pathological programming

I'm currently away on a family vacation, and as soon as vacation is over, I'm off on a business trip for a week. And along the way, I've got some deadlines for my book. So to fill in, I'm recycling some old posts. I decided that it's been entirely too long since there was any pathological programming 'round these parts, so I'm going to repost some of my favorites. Todays programming language insanity is a real delight - it's one of my all-time favorites. It's a language called SNUSP. You can find the language specification href="http://www.deepwood.net/~drlion/snusp/snusp-1.0-spec-wd1.pdf"…
I'm currently away on a family vacation, and as soon as vacation is over, I'm off on a business trip for a week. And along the way, I've got some deadlines for my book. So to fill in, I'm recycling some old posts. I decided that it's been entirely too long since there was any pathological programming 'round these parts, so I'm going to repost some of my favorites. Today, we're going to take a look at a brilliant language called href="http://catseye.mine.nu:8080/projects/befunge93/">Befunge. Befunge is the work of an evil genius named Chris Pressey. Normal programming languages are…
I'm currently away on a family vacation, and as soon as vacation is over, I'm off on a business trip for a week. And along the way, I've got some deadlines for my book. So to fill in, I'm recycling some old posts. I decided that it's been entirely too long since there was any pathological programming 'round these parts, so I'm going to repost some of my favorites. As long-time readers know by now, in real life, I'm not a mathematician; I'm a computer scientist. I'm still a math geek, mind you, but what I really do is very much in the realm of applied math, working on building systems to help…
I'm currently away on a family vacation, and as soon as vacation is over, I'm off on a business trip for a week. And along the way, I've got some deadlines for my book. So to fill in, I'm recycling some old posts. I decided that it's been entirely too long since there was any pathological programming 'round these parts, so I'm going to repost some of my favorites. Today's pathological language is my personal all-time favorite pathological monstrosity. It's an incredibly combination of perfect simplicity and complete incomprehensibility. It's based on a piece of work calledFractran by John…
Sorry for the missed weeks of friday pathological programming language columns. To be honest, I'm running out of languages. I'm sure there must be more, but my usual sources (dealers?) are running out - so send links! Anyway, today I'm going to look at a really simple one, which I find fun. It's not an overly exciting language, but it is a language which is has semantics almost as trivially simple as [BrainFuck][bf], but which ends up looking almost as much like line-noise as [TECO][teco]. It's called [Betterave][betterave]. [betterave]: http://www.esolangs.org/wiki/Betterave [teco]: http://…
All week, I've been buried by a wave of requests to write about LOLCODE today. Normally, I do try to honor requests from readers, but from the time I started my friday pathological languages, I've always tried to stick to languages that actually had *something* interesting about their semantics. LOLCODE is funny because of its goofy grammar; but it's really incredibly dull semantically. And while there are lots of programs written in it, there's no implementation (at least not yet). Anyway, what I decided to do instead is a twistedly beautiful language called [Sortle][sortle]. Sortle is a…
Today's a mighty cool example of bizzare language design, called GammaPlex In terms of language design, it's nothing particularly special: it's yet another stack language with a befunge-like graphical syntax. What's unusual about GammaPlex is that it's strongly focused on graphics. It's got built in support for ascii graphics, OpenGL, and mouse input. Gammaplex is by far the most complicated of the pathological languages that I've discussed. It's got a lot of instructions, and a lot of weird tricky little things in how the machine works - and frankly, most of them aren't particularly…
I thought that it would be fun to stick with the "stack-based" theme of last week's pathological post, but this time, to pick an utterly pointlessly twisted stack based language, but one that would be appreciated by the mascot of one of my fellow ScienceBlogs. Orac, this one's for you! :-) Our target these week is the language "Enema". Enema is a remarkably simple stack based language. In fact, it mostly looks like a thoroughly trivial language - something like False, only simpler. It has a small family of simple commands: 0-9 Push the value of the digit onto the stack. + Pop the top…
While browser over at programming.reddit.com, I came across something simultaneously hideous and amazing. I've showed quines before as part of the pathological programming posts: a quine is a program which, when run, generates itself as an output. I've even written about a programming language where the only way to create a loop is through quining the program. But I've never seen anything like this before. It's a multilingual quine: the program below is not just a quine, but it's simultaneously a quite in three different languages: OCaml, Haskell, and Scheme. I have no idea how the…
Today's friday programming language insanity is a tad different. I'm going to look at another twisted stack-based language. I've got a peculiar fondness for these buggers, because back in the day, I was a serious Forth addict. One of the ideas that's actually come up in serious programming languages in the last few years is creating a sort of cross between functional languages and stack-based languages, producing what are known as concatenative languages. An excellent example of an extremely powerful and useful member of this family is called Factor, by Slava Pestov. But serious useful…
As promised, this week, I've got a new friday pathological programming language. This one is another 2-dimensional language, but it's pretty different from any of the 2d languages I'm written about before. It's called "Flip", and the warped minds behind describe it as being sort of like "Programmers Billiards". It's a seriously neat language, but it is pretty large and complicated. So I'm not going to describe everything about it in detail: you'll have to read the language manual for that. But I'll describe enough to give you the flavor of it, and show you a couple of examples to whet your…
Today's bit of pathology is a really silly, and really fun language called Clunk, with a downloadable package containing a perl implementation here. I'm not sure that it's Turing compete, but my best guess is that it is. It's another two dimensional language, but it's very different from any of the other 2d languages that we've look at, because it doesn't rely on an instruction pointer moving around the playfield; instead, it computes by creating an image by fitting together pieces according to some pre-determined rules. A Clunk program consists of a file containing a set of shapes. A shape…
For reasons that I'll explain in another post, I don't have a lot of time for writing a long pathological programming post, so I'm going to hit you with something short, sweet, and beautiful: binary combinatory logic. I've written in the past about lambda calculus, and it's equivalent variable-free form, the SKI combinator calculus. I've ever written about other combinator calculus based languages, like Unlambda and Iota. Binary combinatory logic, aka BCL, is a language based on SKI calculus - except that it encodes the entire thing into binary. Two characters, plus two rewrite rules, and…
For today's installation of programming insanity, I decided to go with a relative of Thue, which is one of my favorite languages insane languages that I wrote about before. Thue is a language based on a rewriting system specified by a semi-Thue grammar. Todays language is called Thutu (pronounced tutu); it's a string rewriting system like Thue, only it's based on regular expressions instead of grammars, and it's even got regular expression-based control flow mechanisms, making it a sort of hybrid language. The scary thing about Thutu is that it's not all that different from a language I've…
Todays bit of programming insanity is a bit of a novelty: it's an object-oriented programming language called Glass, with an interpreter available here. So far in all of my Friday Pathological Programming columns, I haven't written about a single object-oriented language. But Glass is something special. It's actually sort of a warped cross between Smalltalk and Forth - two things that should never have gotten together; in the words of the language designer, Gregor Richards, "No other language is implemented like this, because it would be idiotic to do so." In general, Glass using single…
What we have here is a truly warped language. Back in the very early days of what eventually became computer science, many of the people working in the field invented all sorts of automatons/computing formalisms. The one that I've always found the most confounding is the Tag machine invented by Emil Post. The tag machine is simple to the point of triviality. The machine is a queue of characters (with one character designated as "Halt"), and a set of rules. Each rule has a different character that selects the rule, and a string of characters. Each step, the machine looks at the first…
Insane Stacking Todays pathology is playing with stacks. Lots of lots of stacks. Stacks for data. Stacks for control. Stacks out the wazoo. It's called Kipple for no particularly good reason that I know of. Kipple happens to be one of the pathological languages that I highly recommend trying to write some programs in. It's crazy enough to be a challenge, but there is a basic logic to how you program to it - which makes figuring out how to write programs rewarding rather than just frustrating. Kipple has only four operators, and one control structure. Everything is really based around the…
In light of the recent posts and discussions about multidimensional numbers,today's pathological language is Recurse, a two-dimensional language - like Befunge, sort of. But I find it more interesting in its own peculiar little way. It's actually a function-oriented two-dimensional language where every function is rectangular. Underneath the two-dimensional layout, Recurse is based on a pretty simple computational mechanism. There are two stacks of integers, a left stack and a right stack; and a single register containing an integer. The basic commands are: Push: push the value in the…
I've had a long, difficult week, so I've decided to pick something pointlessly pathological for today. It's a remarkably goofy language called href="http://www.p-nand-q.com/humor/programming_languages/gplz/gplz_chef.html">"Chef", designed by David Morgan-Mar, in which programs are recipes. Since aside from being a programming language nutjob, I'm also a pretty good chef, combining two of my favorite things naturally has some appeal - particularly when done in a pointlessly twisted way. I said that programs in chef are recipes. I wasn't joking. The structure of a Chef program is a recipe…
Todays pathological language is actually in the form of a challenge for you. (Isn't that exciting?) It's a very clever numerical programming language in the vein of Conway's href="http://scienceblogs.com/goodmath/2006/10/prime_number_pathology_fractra.php">Fractran, called NULL. The author of NULL describes it as a reaction to 2 and 3 dimensional languages in the Befunge tradition; NULL is a 0 dimensional language - a program is just a single point. It's quite clever in its way; the only problem is that is that there's only one example program written in it. So the challenge is to see if…