projects | github | twitter | rss | contact
September 2009

ruby, snow leopard, and dl

posted to writings on sep 3rd, 2009 with tags mac and ruby

more snow leopard breakage: ruby compiled for a 64-bit processor crashes when doing certain calls through the dl module.

the gd2 ruby module (which just dlopen's the gd2 c library) calls gd2's gdImageStringFTEx function which crashes the ruby interpreter. apparently this is an old issue that is still unfixed in the ruby shipping with snow leopard (1.8.7p72; why so old apple?) or any 1.8.7 for that matter. even after ripping out the old ruby and installing the latest patchlevel (174), it still crashes:

Continue reading 159 words...

on snow leopard

posted to writings on sep 3rd, 2009 with tag mac

pgp doesn't have a (non-beta) version of its whole disk encryption product that is compatible with snow leopard yet, so i was holding off on upgrading once my snow leopard dvd arrived. once i read that i would have to decrypt the entire drive (an ~8 hour process), uninstall pgp, upgrade, then re-install and re-encrypt the drive anyway, i figured i might as well do the first half now and wait for them to finally release the new version. please don't steal my laptop until i re-encrypt my hard drive.

installation of snow leopard was easy and fairly quick. i took screen shots of the drive in finder before and after to see how much disk space i saved, but since snow leopard now reports drive capacities in base 10, both values changed. before it was 6.95gb free on a 148.73gb drive. now it's 23.94gb free on a 159.7gb drive. i'm also not sure how pgp wde affected the disk space utilization, so i guess these numbers are meaningless.

Continue reading 835 words...

August 2009

having been destroyed, it is now indestructible

posted to writings on aug 7th, 2009 with tags karting and me

dave wanted to go karting, so we went to cir. i haven't been there in a year but the track 1 configuration is still the same. i placed 1st in all 3 races, setting the best lap time of the week on the first race with a 15.07. the pro karting guy (you can always tell who they are because they show up with their own nomex suits) that placed second must have got mad that i beat him, so he did the next race (with only 3 other people) and set a new week-best of 14.77. i got my best down to 15.02 on the second race, and then a 15.26 on the third race with a kart that had a really loose throttle cable.

though now that my helmet has a tinted visor, everything is kind of dark in an indoor karting track. luckily there were no turtle shells or banana peels to avoid.

Continue reading 157 words...

July 2009

running multiple x11 instances under mac os

posted to writings on jul 27th, 2009 with tags mac, openbsd, and ratpoison

i am heavily using x11 under mac os x with ratpoison as my window manager. combined with mac's "spaces", this basically gives me full-screen x11 (but not actually full-screen with a root window) and a bunch of xterms in one screen, full-screen firefox in another, and then other mac applications in the rest.

i am also a heavy gimp user, but the attempts to port gimp to mac as a non-x11 app don't work very well at all. since i'm using fink, installing the regular x11 gimp was as easy as fink install gimp2, but using gimp with ratpoison has never been fun.

Continue reading 535 words...

June 2009

my mac os x setup

posted to writings on jun 30th, 2009 with tags ipv6, mac, macbook, and openbsd, last updated on jul 8th, 2009

3 years ago, i was using mac os x as my full-time workstation operating system on a 12" aluminum g4 powerbook. i eventually got annoyed at some hardware issues with the powerbook and some software issues with mac os x, which prompted me to switch back to a new thinkpad x40 running openbsd (and then to a thinkpad x200, then random netbooks running openbsd).

a few weeks ago, i purchased a new 13" macbook pro and immediately tried to put openbsd on it; not so much because i'm an openbsd zealot, but more so because i'm so much more productive in it than in anything else and i quickly get fed up when i can't get something done (and can't fix it).

Continue reading 1,487 words...

May 2009

benchmarking cpus for no good reason

posted to writings on may 21st, 2009 with tags openbsd and ruby

adding integers 10 million times shouldn't take that long, should it?

openbsd 4.5 amd64 - 2.4ghz intel core 2 duo (thinkpad x200) - ruby 1.8.6 p368

Continue reading 347 words...


posted to writings on may 11th, 2009 with tags meta and openbsd

since i've gotten a few e-mails on it and google is still sending traffic to me, my openbsd on laptops pages are no longer here (and are now redirecting to this post). i removed them from the site in 2008 because all of the information was outdated, save for my current laptop. most of the laptop models i wrote about are outdated anyway, but even if you did find and purchase them now, i'd rather you try the latest openbsd release or a -current snapshot and see what works and doesn't, rather than rely on something i said about the state of openbsd a year ago.

my /laptops/ urls were temporarily redirecting to the i386-laptop.html page on the openbsd website, but that page was itself removed in february 2009. a few openbsd developers agreed that laptops aren't special hardware anymore and should just work without a list of hacks or special Xorg configs. if things don't work, file bugs and work to get them fixed.

Continue reading 238 words...

April 2009

on the dell mini 9

posted to writings on apr 23rd, 2009 with tags dell, laptops, mini, openbsd, and thinkpad

i bought the oqo 2 years ago hoping to have a truly portable computer that i could carry around and still access my familiar working environment, but for the majority of the time when i was at my desk, it could dock to a full-sized screen and keyboard. that plan didn't really work out too well since the hardware wasn't very compatible with openbsd and it was too small to really use without the dock anyway.

years later, netbooks became popular (and cheap) so i tried the hp 2133 and msi wind, using the wind as my only machine for quite some time. eventually the 1024x600 resolution felt kind of cramped so i went back to a full-sized laptop with the thinkpad x200. it has a 1280x800 resolution that was a nice improvement over the thinkpad x40's 1024x768, but it feels like more of a desktop machine than a laptop. it's quite big, its fan is on all the time, and the battery life isn't that great without the heavy 6-cell battery.

Continue reading 560 words...

March 2009

trying to game (part 2)

posted to writings on mar 10th, 2009 with tag javascript, last updated on aug 12th, 2009

in the first part of this story, i had created a greasemonkey (javascript) script to watch auctions on and log bidding activity to my server. after observing a few auctions, i altered my script to automatically place bids on my behalf every time the auction's counter ran down to 1 second.

the only way i could possibly lose in this scenario would be if some sort of network disruption occurred that prevented my browser from seeing the counter reach 1, or prevented my bid from reaching the server and being placed. my script would keep bidding until my account ran out of money to bid with, continually running the auction time left back up to 10 seconds, until i was no longer outbid.

Continue reading 1,634 words...

trying to game

posted to writings on mar 6th, 2009 with tag javascript, last updated on aug 12th, 2009

i read about a while ago and my first reaction was that it was a very clever concept for the site owners, but awful from an end-user perspective. in short, you buy a pack of bids for say, $30. bidding on an auction will cost you 75 cents (from your $30) and will increase the time of the auction by 10 seconds. if you are the high bidder when the clock runs out, you win, just like a real life auction, and in contrast to ebay which has a fixed time and you have to win by "sniping" and putting in a last-second bid.

on a typical auction for a new macbook (also in contrast to ebay, all products are sold new from the site, not sold used from other members of the site) valued at $1,299, the final ending price is only $172.84. therefore, the high bidder at the end of the auction gets to buy it for $172.84. of course, by that time, 17,284 bids have been placed (each increasing the price by a penny), each costing users 75 cents. the site has earned $12,963 just in bids, plus another $172.84, totaling $13,135.84 for a $1,299 laptop. in this particular auction, the winning bidder made 1,435 of those bids and spent $1,076.25 to win, so he's not really saving much. but on another auction for the same product the next day, the winning bidder only had to spend $57 on bids to win the macbook for $9.58. quite the savings for that person.

Continue reading 1,378 words...

on twitter

posted to writings on mar 5th, 2009 with tag twitter

i keep reading these articles about twitter where some old-timey news person says they don't "get" twitter. their complaint is usually, "who cares what you're eating for breakfast? why would anyone want to read that?" and i completely agree. this is a stupid reason to use twitter. people read the "what are you doing?" question on the twitter home screen and feel compelled to answer it, even if what they're doing is unimportant to anyone. i say this as someone who has maintained a public weblog for 10 years and posted a lot of unimportant things.

i think twitter's strength is not at all what its creators had in mind. while you can use it to keep track of what your friends are doing, its public nature makes it uncomfortable to use that way. and unless you're shaquille o'neal, the hundreds of internet strangers following you don't need to know what bar you're headed to tonight unless you hope to have them all join you. private services like loopt that integrate with phones and location services are better suited for that.

Continue reading 624 words...

February 2009

static files with apache 2 + mod_proxy + mod_rewrite + mongrel + rails

posted to writings on feb 22nd, 2009 with tags apache, openbsd, rails, and ruby

corduroy does everything over ssl and because of that, it was noticeably slow on my openbsd laptop with firefox 3. using tamper data, i was able to observe that firefox was not caching any of the stylesheets or javascript files, so on every page load it would have to re-fetch these few files (one of them being prototype at a hefty 28kb post-gzip). that ultimately seemed to be a quirk in firefox on openbsd since the same setup with the same version of firefox on my mac was caching them fine and safari was as well.

with the help of rails' stylesheet_link_tag et al. appending urls with "?1214348293", i was able to use apache's ExpiresActive to force very long expiration times on these static assets:

Continue reading 626 words...

January 2009

syncing itunes music with the android g1

posted to writings on jan 26th, 2009 with tags android, g1, mac, and ruby

i finally got around to putting music on my g1 and wanted a simple way of synchronizing an itunes playlist with a directory on the g1's sd card while it was connected over usb, just like my iphone used to once it was docked.

i found synctunes which is free (though not available on the author's site anymore for some reason) but it didn't preserve any directory structure on the destination and just lumped all of the files into one big directory.

Continue reading 364 words...

December 2008

god god

posted to writings on dec 7th, 2008 with tags openbsd, rails, and ruby

i'm using god on openbsd (kqueue) to monitor a dozen mongrel processes for various rails sites on one of my servers. i started using it just to have a simple way of restarting each collection of processes when i need to load new code or just start them when the machine boots up. eventually, i added cpu and memory checks to kill processes that go stray for too long, which doesn't happen that often.

however, now the task that constantly uses too much memory and cpu is... the very task that is supposed to be watching for tasks using too much memory and cpu.

Continue reading 198 words...

November 2008

watching the web discover

posted to writings on nov 29th, 2008 with tag web

the buzz around and traffic to is slowing down now and i'm amazed how many people responded positively and thought it was actually useful.

while talking to dave about it yesterday, he remarked something along the lines of, "of all the awesome, useful shit you've ever made, the thing that finally became famous was this stupid little site."

Continue reading 911 words...