Slashdot Mirror


Esoteric Programming Languages

led_belly writes: "I came across this interesting page from the #alt.linux IRC chat room topic (irc.keystreams.com). It is an interesting read for all those who have ever been baffled by why/how some people do things. The Yahoo! Webring listing of similar topics is here."

16 of 259 comments (clear)

  1. Re:My head hurts by Farq+Fenderson · · Score: 5, Informative

    Well, you do have to put stuff on the stack in reverse... since it's FI/LO. Breakdown of the program:

    55+
    put 5 on the stack twice, add the numbers on the stack together, leaving 10, or a newline in ascii.

    ".dlrow ,olleH"
    put "Hello, world." on the stack in reverse, this is so we can pop it off in the proper order.

    >:#,_@
    very nice code to print out everything on the stack. '>' sets the IP velocity to "east", ':' duplicates the last item on the stack. '_' pops an item off the stack and tests it, if true, set IP to west, if false set it to east. The # skips the next instruction, and the comma prints the character off. So you're testing and printing until there's nothing left on the stack. The '@', finally, exits, which is executed when there's nothing left on the stack.

    Makes sense?

  2. Programming challenge by hackerhue · · Score: 4, Interesting

    As an intellectual challenge, rewrite DeCSS in any of these languages. Feel free to share your results with us.

    --

    To get something done, a committee should consist of no more than three persons, two of them absent.

    1. Re:Programming challenge by dido · · Score: 5, Funny

      Actually, deCSS HAS been written in Brainfuck. See this link on David Touretzky's home page.

      --
      Qu'on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.
  3. Brainfuck! by Anonymous Coward · · Score: 4, Funny

    Post Comment
    Lameness filter encountered. Post aborted!
    Reason: Please use fewer 'junk' characters.

    Goddamnit, I just want to post brainfuck source.

  4. Re:INTERCAL by stripes · · Score: 5, Informative
    I'd like to see how Intercal is actually used for anything or if it keeps up with other emerging languages. When new (and useful) languages hit the scene, it probably has to drop some features because they're used in that language.

    They don't bother, but the language isn't static. There is a multi-threading extension for example. Typical of Intercal it is unlike all other threading packages I know of. It doesn't share data, only the code, all messages must be passed by altering the code (disabling and enabling blocks). Trintercal is base-3, there is also a base-N variant (the base-3 one shares some ops with the Klingon programming language...)

  5. My Favorite Quote by istartedi · · Score: 4, Insightful

    It has to be a toss up between:

    (from INTERCAL)The Sieve of Erosthenes test for prime numbers up to 65535 took over seventeen hours on a SPARC--it requires only a half second using C.

    and

    (from SMETANA) The language has two instructions: "Swap step n with step m", and "Go to step p".

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  6. What about var'aq? by The+Ape+With+No+Name · · Score: 4, Informative

    That's right a Klingon programming language. Waaaaaaa! As far from Perl as one can get....

    --
    Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
  7. The Beer Page. by Christopher+Thomas · · Score: 5, Informative

    No list of esoteric programming languages would be complete without a link to the Beer Page:

    http://core.federated.com/~jim/99/ (mirror)

    This is a collection of programs written in over 200 languages designed to print the canonical "99 bottles of beer on the wall" song.

  8. Universal Machine in 371 Bits by Baldrson · · Score: 5, Interesting
    John Tromp has managed to out do the lot of them with his "Kolmogorov Complexity in Combinatory Logic" wherein he concludes:

    A mere 371 bits suffice to encode a universal combinator equivalent to ...(a) universal Turing machine:

    11100110010100110010110011000010001110010101110010 110
    01100101001100101100101001100101100101011100110010 100
    01101110011001100110001011010110100101011100101011 100
    10110011001010011000010001110011001010010010100101 100
    01110001011100110000100011011100110010100110010110 010
    10011001011001010111001100101000110111001100010110 110
    00110111001100101001100110010100110000100011000110 001

    Dan Brumleve has a written a combinator interpreter in Perl that may be capable of evaluating Tromp's strange machine.

  9. Re:thoughts.... by skullY · · Score: 5, Funny
    I wonder... if someone were to write an OSS product using one of these more obfuscated languages, I think we should ban from bearing the title OSS. People wouldnt be able to understand the code at all for their own uses or improvements. Hence it'll be Open source, but instead only the original developer would know anything about how it works, make changes, etc.
    And that's different from perl how?
    --
    When I was able to do my own spam-armoring, you got a chance to email me. Now you can only hope I see your reply.
  10. APL by maxpublic · · Score: 5, Funny

    If you want a strange programming language that garnered virtually no support and was a real pain in the ass, look up APL (primarily used at Pomona College in Claremont, CA, because the guy who invented it was a professor there).

    APL was defined by coding which wasn't particularly inventive but which required a complete keyboard overlay - it didn't use ASCII characters (except in text, as I recall), but rather a mixture of greek symbols and shit the author just plain made up. So in effect you had to match 'objects' to keys on the keyboard, a completely non-intuitive way of typing. Talk about watching your hands while you work....

    Unfortunately the college was incredibly gung-ho on APL and thought it would revolutionize coding, so if we wanted to do any serious work we had to do it in APL. This meant that about a dozen of us sat around learning APL so that we could program what might have been (don't really know, but I don't know of any other examples in 1983) the most massively multiplayer Star Trek ship battle game to date (up to 127 players, although the mainframe usually came to a grinding halt when we passed the 70 or 80 player mark). We then passed this program off as a science project, which it was accepted as since no one else could read the damned thing.

    Well, I guess it had a use after all....

    Max

    --
    My god carries a hammer. Your god died nailed to a tree. Any questions?
    1. Re:APL by DumbSwede · · Score: 4, Interesting
      The object of your uhmmmm... affection can be found here at retrocomputing which is listed in the article.

      I find it odd how every syntax I have ever seen in a computer language looks ugly and stupid to me, until I become fluent in it, then I won't abide any change after.

    2. Re:APL by edhall · · Score: 5, Interesting

      APL was a lot more common than you might think. It was the first language to treat matrices as first-class entities, and so was popular for a time among the mathematics set. It was amazingly fast, in part due to its innovative use of lazy evaluation (e.g. if you only wanted a single column of a large matrix, it wouldn't bother computing the rest of it).

      A bit of APL lore: Back in the late 1970's, Ken Thompson (one of Unix's creators) spent a summer at UC Berkeley (an event that was rather influential in BSD's development). Just for fun, he wrote an entire APL interpreter -- in one weekend. It was a real pain to work with since it used two-letter codes instead of the APL character set, but other than some of the quad functions (various OS primitives and so on) it was complete.

      It's one of the more spectacular feats of programming I've ever heard of.

      -Ed
  11. argh... so many languages so little time by Spootnik · · Score: 5, Insightful

    Learn them all !!!

    Of course, you could also approach the task a little more systematically. A possible approach, and this is based purely on learning a language in order to improve one's thinking processes, rather than learning a language based on the marketability improvements possession of such knowledge brings, is to broadly catergorise them along the lines of 'problem solving styles', or 'programming mindsets' that they directly support or encourage.

    Assuming no prior knowledge, you could start by learning procedural programming; a very good starting point is C. It is a small, compact language that will help you learn the basics of procedural programming; it's not a difficult language if you stay away, initially, from its more esoteric features like pointers and bitwise operators. Having learnt C, you will have a very solid grounding for learning languages such as JavaScript, C++, and Java because the 'syntactic core' of these languages is very similar.

    Another procedural language is COBOL. It is quite a big language in terms of the number of reserved words ('verbs' in COBOL-speak) it offers. However, it is really quite a simple language and provides, as core facilities, tremendous file processing capabilities. In addition, it forces the programmer to be systematic, that is, you need to spell out exactly, and in painstaking detail, what it is you wish to do. In a way, its wordiness is its strength, and it is difficult to produce 'sloppy' code the way it is possible to do in, for example, C.

    Next, you could tackle object oriented programming. You could start with either one of the very popular object-oriented languages, C++ and Java. Personally I would start with C++ as it is, I believe, more complex, and thus, more difficult to learn; if you master it, Java will come easy, and the hardest part will be simply to learn its rich set of packages (collections of objects).

    Smalltalk is probably one of the purer object-oriented languages, is widely respected in the programming community, and, I should admit that the main reason I included it here is that its the next language on *my* list to learn. I've looked at a couple of Smalltalk code listings and have found it difficult, at first glance, to understand it; that being the case, I look forward to the challenge of learning it !

    Now, for a couple of oldies, but goodies: LISP and Prolog. Neither of these has, as far as I'm aware, very significant commercial application, but if you are looking to try some truly 'different' programming approaches, in a bid to extend your thinking processes, then these are it !

    LISP, for me, is a truly enjoyable programming experience. I won't pretend to be an expert in it, but by simply spending time with this language I have learnt so much about data structures, programming techniques, and, generally, problem solving techniques. It's a really good tool for 'doodling', that is, quickly whipping up little algorithms and immediately testing them. A definite 'must-learn' language !

    Prolog is one I find fascinating. I'm still struggling with it, and although I've developed nothing more than simple database query applications with it, every time I work with it I find myself approaching a 'simple' problem in non-conventional ways, always forced to rethink how something should be done. I would recommend you look at this language to learn how to program in a truly non-procedural way, that is, to work 'with' the help of the language itself, rather than simply writing down commands for the compiler / interpreter to follow.

    Finally, on top of these you could add interpretive 'scripting' languages, tools which are aimed more at 'gluing' applications together than being fully-fledged development languages in their own right (I know perl purists will probably scream, claiming this is heresy, but basically it is not so much a development language as a 'super-shell', an all-encompassing environment, almost an 'operating system within an operating system').

    Finally, I should stress that, as a programmer, it is not just languages that you should be striving to learn, but to expand your knowledge in general. For example, acquiring general business, management, communication and 'people' skills will make you more aware of the 'real world' in which you must apply your skills.

    While the idea of learning other programming languages is to extend your ability to identify and abstract problems, as well as adding to your 'armory' of programming tools, there is no substitute for a good grasp of your problem environment, that is, understanding the nature and type of 'problems' you will be asked to solve. Not every problem necessarily translates into a computer-based solution, hence the importance of also acquiring non-programming skills.

  12. Re:What's wrong with Haskell? by nellardo · · Score: 5, Interesting
    I happen to think that Haskell is one of the semantically cleanest languages out there (I put Self in the same category).

    I mean really, in Haskell, "factorial" looks like this:
    fact 0 = 1
    fact n = n * fact (n - 1)

    Write that, and "fact 20" works just fine:
    Examples> fact 20
    2432902008176640000
    Examples>

    However, implementing Haskell (or Self) on a von Neumann architecture is non-trivial. Implementing an efficient compiler or interpreter is tres difficil. People get Ph. D. dissertations for that sort of thing. For someone deeply used to C, Haskell and Self are perverse.

    To wit:

    • In Haskell, nothing changes. Ever. State change is handled by creating a new state from the old one. Semantically clean, but about as far from C as you can get.
    • In Self, anything can change at any time. Yes, Virginia, you can redefine "if-then" whenever you feel like it. Change the inheritance hierarchy? No problem! Whoops! I made a cycle in the inheritance hierarchy! No problem! (yes, A can inherit from B and B can inherit from A). Think of C without the reliability that any particular operation (function call, operator, whatever) maps to the same place more than once. This kind of thing gives most C-family compilers hives. It used to be that C++ was perceived as significantly slower than C - I don't see anyone complaining about it anymore, but Haskell and Self are more extreme examples. C++ made it easy to use jump tables. Haskell makes it easy to use recursion, lazy evaluation, and a bunch of other things. Self makes it easy to use dynamic inheritance, multiple inheritance, even cyclical inheritance.
    What is most impressive about these kinds of languages is that you can build efficient implementations, without the compromises to the semantics that C (or its derivatives) entails. The fastest FFT library out there is in C, but the C code itself was generated by Haskell code (code that came up with some original optimizations along the way). The Self compiler is the root technology for Java JIT compilers (when Sun killed the Self project, all the compiler people went to work on "virtual machine" compilers). Self was able to hit 50% of the speed of optimized C while maintaining:
    • Full source-level debugging
    • Garbage collection
    • Checks for stack and integer overflow
    • and the ability to change the "class" of any object at any time (I put class in quotes because Self is an object-oriented language without classes - part of the super-simple semantics)..
    In short, there isn't anything wrong with clean linguistic semantics. But essentially every computer sold today is built around the von Neumann architecture, and non-von-Neumann semantics (like that used by Self and Haskell) are non-trivial to implement.

    --
    -----
    Klactovedestene!
  13. Eubonicode by GrEp · · Score: 5, Funny

    Back when I took compiler construction at Drake University three of us got together and made our own programming language called Eubonicode to help those who like to engage in ghetto algorithmic expression. I threw it up on the website. Here is the fibbonacci code:

    sup
    {
    gimme fibo bitch
    a be 1 bitch
    b be 1 bitch
    putou a bitch
    putou b bitch
    fibo be fibo widout 2 bitch
    slongas (fibo bepimpin 0)
    c be a an b bitch
    a be b bitch
    b be c bitch
    putou b bitch
    dissin fibo bitch
    nomo
    }

    --

    bash-2.04$
    bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME