Monthly Archives: September 2009

Information vs. Meaning

If you regularly follow comments on this blog, you’ll know that I’ve been
having a back-and-forth with a guy who doesn’t know much about information
theory, and who’s been using his ignorance to try to assemble arguments against the
Kolmogorov-Chaitin information-theoretic measure of information in a string.
In the course of doing that, I came up with what I think are some interesting ways
of explaining bits of it, so I thought I’d promote it to the top-level to share
with more readers.

To be absolutely clear up front: I’m far from an expert on K-C theory. It’s something that I find incredibly fascinating, and I’ve read a lot of Chaitin’s work. I’ve been fortunate enough to meet Greg Chaitin a bunch of times when we both worked at
IBM, and I’ve attended a bunch of his lectures. But this isn’t my main area of expertise,
not by a long-shot.

If you don’t know any K-C information theory, then you can look at my
introduction here. The rest is beneath the fold.

Continue reading

Two Dimensional Pathological Beauty: SNUSP

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 here,
a compiler, and
an interpreter embedded
in a web page
. It’s sort of like a cross between Befunge
and 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.

Continue reading

Two-Dimensional Pathology: Befunge

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 Befunge.
Befunge is the work of an evil genius named Chris Pressey.

Normal programming languages are based on a basically one-dimensional
syntax; the program is a string, a sequence of characters, and it’s processed
by reading that string in a straight-ahead fashion. But that’s not Befunge!
It’s got a two-dimensional syntax. Befunge is something like a two-dimensional
turing machine: the program is written on a two dimensionaltorus called the playfield. Each
instruction in Befunge is a single character, and where it’s located on the
torus is crucial – control is going to move either up/down or left/right
on the torus. All of the control flow is expressed by just changing the direction that
the head moves over the torus.

(In case you’re not familiar with a torus, it’s what you get
if you take a very flexible sheet of paper, and roll it so that you connect
the top edge to the bottom, and then roll that tube so that you connect the
left edge to the right. You get a donut shape where moving up from what used
to be the top of the page puts you on the bottom of the page; moving left from
the left edge of the page puts you on the right.)

Continue reading

The "Last Three Books" Meme

Via Tor.com, a meme that I thought looked really interesting.
What were the last three genre books that you purchased? Why did you purchase them?
And do they feel comfortable together?

  1. Daniel Abraham,The Price of Spring (The Long Price Quartet): This is the conclusion to
    Abraham’s Long Price Quartet, which is a wonderful set of novels. Each
    volume of the quartet is a self-contained story – but the pieces also fit together
    into a larger story-arc. The volumes each take place over the course of a season,
    and each is separated by about 20 years. It’s fantasy with very rare but incredibly
    high-powered magic. Certain people can, after significant training, cause an
    abstract concept to become a real physical being, called an andat
    which they can control. For example, the first book in the quartet focuses
    on “Seedless”, aka “Removing the part that continues”, which is the embodiment
    of the idea of removing children – whether that means removing the seeds from
    a bale of picked cotton, or performing an abortion by removing and killing the
    unborn child. The last book doesn’t quite live up to the promise of the ones
    before, but it’s still excellent. Why’d I buy it? Because I picked up the first one
    on a whim a while ago, and got hooked. I couldn’t wait to get the last volume. And
    you wanna talk cliffhangers? The last volume of this left every single woman in the home nation of the main characters, and every single man in the home nation of their enemies, completely sterile.
  2. Vernor Vinge, The Peace War: I haven’t started reading this one
    yet. Why’d I get it? Because Vinge is a genius. I’ve loved everything of his
    that I’ve read. But some of his early stuff, I was never able to find. Then a friend
    mentioned that it had become available for the Kindle! So I immediately ordered it.
    (And I do mean immediately – I didn’t even wait to get back to my desk – I pulled
    out my Android phone and ordered it from Amazon right in front of the coffee machine.)
  3. China Mieville, The City & The City: I just started this one;
    I’m about 70 pages in. It seems decent so far. The story of why I bought this
    one is interesting. Y’see, I don’t like Mieville. His writing always seems to
    me to be self-consciously but unsuccessfully stylistic – like Mieville sees
    himself as a brilliant prose stylist, while being unable to really pull off
    the brilliantly styled prose that he imagines he’s writing. But I keep getting
    his books – because I keep seeing reviews from people that I really respect
    that talk about how wonderful his prose is. I just don’t see it. He’s a decent
    storyteller – but I can’t see the beautiful prose that everyone talks about.
    It’s not that I don’t like artistically styled writing; I actually love things
    where I’m struck by the beauty of a phrase, and need to stop reading for a
    while just to bask in the beauty of the words; Brust’s “The funniest thing
    about time is when it doesn’t. I’ll leave that hanging there for the moment,
    and let you age while the shadows don’t lengthen, if you see what I mean.”
    from Yendi blows me away every time I read it. But Mieville just seems to be
    trying to write that way. Anyway, “The City and the City” is based
    on a wonderful idea, so I figured I’d give it a try. It’s a murder mystery set
    in a city which is spatially overlapped with another city. In some places (called
    “crosshatched regions”), you can see both cities at the same time unless you
    will yourself to “unsee” the other one; in other places, you’re solidly in one
    city or the other. And the two cities are actually different nations,
    so to cross from one to the other requires going through customs. Even
    not “unseeing” the other city is actually a crime. Brilliant idea; I’m really
    hoping he carries it off.

As for “are they comfortable together?” No, not really. We’ve got one
historical high-fantasy from an alternate earth; one gritty current-time
potboiler in a setting that has fantasy elements; and one far-future
hard science fiction. They really don’t make for comfortable neighbors.

So. What’s your three latest? Post ’em in the comments, or post ’em on
your own blog, and then link from the comments.

The One… The Only… Brainf*ck

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 people build programs.

One of my pathological obsessions is programming languages. Since I first got exposed to TRS-80 Model 1 BASIC back in middle school, I’ve been absolutely  nuts programming languages. Last time I counted, I’d learned about 150 different languages; and I’ve picked up more since then. I’ve written programs most of them. Like I said, I’m nuts.

These pathological programming language posts are my way of inflicting my obsession on you in a (hopefully) amusing way. You see, in this screwed up world of ours, there are lots and lots of thoroughly crazy people out there. In the world of geekery, many of those crazy people like to invent programming languages. Some very small number of them try to design good languages and succeed; a much larger number try to design good languages and fail; and then there are ones whose work I’m writing about. The ones who deliberately set out to design strange, warped, twisted, and nearly unusable languages, and succeed brilliantly. Most of the people who design them call them “esoteric” programming languages. I call them evil.

Today, the beautiful grand-daddy of the esoteric language family: the one, the only, the truly and deservedly infamous: Brainfuck, designed by Urban Müller. (There are a number of different implementations available; just follow the link.)

Only 8 commands – including input and output – all written using symbols. And yet it’s Turing complete. In fact, it’s one-up on just being Turing complete – it’s actually been formally specified with a complete formal theoretical design, called P”. And it’s even been implemented in hardware!.

Continue reading

Pathological Programming with Primes (REPOST)

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 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.

Continue reading