From: Eric S. Raymond Date: Thu, 11 Jul 2002 23:36:49 +0000 (-0400) Subject: Tidy cleanup. X-Git-Tag: 0.21~11 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=d777702d90ab76f35311d01a745405129bd7b8d9;p=intercal.git Tidy cleanup. --- diff --git a/website/paper.html b/website/paper.html index b5fdd22..0fbbdd4 100644 --- a/website/paper.html +++ b/website/paper.html @@ -8,18 +8,19 @@


-
- +

+Not Funny! Abstraction and Modularity in INTERCAL
D. Alexander Garrett
CS-538: Theory and Design of Programming Languages.
-

+

+

"And remember, when you look into the pit, the pit looks back into you."
         -- Anonymous INTERCAL hacker -

- +

+

On May 26, 1972, two students at Princeton University took the programming community if not by storm, at least by mild sprinkle when they released INTERCAL[1]. They were summarily @@ -28,7 +29,8 @@ where they refine the finer points of the language on political prisoners. This is, of course, strictly against the Geneva Convention, but as you will see, INTERCAL strives to be an unconventional language. -

+

+

Eighteen years later, while suffering from a paralytic attack of ennui, the Mad Malvernite J. Lapin perpetrated a hack of untold consequences upon the world by rereleasing INTERCAL under UN*X, which @@ -39,7 +41,8 @@ the rerelease of INTERCAL heralds the time when the Old Ones shall wake from their sleep deep beneath the sea and shall rule over the earth for 2^32 years, befuddling men's minds and forcing them to use buggy overpriced software[2]. -

+

+

But I'm not here to talk about eschatology, I'm here to talk about modularity and abstraction. Well, believe me, you couldn't have designed a language more abstract than INTERCAL. To begin with, one of @@ -51,9 +54,9 @@ hiding any possible information, so your employer couldn't fire you and hire some junior birdman mailboy to maintain your code. INTERCAL doesn't only hide information it actively distorts it. For example, the easiest way to store the value of 65536 in a 32-bit INTERCAL -variable is:

DO:1<-#0$#256 -
-

+variable is:

+
DO:1<-#0$#256
+

If that's the easiest way, imagine the power at your fingertips if you're trying to be deliberately obscure! To further demonstrate, if you were to write a program in INTERCAL which reads in 32-bit unsigned @@ -71,7 +74,8 @@ cleverly hidden that not even Sparky the Wonder Dog could find it, and she can find gravy in a cesspool! This allows the programmer to take even more Quake-breaks, as management doesn't dare fire such an important asset to the company. -

+

+

In addition to information hiding, multinational support is also an important part of abstraction. As information exchange causes the globe to shrink,[4] it's important that @@ -89,7 +93,8 @@ accept the value of OH for zero and NINER for 9. Recognising that INTERCAL would have multicultural scope, the implementors implemented number support for input digits in Sanskrit, Basque, Tagalog, Classical Nahuatl, Georgian, Kwakiutl, and Volapuk. -

+

+

Until the new INTERCAL compiler with better RYM[6] access comes out, the old compiler has no way of knowing which language you are familiar with and thus it doesn't know @@ -99,7 +104,8 @@ producing its output in Roman numerals, under the assumption that when Rome was at the height of its strength, half the world was under its dominion, so the comprehension of Roman numerals is part of our racial memory. -

+

+

In addition to being a versatile and truly international language, INTERCAL is also very simple. For example, in most languages the logical operators AND, OR, and XOR are binary, i.e., they require two @@ -112,7 +118,8 @@ perform the required operation on adjacent bits in the variable. Thus, #&77 (binary = 1001101) is binary 0000000000000100 = 4, #V77 is binary 1000000001101111 = 32879, and #?77 is binary 1000000001101011 = 32875.[9] -

+

+

Ever since Dijkstra's seminal paper "Use of GOTO Considered Harmful" was published in Communications of the ACM, there has been a hue and cry against the use of GOTO. INTERCAL recognises the importance of @@ -120,22 +127,24 @@ structured programming and rebukes the GOTO, saying retro me iad[10]. In fact, the implementors of INTERCAL feel so strongly about the poor programming habits that GOTO encourages, that they implemented GOTO's opposite number, COME -FROM. Thus if you had a program which looked similar to below: -

-(1) PLEASE
-
+FROM. Thus if you had a program which looked similar to below:

+
+(1) PLEASE <YOUR STATEMENT HERE>
+
.
.
. -
+
(2) DO COME FROM (1) -
+
+

anytime the program executed the statement at label 1, it would immediately jump to the statement at label 2 without executing any of the intervening statements. This is very difficult to follow and requires considerable expertise to use correctly and makes the code almost impossible to follow. That's right, baby -- information hiding. -

+

+

One of the big changes to C that Stroustroup made when he created C++ was the use of const data types, which kept the programmer from inadvertently changing the values of variables which shouldn't.[13] -

+

+

INTERCAL is not even vaguely modular and nothing I can say would -persuade you that it was.

INTERCAL is a very dynamic, constantly +persuade you that it was.

+

INTERCAL is a very dynamic, constantly evolving[14] language which shows much promise for future generations of programmers. With languages like Visual Basic and Java out there which allow people who can hardly tie their @@ -175,24 +186,25 @@ then compiles that. The INTERCAL compiler, itself, is written in C and is easily portable. There's even an INTERCAL major mode for emacs which will help you maintain the proper balance of PLEASE, DO, and PLEASE DO statements.[15] -

-References
-

- THE INTERCAL PROGRAMMING LANGUAGE REVISED REFERENCE MANUAL, Woods, +

+

+References
+

+THE INTERCAL PROGRAMMING LANGUAGE REVISED REFERENCE MANUAL, Woods, Donald R. and Lyon, James M. Revised by Howell, Louis and Raymond, Eric S.
My pineal gland. -
-

-Afterword
-

+
+

+Afterword
+

The author of this paper is currently residing in a home for the criminally insane after attempting to rewrite the Linux kernel in Object Disoriented INTERCAL. -
+




- + [1] which stands for "Compiler Language With No Pronouncable Acronym", obviously.
[2] There's a small sect of Billyites who, pointing to Microsoft, claim that this has already happened.
[3]These examples shamelessly cribbed from THE INTERCAL PROGRAMMING LANGUAGE REVISED REFERENCE MANUAL, page 2.
@@ -210,7 +222,7 @@ Disoriented INTERCAL. [15]Confused? Good. Information hiding.
-
+