This post is about creating a server side z-code interpreter that represents game progress in the URI. Try it with the game Lost Pig.
I enjoy working on URIs and have the mug to prove it. Along those lines I've combined thoughts on URIs with interactive fiction. I have a limited amount of experience with Inform which generates Z-Code so I'll focus on pieces written in that. Of course we can already have URIs identifying the Z-Code files themselves, but I want URIs to identify my place in a piece of interactive fiction. The proper way to do this would be to give Z-Code its own mimetype and associate with that mimetype the format of a fragment that would contain the save state of user's interactive fiction session. A user would install a browser plugin that would generate URIs containing the appropriate fragment while you play the IF piece and be able to load URIs identifying Z-Code files and load the save state that appears in the fragment.
But all of that would be a lot of work, so I made a server side version that approximates this. On the Web Frotz Interpreter page, enter the URI of a Z-Code file to start a game. Enter your commands into the input text box at the bottom and you get a new URI after every command. For example, here's the beginning of Zork. I'm running a slightly modified version of the Unix version of Frotz. Baf's Guide to the IF Archive has lists of IF games to try out.
There are two issues with this thought, the first being the security issues with running arbitrary z-code and the second is the practical URI length limit of about 2K in IE. From the Z-Code standard and the Frotz source it looks like 'save' and 'restore' are the only commands that could do anything interesting outside of the Z-Code virtual machine. As for the length-limit on URIs I'm not sure that much can be done about that. I'm using a base64 encoded copy of the compressed input stream in the URI now. Switching to the actual save state might be smaller after enough user input.
At the grocery store the other day Sarah and I attempted to find shallot for a recipe, but I can't tell the difference between shallot, sweet onions, yellow onions, etc. etc. We found something that we decided was the closest we'd find in the store and I believe we picked correctly because at checkout the cashier rang it up as shallot.
I think this could be a practical problem that the 20q Pocket Mind Reader should be able to solve: obtain the name of an unidentified object. When we got home I decided to test the 20q Pocket Mind Reader on shallot. Unfortunately, it told me I had an onion, but I think if these were designed for identifying unknown objects based solely on information you can obtain by looking at it, rather than requiring knowledge of seeds, where it grows, etc. it would do better. Or I could just ask someone who works at the grocery store.
I signed up for the pre-release beta and purchased a Chumby last year. Chumby looks like a cousin to a GPS unit. Its similar in size with a touch screen, but has WiFi, accelerometers, and is pillow like on the sides that aren't a screen. In practice its like an Internet alarm clock that shows you photos and videos off the Web. Its hackable in that Chumby Industries tells you about the various ways to run your own stuff on the Chumby, modifying the boot sequence (it runs Linux), turning on sshd, etc, etc. The Chumby forum too has lots of info from folks who have found interesting hacks for the device.
When you turn on the Chumby it downloads and runs the latest version of the Chumby software which lets you set alarms, play music, and display Flash widgets. The Chumby website lets anyone upload their own Flash widgets to share with the community. I tried my hand at creating one using Adobe's free Flash creation SDK but I don't know Flash and didn't have the patience to learn.
Currently my Chumby is set to wake me up at 8am on weekdays with music from ShoutCast and then displays traffic and weather. At 10am everyday it switches to showing me a slide-show of LolCats. At 11pm it switches to night mode where it displays the time in dark grey text on a black background at a reduced light level so as not to disturb me while I sleep.
I like the Chumby but I have two complaints. The first is that it forces me to learn flash in order to create anything cool rather than having a built-in Web browser or depending on a more Web friendly technology. The second complaint is about its name. At first I thought the name was stupid in a kind of silly way, but now that I'm used to the name it sounds vaguely dirty.
I got a FlickrMail from Emma J. Williams a bit ago saying that they wanted to use two of my photos in their Schmap San Francisco Guide online travel guide. So now you can see two of my vacation photos on the Westfield San Francisco Shopping Center Schmap page and the Hotel Diva Schmap page.
I think its wonderful that digital cameras are at the point where I really don't have to know much about their workings to produce a photo that's reasonable looking. And its thanks to Flickr and searchable tags that Schmap could find my photos. Since my photos on Flickr are all licensed under a Creative Commons license named Attribution-Noncommercial-No Derivative Works 2.0 Generic which only applies to non-commercial uses, Schmap, which is advertisement supported, kindly asked me if they could use my photos. I agreed to their license which was human readable and included wonderful stuff like I get in place attribution and the license is only applicable while Schmap makes their guide freely available online.
Previously I've only heard of folks having their flickr photos used without their permission so I'm glad to know that's not always the case. Or perhaps this is just Schmap's clever method of getting me to blog about them.