Since roughly last August, I’ve been using a slightly out-of-date computer; Sempron 3000, 512 MiB RAM, integrated video, etc. Nothing special. I detailed my frustrations with integrated video + widescreen + Beryl/Compiz a while back, and I actually did something about it a month or so afterwards. Specifically, after a fair amount of hunting for a video card that would fit in the tiny case (grrr), I bought and installed a 128 MiB GeForce 7300LE.

Read the rest of this entry »

Alright, so Blackstream is Yet Another Python {Blog,CMS,Wiki,internet whatever}. At its most very basic level, it’s something for publishing things on the internet. The reason it can be all of the above is that almost all of its functionality is implemented through filters (same concept as running, for instance, ls -l | sort | less; the sort command is a filter in this case). Even such basic things as printing out the DOCTYPE are not part of the core of Blackstream. The basic way these filters work is:

  1. First, the content module gets whatever was requested, and shoves it into a bit object, which is essentially just a list, with some extra attributes to store metadata and stuff
  2. Then, the page module (which was how the above was probably called), gets the metadata (through the metadata module, and attaches it to the bit.
  3. After that, the filter looks for any filters that need to be run for the MIME type of this bit (text/plain or text/x-textile, for instance), and runs the bit through them.
  4. Once those are done, a transformer (more weird lingo) is used to get the bit into whatever output type we want (usually text/html). I’ve already implemented a ridiculously simple one that cleans out > and < from plain text.

These filters aren’t just used to format and parse pages and other bits from the database. They’re also used to add that DOCTYPE I mentioned earlier, along with anything else you might want (like a pretty sidebar, or some CSS). Even the code that calls all these filters and convenience functions isn’t part of the core; it’s implemented through a nice little function, registered through a decorator for a particular HTTP request method (GET or POST or whatnot). For instance, a function registered with:

@view.method('content', 'GET')

Would be called for an HTTP request like

GET /blackstream/content/foo HTTP/1.1

All of Blackstream is implemented in a very extensible and modular manner; you could theoretically ignore the entire filter/transformer system and hand code everything, or use a different way of retrieving content (the current implementation uses the filesystem for content and an SQLite database for metadata; it would be possible to retrieve everything from the database).

Don’t know how soon I’ll release anything. Hopefully within a couple months, or now to anyone who doesn’t mind pre-pre-alpha code.

NOTE: As of March 15, all of this is up in the air; I’m considering implementing a more generic framework based on semantic actions, that can be specified for MIME types and more general “types”.

Is uberosity a word? Firefox spellcheck says no, but it also says spellcheck isn’t a word, so who cares?

Anyway, my hope to blog twice weekly didn’t work. Here’s an update.

After saving up my money for a while (and debating whether to buy a Wii), I now have a widescreen monitor. Everybody I know and their mother has been told this, but I have to brag about it some more! I no longer have neck pain, and my parents are extremely envious. Only disadvantage: I’ve had to turn off all sorts of fun stuff in Beryl to prevent it from slowing to a crawl (and it still does whenever I have lots of windows open). Apparently my POS integrated video card isn’t meant to do complex 3D at 1440×900. Oh, well.
Edit: Nevermind. Apparently, running svn versions of Beryl isn’t a good idea, unfortunately. I am going to switch to Compiz with all the fun plugins turned off, now…

My nice little CMS is printing ‘Hello, World!’ from a file on my hard drive. Hello, World with only 700 lines of code is fun (and half of that is decorators I snagged from various places on the internet). I’ll post about the design sometime in the next few days. Trust me, it’s cool.

Bash and Searching

2007/01/17

Woo! Just discovered a really cool feature while messing around in the shell. It turns out that by pressing Control-R, you can do an backwards incremental (think Firefox’s find) search. Once you’ve found the line you want, you can run it with Enter or go back to the command line with the found text by pressing Escape. It sounds a bit obtuse, but it’s really cool once you try it.

In case you’re wondering, the above are two books by Spider Robinson. The two books are very different, but both are highly recommended by yours truly. Here’s why:

Callahan’s Key
For starters, don’t read this unless you’re not easily offended and willing to put up with some really bad puns. To give you an idea, the main character is a bulletproof barkeeper, who was telepathic a couple of times, and has a supergenius two year old daughter. It sounds really cheesy, but the novel doesn’t feel overdone at all, merely insane. Read it. Trust me, you’ll like it.

Free Lunch
While this novel isn’t as insane, it’s still definitely worth reading. Spider Robinson just rocks.

On Mariah Carey

2006/12/13

All of us have our guilty pleasures: a milkshake on the way home from work, or playing Super Smash Bros. until our eyes fall out. Mine, I’m sad to say, is Mariah Carey’s “Always Be My Baby”. Goodness, the name even sounds emo…
Perhaps I should explain a little bit. When browsing around the hard drive of my dad’s work computer (which I recently spent about 20 hours fixing, I’ll post that story soon), I found some music. Apparently, my sister downloaded some music from iTunes to load on her iPod when she got it for Christmas. After listening to the forementioned song a few times, I discovered that I actually really liked it. Since then, I’ve listened to it (according to Last.FM) 57 times. I am addicted to that song. Mariah Carey is a pop singer, from what I can tell, yet my counterculture instincts have failed to kick in. Oh, well…

Woo, the makers of WordPress, Automattic, will host a WordPress blog for you! This is really a much better setup than LiveJournal, simply because it is more attractive (i.e., an unconfigured blog doesn’t look like crap). Will browse around a little more and report back.