Recent blog entries for wainstead

25 Apr 2016 (updated 25 Apr 2016 at 19:56 UTC) »

"Going forward, the only languages projected to see more use among front-end, back-end and IoT developers are JavaScript, naturally, followed by Go, Python and C++, which will see the most future use among IoT developers."

Node.js Survey: Enterprise Inroads, New Meaning for 'Full Stack' Developers

I've been building pyramids in Minecraft. I figured I'd write a function to calculate how many blocks I'd need given the width of the base of the pyramid.

def cnonb(number):
# "cnonb": computer number of needed blocks
# this is recursive, as it happens
if number raise Exception("Recursion failed: %s" % number)
if number in (0, 1):
return number # top block
# number times four minus four.
return ((number * 4) - 4) + cnonb(number - 2)

Waverous finally moves to GitHub

What with the imminent demise of Google Code (has it been around that long already?), it was finally time to move Waverous over to GitHub. Henceforth:

Syndicated 2015-03-12 22:26:00 (Updated 2015-03-12 22:26:38) from Wainstead

12 Oct 2013 (updated 12 Oct 2013 at 21:09 UTC) »

Wandering around the Stunt ecosystem and GitHub

I've spent some time today compiling Stunt, trying out Improvise and looking at my fork of Stunt on GitHub. Been a long time!

I had little luck playing with the console one gets via Improvise (think: a terminal emulator in the browser), but it was cool nonetheless. The experience was much like loading the Minimal.db that comes with the original LambdaMOO server code: pretty much anything you type ends in a cryptic error.

Reading more documentation cleared things up a bit. I've half a notion to build out a personal website based off of Stunt and Improvise. My recent thinking is to plunge into the Indie Web movement a bit and run a personal site: first, as a WordPress site (just to get going) and then perhaps rolling my own CMS using Node.js or Django.

(The ideation phase is always the most fun, when all things are possible and sound really cool in your head).

But the possibly-meaningless thought of "making a personal web site that is programmable by any user" has the weird appeal of the pre-Cloud days of the Web, and even the weirdness of the pre-World Wide Web days of the Internet. (LambdaMOO was born roughly the same time as the web).

Well, much to think about. I'd like to see Stunt become widely available via various package management systems (Fedora, MacPorts, etc).

Oh, I should note here I've moved to Key West, Florida. This came about after, one day in May, I was looking at the classified ads in the online edition of The Citizen, Key West's local paper. There was a job listed in Help Wanted that was perfect for my wife: Director of Development for the Key West Art and Historical Society. I teasingly sent the ad to her, she applied for it just to show me up, and landed the job. So in short order we moved from Las Vegas to Key West.

This spells the end of my technology-scene-building days for a while. Vegas was a tabula rasa as far as tech scenes go, so I plunged myself into every tech Meetup there was and started one of my own (Las Vegas Developers Meetup, for any software developer regardless of technology). I also cofounded the first Vegas GiveCamp, a weekend hackathon for charity.

But since at least the middle of this year I've longed to get back into open source development. Probably longer. I think the free time is now there to finally finish work on Automake and roll some Linux distro packages. 

Syndicated 2013-10-12 19:38:00 (Updated 2013-10-12 20:57:55) from Wainstead

Stunt is now C++

Over at, Todd Sundsted has released the C++ version of Stunt, his fork of the LambdaMOO server.

Much of my Waverous LambdaMOO went into it, even if not directly: Todd had done so much work on the multiple-inheritance addition to the MOO scripting language that my branch was too far out of sync with the mainline to be merged... but Todd used my branch as a guide.

See the announcment on the MOO-talk mailing list!

Syndicated 2013-06-22 15:49:00 (Updated 2013-06-22 15:49:36) from Wainstead

Long hot summer

I have nothing new regarding the project. I've been super busy running LVDev, participating in the National Day of Civic Hacking (I won the category "Best Civic Hack"), and organizing the first Las Vegas GiveCamp.

Lately I've been longing to plunge into more open source work though!

Syndicated 2013-06-05 20:50:00 (Updated 2013-06-05 20:50:17) from Wainstead

22 May 2013 (updated 22 May 2013 at 17:44 UTC) »

I've longed for an implementation of sdiff for Git, but in the meantime I have something that works great on OS X. It requires FileMerge, part of the developer tools from Apple. Hat tip to my friend Dale.

This works when:
  • You are in a branch,
  • the branch differs from master, and
  • the file you're interested in differs in your branch and master.

    The command is:
    git difftool -t opendiff $(git log --pretty=format:%H -1 master -- $1) $(git log --pretty=format:%H -1 HEAD -- $1) -- $1

    (I'm using subshell calls to get the SHAs of the file for the branch and master; a simplified look at the command is:
    git difftool -t opendiff SHA-master SHA-branch -- path/to/

    I put this in a shell script and call it with the relative path to the file. Git is picky about that relative path; it should be relative to the current directory your shell is in, and a directory that is in the repository.

    Assume you named the script my-sdiff. Example:
    my-sdiff relative/path/to/

    You'll be prompted at the shell with something like:
    Viewing: 'relative/path/to/'
    Launch 'opendiff' [Y/n]:

    Just hit RETURN and FileMerge should open, showing you a side-by-side comparison of the file.

    Vexingly, if you get the relative path wrong, nothing happens! If you don't get the Y/n prompt you probably have the relative path wrong.
  • Waverous patches soon to be integrated into Stunt

    I saw a wonderful message from Todd Sundsted this weekend on the MOO-Talk list:

    Next up, I'm going to start integrating Steve Wainstead's C++ patches into Stunt. This will give us better tools for abstracting away some of the complexity in the current codebase.
    I haven't been doing anything with Waverous for months now and this is a shot in the arm. In part I took a deep dive into Minecraft and spent a lot of time on it -- a few hundred hours of playing time.

    This was a direct result of reading Jane McGonigal's "Reality Is Broken: Why Games Make Us Better and How They Can Change the World." I never knew all those years of playing Grand Theft Auto were making me happier and mentally healthier. I sold my PS3 a couple of years ago and decided I wouldn't sink any more time into gameplay. When my wife took a four day trip to New Orleans I decided to spend the alone-time in a new immersive experience. I loved every minute of it.

    This is related peripherally to LambdaMOO development work in that some people still use MOOs to create and play games. The MOO I reside on does not do this, but one of the projects I want to pursue is use the package management system of Stunt to create some rooms and objects... I think prefabricated worlds (or even just portions of worlds) offer some good potential for wizards and world building. Imagine someone recreated the world of Harry Potter in a MOO: another person could contribute the Hogwarts Express, for example. The world builder might have two or three Hogwarts Express packages to choose from, offering different features. Todd's package management system will allow a level of sharing that was never possible before with LambdaMOO.

    I highly recommend watching Jane McGonigal's TED talk "The Game That Can Give You Ten Extra Years of Life."

    Syndicated 2012-12-09 21:50:00 (Updated 2012-12-09 21:52:54) from Wainstead

    26 Sep 2012 (updated 26 Sep 2012 at 16:41 UTC) »

    I haven't called AppleScript from Emacs in a while. Cooked up an Emacs command today to to make iTunes either play or pause, depending on its state. It's nothing fancy.

    (defun sw-pp ()
    "Make iTunes either pause or play"
    (setq apscript "
    tell application \"iTunes\"
    if player state is paused then
    end if
    end tell
    (do-applescript apscript)

    (An aside: I'm using the code HTML tag here to render the above code, which doesn't honor indentation. Using the pre tag double spaces the code, which strikes me as a bug).

    Formally, I should use (let) instead of (setq) (which creates and sets a global variable) but I'm too lazy to work out the syntax. Writing Emacs Lisp is not yet second nature to me.

    TIL Emacs's "echo area" is a different thing from the minibuffer.

    I was looking for a way to write to the *Messages* buffer only, and not to the "echo area" at the same time. The function message writes to both the "echo area" and the *Messages* buffer, which is too noisy for my little Emacs extension, desktop-auto-save.

    99 older entries...

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!