INTERCAL - Compiler Language With No Pronounceable Acronym
May 15, 2010 12:43 AM Subscribe
Everything you ever wanted to know about history's most abusive programming language. INTERCAL: Its history, reference manual and a style guide.
The style guide made me laugh. Then I cried. Then I laughed some more. But mostly I just cried.
posted by threetoed at 1:14 AM on May 15, 2010
posted by threetoed at 1:14 AM on May 15, 2010
history's most abusive programming language
I dunno, what about something like Malbolge?
The first "Hello, world!" program written in it was produced by a Lisp program using a local beam search of the space of all possible programs.
!?!
posted by juv3nal at 1:39 AM on May 15, 2010 [3 favorites]
I dunno, what about something like Malbolge?
The first "Hello, world!" program written in it was produced by a Lisp program using a local beam search of the space of all possible programs.
!?!
posted by juv3nal at 1:39 AM on May 15, 2010 [3 favorites]
Intercal is great, but I think Malbolge is the hardest programming language, shown by the fact that the first working program (a form of Hello World) was written only after two years, and was discovered by a machine, not a human. Befunge has fun-looking programs. If you aren't tired of LOLmemes, there's always LOLCODE.
posted by Hello Dad, I'm in Jail at 1:50 AM on May 15, 2010
posted by Hello Dad, I'm in Jail at 1:50 AM on May 15, 2010
That first bit about making the language as cryptic as possible reminds me of the CNC code my machines at work run on. The programs themselves are actually very, very simple once you can read them, but they look like absolute gibberish compared to just about anything else.
For example:
G20 G90
T101 M6
M3 S2000 M8
G0 Z-100
That little program is a great way to make a mess by spraying coolant everywhere and will then cause most machines to crash like a motherfucker.
posted by TrialByMedia at 2:20 AM on May 15, 2010 [6 favorites]
For example:
G20 G90
T101 M6
M3 S2000 M8
G0 Z-100
That little program is a great way to make a mess by spraying coolant everywhere and will then cause most machines to crash like a motherfucker.
posted by TrialByMedia at 2:20 AM on May 15, 2010 [6 favorites]
And by crash, I don't mean computer crash. I mean running a tool into the bottom of the machine at really high speed.
posted by TrialByMedia at 2:21 AM on May 15, 2010 [3 favorites]
posted by TrialByMedia at 2:21 AM on May 15, 2010 [3 favorites]
You missed the most important INTERCAL implementation of all, CLC-INTERCAL.
CLC-INTERCAL was first released as an April fool joke on April 1st, 1999. The idea behind the release was to provide a new INTERCAL compiler which could be used as a test-bed for new language ideas, provided one could justify such ideas with the fundamental INTERCAL philosophy of "doing things differently".
It supports a whole bunch of language extensions including system calls, networking, a unique model of object-oriented programming via Classes and Lectures, Quantum INTERCAL, and the ability to treat the compiler as a first-class object and overload it with new grammars -- thus making it potentially as powerful as Perl 6 (but much less friendly).
I have reason to believe that Claudio has also written a web server in INTERCAL ...
posted by cstross at 2:38 AM on May 15, 2010
CLC-INTERCAL was first released as an April fool joke on April 1st, 1999. The idea behind the release was to provide a new INTERCAL compiler which could be used as a test-bed for new language ideas, provided one could justify such ideas with the fundamental INTERCAL philosophy of "doing things differently".
It supports a whole bunch of language extensions including system calls, networking, a unique model of object-oriented programming via Classes and Lectures, Quantum INTERCAL, and the ability to treat the compiler as a first-class object and overload it with new grammars -- thus making it potentially as powerful as Perl 6 (but much less friendly).
I have reason to believe that Claudio has also written a web server in INTERCAL ...
posted by cstross at 2:38 AM on May 15, 2010
Of course in this brave new world of multicore processors Intercal comes equipped with all the native support for threading that a programmer yearning for scalability could ask for:
posted by nfg at 2:40 AM on May 15, 2010
(100) PLEASE NOTE: Send the LSB of .1 PLEASE STASH .2 DO .2 <>
posted by nfg at 2:40 AM on May 15, 2010
Argh my comment got eaten! Clearly puny MeFi comment boxes cannot comprehend the true power of INTERCAL.
posted by nfg at 2:41 AM on May 15, 2010
posted by nfg at 2:41 AM on May 15, 2010
I also submit the rarely used and terribly cruel whitespace.
posted by disillusioned at 2:43 AM on May 15, 2010
posted by disillusioned at 2:43 AM on May 15, 2010
TrialByMedia: is that g-code?
yes, more specifically it's CNC. g-codes are a set of commands within CNC.
posted by TrialByMedia at 3:43 AM on May 15, 2010
yes, more specifically it's CNC. g-codes are a set of commands within CNC.
posted by TrialByMedia at 3:43 AM on May 15, 2010
they look like absolute gibberish compared to just about anything else.
I remember the first time I saw C (having previously only seen BASIC). "Why so many curly braces? And on lines by themselves??"
posted by DU at 3:54 AM on May 15, 2010
I remember the first time I saw C (having previously only seen BASIC). "Why so many curly braces? And on lines by themselves??"
posted by DU at 3:54 AM on May 15, 2010
G20 G90
T101 M6
M3 S2000 M8
G0 Z-100
For those of you following along at home,
Program in inches, Use incremental
Tool change
Spindle on at 2000 rpm, Flood coolant
Tool down 100 inches
posted by atrazine at 5:15 AM on May 15, 2010
T101 M6
M3 S2000 M8
G0 Z-100
For those of you following along at home,
Program in inches, Use incremental
Tool change
Spindle on at 2000 rpm, Flood coolant
Tool down 100 inches
posted by atrazine at 5:15 AM on May 15, 2010
juv3nal: "history's most abusive programming language
I dunno, what about something like Malbolge?
The first "Hello, world!" program written in it was produced by a Lisp program using a local beam search of the space of all possible programs.
!?!"
Yeah, I'd say that any programming language that encrypts its instructions in memory after every execution step would qualify as "abusive".
posted by ArgentCorvid at 6:04 AM on May 15, 2010
I dunno, what about something like Malbolge?
The first "Hello, world!" program written in it was produced by a Lisp program using a local beam search of the space of all possible programs.
!?!"
Yeah, I'd say that any programming language that encrypts its instructions in memory after every execution step would qualify as "abusive".
posted by ArgentCorvid at 6:04 AM on May 15, 2010
The first end user programmable controller designed for weigh scales was the Fargo KB102, followed later by the KB105, which were add-ons that plugged into a Fargo Matrix 2000 ticket printer -- all devices so old even the fabulous GOOG does not seem to know of them. The KB102 was programmed in a delightful little language called Scale Calc, featuring one-letter commands and no true expression evaluator; the assignment statement:
Would only acept two arguments separated by an operator. If you wanted to simply copy a variable into another, you had to add zero to it. Genius.
This was followed ca. 1988 by the Toledo 9360, programmed in a language they called LBase. Single letter commands? Check. Had the hilarious feature that literal numbers and strings could not be inserted in code -- they had to be defined in a master list, so you'd make Y1 "HELLO" and D Y1 would display HELLO on the display. I remember having to upgrade my copy of LBase Toolbox because the original wouldn't work correctly on a PC running faster than 12 MHz. They never did come out with a version that would work in Windows.
But the all time king of scale industry chicken scratch code is GSE macro language, which as the name suggests started out as a system for automatically generating keypresses and eventually became Turing complete, in the process assigning functions to all possible 255 ASCII codes as single-character commands. But wait, there's more! In order to facilitate downloading macro programs over a serial link, the external syntax requires each ASCII macro command to be preceeded by a percent sign % to let the interpreter know to store the command instead of executing it. As a result, a GSE macro program looks like what would happen if your three year old spent an hour pounding on the keyboard.
GSE uses a file of 65536 registers accessed by register number to do EVERYTHING. You cannot rename them. As of the 600 series some of those registers serve more than one purpose depending on what mode you're in (via of course another register) when you read or write them. Here is a real GSE macro from the manual:
It is worth noting that each line ends, as far as the scale is concerned, with the %e; the rest is automatically generated by the listing utility precisely because the actual language is impossible for humans to read (though old school GSE hacks end up memorizing an awful lot of register locations). And the best part? Unlike the Toledo and Fargo Fischer-Price languages, and like the much less cryptic g-code, GSE macro language is still in use.
posted by localroger at 7:16 AM on May 15, 2010 [7 favorites]
L A = B + 3
Would only acept two arguments separated by an operator. If you wanted to simply copy a variable into another, you had to add zero to it. Genius.
This was followed ca. 1988 by the Toledo 9360, programmed in a language they called LBase. Single letter commands? Check. Had the hilarious feature that literal numbers and strings could not be inserted in code -- they had to be defined in a master list, so you'd make Y1 "HELLO" and D Y1 would display HELLO on the display. I remember having to upgrade my copy of LBase Toolbox because the original wouldn't work correctly on a PC running faster than 12 MHz. They never did come out with a version that would work in Windows.
But the all time king of scale industry chicken scratch code is GSE macro language, which as the name suggests started out as a system for automatically generating keypresses and eventually became Turing complete, in the process assigning functions to all possible 255 ASCII codes as single-character commands. But wait, there's more! In order to facilitate downloading macro programs over a serial link, the external syntax requires each ASCII macro command to be preceeded by a percent sign % to let the interpreter know to store the command instead of executing it. As a result, a GSE macro program looks like what would happen if your three year old spent an hour pounding on the keyboard.
GSE uses a file of 65536 registers accessed by register number to do EVERYTHING. You cannot rename them. As of the 600 series some of those registers serve more than one purpose depending on what mode you're in (via of course another register) when you read or write them. Here is a real GSE macro from the manual:
SET SP-1 ACTIVATION POINT TO 100% OF VAR#1 VALUE
5099%s1%e P5099 Setpt 1
5100%s1%e P5100.1 SPTyp Outpt
5110%s0%e P5110.0 Activ Above
5111%s0%e P5111.1 AcDly 0.00
5112%s1%e P5112.X AcMac 1*
5113%s0%e P5113.0 AcMtn Ign’d
5114%s80.1%e P5114.1 ALPar VAR#1
It is worth noting that each line ends, as far as the scale is concerned, with the %e; the rest is automatically generated by the listing utility precisely because the actual language is impossible for humans to read (though old school GSE hacks end up memorizing an awful lot of register locations). And the best part? Unlike the Toledo and Fargo Fischer-Price languages, and like the much less cryptic g-code, GSE macro language is still in use.
posted by localroger at 7:16 AM on May 15, 2010 [7 favorites]
Ahem. INTERCAL still rules!
The following is believed to be an example implementation of the Deutsch algorithm in CLC-INTERCAL with quantum extensions:
posted by cstross at 8:37 AM on May 15, 2010
The following is believed to be an example implementation of the Deutsch algorithm in CLC-INTERCAL with quantum extensions:
DO |1 <>
(It will, however, almost certainly fail due to insufficient politeness.)posted by cstross at 8:37 AM on May 15, 2010
(Reposted, this time with HTML entities for < and >.)
Ahem. INTERCAL still rules!
The following is believed to be an example implementation of the Deutsch algorithm in CLC-INTERCAL with quantum extensions:
posted by cstross at 8:39 AM on May 15, 2010
Ahem. INTERCAL still rules!
The following is believed to be an example implementation of the Deutsch algorithm in CLC-INTERCAL with quantum extensions:
lt;blockquote><code>DO |1 <- #0
DO |2 <- #100$#0
DO TRANSFORM |1
DO TRANSFORM |2
DO (13000) NEXT
DO TRANSFORM |1
DO TRANSFORM |2
DO .1 <- #0
DO QUANTUM |1 .1 <- #1
DO READ OUT .1
(It will, however, almost certainly fail due to insufficient politeness.)posted by cstross at 8:39 AM on May 15, 2010
Aaaagh. (Dies of HTML proofreading embarrassment.)
posted by cstross at 8:40 AM on May 15, 2010 [2 favorites]
posted by cstross at 8:40 AM on May 15, 2010 [2 favorites]
Program in inches, Use incremental
Tool change
Spindle on at 2000 rpm, Flood coolant
Tool down 100 inches
They let you control a machine armed with spinning blades of death with a language with no bounds checking, and then people complain if you walk off the end of a C array.
posted by Dr Dracator at 8:40 AM on May 15, 2010 [2 favorites]
Tool change
Spindle on at 2000 rpm, Flood coolant
Tool down 100 inches
They let you control a machine armed with spinning blades of death with a language with no bounds checking, and then people complain if you walk off the end of a C array.
posted by Dr Dracator at 8:40 AM on May 15, 2010 [2 favorites]
I'm just dying to slip a PHP joke in here. But I'll leave it to someone more clever and flame-retardant than myself.
posted by dubitable at 10:13 AM on May 15, 2010
posted by dubitable at 10:13 AM on May 15, 2010
From that Knuth Intercal code: "DOING (SUX) NEXT SETS ;1 <- ;1-;2 AND TRACKS OVERFLOW".
Man, that's not the only thing doing sux next sets.
posted by kenko at 11:41 AM on May 15, 2010 [2 favorites]
Man, that's not the only thing doing sux next sets.
posted by kenko at 11:41 AM on May 15, 2010 [2 favorites]
G0 Z-100
man, if i had a nickel for every time i've done that...
posted by fallacy of the beard at 11:55 AM on May 15, 2010
man, if i had a nickel for every time i've done that...
posted by fallacy of the beard at 11:55 AM on May 15, 2010
G90 is absolute coordinates on my machine.
Yeah, G91 is the standard incremental code. Either way, doing a negative rapid travel of that distance is bad news.
posted by TrialByMedia at 1:56 PM on May 15, 2010
Yeah, G91 is the standard incremental code. Either way, doing a negative rapid travel of that distance is bad news.
posted by TrialByMedia at 1:56 PM on May 15, 2010
I won't jump in the argument over horrible languages, but my favorite horrible language feature is of course the "COME FROM" statement (which I think originated in INTERCAL). Genius.
posted by madmethods at 3:00 PM on May 15, 2010
posted by madmethods at 3:00 PM on May 15, 2010
Gcode is just like LOGO, only where the turtle can break in half at 4800RPM and get flung halfway through someone's skull. Also, it's less standard.
(Oh please, let this thread turn into a gcode whinefest. I could use the catharsis.)
posted by phooky at 3:50 PM on May 15, 2010 [4 favorites]
(Oh please, let this thread turn into a gcode whinefest. I could use the catharsis.)
posted by phooky at 3:50 PM on May 15, 2010 [4 favorites]
Either way, doing a negative rapid travel of that distance is bad news.
You just need need a larger machine, liked Scaled Composites' 2.5m tall gantry mill.
posted by autopilot at 3:59 PM on May 15, 2010
You just need need a larger machine, liked Scaled Composites' 2.5m tall gantry mill.
posted by autopilot at 3:59 PM on May 15, 2010
I had to do some XSLT at work recently. I can only but imagine it was born as a bet between programmers about whether you could get your boss to require using an esoteric programming language if you called it enterprise-ready.
posted by Zed at 4:11 PM on May 15, 2010 [2 favorites]
posted by Zed at 4:11 PM on May 15, 2010 [2 favorites]
Anything computer-based associated with a guy named Jimbo CAN'T be good.
Never eat at a place called Mom's, never play cards with a guy named Doc, and never marry a woman named Cookie.
posted by StickyCarpet at 4:27 PM on May 15, 2010
Never eat at a place called Mom's, never play cards with a guy named Doc, and never marry a woman named Cookie.
posted by StickyCarpet at 4:27 PM on May 15, 2010
history's most abusive programming language
I would say Brainfuck is more abusive, since its syntax is all symbols (like <> ' =) with no whitespace. At least you can sort of read Intercal.
posted by DecemberBoy at 4:35 PM on May 15, 2010
I would say Brainfuck is more abusive, since its syntax is all symbols (like <> ' =) with no whitespace. At least you can sort of read Intercal.
posted by DecemberBoy at 4:35 PM on May 15, 2010
Gcode is just like LOGO, only where the turtle can break in half at 4800RPM and get flung halfway through someone's skull.
And this makes it not the greatest programming language ever because...?
LOGO that can kill people is the awesomest thing I've heard of today, that's for sure.
posted by DecemberBoy at 4:42 PM on May 15, 2010 [1 favorite]
And this makes it not the greatest programming language ever because...?
LOGO that can kill people is the awesomest thing I've heard of today, that's for sure.
posted by DecemberBoy at 4:42 PM on May 15, 2010 [1 favorite]
And here's a language (Whitespace) that's all whitespace, so you can't even see it. See (or don't) this example program.
For all you know, there's a whitespace program between these two paragraphs.
posted by Hello Dad, I'm in Jail at 4:55 PM on May 15, 2010 [1 favorite]
For all you know, there's a whitespace program between these two paragraphs.
posted by Hello Dad, I'm in Jail at 4:55 PM on May 15, 2010 [1 favorite]
You can also program automatically in whitespace using Acme::Bleach. For really clean Perl programs.
posted by autopilot at 5:36 PM on May 15, 2010
posted by autopilot at 5:36 PM on May 15, 2010
I was quite fond of Befunge for a while and even wrote a visual interpreter for it (for MacOS System 6, god help me) which has since been lost to time. The neat thing about it (Befunge, not my interperter) was that it used a two-dimensional memory space along with a stack, and your program head had a velocity. This was also my introduction to programming with Curses, which as you can imagine was an invaluable skill to have on a Mac. I experimented for a short time with having instructions which would spawn new dimensions, but it all got pretty hard to actually write programs in after a short while.
I tried to get into Intercal for a while when my interest in esoteric programming languages was at its peak, but I could never quite work up any enthusiasm for it. It seems like it's full of in-jokes for FORTRAN programmers or something.
posted by whir at 8:14 PM on May 15, 2010
I tried to get into Intercal for a while when my interest in esoteric programming languages was at its peak, but I could never quite work up any enthusiasm for it. It seems like it's full of in-jokes for FORTRAN programmers or something.
posted by whir at 8:14 PM on May 15, 2010
i didn't have patience to get very far with trying to understand the language itself, but the attempt took me down a rather fun internet rabbit hole of exploring lateral thinking and games with mutable or concealed rules (via the first link's casual reference to Mornington Crescent).
posted by fallacy of the beard at 9:37 AM on May 16, 2010
posted by fallacy of the beard at 9:37 AM on May 16, 2010
The most recent issue of Cabinet magazine had a brief history of Intercal that included images from the original documentaiton. Doesn't seem to be online, though.
I've always been a fan of languages that use non-text source code, such as Piet. I created one myself a while back, Velato.
posted by rottytooth at 10:33 AM on May 16, 2010 [1 favorite]
I've always been a fan of languages that use non-text source code, such as Piet. I created one myself a while back, Velato.
posted by rottytooth at 10:33 AM on May 16, 2010 [1 favorite]
Yes, I should have credited Cabinet with turning me on to INTERCAL. I actually assumed it was a joke article - I went looking for websites to confirm or deny my hunch and found out it had been a real project.
posted by serazin at 4:26 PM on May 16, 2010
posted by serazin at 4:26 PM on May 16, 2010
Favorite bit from the Wikipedia article:
A Sieve of Eratosthenes benchmark, computing all prime numbers less than 65536, was tested on a Sun SPARCStation-1. In C, it took less than half a second; the same program in INTERCAL took over seventeen hours.posted by Wolfdog at 4:58 AM on May 17, 2010
« Older the moving finger having writ | The Face of a Joke on the Body of a Truth Newer »
This thread has been archived and is closed to new comments
And I think CLWNPA (pronounced Clown-Pa) is a very pronounceable acronym.
posted by oneswellfoop at 12:47 AM on May 15, 2010