Archive for 2007




SHDH: Getting Songbird to sing on OpenSolaris

Contrary to much popular opinion, I’m not actually employed at Songbird to work on porting it to OpenSolaris… so I haven’t had any time to really work on it at all. Fortunately, next weekend looks free, and coincides nicely with SuperHappyDevHouse, yay!

So with that, I’m planning to be at SHDH 22 next weekend Jan. 5th… if anyone in the SF Bay Area wants to meetup to hack on getting Songbird running on OpenSolaris, t’would be grand. If you’re not in the area, we should try and coordinate via IRC. I know there are at least 3 people (Triskelios, Ken, & dynamicproxy) who have given this a shot already - so let’s try and coordinate efforts and get this thing singing.

2 comments December 27th, 2007

girl talk - night ripper

heard a few tracks from the night ripper album by girl talk last night, ended up being compelling enough to go buy and wow. what a great album.

i don’t think i’ve ever heard an album with so much sampling, it’s fantastic. the mixing of all the different samples is genius. to hear some old Stevie Wonder overlaid with DJ Funk transitioning into Elastica is just brilliant.

highly recommend this album.

Add comment December 24th, 2007

culinary macguyver

came home from work starving, cause my wife ditched me to join her coworkers at Ruth’s Chris Steakhouse. oh well. can’t blame her, i’d have done the same.

check out the fridge to see what i’ve got. not a whole lot. lots of half drunk beverages (thanks wifey), a bunch of cytomax (great for post-workout drinks - not so great for dinner), and uh… yeah. pretty bare.

fortunately, what i did manage to find was pretty huge: kimchee (slowly fermenting away). leftover steamed rice. eggs.

huge? yeah. huge cause then i remembered that can of spam i kept in the closet.

oh yeah. that’s right. spam. spam as in the mystery meat. spam as in the oft-ridiculed monty python stuff. spam as in the meat i’ve never actually ever eaten until 19 minutes ago.

there’s a korean place we go to in berkeley where i always order the kimchee spam fried rice, and i think to myself “damn, that can’t be that hard to make.”

turns out it isn’t. stir-fry the kimchee, toss in some soy sauce, kimchee, and rice. stir-fry more. stir-fry some more. throw on some sesame oil. stir-fry some more. set aside in a bowl. fry an egg sunny side-up. put egg on rice. eat.

woot! serve with an ice-cold Hite, and i’ve got my culinary macguyver korean restaurant comfort food. good stuff.

the only off-putting moment was when i opened up the spam. it smelled exactly like opening up cans of wet dog food. isis and char-siu even came running over and sat down next to me expectantly. their looks were communicating, “sweet. we don’t normally get two meals a day.”
sorry to disappoint, guys. but this canned mystery meat is mine. (it smells a lot better after some soy sauce, stir-fry, and a shot of bourbon (what?? like you’d smell spam and then eat it while sober??)

Add comment December 19th, 2007

Media Web Meetup: Portable Playlists

Our media web meetup last week was, imho, a great success. We had really good turnout, and a really interactive panel discussion between our four panelists:

  • Tantek Çelik (former Chief Technologist of Technorati, and microformats expert)
  • Lucas Gonze (XSPF and portable playlist guru)
  • Scott Kveton (Open Technology Lead at MyStrands)
  • Tom Conrad (CTO of Pandora)

Things got a little interesting with the debate over Flash (Tantek’s decision that “Flash is killing the web” vs. Conrad’s more pragmatic view of Flash as the default, if not standard). There was really interesting talk about XML formats and standards (and why you shouldn’t invent one), portable playlists, content resolution, etc.

I took some poor notes that inadequately covered the stuff - but one nugget I found particularly emphatic came from my colleague, Ethan:

Why use open standards? Because only the huge $$$ corporations can bear the cost of repeated proprietary closed integrations.

Better coverage can be found at Lucas’s blog or Scott’s blog

Add comment December 17th, 2007

east bay skeptics society

ran across the east bay skeptics society online last night while i was doing some googling/research for wendy’s job hunt.

sounds intriguing. i definitely want to go check it out sometime.

chinese food for dinner with a table of skeptics? could be good fun.

1 comment December 10th, 2007

i drank and drove

had a lovely weekend. spent sunday morning cleaning up the basement; this was the first good chunk of time wendy and i spent down there since it flooded, so it was nice to get things organised and sorted.

we then met geoff and chris for a terrific lunch at The New Zealander (or 1-866-I-EAT-PIE, no kidding) where we tossed back some Snakebites while Wendy and I had curry pies (yum). after lunch we wandered up the street, oggled geoff’s Kindle and then went slot-car racing at the HomeRoom Racing Club which was incredibly fun. $5 for 20 minutes? totally worth it. geoff pretty much cleaned up against the younger generation though i will protest that the wife got in my way on several occasions. ;-)

2 comments December 10th, 2007

php5 “Unable to fork” on Solaris

I was battling with inconsistent behaviour for grommit with PHP5 periodically (50% of the time, roughly) throwing the dreaded “Unable to fork” error (seen on both exec() & passthru() calls). Googling for it gives tons of great info for what causes this problem on Windows; but virtually none on Solaris.

Finally after some truss and DTrace-fu, I saw what was happening. exec() was calling open(), and since httpd is a 32 bit process, it was hitting the 256 file descriptor limit.

Booooooo. :(

A quick modification to /lib/svc/method/http-apache2 to do a:

ulimit -n 65535 LD_PRELOAD_32=/usr/lib/extendedFILE.so.1 export LD_PRELOAD_32

before the line calling apachectl at the end fixed the problem for me.

Seems like other people should have hit this problem though; which makes me curious why I don’t see any other hits on Google about it.

9 comments December 6th, 2007

power up!

just came back from the great western power company, the new climbing gym that just opened (last week!) in downtown Oakland.

man, it felt great. i haven’t really really climbed in a few years now, so it felt great to just go there for a couple of hours, and boulder by myself. the gym staff were friendly, the other solo boulderers offered good spots and even better advice, and i had a fun time despite not completing the V1 i swore i would do today. (just couldn’t match my hands on the last hold, and came tumbling down everytime). but i was able to do one V1, for what little that’s worth.

my hands are all dried and scuffed, i’ve got scabs on both my knees, and my arms are pumped beyond belief.

i bought a membership. :-)

Add comment December 1st, 2007

simple pleasures

leeks. spinning.

kept me entertained anyway.

1 comment December 1st, 2007

passing parameters to XMLHttpRequest’s onreadystatechange function

I’ve been smashing my head against this all day - but I finally got something working consistently and reliable, so I better damn well document it. This is as good a place as any, and hopefully it will be useful to others.

I needed to make an Ajax call, so I turned to my good friend XMLHttpRequest. One wrinkle was that I needed to pass in a parameter to it… so I tried:

var test = "bar";
req = new XMLHttpRequest();
req.open("GET", myURL, true);
req.foo = test;
req.onreadystatechange = function() {
    if (this.readyState != 4)
        return;
    if (this.status == 200) {
        alert(this.foo);   // should print out "bar"
    }  
}
req.send(null);

For the most part this worked. Except every now and then… when it didn’t. Most annoyingly, it failed pretty consistently when I was trying to use it within a nested Ajax call (complicated code, don’t ask.. it’s not interesting).

I’m not sure why it doesn’t work to be honest. From my understanding, req.foo should just instantiate a new foo member variable of the XMLHttpRequest object I just created and set it to be referenced via ‘this.foo’ inside any member function. I’m guessing it’s something to do with the scoping of onreadystatechange being set to the reference of an anonymous function so the anonymous function isn’t actually part of the XMLHttpRequest object and thus doesn’t have access to its member variables. What’s frustrating is that it works most of the time. A consistent failure model would actually be more helpful here.

Anyway, enough blabbering, here’s what seemed to work for me:

var test = "bar";
req = new XMLHttpRequest();
req.open("GET", myURL, true);
req.onreadystatechange = function(foo) {
    return function() {
        if (this.readyState != 4)
            return;
        if (this.status == 200) {
            alert(foo);
        };
    }(test);
}
req.send(null);

Now that works reliably for me 100% of the time.

6 comments November 27th, 2007

Previous Posts

Search

Pages


New Photos

2008-07-24 The After After Party @ OpenSourcery by Stephen Lau2008-07-24 Beerforge (The Songbird Party) by Stephen Lau
2008-07-24 OSCON Day 2 at the Booth by Stephen Lau2008-07-23 John Plocher vs. Jörg Schilling Sumo Wrestle by Stephen Lau
2008-07-23 OSCON Day 1 by Stephen Lau2008-07-22 OSCON Day 0 by Stephen Lau
2008-07-21 Bummin' Around Portland by Stephen Lau2008 Photos of Char-siu by Koshi by Stephen Lau
2008-07-05 Climbing Six Toe Rock at Castle Crags by Stephen Lau2008-06-28 Neighbourhood Beagles by Stephen Lau

Categories

Links

Meta

Calendar

September 2008
M T W T F S S
« Aug    
1234567
891011121314
15161718192021
22232425262728
2930  

Posts by Month

Posts by Category