stephendeken.net a blog of insignificant proportions

Archive for February, 2009

KeyCastr 0.8.0 Released

Thursday, February 26th, 2009

KeyCastr 0.8.0 has been released.  Source is available on GitHub.

Diary-X Composer

Wednesday, February 25th, 2009

Back when Diary-X was still around, I was writing a Mac OS X application I called ‘Diary-X Composer.’  It was intended to be an offline version of Diary-X, allowing you to keep a journal on your local computer, and optionally sync it to the Diary-X servers.  I designed a glossy blue book icon for it, because I seem to always do the most useless parts of application development up front.

I never actually released a finished version — I posted one disk image, once, that was a very very early alpha version, basically just using the existing Diary-X code with a custom-built version of Perl.  I did, however, put my little blue book icon on it, because I thought it looked really cool, and I really seriously have a problem with doing the useless parts first.

Anyway, a few months back, Michelle and I consolidated our web hosting accounts to a neutral hosting provider (one that neither one of us had used before): HostGator.  The very first time I logged in to our account, my eye was drawn directly to their FAQ icon:

hostgator-faq

That’s my little book icon!  It’s been doubled for some reason, apparently because there’s a lot of frequently asked questions.  Every time I log in to the admin panel it makes me smile.

You’d think I’d know this stuff by now.

Thursday, February 12th, 2009

I’ve been using C and C++ for about ten years now, both personally and professionally.  And yet, I’ve never encountered a specific bit of syntax that I really should already know about: bit fields.  You can specify the specific number of bits required for integer members of C structs, allowing the compiler to take care of the bit masking and marshalling for you:

typedef struct foo {
    unsigned int flag_0 : 1, // one-bit variable (0..1)
    unsigned int small_enum : 4, // four-bit variable (0..15)
    unsigned int other_index : 3,  // three-bit variable (0..7)
} foo;

This struct will be packed into a single byte (actually probably a single int), which can potentially save quite a bit of space.  You could do the same thing manually by specifiying one “flags” field and doing the bit-twiddling on your own, but the bit fields make the meaning and the code a lot cleaner.

I’m embarrassed to admit that I didn’t know this even existed until yesterday, when I had to open up the NSWindow sources to look something up.

KeyCastr 0.8.0 Coming Soon

Monday, February 9th, 2009

I’m very close to finishing KeyCastr version 0.8.0. This version is a complete rewrite from 0.7.x, with improvements across the board:

  • Easier-to-understand source
  • Redesigned visualizer
  • Plugin architecture
  • Open-sourced under the BSD license
  • Redesigned icon
  • Menu bar item
  • …and lots of bug fixes

I’ve already promised a few people that it would be released two weekends ago, but I wanted to let everyone know that it’s really very close to being finished and will be released soonish.