In the spirit of "fun polls"... What is your favorite esoteric programming language?
Guidelines:
- One language per response, upvote to echo others' responses
- If you can, describe what makes it your favorite
- Provide a code sample (if practical)
See Also:
- Is it worth it to learn an esoteric programming language?
- What is the strangest programming language you have used?
- Most interesting non-mainstream language?
I thought it might be nice to summarize the responses, because although there are other lists (see comments below), it turns out that this list resulted in some (arguably) non-esoteric languages getting in. Also, to my knowledge none of the other lists is ranked based on votes, but these of course are. Note that only responses with at least 1 upvote are listed below.
Responses by Votes
- LOLCODE
- Brain**
- Whitespace
- Ook!
- APL
- Perl
- The Shakespeare Programming Language
- HOtMEfSPRIbNG
- Scratch
- Prolog
- Lisp
- Piet
- LabVIEW
- F#
- Bash
- INTERCAL
- Subtext
- K Language
- Haskell
- REXX
- BRIEF scripting
- FORTH
- java2k
- Iota
-
Perl.
You can write the most efficient (not necessarily readable) expressions.
wcm : No down vote, but curious if you think Perl is really esoteric.David Arno : Perl is incredibly esoteric. It is the only truly "write only" language out there.Lance Roberts : It's esoteric for me for two reasons: 1) I only get to use it a little, so I get to relearn it every time I need it, 2) It seems to be the only language I've really found that was built for minimalist programmers.Bruce Alderman : To someone who doesn't know the language, ANY programming language can appear unreadable. That's not what esoteric means, though.Ant P. : And there's also Perl's read-only complement: PHP. With function names like "htmlspecialchars_decode", you can probably guess why it's impossible to write without heading to the function reference every 15 seconds.fortran : @aardvark any language but Python! xD -
Definitely Whitespace which I like because it's clever and seems like it almost has to be a hoax, but it's not. Code sample not really viable in this forum, I think ;)
jmein : We had to do a Hello World program and a couple others small ones for this language in my programming languages class. It was definitely an eye opening experience. Would not want to use it for much more than Hello World though -
Lisp. It's not esoteric really, but it does bend my mind when I use it, and it's functional enough as a language that I don't feel that I'm playing with a pointless toy.
Tirpen : Lisp is purity and beauty. Compared to Lisp all _other_ languages are esoteric. -
Haskell. I just like it for no good reason :)
Mike Miller : While I love Haskell, I don't think that all functional programming languages are necessarily esoteric.Sam : Mike, "esoteric" means something like "known by only a few", which I think fits functional languages very well.Zen : Actually Monads ARE esoteric, or not? :-) -
Definitely LOLCODE. It elegantly combines programming language design with one of the strangest memes of this century.
Hello World example:
HAI CAN HAS STDIO? VISIBLE "HAI WORLD!" KTHXBYE
My favorite example from the Wikipedia article:
HAI CAN HAS STDIO? I HAS A VAR IM IN YR LOOP UP VAR!!1 IZ VAR BIGGER THAN 10? KTHX VISIBLE VAR IM OUTTA YR LOOP KTHXBYE
Here's some object-oriented code, sort of:
O HAI IM thing I HAS A VAR ITZ "LOL" KTHXBYE I HAS A thing ITZ A BUKKIT I HAS A someThing ITZ LIEK A thing
LOLCODE is also implemented as a procedural language.
Paul Nathan : Does it have a compiler yet?Thomas Owens : Yes. I believe you can even get LOLCODE.NET (which targets the .NET platform).Robert S. : There's also a version in the DLR for testing purposes.Ólafur Waage : http://lolcode.com/implementations/implementationsÓlafur Waage : Also here is an example of turing completion of lolcode: http://forum.lolcode.com/viewtopic.php?id=51J.J. : OMG! :-D I would love having my caps lock key on all day. :-DConstantin : What's so esoteric about it? It's pretty mainstream.Robert S. : Yeah Constantin, all those production apps written in LOLCODE...rmeador : my company uses LOLCODE for interviews, since it's a language most candidates have no experience with (even if they know what it is, they've never used it)Firas Assaad : Internet humor is so lame. LOLZ EPIC PHAIL XDMartin Beckett : Doesn't the new edition of Knuth's book on literate programming use lolcat?Robert Harvey : @rmeador: I'd laugh myself silly during the interview. -
Scratch, to go back to basics ;)
More at Scratch web site.
That way, I can show my nephew of 5 years old about my job ;)
And he is already explaining to me about recursion !?? (because "it makes nice drawing in scratch"...) What can I say ? He's got the latest PC, I had a ZX81... and not before 11 years old.voyager : Reminds me a bit of `ladder`.just somebody : *What can I say ? He's got the latest PC, I had a ZX81...* You can say that hw isn't what it used to be. ;) -
APL! look at all the special keys that you can use in your code:
APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
--- Edsger Dijkstra, 1968
I don't think any other language can beat that.
wcm : APL was awesome. I used to use it when I was an Actuary. Kinda hard to read though.Michael Easter : If Perl is the king of one-liners, then APL is the deity of one-liners. Definitely mind-bending and the definitive 'write-only' language._ande_turner_ : I WANT A KEYOBARD LIKE THIS ! ... :) oh, actually ... I WANT AN ERGONOMIC KEYOBARD LIKE THIS !wcm : We used to pride ourselves on writing programs in 4 or 5 lines that would have taken several pages in another language. If you complained that it was hard to read then you were immediately ridiculed. Good times...Brent.Longborough : Of course, that keyboard is a simplification. Composite symbols such as (rectangle) (backspace) (division) for matrix inversion/division, and so forth...Christian Davén : There are a lot more special keys in APL than in that picture.knittl : @sudo bountiful: http://neo-layout.org comes close :)Martin Beckett : Dijkstra was a miserable bugger wasn't he ?Dinah : Conway's Game of Life in 1 line of APL: http://www.youtube.com/watch?v=a9xAKttWgP4Callum Rogers : I need to buy this keyboard. -
HOtMEfSPRIbNG, full stop. Programming as seen through the lens of salmon moving through a system of rivers. Sample code:
Universe of bear hatchery says Hello. World!. It powers the marshy things; the power of the snowmelt overrides.
steffenj : oh, how poetic! i knew it all along ... programming is poetry! -
After seeing it mentioned here, Piet, because of its startling appearance.
- "Hello, world!"
Andrei Krotkov : The image didn't really work, but up-vote anyway.Zen : Is it The Art of computer programming? ;-) -
Ook! is the most esoteric programming language ever. Here is the classic hello world program written in Ook:
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.
See http://www.dangermouse.net/esoteric/ook.html for a number of Ook! resources.
different : That's brilliant. :)Paul Nathan : Can't be a code monkey with Ook! though.fishlips : Very useful though. It produces completely pronounceable code! I can just read the source aloud to my friends, and I will seem incredibly funny.fortran : great for librarians!Gregoire : good reference fortran ;)Dinah : @Gregoire: I believe that was the point of the language to begin with. From the original page, "What do you expect for something usable by orang-utans?"Skilldrick : Ook's just brainfuck, don't forget. -
LabVIEW because even the source code is graphical.
Avdi : Nice! I was thinking of tossing that one in.Paul Nathan : labview is very popular with EE types I've noticed.Bill the Lizard : That's how I was introduced to it. It's even used in some EE college programs.Underflow : LV's a great niche language for hardware access (I make a living at it). CS folks tend to have an allergy to LV, despite the fact that it has a peculiar resemblance to C.Joshua : I mock it due to its bad taste to be not mergable.Andrei Krotkov : It doesn't really seem esoteric to me - looks like a completely normal series of gates to me.Joren : Labview, in a different form, is also used for programming the Lego Mindstorms NXT.Arafangion : Keep in mind that that is massively concurrent. -
Bash -- Yes, the Bourne-Again Shell, you can almost write real programs with it! Go on, try to write a web browser in bash, you can almost actually do it, and it's fun! What's more, you can use it for actually useful things, which you by and large can't in other esoteric languages. I will admit that Perl might be even more esoteric, but I love bash more.
Joshua : I have somewhere deep in my archives a web server in nc + POSIX shell + a few standard POSIX utilities. -
REXX. Common on IBM operating systems and almost completely unheard-of anywhere else. I can't remember a single thing about it now, but it's the language I first taught myself to code in, so it gets my vote.
Paul Nathan : I've heard about it before...someone was touting it as a great scripting language.Jörg W Mittag : It was also the successor of AmigaBASIC as the standard system scripting language on the AmigaOS. This incarnation was called ARexx.Norman Ramsey : Rexx was in no way esoteric. It was an excellent embedded scripting language long before Tcl. All praise Mike Cowlishaw!Brent.Longborough : I always thought of Rexx as the firsy PL I encountered that was "user-friendly". In other words, whatever I wrote with it just didn't have bugs, and this was due to the language, not me.DaveE : I used to use it to glue together a process that was a mix of SAS, OS/2 batch, MS-DOS batch, Access and FoxPro crap. Really quite powerful & expressive for the day. Modern scripting languages beat (the versions I used) handily. -
Without a doubt, INTERCAL is the best esoteric programming language. It even says it's the canonical example on the Wikipedia page!
-
Brain**. It lives up to its name...
gyrolf : I never used it, and I hope I never have. One vote up.grieve : People have even written games in it: http://jonripley.com/i-fiction/games/LostKingdomBF.htmlBeska : I bet no one really writes in it. I'd bet anything of significant size is essentially "compiled" (translated) via a script into BF. Why someone would bother to do this is beyond me, but I've done some seemingly pointless things in the hopes of learning some new programming ideas, so maybe that's it.Bill the Lizard : Please see the discussion at meta.stackoverflow.com/questions/24079/… for why the name of a particular programming language is being censored.Skilldrick : I think brainfuck is a great language to learn. It only takes a couple of hours to understand all the ins and outs, and can really change your thinking. -
Prolog has always been a favorite of mine. The whole idea behind an executable problem specification and the simplicity of how it works behind the scenes astounds me.
Bob Cross : Oh, come on! You didn't even mention that, for any given Prolog program, the most likely response you're going to see is "no." ;-) -
The most exotic language the I actually wrote usable code in is the scripting language for the BRIEF text editor (Brief was, back in it's day, by far the best MSDOS-based text editor for programmers).
The language itself was a lot like lisp.
-
I wrote a few short programs in this many, many years ago. I really liked the whole Stack-oriented nature of it. Of course, it helped that my calculator of choice at the time was an HP-11C.
Daniel : Honestly, man, put some code in there! Do some `: 0 1 ;` funky stuff! Show `CREATE ... DOES>`! Take over the interpreter for an encore! People just don't understand how incredibly cool Forth really is...jleedev : FORTH LOVE IF HONK THEN -
The Shakespeare Programming Language, for sure.
You really HAVE TO look at the code examples. They're huge.
chills42 : That is pure evil... enjoyable though.fly.floh : it's completely useless, but such nice source code :-D -
Subtext. A language with a visual representation of control flow.
Look at the presentation video here: http://subtextual.org/subtext2.html
-
Java2k could be fun :)
Java2K is not a deterministic programming language, but a probabilistic one. Even for built-in functions, there is only a certain probability the function will do whatever you intend it to do. All Functions have two different implementations. At runtime, based on a pseudo-RNG, the actual implementation is choosen. This is in line with common physicalist assumptions about the nature of the universe - there is never absolute security, there is always only probability.
More funny features can be found here.
-
K Language, a wild APL/Scheme crossbreed.
Hello world:
"Hello world"
Compute maximum running sum inside a list of numbers:
|/0(0|+)\
Sudoku solver:
p,:3/:_(p:9\:!81)%3 s:{*(,x)(,/{@[x;y;:;]‘&21=x[&|/p[;y]=p]?!10}’)/&~x}
N-queen solver:
qn:{[n],/{:[n=#*x;,*x;,/_f'f x,\:/:(!n)_dvl,/x]}’(f:0 -1 1+/:)@!n} bd:{[p]`0:”.Q”p=\:!#p}
You still think Perl is terse?
DoR : p,:3/:_(p:9\:!81)%3 s:{*(,x)(,/{@[x;y;:;]‘&21=x[&|/p[;y]=p]?!10}’)/&~x} Just looking at this makes me want to hurt someone. -
My favourite is Chef but I'm also a fan of Brain**** and Whitespace.
Lance Roberts : See meta.stackoverflow.com/questions/24079/ for why we munge obscenites on StackOverflow. Also see Bill the Lizards comment on earlier answers. -
Iota: an unambiguous Turing-complete language with just two symbols. Iota exploits the amazing fact that any combinator (i.e. lambda-definable term) can be written using only the two combinators S
(lambda (x) (lambda (y) (lambda (z) ((x z) (y z)))
and K(lambda (x) (lambda (y) x)
.This fact is closely tied to the Curry-Howard isomorphism: the types of combinators correspond to tautologies of propositional logic. For example, the type of K is
A -> B -> (B -> A)
. ReadA, B, C
as variables and->
as implication. Try S:A -> B -> C -> ((A -> C) -> (B -> C)
. Even more, any tautology can be derived from S and K using modus ponens. Why? The rules (for abstraction and application) in typed lambda-calculus correspond to the rules (for introduction and elimination of implication) in a natural deduction system.efficientjelly : You'll really enjoy Unlambda: http://www.madore.org/~david/programs/unlambda/ and for the second part of your answer: you'll really enjoy Agda: http://wiki.portal.chalmers.se/agda/ -
Hands-down, my favorite esoteric language is the 2D language designed by the Cult of the Bound Variable for the 2006 ICFP programming contest.
Dear cult.cbv.discuss:
I'm pleased to announce a new programming language called 2D. This language frees the programmer from the shackles of linear programming by allowing programs to occupy two dimensions. However, unlike 3- and 4- dimensional languages like CUBOL and Hypercard, it does not distract the programmer's attention with needless dimensional abandon.
I first present an overview of the language and then delve into a more careful description of its syntax and semantics.
2D Overview
2D programs are built from boxes connected together by wires. A box takes the following form:
*=======* !command! *=======*
Wires can connect boxes:
*========* *========* !command1!------>!command2! *========* *========*
Each box has two input interfaces: its North and West sides. It also has two output interfaces, its South and East sides. The following box sends the input that it receives on its North interface to its East interface:
| v *============* !send [(N,E)]!-----> *============*
Wires carry values from one box to another. Each wire starts out with no value. When a value is sent along a wire, the wire keeps that same value forever. A box will only activate when all of its inputs (zero, one, or two) have values.
The values flowing along wires take on the following forms:
val ::= () | (val, val) | Inl val | Inr val
The () value is the single base value. Two values can be paired together. They can also be stamped with the disjoint constructors Inl and Inr. Commands manipulate the structure of values and the control flow of the program by selectively sending along their outputs. For example, the 'case' command distinguishes between values stamped with Inl and Inr:
| v *=============* !case N of E,S!---- *=============* | +--------------
If this box is sent Inl () to its North interface, then () is sent along the wire connecting to the east interface. If it is sent Inr ((), ()) then ((), ()) is sent along the south interface instead.
2D programs can be organized into modules. A module encapsulates a collection of boxes and wires and gives them a name. The following module, called stamp, encapsulates the operation of applying the Inl and Inr constructors to the first and second components of a pair:
,........|......................................., :stamp | : : v : : *=======* : : !split N!-----+ : : *=======* v : : | *=========================* : : +------>!send [((Inl W, Inr N),E)]!------ : *=========================* : : : ,................................................,
(The split command splits a pair, sending the first component south and the second component east.)
A module can be used as a box itself. The following circuit sends (Inl (), Inr Inl ()) along the wire to the east:
*========================* !send [(((), Inl ()), E)]|---+ *========================* | +--------------------------------+ v *=========* !use stamp!----------------------------------- *=========*
Each time a "use" box is executed, a new copy of the referenced module is made (with wires carrying no values). Recursion is just a particular use of modules: modules may also "use" themselves. Mutual recursion between modules is also permitted.
A module is limited to at most one input along each of its north and west faces. It may have multiple outputs, all along its east face. When a module is executed, exactly one of its output wires must be sent a value; this is the value that the "use" box sends along its interface.
2D Syntax
Box syntax
A box's north and south edges are written with the = symbol. Its west and east edges, which must be exactly one character long, are written with the ! symbol. The box's corners are written *. No whitespace is allowed between the command and the box that surrounds it.
The concrete syntax for commands is as follows:
inface ::= N | W outface ::= S | E exp ::= () | (exp, exp) | Inl exp | Inr exp | inface command ::= send [] | send [(exp, outface)] | send [(exp, outface), (exp, outface)] | case exp of outface, outface | split exp | use "name"
Note that extra parentheses are neither required nor permitted. A space character may be omitted when the character to its left or to its right is one of ,()[] and two consecutive space characters are never allowed.
A name consists of one or more characters from the following set:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
If a wire is connected to the north side of a box, the v character must be used as follows:
| v *=======* !command! *=======*
The wire can connect above any = character. If a wire is connected to the west side of a box, the > character must be used as follows:
*=======* -->!command! *=======*
At most one wire can be connected to each of a box's four faces.
Wire syntax
Wires are made from the following characters:
|-+#
Every wire must use at least one of these characters. That is, > and v alone are not valid wires.
Each character is "open" on some of its sides. The | character is open on its north and south sides. The - character is open on its west and east sides. The + and # characters are both open on all four sides.
The = character on the south face of a box is open to its south, and the ! character on the east side of a box is open to its east. The v character is open to its north, and the > character is open to its west.
All wire characters within a module must obey the following rules of connectedness:
For each - character, its west and east neighbors must both be open on their east and west sides, respectively.
For each | character, its north and south neighbors must both be open on their south and north sides, respectively.
For each # character, its north, south, west, and east neighbors must each be open on their south, north, east, and west sides, respectively.
For each + character, exactly two of the following conditions must be met: a. its north neighbor is open on its south side b. its south neighbor is open on its north side c. its west neighbor is open on its east side d. its east neighbor is open on its west side
Only the | and - wire characters are allowed along module boundaries, and they only require a single open neighbor on the inside of the module. (They do not syntactically connect to anything on the outside.)
Module syntax
The input consists of an arrangement of non-overlapping modules. Each module is bordered by the . character on its north and south face, the : character on its west and east face, and the , character in each corner. Additionally, the north face may optionally have one occurrence of the | character; this is the north input to the module. Similarly, the west input (if any) is represented by a - character. The east side of the module may have any number of occurrences of the - character; these are its outputs. A module's name must appear in the upper left corner of the module and be followed by a space.
2D Semantics
Evaluation of 2D programs revolves around a function for computing the value of a module instance. A module instance is a collection of wires, some of which have values, and the boxes that these wires connect.
A module instance evaluates in a series of evaluation steps. In each step, the "ready" boxes are identified as those boxes for which all of their inputs wires have values, and which have not yet executed in this instance. All ready boxes are evaluated (see below) in an arbitrary order. If no boxes are ready, then the module instance is finished. Its output is the value of the single output wire that has a value. If more than one wire has a value, or if no wire has a value, then evaluation fails.
Box evaluation
Boxes only execute when all of their input wires have values. This is true even if the command does not reference all of the wires.
Commands are executed as follows. First, all expressions in the command are evaluated. The expressions N and W are replaced with the values on the North and West wires, respectively. If a value is needed but no wire is connected, then evaluation fails. Then, commands are executed as follows:
send []
nothing happens.
send [(val, outface)]
val is sent along the specified outface.
send [(val1, outface1), (val2, outface2)]
val1 is sent to outface1, and val2 is sent to outface2. The two outfaces may not be equal.
split (val1, val2)
val1 is sent south, and val2 is sent east.
case Inl val of outface1, outface2
val is sent to outface1.
case Inr val of outface1, outface2
val is sent to outface2.
use mod
a new instance of the module mod is evaluated. The inputs to he module must match the inputs to this box, and are instantiated with the values along those wires. The output along the east face is the output of the module instance.
In any other situation (for example, split ()), the machine fails. If a value is sent along an outface, then there must be a wire connected, or the machine fails.
Darius Bacon : I loved 2D! I think some people would appreciate a spoiler warning, though, thinking of that ICFP contest as an unusual work of IF. (Incidentally my team was kind of proud that the five of us together scored a little better than Norman Ramsey -- we joked about it at the time.)Liran Orevi : Reminds me http://en.wikipedia.org/wiki/Befunge -
From the original specification:
Censorship
For those of you who blush when reading the original syntax, wish to have your grandma proof read your code or simply don't quite wish to get fired yet. The mnemonics can be censored with asterisks or with any letter of the alphabet replacing the second and/or third characters. Censored language can be interspersed with the original more full blooded form. Some f*ckf*ck programmers choose to use the censored code for the majority of their coding so as not to distract from the value and expression of the original syntax which they save for moments of extreme aggression/inspiration.
HelloWorld in F*ckF*ck, censored accordingly:
f**k b**b!!!!!!!! a**e s**g b**b!!!!!!! f**k t**s b**t s**g c**k f**k b**b!!!!!! a**e s**g b**b!!! f**k t**s b**t s**g b**b c**k b**b!!!!!! c**k! b**b!! c**k a**e t**s b**t f**k b**b!!!!!!! a**e s**g b**b!!! f**k t**s b**t s**g c**k f**k b**b!!!!!!!!!! a**e s**g b**b!!!!!!! f**k t**s b**t s**g t**s c**k t**s!!!!!!! c**k b**b!! c**k t**s!!!!! c**k t**s!!!!!!! c**k a**e t**s b**t f**k b**b!!!!!!! a**e s**g b**b!!! f**k t**s b**t s**g b**b c**k a**e t**s b**t b**b!!!!!!!!! c**k
Brent.Longborough : I wonder where this comes in Maslow's Hierarchy of Needs?jjnguy : Loling right now. I don't believe code has ever made me lol before.Dinah : This one should be renamed, "Tourette's."dalle : Censorship sucks. Bringing back the original.Miyagi Coder : This is garbage... -
SML
It's the favorite of none other than Satan himself.
-
Befunge is a stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, right, up or down, and loops are constructed by sending the control flow in a cycle.
The technique of using arrows to change control flow is demonstrated in the random number generator program below. Following the arrows around, the ? instructions send the instruction pointer in random cardinal directions until the pointer hits a digit, pushing it to the stack. Then the arrows navigate to the . to output the digit from the stack and return the pointer to the first directional randomiser. Note that there is no @ to terminate this program so it produces an endless stream of random numbers from 1 to 9.
Sample
vv < < 2 ^ v< v1<?>3v4 ^ ^ > >?> ?>5^ v v v9<?>7v6 v v< 8 . > > ^ ^<
Zen : I really like this one: programming thinking 2D is amazing! :-)Oak : ... and its n-dimensional variants. http://www.purplehatstands.com/bequnge/ -
Logo and its famous Turtle with a pen attached to its tail :)
The following code draws a square:
FORWARD 100 ; draws a square with sides 100 units long LEFT 90 FORWARD 100 LEFT 90 FORWARD 100 LEFT 90 FORWARD 100 LEFT 90
or with a loop:
REPEAT 4 [FD 100 LEFT 90]
Just for the record, the Hello World program in Logo looks like this:
print [Hello World]
-
Intuitive
It's identical to C except you use closing braces to open, opening braces to close, swap the meanings of + and -, * and /, ; and :, > and <, etc. Example:
int foo)int i, char c( } int six = 2 / 3: int two = six + 4: if )i > 0( } printf)"i is negative"(: { {
Josh : **Poof** Oh crap, my head just exploded. I could handle Brainfuck, whitespace, even Lisp, but *this* is just too much for me. -
I really nice deep esoteric language is SNOBOL, which I tried to learn while at Uni. I was one of the standard pre-compiler available on DEC Alpha 4100. Everbody was busy learning C/C++ as part of the standard curriculum, and I thought, lets learns SNOBOL, get it under the belt before I leave. Man, that was a mistake. Its a pattern orientated very highly abstracted language.
B
David Thornley : What SNOBOL does well, it does very well. Pity about the control structures, though. -
Taxi. Example code (hello world) bellow:
"Hello, World!" is waiting at the Writer's Depot. Go to Writer's Depot: west 1st left, 2nd right, 1st left, 2nd left. Pickup a passenger going to the Post Office. Go to the Post Office: north 1st right, 2nd right, 1st left. Go to the Taxi Garage: north 1st right, 1st left, 1st right.
-
What about Processing?
-
My favorite is ZOMBIE.
ZOMBIE is a programming language designed for Necromancers, particularly evil ones. (Actually, what other sorts are there?) ZOMBIE is an acronym, and stands for Zombie-Oriented Machine-Being Interface Engine.
Sample Programs
Hello World
HelloWorld is a zombie summon task SayHello say "Hello World!" animate animate
Fibonacci Numbers
Zombie1 is a zombie summon remember 1 bind Zombie2 is a zombie summon remember 1 bind FibonacciZombie is a zombie summon remember 0 task SayFibonaccis shamble say moan Zombie1 say moan Zombie2 remember Zombie1 moan Zombie1 moan Zombie2 remember Zombie2 moan Zombie1 moan Zombie2 remember moan 2 until remembering 100 animate animate
-
Conway's game of life
Conway's game of life has been used to implement a Turing machine
http://www.rendell-attic.org/gol/tm.htm
http://everything2.com/?node_id=1006951
http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#Notable_Life_programs -
Sartre, for the tragic beauty of its programs. What other languages not only acknowledge the absurd purposelessness of cubicle life but actually require it? In what other languages is functionality subservient to the desires of the programmer to express herself? Truly, Sartre is a language for programmers, not programs. No other language is as deeply expressive as Sartre. The most basic feature of programming, conditions, is also the most basic feature of existentialism. From the spec:
[...] one may keep creating programs, one after another, like soldiers marching into the sea, but each one may seem empty, hollow, like stone. One may want to create a program that expresses the meaninglessness of existence, and instead they average two numbers.
-
Turkey Bomb, the only language that can cause alcohol poisoning.
-
I'm still enjoying LOLCODE.
It is rather entertaining to write a program in the manner that you do with LOLCODE.
Other than that I would say my second pick goes to Taxi.
Taxi is rather confusing to have to remember everything, but at least it makes for good reading. You might be able to get a job writing Soaps through it, who knows :P
0 comments:
Post a Comment