20.6.07

the turing tarpits

i am not a normally-sleeping human, luckily. tonight the blinds of the lab windows are open, leaving me a view composed of two huge panels of glass; outside, the city is grey and closed, the orange streetlights lighting the streets with umber and making the blue sky fade down to a luminescent violet. i'm the only one here, and i'll never understand why; it's magnificent.

i just got a simple bit of awesomeness today: the Turing tarpit. this is any machine, language or device which is Turing complete (it can perform any logical operation) and yet is considered useless for practical computing.

"54. Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy." --Alan Perlis, "Epigrams on Programming"

take, for example, the Brainfuck language. it's aptly named - i can't program in BF for shit, and i'm meant to be alright with code. here's the Hello World program in Brainfuck, stolen off Wikipedia because i refuse to compose any more BF code ever ever ever:

++++++++++
[>+++++++>++++++++++>+++>+<<<<- br="">>++.
>+.
+++++++.
.
+++.
>++.
<<+++++++++++++++.
>.
+++.
------.
--------.
>+.
>.


ouch. you should also go take a look at the shenanigans we gotta go through to divide things in this nasty-ass language, and that's in the standard dialect, with newlines - yeah, it has dialects, and it doesn't need to be set out like that. and no way to see the state of the program. and text-only compilers. you see why Brainfuck is a Turing tarpit? and why this is cool?

as a leaving note, the sky goes a simple uniform lilac just before dawn here. i have one of the best lives in the world, and i know it.

Lepht

No comments:

Post a Comment

[pls no ask about the vodka. debate is always welcome. remember, Tramadol fucks you up]