Replacing Myself With JavaScript and Markov Chains
I’m too lazy to update this blog with new posts lately, so I wrote a bot to write new ones for me. It leverages the raw text of posts I’ve written going back to 2002. Try it here:

After it finishes loading, click on the button at the bottom of the page to generate a new post.
I’ve tried it out on Firefox and Safari and it seems to work on those. IE, I have no idea.
Details: It’s a Markov chain implemented in JavaScript. View source if you are so inclined (hint). The training phase was taking a long time, leading to “Slow Script” warning dialogs, so I broke it up into async chunks (and added the progress indicator) so hopefully it won’t crash your browser :)
The link called “here” in the text has some extra junk in it. The link on the image works, though.
Blake
28 Jul 08 at 1:03 pm
@Blake: thanks! fixed it.
banksean
28 Jul 08 at 3:23 pm
Crashed MobileSafari after some progress in bar. Progress bar never started progressing in FF 3.0.1 on XP. Worked A-OK in Safari 3.1.1 on XP! Can it program for you, too?
Gordon Mohr
28 Jul 08 at 6:09 pm
sometimes it generates code in the middle of an otherwise English sentence, but I haven’t tried running any of it :) That’s what I get for posting code in blog entries.
Not surprised that it crashed mobile safari. I’m sure it uses more memory than a normal web page. At least 600k for the raw text.
banksean
28 Jul 08 at 6:26 pm
broke in ff3, but worked fine in safari.
you certainly spout a lot of nonsense. but i guess that’s pretty normal for a blogger. :)
taj
29 Jul 08 at 1:29 am
It doesn’t work in any of the browsers I’ve got here though (Firefox 3.0.1, Konqueror 3.5.9, Opera 9.2.3 on GNU/Linux). Great idea though, I might try a server-side implementation on my own blog.
postlude
29 Jul 08 at 10:53 am
you should run all your old songs into some musical notation analyzer then adapt this current program to write songs you haven’t already written. That way you don’t loose productivity time doing lame stuff like work and/or whatever it is you kill your time with like breathing, eating bacon, and making graphs explaining how eating bacon and breathing are recursive endeavors.
MOOBS
4 Aug 08 at 1:49 pm
“Talking is pretty gross. It’s quite unappetizing, even when things go smoothly.”
More words of wisdom there from Mr Markov. Any particular license on that code?
Peter
8 Apr 09 at 6:09 am