STASH: Filesystem as text adventure

I’ve been jonesing to put together a little text based adventure program recently, but time constaints have kept me from even playing one. Somehow my mind wandered off to a recollection of the old Doom fielsystem navigation program I ran across years ago… an amusing concept, if not particularly feasible for day-to-day use. Fusing the two ideas, I decided a text-based adventure type interface to the filesystem would be neat, something like the lovechild of bash (or pksh for me) and some nameless MUD tramp. Thus was born STASH, the Super Text Adventure SHell!

It’s not actually a shell, but a script and an aliases file. The aliases file defines actions, like ‘look’ and ‘eat’. If for some reason you come across a conflict on your system, just rename the alias. These aliases all call the perl script, passing whatever arguments (usually keywords and env variables) are appropriate for that action. The script then does its bit, which could be any thing from printing a simple message in response to saving your state to a database file. When you want to play you just source the aliases file (I’d put the commands to open a subshell, source the file, and display a small banner into a script).

The neat thing about this is that you can continue to get work done- it doesn’t change the fact that you are sitting directly in a shell, and it doesn’t even take up extra screen/desktop realestate! When you get bored and need to blow off some steam, just start playing, hopping back when appropriate.

So you’ve got the tools: now what? Well, if we’re using the filesystem and environment for the setting… create a map of the filesystem and start writing descriptions and interactions. If using a perl script, these should go into a module, so that a single script can be used to play, or even combine, modules. If each new directory is given as a package then additions become very easy to plug together using a startup script that pulls together the desired packages via ‘use’ statements. To randomize room contents and encounters, use the directory listing, the environment variables, and the process running at the time.

I’m considering a persistant command filter as well, such that the way you perform your work itself affects the game. What if using sudo spuriously cost MP, cd progressed game time, and ls might cause a random encounter? You might heal according to the value of the commands issued while the filter was in affect, or take damage according to the return value of commands…

$ cd ..

“The door is locked”

$ cd /root

“It’s awfully dark in here…”

I often am charmed into remaining in bed after I read the final bedtime book by requests to make up a story or poem. I take pleasure in dressing forms that please me in the trappings of childhood story, as is the custom of fables. Absurdity also comes readily to hand. Tonights’ spin like this:

1) Once there was a turtle, who was freinds with a fish. The fish’s name was kitty, and the turtle’s name was doggie. One day they swam all the way to the other side of the pond, where they met a cat and a dog. Then the dog ate the turtle and the cat ate then fish. The dog’s name was turtle. Guess what the cat’s name was?

Horace!

2) Once, there was a little girl who said, “Dadoo, that story was short, tell me a long story.” So he did, and here’s how it went: ” Once, there was a little girl who said, “Dadoo, that story was short, tell me a long story.” So he did, and here’s how it went: …. (This one seems to have developed an endearing quality, as it results in snuggles, thus reinforcing my retelling.)

Dark words and pictures

I stole some time in the last day to dip into two series I’ve meant to pick up for a while.

Animal Man : “Deus Ex Machine” The run of revived Animal Man written by Grant Morrison. I’ve enjoyed a lot of art whose artists decided to cast it as a “comic”; this is a comic in the most obvious, underwear pervert sense of the word, and it excels as a piece of art worthy of critical acclaim. Thankfully, sitting in bed and reading the first several pages out loud as my daughter fell asleep, I was not asked what a peyote ritual was.

Elf Quest: “The Grand Quest”

Somehow I haven’t gotten my hands on this until just now. It’s… Elf Quest.?! I grabbed a manga sized copy because it said “#1″ and I was in the same physical location, something that hadn’t yet occured. Now I’ll probably end up trolling through the Online Archive they’re releasing, trying to catch up with 32 years of comics. At least I won’t need to wait for the next one :)

Oh, and I also just started reading “Dresden Codak”, and it is wonderful. Very well illustrated and exactly on the mark to tickle my fancy… philosophy, psychology, physics, undead, robots, adventure, humor… it reminds me of good conversations I’ve had that turned into shared mini-stories. I think I may now recover from my sense of loss at the end of the “Perry Bible Fellowship”.

Don’t go in the basement!

<object width=”425″ height=”355″><param name=”movie” value=”http://www.youtube.com/v/dOptGLEOsJ8&hl=en”></param><param name=”wmode” value=”transparent”></param><embed src=”http://www.youtube.com/v/dOptGLEOsJ8&hl=en” type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”355″></embed></object>

Can you guess who did the score?

SSH woes: where do I go from here?

I recently rented a server, and in setting it up I moved sshd off port 22 and onto something script kiddies and worms will need to be more persistant to find. No problem… until I try to connect from my machine running XP, using PuTTY.

“Network error: connection refused” OK, normally this means I got something wrong… double check everything, try again… still no go. I’ll spare you the play by play and outline the situation as it stands:

I can connect to this host via ssh on the non-22 port from any other machine I try, using openssh clients or even the same version of PuTTY I tried and failed with from my XP machine.

I can connect to this host IF I set the sshd to listen on port 22. I tried several other ports and none worked for this particular situation.

I can connect to virtual hosts running on this host (at different IP addresses) on this alternate port just fine, even using PuTTY from my XP machine.

I can connect to it using WinSCP, and the WinSCP terminal. I cannot connect using SSHWinClient.

I’ve stripped my normal tcpwrapper and ipf rules for testing and stopped my Windows Firewall (all that should be running as a firewall on this machine.) Still no dice.

All behaviour on the XP box is the same on multiple user accounts.

My server’s auth.log doesn’t even show the connection attempts… so I’m pretty sure it isn’t a configuration on the server, or protocol conflict, but something on the XP box itself… nothing user specific, something OS in scope. I haven’t tried booting knoppix or ubuntu to see how they would fare yet, so I’m not sure it isn’t something beyond the OS, although what that could be is beyond me anyway.

Anyway, I’ve decided to get some real work done instead of trying to debug this right now, since I can get around it. But I’m all ears on suggestions on what to investigate next…

A minor satori (is all it took)

Like every bug, I did it to myself.

I was having difficulty figuring out why, after visiting a certain page on my development subdomain’s site, my session logged out. There wasn’t any code to do this… it’s cookie based… the cookie is there, but seems to change value, as if the session is being deleted. Finally, I notice that there’s a cookie for my production subdomain that uses the same name… and they both apply to the same domain. This means that if I were to try going back and forth between domains and hit a page that sets this cookie, my session is unrecognized by the other subdomain. But I haven’t been going back and forth… ahh, but I DO include an object on that page, and upon examination, the code that provides it is hard-coded to my production site. So I was surreptitiously loading content from my production site, which set the cookie, which conflicts with my dev session cookie because they’re both whole-domain cookies.

Changing the object code to apply only the current call’s subdomain cleared up the problem.

Hello dad, I’m chrooted into jail, and I LIKE it here

So I’ve spent most of my free time in the last month migrating all my old code from a shared hosting environment to a virtual server, where I effectively have root control of a freebsd server and manage it from the ground up. This has meant I can now do things like run mod_perl, fiddle with (and bounce, and bounce) apache, and get dedicated static IPs to run SSL (https) from. This has meant setting up these service from scratch (ok, from the very good scratchings on the FreeBSD port’s tree) and porting my code over. Luckily I started writing it with mod_perl in mind (back before my one and only test server died and I moved to a shared host) so there isn’t much work on that end. Then early this week I got another (virtual) server so that I can fully break out production and development, but that means I took a day off to sleep and finish grooming the new production server and configuring everything…

Which leads to me buying ”Practical mod_perl” to have the text on hand, which leads to paying $3.00 for the book, $7.00 for expidited shipping, and receiving a $50, 900 page technical reference off amazon partners. Sweet.

It also raises the question of what to do about a mail server. Poo.

Subversion property tools

I spent a good chunk of today writing up some svn command line tools for managing updates, commits and so on based on properties. This is largely in an effort to avoid full out branching, allowing us to differentiate between more frequent development commits (to track changes during development) and less frequent production-ready commits. By ignoring any revisions of a file past the most recent “production ready” tagging when updating we can ensure development and production maintain the same basis while without adding anything to the development cycle. Project name tagging will also allow us to track obvious and hidden dependencies for the purpose of recompiling… We currently have little build environment to speak of despite working so closely to the data structure itself, so sanity checking and such is largely… and acquired skill. It is also entirely undocumented.

Once I have them spruced up a bit I’ll put them up.

Diary of the dead

I saw Diary of the dead last night. I liked it in excess of what fault I found, most of which came from the somewhat burdened dialog. If you’re watching this it almost certainly isn’t the first zombie movie you’ve seen, nor are you unfamiliar with the social commentary embodied therein. Just add the thrill, chill and kill scenes to a story arc that give you a vehicle for your message, don’t push it through dialogue; it does nothing but make it harder to suspend disbelief. Recommended in proportion to the number of zombie movies you’ve already seen.

I’m watching Paprika for the third time since I bought it Saturday, but for the first time with just the English dubbing. It always find it interesting to compare the differences in the spoken and written english translations, including the different ways the voice actors portray their characters. Highly recommended for people who like pretty mental exercises and full length features with multiple subplots. Bonus points for already liking animation and foreign language movies.

Happy sweater day, Vernal Equinox, Ostara, and so on

Hope it was a good one.

Happy Pi day!

I honor of Pi day, I whipped up this little quizlet: Test your Pi power!

Hope you all had some irrational fun :)

Feel like breaking bugs

I have a template I apply before releasing a program at work, most of which is a header of documentation boilerplate. I included a “Bugs & Limitations” section, and prior to testing I list the limitations I can forsee that (I believe ;) fall outside anticipated usage.

More than once, just the exercise of writing this section has ”encouraged’ me to go back and make changes to the program, just so I can remove a limitation comment from the documentation. Not every limitation gets removed, especially for small, limited usage cases, and I find that putting in warnings for future maintainers provides an immediate sense of relief for some part of my release anxiety. If I’m unable to dump most of this anxiety by documenting or testing then it isn’t ready for release.

OK, so I also keep a to-do list, and will write down things I’ve done just to cross them off…

James Kochalka, American Elf

American Elf is the daily artblog of creative wonk James Kochalka. His band, ”James Cochalka Superstar“ has put out several albums and he has a few children’s books, including Monkey Vs Robot. He currently spends much of his free time composing bit-rock on his Gamboy.

I was prompted to write because not only did he recently open the archives of his daily, extremely candid, autobiographical webcomic American Elf to the public, but also because he and his wife just recently welcomed their second child into the fold. He may be one of the first fathers to capture some of the, um, funkier nuances of parenting.


A kiss for each
Get a star!
American Elf updates daily.

Back in Blue

Apparently those little blue imps are stocking their longships for another trans-atlantic invasion. that’s right. THE SMURFS ARE COMING (BACK).

Don’t say I didn’t warn you.

Demon Penguins

Having migrated all my data to an external drive, I’m hoping to squeeze my laptop’s windows partition down and install another OS this weekend. I plan on primarily using this new OS, but want to keep XP for gaming. I’m torn between Ubuntu and FreeBSD.

I’ve been into FreeBSD for a few months now, and I like it. I hesitate only because of the lack of native Flash support… while some people still grump about those new-fangled websites, and while I think it’s often inappropriately used, I watch a good number of videos (like the TED talks.) I know it’s possible to get some level of support, but it’s something I’ve failed to get working so far, and I don’t want to reboot just to watch a video.

Linux has better Flash support because Adobe decided to supply it to them. Not only do they not lend this support to BSD distros, Adobe expressly forbids BSDs from including it. It’s a commercial strategy based on their alliance with M$, as far as i can figure. There are Flash re-implementation projects, like Gnash, and there are ways of using the Linux binary code… but it’s a hassle, and Firefox seems to love to crash when I make the attempt (Opera just ignores it, but then, that’s to be expected.)

So if I install Ubuntu, it’s basically for the Flash. I guess at least I’ll be better able to help support others who want to migrate to Ubuntu. Some consolation…

I’m also on a simplification kick, so while I would typically just install both, I’m fighting that urge. For now. ;)

“Its All About Oil”-Alan Greenspan

“The Commerce Department has been forced by Judicial Watch to turn over records of spring, 2001 meetings held between Dick Cheney and execs from global oil giants, records that suggest that the group decided months before September 11th that the US energy policy would center on taking control of Iraq’s oil”

From Jon Talpin via BoingBoing

Up for grabs: of meals and fish

Whenever I get an idea for a site project, I tend to run to the command line and bounce from whois to whois, looking to see if I can find a good name that isn’t registered. OK, sometimes I don’t even have a good idea, I just like to see what I can find among the ever diminishing top level domain namespaces…

I’ve gotten better (I don’t want to go on the cart!) about not registering my finds until I’m SURE I have something worth putting up… but at $10 or so for a year registration it can be pretty hard. In an effort to offload the burden I’ve decided to throw whatever I find and am definitely not going to register up here.

The funniest ones are the ones that can be parsed in multiple ways, or provide options for interesting subdomains or e-mail addresses. For example:

  • meallover.com – As in “meal lover.” I was thinking ”me all over,” but who doesn’t love food? Good for a recipe / restraunt review blog. Ok, so there are other options too… like track, follow, lick…
  • ssismine.com -How would you like to get an e-mail from “your@ssismine.com”? I don’t send enough threatening e-mails to register that one. Maybe a fisherman would like this.b@assismine.com? Or a metal reseller: all.br@assismine.com?

If anyone does register a domain I post here, please let me know so I can see what you do with it.

Decentralized authentication scheme

Hmmm, I think I just had a worthwhile idea for a new authentication scheme that would work really well with the distributed nature of service clients and persistant, uniquitous nature of accounts. Now to work it out a bit more and find someone who can vet the details…

Little Miss Barker

“Mom, Dad, did you know I could shoot blood out my fingers?”

This is her way of engaging us, by calling us to question her weirdest fantasies.

“What if angry worms dropped out of the sky and ate our fingers?”

My dear little girl is three. I fear not for her future career as a horror writer.

(And no, I actually don’t watch scary movies with them, unless you count <u>Howl’s Moving Castle</u>. Maybe it’s hereditary)

Noodle Cart

Find an inexpensive food cart (or design and build) and sell noodles. Cheap vegan noodle dishes, like sweet potato noodles with peanut satay. FSM logo, obviously.