[plt-scheme] My TWIFcomp entry, in PLT Scheme

From: Doug Orleans (dougorleans at gmail.com)
Date: Sat May 8 19:52:56 EDT 2010

A competition called TWIFcomp was recently held, in which people wrote
interactive fiction (IF) games whose source code was 140 chars or
less, not including whitespace or external resources (libraries or
multimedia files):

http://blog.templaro.com/?page_id=118

I submitted a game in PLT Scheme.  Since the comp was motivated by
Twitter, I decided to make my source code actually be tweetable, i.e.
140 chars including whitespace, with no tabs or newlines.  The game
itself, Manifest Destiny, was not particularly inspired, so it came in
around the middle of the pack in voting, but I was somewhat proud of
it anyway:

http://dhakajack.templaro.com/node/79

I ended up using Swindle, mainly so I could use "echo" and "1+"
(though the latter only saved me one character).  It would be nice to
have "echo" or something like it in the main PLT Scheme language;
"printf" is still a bit cumbersome when you just want to print
something with a newline.

Here's a chart of programming languages used (18 different ones):

http://blog.templaro.com/?p=172

Most of the entries were implemented in Inform 7, a popular
IF-authoring language.  I was a little surprised, since I think of its
syntax as being verbose (it's extremely natural-language oriented),
but since you get so much for free (the parser, basic world model, and
a large library of standard actions) you can use most of the 140 chars
for pure game content.  It's also helped by the
not-counting-whitespace rule, since it uses whitespace as syntax (a la
Python).

Also of interest is one entry written in ZIL (also fully tweetable
like my entry):

http://dhakajack.templaro.com/node/45

ZIL was the original Zork Implementation Language used by Infocom,
which was a descendant of MDL, a 1970s-era Lisp from MIT and a
predecessor of Scheme:

http://ifwiki.org/index.php/ZIL


--dougorleans at gmail.com


Posted on the users mailing list.