As a layperson reading about some branches of mathematics, it often seems like mathematicians are just people who really like to create and solve puzzles. And, knowing that computer science shares a lot of its fundamentals with mathematics, we can assume that most computer scientists are also puzzle-solvers as well. This latest project from [tom7] shows off his puzzle creating and solving skills with a readable file which is also a paper, which is also a compiler for C programs, which can also play music.
[tom7] started off with the instruction set for the Intel 8086 processor. Of the instructions available, he wanted to use only instructions which are also readable in a text file. This limits him dramatically in what this file will be able to execute, but also sets up the puzzle. He walks through each of the hurdles he found by only using instructions that also code to text, including limited memory space, no obvious way of exiting the program once it was complete, not being able to jump backward in the program (i.e. looping), and a flurry of other issues that come up once the instruction set is limited in this way.
The result is a sort of C compiler which might not be the most efficient way of executing programs, but it sure is the most effective way of showing off [tom7]’s PhD in computer science. As a bonus, the file can also play an antiquated type of sound file due to one of the available instructions being a call for the processor to interact with I/O. If you want to learn a little bit more about compilers, you can check out a primer we have for investigating some of their features.
Thanks to [Greg] for the tip!
I’m a mathematician who took courses on mathematical logic and the philosophy of mathematics. You’re not wrong.
This is wonderful but there must be some trick needed to format the text – fixed line length or something, I can see that the info is there but it’s all jumbled up
If you receive this paper in a raw text file, it may be difficult to
read because of its two-column layout. It should be typeset in a monospace font on pages 160 characters wide and 128 characters tall
(this is 4x the typical density of a line printer from the 1980s or
1990s). Many pages, including parts of this first one, have cropping
marks outside the text body to make the correct alignment easier to
verify.
ah, ok thanks. Do you know if there’s a PDF or similar pre-formatted version?
It is the second link on the website.
http://tom7.org/abc/paper.pdf
Ah, i’m dumb, thanks
Follow the link in this article, then the link “paper” on Tom’s page, it’s a PDF.
The TXT file being here http://tom7.org/abc/paper.txt
small exert
“eggs are okay, and then they bring you an egg, but that egg positive number.”
The part I like is that at the end of the file he lists the number of times of each character occurs in the file… including the listing of the number of times of each character! Very nice.
That’s an old trick. “This sentence contains seven letter “e”s, fourteen “s”s, 4 “l”s and a “w”. Except accurate. There are sentences like that which are accurate, self-descriptive I think.
Reminds me of a pair of the great “Metamagical Themas”, from Scientific American: On Self-Referential Sentences
(January, 1981) and Self-Referential Sentences: A Follow-Up (January, 1982).
https://archive.org/stream/MetamagicalThemas/Metamagical%20Themas,%20Hofstadter_djvu.txt
There was even a reader’s letter, in a later number, describing the “single purpouse computer” he designed and built at home (100 % discreet logic, IIRC) to solve the puzzle the article posed to the readers.
I’ll search a little more, to provide the links to the original articles.
Enjoy,
Best regards,
A/P Daniel F. Larrosa
This sounds like diverging Godel would do if he were alive.
*something Godel would do
I dunno, I sorta liked diverging Godels in this context.
Lol! I thought the same when I considered correcting it.
This sentence is unprovably TRUE.
This is the most geekily wonderful thing I’ve read in a long time. The PDF is at http://tom7.org/abc/paper.pdf
Has bill gates got slippers on?
Is it just me, or are the first two bytes in the wrong order?