• Starcade full episodes online now. Holy Crap.

    I’d completely forgotten about this old TV show until Kotke mentioned it. I watched it whenever I could and was always jealous they got to place Dragon’s Lair (too rich for my blood) for the end…

    One thing I’m noticing with all these old game shows and shows from the 80’s in general: the production values are really low compared to today’s stuff, but I find the shows were a lot more entertaining. For all the flash and polish on today’s stuff, there’s just no meat any more. I mean, Deal or No Deal? Very fancy, but it’s horribly dumb. I dunno. Maybe I’m just getting old.

    (via Kotke)

  • Dojo’s little gems

    I really enjoyed Mitch’s article on YUI Lang’s little gems and thought it might be handy to see how to do the same things with Dojo. Here’s the translation:

    Trim

    var trimMe = "  trim me please  ";
    
    //YUI 
    var trimmed = YAHOO.lang.trim(trimMe);
    
    //Dojo
    // - exactly the same
    trimmed = dojo.trim(trimMe);

    Substitute

    var processText = function(key, value) {  
      return value.toUpperCase();  
    };  
    
    //YUI
    YAHOO.lang.substitute('Hello {world}', { world: 'earth'}, processText); 
    
    // Dojo
    // - Named placeholders are prefaced with a $
    // - No support for extraValues from Mitch's example
    dojo.require("dojo.string"); // not in base distribution
    dojo.string.substitute('Hello ${world}', { world: "earth" }, processText);

    Later

    // YUI 
    // - Docs indicate this return type void, which is a timer object?
    YAHOO.lang.later(200, foo, "method", [{ data: "bar" }]);
    
    // Dojo
    // - No abstraction for timers in Dojo
    // - Can use hitch to set calling scope for function
    setTimeout(dojo.hitch(foo, "method", { data: "bar" }), 200);
    //  or
    setInterval(dojo.hitch(foo, "method", { data: "bar" }), 200);

    Merge

    var defaults = { color: "red", answer: 42 };
    var config;
    
    //YUI
    config = YAHOO.lang.merge(defaults, { color: "blue" });
    
    //Dojo
    // - mixin takes a variable number of arguments
    // - Values are written to the first object, hence passing {}
    // - Later values have precendence
    config = dojo.mixin({}, defaults, { color: "yellow" });
  • SqueezeCenter + Hardy

    I upgraded my Ubuntu boxes to 8.04 last night and ran into but one issue: my SlimServer (now SqueezeCenter) would not start. Apparently I’m not the only one with this problem, and solution for now is to jam some more lines into your /etc/apparmor.d/usr.sbin.mysqld

    /var/lib/squeezecenter/cache/ r,
    /var/lib/squeezecenter/cache/my.cnf r,
    /var/lib/squeezecenter/cache/mysql.startup rw,
    /var/lib/squeezecenter/cache/mysql-error-log.txt rw,
    /var/lib/squeezecenter/cache/squeezecenter-mysql.pid w,
    /var/lib/squeezecenter/cache/squeezecenter-mysql.sock w,
    /var/lib/squeezecenter/cache/MySQL/ r,
    /var/lib/squeezecenter/cache/MySQL/** rwk,

    According to the bug report, the installer is fixed in trunk, so with the next release (7.0.1?) this won’t be an issue.

    Congrats to the Ubuntu guys for such a seamless upgrade! It was really smooth.

  • Commands

    My contribution to the meme:

    blowery@hermes:~$ history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
    170 cd
    78 ls
    55 sudo
    31 svn
    18 scons
    18 nm
    12 less
    9 grep
    8 rm
    8 make

    As for why these, here are some rough guesses:

    cd
    obviously we use a lot of directories and I end up moving around quite a bit.
    ls
    implicitly tied to cd usage I think. And I have a lousy memory for what file names in what dirs.
    sudo
    This meme caught me while I was setting up a new working vm instance, hence all the sudo. Normally, I don’t think I use it quite so much.
    svn
    svn is our source control management tool of choice
    scons
    scons is our build tool of choice
    nm
    nm lists the exported symbols in a library. I was tracking down a problem with MySQL and a broken exported symbol during the aforementioned instance install.
    less
    less is my pager of choice
    grep
    handy for finding things
    rm

    handy for removing things. I think this was related to MySQL causing me grief
    make
    everyone else’s built tool of choice and I was installing a lot of everyone else’s stuff