3 ms·
Are these meant to just be incomprehensible, or is there some translation possible? Haven't heard the song for awhile.
by bear8642 3y ago
Are these meant to just be incomprehensible, or is there some translation possible?
Haven't heard the song for awhile.
- DonHopkins 3y agoTECO really is that incomprehensible. I don't understand it myself, but here's another example that I remember seeing in Marvin Minsky's home directory on MIT-AI, which I'm glad I asked about years ago on HN, because Harold Ancel just happened to save a copy of it: https://news.ycombinator.com/item?id=10161002 https://news.ycombinator.com/item?id=10161002 DonHopkins on Sept 2, 2015 | parent | context | favorite | on: The most obsolete infrastructure money could buy –... I remember running across a Turing machine emulator implemented in TECO in Minsky's home directory that I'd REALLY love to get ahold of. hga on Sept 2, 2015 [–] Ask and yea shall receive: MSG: APL 1 DISTRIB: *BBOARD EXPIRES: 03/17/81 23:08:54 MINSKY@MIT-MC 03/11/81 23:08:54 Re: too-short programs APL is compact, I suppose. So is TECO. When I wrote the following Universal Turing Machine, which works, I actually understood it. [ I've interpolated the non-printing characters as displayed by (Gnu) EMACS, escape is ^], ^^ is one character, as is \356: ] i1Aul qq+^^0:iqm^[29iiq\356y0L1 00L1 11L2 A1L1 y0L1 0yR2 1AR2 AyR6 yyL3 00L0 1AL3 A1L4 yyL4 0yR5 11L7 A1L4 yyR5 0yL3 1AR5 A1R5 yyR6 0AL3 1AR6 A1R6 y0R7 0yR6 11R7 A0R2 ^[j<sR^[;-d-2ciql-^^^[ci"ed^^^[cii^[ciuq'^[> j<sL^[;-d-2ciql-^^^[ci"ed^^^[cii-2c^[ciuq'^[>jxblx1lx2lx3lx4lx5lx6lx7hk iyyAyyAyy^[32<i0^[>ji110101110000010011011^[ 1uq<htmbqq=> I do not advise attempting to understand this code, which is almost as bad as that for the Universal Turing machine. ADDED: or http://ancell-ent.com/share/minsky-TECO-turing-machine.txt http://ancell-ent.com/share/minsky-TECO-turing-machine.txt Please ack receipt of this and/or send me email (in my HN info); for others, note this is ITS TECO, which I was told was by far the most powerful version of it (fortunately, by the time I showed up learning it was no longer really necessary). DonHopkins on Sept 3, 2015 | parent [–] OOP ACK! It was a shot in the dark, but I am SO GLAD I asked!!! Thank you Harold! It looks just like I remember. ;) https://news.ycombinator.com/item?id=33356932 https://news.ycombinator.com/item?id=33356932 >I deeply appreciate and am greatly privileged to benefit from the MIT AI Lab's "Tourist Policy" and general openness, generosity, and encouragement of education, which allowed me to use the lab's PDP-10s over the ARPANET as a high school student. [...]
- DonHopkins 3y agoI asked GPT-4 to take a whack at it: ChatGPT: I see that you've posted a TECO program, a Universal Turing Machine emulator, from Marvin Minsky's directory, shared via Hacker News. TECO (Text Editor and COrrector) is a text editor that was very popular and widely used in the 1960s and 1970s, especially on DEC computers. It's an extremely powerful and flexible editor, but also notoriously difficult to understand and use. In fact, it's often used as an example of a "write-only" language, because its programs can be extremely hard to read and understand, even for people who are familiar with TECO. This TECO program is indeed cryptic. Its syntax involves lots of non-alphanumeric symbols and control characters, which are typical of TECO. Reading and understanding this code would require a deep understanding of TECO's syntax and commands. TECO code is composed of commands that are read and executed one after the other. Each command can have an optional numeric argument, and can also have another command as an argument. This allows for complex, powerful operations, but also makes the code difficult to read. If you're interested in understanding how this TECO program works, I'd recommend starting by learning more about TECO's syntax and commands. Be aware, though, that this is not a trivial task; even experienced programmers often find TECO challenging to understand. As the Hacker News comments note, this program is written in ITS TECO, a version of TECO used on the Incompatible Timesharing System (ITS) developed at MIT. This version of TECO has some differences from other versions, so you would need to find documentation specifically for ITS TECO in order to fully understand the program. User: How much of it can you understand? Explain what you can. ChatGPT: I must point out that while I'm able to provide explanations on many topics, TECO is one of the most cryptic and complex programming languages ever created. TECO programs are notoriously difficult to read, and even people who are experienced with TECO often struggle to understand non-trivial programs written in it. Therefore, please take the following explanation with a grain of salt as it may be simplified or not entirely accurate due to the complexity of TECO. Here's a breakdown of a few commands, as far as I can understand: i1Aul qq+^^0:iqm^[29iiq\356y0L1 00L1 11L2 A1L1: This line initializes several variables. The i command inserts text, A assigns the value of the last text string searched for to a variable (qq in this case), ul is probably used to move the cursor to the left. There are other commands to move around the buffer and do arithmetic operations. The line ends with assigning a string to variable qy and the insertion of several pairs of numbers and letters. y0L1 0yR2 1AR2 AyR6 yyL3 00L0 1AL3 A1L4 yyL4 0yR5 11L7 A1L4...: This line continues with similar commands, modifying the state of the buffer and several variables. ^[j<sR^[;-d-2ciql-^^^[ci"ed^^^[cii^[ciuq'^[>: This part seems to be a conditional jump loop, a fundamental structure in TECO. The j command moves to the beginning of the buffer. The < and > delimit a loop, and s searches for a string. The ; command conditionally terminates the loop. jxblx1lx2lx3lx4lx5lx6lx7hk: This line seems to be doing various operations on buffers, possibly saving or loading state. x executes a macro, l loads a file into a buffer, h moves to the top of the current buffer, and k kills the current buffer. iyyAyyAyy^[32<i0^[>ji110101110000010011011^[ 1uq<htmbqq=>: This line again modifies buffers and variables and includes another loop structure. The long string of numbers seems to be data for the Turing machine, and the uq command updates a Q-register. Please note that this is a high-level interpretation and might contain inaccuracies. Fully understanding this program would require a deep understanding of TECO and possibly access to its original documentation. As such, this program is a great example of the complexity and cryptic nature of TECO.
- DonHopkins 3y agoHere's what GPT-4 had to say about the TECO code in the song: Explain every detail of this TECO code that you can, and speculate on what it does. [1:i\*^Yu14<q1&377.f"nir'q1/400.u1>^[[8 .-z(1702117120m81869946983m8w660873337m8w1466458484m8 )+z,.f^@fx\*[0:ft^]0^[w^\ [1:i\*^Yu16<q1&77.+32iq1f"l#-1/100.#-1&7777777777.'"#/100.'u1r>6c^[[6 .(675041640067.m6w416300715765.m6w004445675045.m6 455445440046.m6w576200535144.m6w370000000000.m6),.fx\*[0:ft^]0^[w^\ ChatGPT: TECO (Text Editor and COrrector) is a primitive text editor from the early days of computer programming. TECO code is notoriously difficult to read, as it's a sort of "write-only" language with many commands being single punctuation characters and having different meanings depending on context. Its language is an esoteric one, with little resemblance to most modern programming languages. Let's try to break down the given TECO code line by line: [1:i\*^Yu14<q1&377.f"nir'q1/400.u1>^[[8 Here, [1 is saving the current buffer's contents to Q-register 1 (a kind of temporary storage). i\*^Y is inserting the character with ASCII code 25 (^Y stands for decimal 25, \* is for output). u14 is storing the value 14 in Q-register 4. <q1&377.f"nir'q1/400.u1> is a conditional loop that executes while the value in Q-register 1 (the contents of the buffer) ANDed with 377 (octal, or 255 decimal) is not 0. Inside the loop, it's reading one character from the buffer (.f), if it's not end of file ("n), it's returning the pointer back to the character just read (ir'), otherwise it's storing the value of Q-register 1 divided by 400 in Q-register 1 (q1/400.u1). >^[[8 at the end is somewhat unclear without context. ^[[ is often a prefix for terminal control sequences (also called escape sequences), but 8 doesn't correspond to a typical terminal control sequence. This might be a TECO-specific sequence. .-z(1702117120m81869946983m8w660873337m8w1466458484m8)+z,.f^@fx\*[0:ft^]0^[w^\ Here, .-z( to )+z, is calculating a range in the buffer. .-z is the difference between the current pointer position and the end of the buffer, and z is the length of the buffer. 1702117120m81869946983m8w660873337m8w1466458484m8 are arithmetic operations involving multiply (m) and bitwise OR (w), but without the context it's hard to say exactly what this line is doing. .f^@ reads one character from the buffer and replaces it with ASCII null (^@ stands for decimal 0, and f is for fetching). fx exchanges the Q-register and the buffer, meaning that the contents of the buffer are now in the Q-register and the previous Q-register contents are now in the buffer. \*[0:ft^]0^[w^\ are performing a series of operations involving Q-register 0, fetching and type commands but, without context, it's hard to say exactly what this is doing. [1:i\*^Yu16<q1&77.+32iq1f"l#-1/100.#-1&7777777777.'"#/100.'u1r>6c^[[6 This is similar to the first line but with a few differences. u16 is storing the value 16 in Q-register 6. <q1&77.+32i is a conditional loop that executes while the value in Q-register 1 ANDed with 77 (octal, or 63 decimal) is not 0. Inside the loop, it's adding 32 to the character in the buffer, essentially converting uppercase ASCII characters to lowercase. q1f"l#-1/100.#-1&7777777777.'"#/100.'u1r is a series of commands inside the loop. If the fetched character is less than -1, it's performing a series of operations involving division and bitwise AND, and storing the result in Q-register 1. The exact purpose of these operations isn't clear without context. >6c^[[6 at the end is also unclear. It could be storing the character with ASCII code 6 in Q-register 6, but without context, it's hard to say for sure. .(675041640067.m6w416300715765.m6w004445675045.m6455444046.m6w576200535144.m6w370000000000.m6),.fx\*[0:ft^]0^[w^\\ Similar to the second line, this line is performing a series of arithmetic operations with the contents of Q-register 6. After that, it's again exchanging the buffer with a Q-register (presumably the Q-register with the result of the arithmetic operations). In terms of what this code does, it's difficult to determine without context. It's performing a series of operations on the contents of the buffer, and these operations involve arithmetic, bitwise, and possibly character manipulation. But the exact purpose of these operations isn't clear from the code alone. For example, we can see that the code is interacting with the contents of the buffer and Q-registers, but it's not clear what these contents are or what the desired outcome is. TECO's complex syntax and the lack of modern programming conventions makes it very difficult to determine what a specific piece of TECO code does without additional context or comments.