-
14 Apr 2006
I wrote my first quine today, in Perl. It was surprisingly simple:
$_=q($_=$$; s/\\$\\$/q($_)/; print; ); s/\\$\\$/q($_)/; print;
Next step: ETA.
Update 13:03: Someone beat me to it. Warning: the first line of the source is 11k characters long, which crashed my browser.
Discuss -
4 Jan 2006
I wrote Three words, five minutes this morning after about a year of procrastinating. It was initially going to be big and complicated, but since that was the source of the procrastination, I made it a single frameset with Writeboard as the writing interface. TWFM makes it surprisingly easy to just go and get a little writing exercise, and even if it doesn't inspire something longer, then it was worth it.
Nomad has been ignoring work with it all day.
-
8 Dec 2005
I was inspired yesterday to work on a new Greasemonkey script. Reminded about Jesse Ruderman's Bash.org Instant Voting script, I made a similar script for flagging posts and comments on Metafilter. Metafilter Asynchronous Flagging allows you to flag posts and comments without having to go through the two interstitial pages and losing your line of thought in the thread.
(I had to flag one of my own comments approximately thirty times while I was testing it. I wonder what Mathowie thought about that.)
-
23 Nov 2005
I updated the Greasemonkey script "Flickr More Home" today. It used to get its data from the RSS feelds, but I'd had problems with the feeds not actually showing my contacts' most recent photos. Plus they'd always be missing non-public photos that I had access to.
So now it uses the HTML pages to get the list of photos instead. I don't know if that's harder on Flickr's servers (it's certainly less elegant), but since it caches them, it's only really two more hits per Flickring session.
Update 14 Dec - Fixed to work with Greasemonkey 0.6.4
-
22 Jun 2005
I was working on a Greasemonkey script yesterday, and I ran into a problem for a second time. I had data (in this case, XML, in the previous case, HTML) that I had retrieved via GM_xmlhttpRequest() (Greasemonkey's cross-site-capable and slightly more flexible implementation of the XMLHTTPRequest object). I wanted to grab some small piece of information out of the huge string, but the easiest way to do this that I could think of was with big ugly Regular Expressions. The data was goddamn XML, why couldn't I use DOM? The ideal solution would be if Greasemonkey added a responseDocument field to the data that it passes to the onload callback. Since the ideal solution is not currently available, I had to cobble something else together.
Update 9 Nov: I found a far better solution today. I can hardly believe it.
var xmlDoc; if (typeof(DOMParser) != "undefined") { var parser = new DOMParser(); xmlDoc = parser.parseFromString(x, "application/xhtml+xml"); }
-
25 May 2005
I've created a new Greasemonkey user script awkwardly named "Metafilter mark contact contributions". I mark people that I've met at meetups as contacts on MetaFilter, and I like to be able to have a reminder when I see something from that user. Slashdot has a feature like this built in (it uses small green and red globes), and I figured that with some of GreaseMonkey's cross-site XMLHTTP functions, this would be pretty easy. It was.
Install Firefox and Greasemonkey and right click here to install the user script. Here is a sample screenshot.
-
25 Mar 2005
I discovered the Firefox extension Greasemonkey in early March 2005. I had probably heard of it before then, but I don't know why it had taken so long for me to really look at it. It's exactly the kind of thing that appeals to me: injecting Javascript (often with DOM actions, possibly with Ajax) into any web page. Every once in a while, I come up with an idea for a one-off script. They're all available from my profile on Greasemonkeyed.com.
-
26 Nov 2004
The most recent news post for Steam contains this gem:
Next week we will be releasing the Source SDK, along with a surprise for the community.
-
14 Oct 2004
Flashback with me to my CompSci days (and realize how much I've forgotten, and how easy it is to remember) with this inefficient sort algorithms analysis. Check out the O(n! ^ 2) code at the end!
-
12 Oct 2004
Before this morning, I never really looked too carefully at the pie charts I was generating with GD::Graph. Then I had an epiphany, and suddenly they were the ugliest things anywhere. So I set about making them more beautiful.
