This is the archive for October 2005. Recent posts can be found at the main blog page.
Several people have been asking about my web project Anewt (Almost No Effort Web Toolkit) after my previous article titled A sneak peek at Anewt.
Today, I’ve been busy rewriting the
datetime module, which was a total piece of legacy crap that was not useful at all for new applications. It was never used in a real situation and was basically unmaintained for over a year. I opened bug #3528 to get some feedback and started implementing the new module.
Fortunately, most date formatting can be done using simple PHP functions, but since PHP’s function syntax is so inconsistent, a nice API to wrap all these is very nice to have. Any date that can be parsed by the
datetime module, can be converted to several formats, which include unix timestamps, ISO 8601 format, RFC 2822 format (used in e-mail and RSS feeds) and of course just the year, month, day, hour, minutes and seconds.
The other part the
datetime module takes care of is date parsing. Right now it handles a variety of formats, including unix timestamps, the formats used in SQL and, last but not least, various forms as defined in ISO 8601. A summary of my current implementation can be found in the comments I posted on the bug #3528 page.
datetime module provides a
is_valid() function that validates any parseable date. This saves you a lot of time checking user input (when processing a form, for instance).
So, Anewt is definitely not dead. It’s getting a lot of love lately and I’m looking forward to releasing a first beta.
P.S. Currently playing: Gotan Project (I’m in the mood)
Finally got the CPU Frequency applet to not only display the current frequency, but also show a menu to easily change the processor speed.
The problem was that my custom GNOME installation (using jhbuild) was not installing
/opt/gnome/bin/cpufreq-selector with the suid bit set, because I didn’t realise it was a part of the GNOME desktop (I thought it was part of the cpufrequtils package). Simple fix:
$ sudo chown root:root /opt/gnome/bin/cpufreq-selector $ sudo chmod 4755 /opt/gnome/bin/cpufreq-selector $ ls -al /opt/gnome/bin/cpufreq-selector -rwsr-xr-x 1 root root 52103 2005-10-02 16:07 /opt/gnome/bin/cpufreq-selector*
Thanks to the source code I was able to find out what was wrong.
Hi… hi there. Fine. How are you doing? Are you still there? Yeah, fine, how are you doing? What are you doing right now? Really? Oh well… Are you still there? Yeah? Oh. Well. Yeah.
No, I’m all alone… really, no one can hear me… no, not even Simon… Uh, what? I can’t hear you… better now.
I’m on a train… sorry, I can’t hear you… a train, yes, it makes a lot of noise… stupid trains… what?
No, I’m really alone… they would say I’m a stupid American tourist… yeah. I can’t hear you. Can you hear me? Yeah? Bye. What? Yeah, bye.
The Machinist is a mysterious film in which a skinny man (Christian Bale), suffering from severe insomnia, slowly loses control over his life and his mind. Strange events take place, but are those events real or just an imagination? The thin line between reality and imagination is crossed numerous times in this creepy picture, in which nothing is what it seems.
Christian Bale ate nothing but a can of tuna and apple each day, and he did that for a month. The result: losing a third of his total weight. Sick, huh? Yeah.
And yes, that’s this photo on my desktop.
Wouter Bolsterlee, also known as uws, a postmodern geek living in the Netherlands. Read more about me…
Unless stated otherwise, all material on this site is available under a Creative Commons Share-Alike license.