pathological programming

I decided that for today, I'd show the most thoroughly evil programming language ever devised. This is a language so thoroughly evil that it's named Malbolge after a circle of hell. It's so evil that it's own designer was not able to write a hello world program! In fact, the only way that anyone managed to write a "Hello World" was by designing a genetic algorithm to create one. This monstrosity is so thoroughly twisted that I decided to put it in the "Brain and Behavior" category on ScienceBlogs, because it's a demonstration of what happens when you take a brain, and twist it until it…
I'm hitting on something deeply twisted this week. It's called homespring. Homespring is interesting for two reasons. First, it's got a sort of reverse flavor to it: it consists of active agents in a passive structure. So, for example, you can't do anything like control flow - that's a dynamic change in the control flow of the program; in Homespring, you need to trick the agents into doing something using the static, unchanging structure of the program. And second, it challenges you to write your program in the form of a poem! And the icing on the cake? The agents are salmon, and the passive…
Today, I have something really fun and twisted for you. It's my favorite variation onBrainF**k, called "BFM", which is short for "BrainFunct-Macro". It's a doubly-Turing-equivalent language - it's got two complete and distinct Turing equivalent computing systems in it: it's got regular BF on the bottom... But before BF gets going to run the program, the program is pre-processed by a complete lambda-calculus macro expander. Basically, you start with a BF interpreter, and you observe, quite logically, that there's a ton of repetition in a typical BF program - stuff that could be nicely…
Today, I'm going to show you a very simple, very goofy little language called "SCEQL", which standards for "slow and clean esoteric queue language". It's based on nothing but a circular queue of numbers with nothing but 8 commands. It's not one of the more exciting languages, but it can be a lot of fun to figure out how to make the circular queue do what you want it to. In SCEQL, you've got a circular queue of bytes. You can't *ever* remove anything from the queue. You can alter values on the queue; move things from the front to the back; and add things to it. But that's it. The commands are…
Our pathological language this week is [Underload][underload]. Underload is, in some ways, similar to Muriel, only it's a much more sensible language. In fact, there are actually serious practical languages called *concatenative languages* based on the same idea as Underload: [Joy][joy] and [Factor][factor] are two examples. [underload]: http://esoteric.voxelperfect.net/wiki/Underload [muriel]: http://scienceblogs.com/goodmath/2006/11/friday_pathological_programmin… [joy]: http://www.latrobe.edu.au/philosophy/phimvt/joy.html [factor]: http://www.factorcode.org/ Underload is a remarkably…
I'm sure that in the friday pathological programming languages, I have a fondness for languages that make your code beautiful: languages like [SNUSP][snusp], [Befunge][befunge], [Piet][piet], and such. Those languages all you two-dimensional layouts for their programs. [snusp]: http://scienceblogs.com/goodmath/2006/08/beautiful_insanity_pathologica… [befunge]: http://scienceblogs.com/goodmath/2006/07/friday_pathological_programmin… [piet]: http://scienceblogs.com/goodmath/2006/11/programming_in_color_fixed.php Among the nutters that make up the community of folks interested in this kind of…
Todays tidbit of torture is a simple little language called [Leszek][leszek], with an implementation available [here][leszek-impl]. Leszek is based on the idea of *iterative string rewriting*, which is actually a useful and valuable concept. Of course, Leszek takes it to an extreme of insanity which takes a perfectly good idea, and turns it into a horror. But thats what makes it fun! [leszek]: http://www.esolangs.org/wiki/Leszek [leszek-impl]: http://students.mimuw.edu.pl/~js248325/zsyp/leszek.tar.gz In Lezsek, there are no variables; no loops; no state. A program is just a string with a…
Due to work stuff, I'm very busy this week, and I don't have time to write a detailed pathological language post, so I chose something that doesn't take a lot of explanation, but which is delightfully twisted. It's a language called [Muriel](http://web.archive.org/web/20021205092706/http://demo.raww.net/muriel/), aka the *"Monumentally Useless ReIterative Execution Language". Muriel is based on the idea of [*quines*](http://www.nyx.net/~gthompso/quine.htm). A quine for a programming language is a program in that language which produces itself as output. Quines are considered interesting…
Today's pathological language is a bit of a treat for me. I'm going to show you a twisted, annoying, and thoroughly pointless language that *I* created. The language is based on a model of computation called [Actors](http://en.wikipedia.org/wiki/Actor_model), which was originally proposed by Professor Gul Agha of UIUC. There've been some really nice languages built using ideas from Actors, but this is *not* one of them. And that's exactly where the name comes from. What name comes to mind when you think of *really bad* actors with delusions of adequacy? For me, it's "Cruise". You can get the…
Todays programming pathology is programs as art. Start with a really simple stack based language, add in a crazy way of encoding instructions using color, and you end up with a masterpiece of beautiful insanity. It's not too exciting from a purely computational point of view, but the programs are really great to look at. Yes, it's a pathological language with truly beautiful source code! *(The original version of this post had some trouble because I linked to the original images in-place, which the owner of the Piet webpage had blocked. I didn't realize he didn't want links. I've since…
For your amusement and edification, the following is a very simple interpreter for fractran programs which, in addition to running the program to generate its result also generates a trace to show you how the program executed. ;; A Trivial Fractran Interpreter ;; ;; Copyright 2006 Mark C. Chu-Carroll ;; http://scienceblogs.com/goodmath ;; ;; You're welcome to do anything you want with this code as long ;; as you keep a copy of this header to identify the original source. ;; ;; This program runs a fractran program. A fractran program is a list ;; of…
Today's pathological language is based on a piece of work called Fractran by John Conway of game theory fame. It's a really fascinating bugger; absolutely insanely difficult to program in, but based on one of the most bizarrely elegant concepts of computation that I've ever seen. It's amazing that this is Turing complete. It's not a *real* programming language in the sense of being able to write practical programs; it's more of a simple theoretical computational model which has been implemented as a language. It's based on the idea of numbers as products of prime factors. As you should…
Todays entry isn't so much a pathological language itself as it is a delightful toy which can be used to *produce* pathological languages. I'm looking at Chris Pressey's wonderful language [ALPACA](http://catseye.mine.nu:8080/projects/alpaca/), which is a meta-language for describing different kinds of cellular automata. Frankly, I'm very jealous of Alpaca. I started writing a cellular automata language something like this on my own; I spent about two weeks of my free time working on it, and got it roughly 90% finished before I found out that he'd already done it, the bastard! Alpaca…
Todays dose of pathology is another masterpiece from the mangled mind of Chris Pressey. It's called "[Version](http://catseye.mine.nu:8080/projects/version/)", for no particularly good reason. It's a wonderfully simple language: there's only *one* actual kind of statement: the labelled assignment. Every statement is of the form: "*label*: *var* = *value*". But like last's weeks monstrosity, Smith, Version is a language that doesn't really have any flow control. But instead of copying instructions the Smith way, in Version the program is toroidal: it executes all statements in sequence, and…
Joy of joys, [Cat's Eye Technologies](http://catseye.mine.nu:8080/projects/), the home of Chris Pressey, one of the most prolific designers of thoroughly bizarre languages is back up! And so, today, we're going to take a look at one of his masterpieces, the language *Smith*. This is one of my personal all-time favorite pathological languages; it's positively brilliantly twisted. Smith is, mostly, a pretty typical memory-oriented machine language. So what makes it pathological? It's got *no* jumps, *no* branches, *no* control flow whatsoever. The program counter starts at zero, and every step…
I've got a real treat for you pathological programming fans! Today, we're going to take a quick look at the worlds most *useful* pathological programming language: TECO. TECO is one of the most influential pieces of software ever written. If, by chance, you've ever heard of a little editor called "emacs"; well, that was originally a set of editor macros for TECO (EMACS = Editor MACroS). As a language, it's both wonderful and awful. On the good side, The central concept of the language is wonderful: it's a powerful language for processing text, which works by basically repeatedly finding text…
Expanding on last weeks theme of minimalism, this week, we've got OISC: the One Instruction Set Computer. This is a machine-code level primitive language with exactly one instruction. There are actually a few variants on this, but my favorite is the "subleq" OISC, which I'll describe beneath the fold. OISC, aka the "One Instruction Set Computer" is based on the idea of the *Minsky Machine*. The Minsky machine is an extremely simply Turing complete machine proposed by Marvin Minsky. Back at the original GM/BM, I wrote an [article on the Minsky machine][minsky] and a simple [Minsky interpreter…
For todays dose of pathological programming, we're going to hit the worlds simplest language. A Turing-complete programming language with exactly *two* characters, no variables, and no numbers. It's called [Iota][iota]. And rather than bothering with the rather annoying Iota compiler, we'll just use an even more twisted language called [Lazy-K][lazyk], which can run Iota programs, Unlambda programs, as well as its own syntax. [unlambda]: http://scienceblogs.com/goodmath/2006/08/friday_pathological_programmin… [lazyk]: http://esoteric.sange.fi/essie2/download/lazy-k/ [Iota]: http://ling.ucsd.…
Todays dose of programming pathology is a monstrosity called *Linguine*. Linguine is a language that (obviously) carries spaghetti code to an extreme. You can see the [language specification][linguine-spec], or download an [implementation with examples][linguine-impl]. It's really a remarkably simple language. There are only 10 commands, including input and output: 1. "`x=y`": assign the value of y to the variable x. 2. "`x+y`": assign the value of x+y to the variable x. 3. "`x-y`": assign the value of x-y to the variable x. 4. "`x|y`": assign the value of x NAND y to the variable x. 5. "`x…
Todays programming language insanity is a real winner. It's a language called SNUSP. You can find the language specification [here][snuspspec], a [compiler][snuspcomp], and [an interpreter embedded in a web page][snuspinterp]. It's sort of like a cross between [Befunge][befunge] and [Brainfuck][brainfuck], except that it also allows subroutines. (And in a variant, *threads*!) The real beauty of SNUSP is its beauty: that is, programs in SNUSP are actually really quite pretty, and watching them run can be positively entrancing. SNUSP keeps its data on a tape, like Brainfuck. The basic…