A programmer's blog collecting software folklore, Turing-complete accidents, odd bug stories, and notes on programming languages.
HN commenters call its software lore classic, such as the crash cows and 500-mile email stories, and one shares similar blogging insights.
TeX is not a "language"; it's just a tool for typesetting when you want to go the last mile of achieving book-quality printing. The fact that it turns out to be possible to (ab)use its macros (originally designed merely to save the user some typing effort) to do "programming" shows only that it's easy for things to become "accidentally Turing complete" [1], and the cleverness/perversity of its user community.
> TeX was designed for typesetting, not for programming; so it is at best “weird” when considered as a programming language. — DEK, Digital Typography, page 235
> In some sense I put in many of TeX's programming features only after kicking and screaming. — DEK, Digital Typography, page 648
> So TeX is a programming language but I had to put in those features kicking and screaming. […] In a way I resent having every language be universal because they’ll be universal in a different way. […] I was really thinking of TeX as something that the more programming it had in it, the less it was doing its real mission of typesetting. When I put in the calculation of prime numbers into the TeX manual I was not thinking of this as the way to use TeX. I was thinking, “Oh, by the way, look at this: dogs can stand on their hind legs and TeX can calculate prime numbers.” — DEK, interviewed in Peter Seibel's Coders at Work
> Michael Plass, who was Don's student and worked with Don on TeX, told me once that "Don tried very hard not to make TeX a programming language. Unfortunately, he…
There's... a lot of wrong stuff here. Tackling some of the highlights:
> ASCII code pages map the upper 128 positions (0x7F:0xFF) of the ASCII byte. Each page holds a different character set. This is one way internationalisation can be achieved.
This is at best a poor explanation, and at worst outright wrong. The actual key thing is charset--there's a wide variety of charsets. Because ASCII is an inherently 7-bit charset, a lot of charsets were created by setting the first 128 characters to be ASCII and mapping in different characters for these charsets. IBM (I believe) came up with the term 'code page' to refer to the different character sets they came up with.
> Unicode provides a unique code for every character, regardless of the language.
That's not really true. Unicode keeps track of "code points". Several code points may together make up what we think of a character--consider that something like à can consist of either a precomposed "à" code point or an "a" + "` diacritic" sequence. Thus there's an entire concern about Unicode normalization that a lot of people prefer to sweep under the rug.
> When creating a new file using touch, your computer will interpret that file as binary file.
Okay, what's happening here is you've got a command here, the file command, whose entire job is to look at a file and guess what the contents of that file is. For text files, part of that guessing process often involves guessing what the character encoding of the file is. That…
> if the universe is that simple does that imply a complex runtime?
There is a tradeoff to be made between (algorithmic) information specified as a program/software versus an interpreter/hardware http://www.hutter1.net/publ/ctoex.pdf
However, all we really need is a Turing-complete runtime, which can be very simple, e.g. https://en.wikipedia.org/wiki/Rule_110 https://beza1e1.tuxen.de/articles/accidentally_turing_complete.html
One easy way to make our universe is to run all possible programs (even if you don't think our universe is computable, we would still end up running simulations which are indistinguishable to arbitrary precision). We can even apply an anthropic argument to this: that the vast majority of programs are not universes conducive to containing life, but we must necessarily find ourselves in one which is.
https://www.kurzweilai.net/in-the-beginning-was-the-code
Well, famously the halting problem is undecidable.
As a consequence (via Rice's theorem [1]), all nontrivial semantic properties of computer programs are undecidable. That is, there's no algorithm that can answer "does program x have property y?" for all programs, although obviously it's possible to prove propositions about many individual programs.
Because Turing completeness is a fairly low bar to clear, there are infamously a lot of systems that were not designed (or indeed designed not) to be Turing-complete but nevertheless turned out to be so [2]. As such, things like the Java type system is undecidable – in principle there exist Java programs that the compiler can neither reject nor accept.
[1] https://en.wikipedia.org/wiki/Rice%27s_theorem
[2] https://beza1e1.tuxen.de/articles/accidentally_turing_complete.html
The ol all requirements up front -> design -> implement that people classically associate with waterfall came from an infographic on how not to do waterfall.
Actual waterfall looks very much like actual agile, in that it is designed around iteration loops. The primary difference is that waterfall prescribed steps in the iteration process, and agile is just a set of principles in a manifesto.
Edit: reference: https://beza1e1.tuxen.de/waterfall.html
TLDR: the original impetus for waterfall is basically what we call agile today.
Someone copy-pasted a random chart from a paper (one the paper specifically said was too problematic) into a DOD process spec, that turned into a standard because the DOD loves to standardize everything, and big companies all adopted the fundamentally flawed approach and called it waterfall.
> That characterization isn't enough to distinguish a Turing complete interpreter from something that trivially manipulates an input datum. An interpreter is just a program containing code paths, which are activated in response to the input (the interpreted code).
It is surprisingly simple to make an interpreter that is "accidentally" Turing complete (this IMHO so often happens by accident that I love to say that if an interpreter is not "obviously" more restricted than a Turing machine, it probably is Turing complete).
This is not just my opinion - there lots of pages in the internet of things that are "accidentally" Turing complete, for example:
http://beza1e1.tuxen.de/articles/accidentally_turing_complete.html
https://www.gwern.net/Turing-complete