• Supporting the ServerJS Standard On Axiom Stack: First Steps

    I've been following the ServerJS list on google groups for a while.  I'm excited about the emergence of javascript as a full-fledged modern language.   But it's sorely lacking in a lot of functionality we've come to take for granted in programming languages.  The ServerJS group has taken on the task of developing standard APIs and libraries to enable things like file system access, networking capabilities (although this is partially addressed by XMLHttpRequest) and a sensible, secure module system for pulling everything together.

    There are several usable implementations of the early ServerJS standard available right now.  So I sat down this weekend to see if I could integrate one of them into Axiom Stack (the open source server-side javascript framework that powers this site.)  I chose Narwhal simply because the primary maintainer, Tom Robinson, is focusing on support for the Rhino JavaScript Engine.  Getting things up and running ended up being pretty straight forward, so I figured I'd outline things here.

    On the surface Narwhal, and any other ServerJS compatible implementation, is just a library of javascript files that provide the standard APIs.  The underlying implementation relies on java packages though, which is why the Rhino engine is key.  Narwhal includes Rhino as a dependency and it also includes scripts for bootstraping the javascript environment in a JVM and loading the necessary js files.

    Keep Reading Supporting the ServerJS Standard On Axiom Stack: First Steps »

  • Add Your Current Facebook Status To Your Home Page

    Update: The most recent changes to Facebook broke this! Hopefully I'll get some time to fix it at some point.
    --

    Ever since the most recent Facebook redesign, you can't see your current status from the home page.  You have to go to your profile or find out through some other method.  This has been irking me, because the only time I update my status is when I got to my home page to read something and realize that it's old.

    Anyway, I was looking for something to do so I wrote a greasemonkey script that adds the status back to the home page.  You'll need the firefox add-on if you don't already have it.

    Keep Reading Add Your Current Facebook Status To Your Home Page »

  • Generating Abstract Text from HTML content

    In the world of online content management, we often want to introduce an article with a summary or abstract. The best example of this is the front page of a blog. You are presented with a list of the most recent articles with just a few paragraphs from each to get your interest. If want to continue you can click through and get the full text. Until recently, this blog didn't do that. It's a pretty important addition for me because my posts tend to run long, and my Home Page was getting pretty lengthy from just 3 posts. Here's the rundown on adding this feature.

    A Few Requirements

    First a little setup. Ideally this summary would be written specifically for the article and formatting nicely for it's space in the page. But since we live in the real world, we are generally given a few requirements for our system to make this easier. These are the general guidelines I used:

    Keep Reading Generating Abstract Text from HTML content »