Pythonaro blog

31 August 2007

In which my life gets rock&roll for 5 minutes

Several glasses of Champagne at 4PM, having had only a cake in the entire day, are probably not good. Can't remember passwords. Can't read pop-ups. Life is tough for a drunken geek.


posted by GiacomoL @ 3:34 PM   0 comments links to this post

29 August 2007

Firefox Add-ons :: Better Gmail

Lovely little extension containing the most useful greasemonkey scripts for GMail. Google Reader and Calendar integration is a must, the "filter assistant" is also a better way to create filters than the standard wizard. Lots of other goodies, definitely a keeper.

Labels: , ,

posted by GiacomoL @ 4:56 PM   0 comments links to this post

28 August 2007

Unfocused + unsolicited reviews of popcult items

That's what I feel right now. Spent three days pretty much doing fuck all, fixing the odd thing on the new home server and that's it. I have a horrible queue of books to read, but didn't feel really compelled to touch any of that. I have at least two projects to work on, but I wasted much of the time allocated to those.

We watched a couple of weird movies (which were the only ones mildly interesting at our local Blockbuster). Probably the weirdest was "Frozen Land", a Finnish flick on chaos theory, human depression, and the "interconnectedness of it all". Finnish movies are always so bare, they probably get it from their climate... Or maybe these movies are the only ones sold abroad, and as such they reinforce stereotypical images of "cool Helsinki", this "frozen land" of desperation, drugs, technology and strange sunlight. Suomi is extremely weird to hear, very odd in the European landscape, only vaguely Slavic... Should I ever need a language for talking whales, I'd use that.

Also seen "The Darwin Awards", a quick-buck-job for everyone involved (including Winona Ryder and Joseph Fiennes). "Inspired" by, the plot is an excuse to link together some of the freakiest (real) accidents described on the site. Production is TV-like and direction is simply bad. You can really see the Hollywood team, meeting over a (vegetarian) meal, banging together the movie... "ok, this one is basically like Jackass, but we wanna sell it to the Ryder crowd too which is a bunch of Gen-Xers with degrees... we need a "higher" subplot here, what about... a serial killer? maybe a literate serial killer?" "Yeah, that's clever! He could quote poets... like, beat poets!" "But we also wanna make it like this stuff if really real, or we lose the Jackass crowd... what if all was kind-of-filmed-on-super-8-sorta-thing?" "Yeah, cool!"... So Winona can pay the rent and Ferlinghetti can pay for the drugs (or the other way round), and you can have the odd laugh here and there while waiting for Joe Fiennes to get laid (which he'll invariably do, I guess his agent put it in the contract as usual) and go away. Did I say this caters to the Jackass crowd? It even has the unavoidable Metallica guest appearance, full of shit as they usually are.

I'm currently in the middle of The Third Policeman, surreal book recently rediscovered thanks to random product placement on Lost. Better books than BMWs, I guess. Review when I'm done.
( And since we are on product placement, the last Bond movie was a very stylish 20-minute-long film followed by an hour of adverts. What a waste. )

The Third Policeman
by Flann O'Brien

Read more about this title...

I've finished the first book from the Earthsea tetralogy (or "quartet", as they put it). I hadn't read fantasy for a looooong time, and this book reminded me why. The careful use of epic language never falls in common traps and avoids boring down the reader in useless world-building details... but it left me with a sense of "so what" which didn't really push me to read the following books. Enjoyable distraction, probably very good for teenagers (no disrespect intended here).

The Earthsea Quartet
by Ursula K. Le Guin

Read more about this title...

So many other books on the shelf... "From the Gracchi to Nero" is a lovely introduction to Roman history; it reminds me at every page of how similar they were to us, how they really built the foundations on which every "democracy" (i.e. "extended oligarchy") now runs. We went from daggers in the dark to sex scandals, but the concepts are the same, the political questions are still the same (who is a citizen? What is Law? Who executes the Law?). You could probably write "The Emperor's West Wing" in five minutes; now that i think of it, HBO's "Rome" is more or less that, plus the customary brawls and orgies.

From the Gracchi to Nero: A History of Rome from 133 BC to AD 68
by H. H. Scullard

Read more about this title...

Labels: , ,

posted by GiacomoL @ 4:00 PM   0 comments links to this post

27 August 2007

For people tired of technical (or personal) posts...

You can subscribe to only the "personal" part of my blog. You need to use this feed (right-click, copy link): Subclassed (only "personal" posts) (if your news aggregator doesn't like it, try adding "?alt=rss" at the end). I should probably put this on the sidebar... Added to the sidebar (broken in IE, fantastic).

UPDATE: if you'd rather have only the tech posts, you can use this other feed: Subclassed (only "GeekDiary" posts).

Labels: ,

posted by GiacomoL @ 12:30 PM   0 comments links to this post

svn+ssh from Windows

Another one for Google, since currently the first hit is from a muppet advising to use a commercial product... If you want to connect to a Subversion repository using the standard SSH tunneling (svn+ssh), but you have a Windows workstation, you can use the Putty utilities. Here's what you need to do:
  1. Go to the Putty download page and download putty.exe, plink.exe, puttygen.exe and pageant.exe (since you are there, you might as well get the full installer, since stuff like pscp is also very useful). Put them in your Windows PATH (e.g. C:\Windows) -- you don't need this if you ran the installer).
  2. Start puttygen.exe and click Generate to generate a key. Enter the comment (usually your email) and a password. Then save the private key somewhere safe.
  3. Start Putty.exe and connect to your machine, with the user/pass you use when working in Subversion.
  4. go back to the puttygen window, and copy the generated key text
  5. in the open ssh session, type
    echo '

    then right-click and Paste then
    ' >> ~/.ssh/authorized_keys

    then Enter
  6. close Puttygen ad exit the ssh session, start Pageant. A small icon will appear in your taskbar.
  7. Right-click on the icon, "Add key". Select your private key and OK, enter the password.
  8. open a new command window, and try this:

    You shouldn't be asked for a password, and be straight in. Perfect! One last thing...
  9. go to your %APPDATA% directory (C:\Documents & Settings\your-name\Application Data), and enter the Subversion folder. Open the "config" file, locate the [tunnel] section and add this line before saving & closing:
    ssh = plink
  10. Now you should be set! Try doing
    svn co svn+ssh://

I don't know if using TortoiseSVN or other UI this process can be easier or more complicated. This works, and it will give you the standard basic svn+ssh features.

Technorati Tags: , , ,

Labels: , , , ,

posted by GiacomoL @ 11:54 AM   0 comments links to this post

26 August 2007

It's 4.52 AM (GMT +0)

This, folks, is why I stopped drinking coffee. Also, this is why they call 5 PM "tea-time". Tea-time, not "latte-time" or "espresso-time". I wonder how long I'd stay awake with amphetamines. Better not to try.

Labels: ,

posted by GiacomoL @ 4:45 AM   2 comments links to this post

Notes on mod_mp3 running on OpenBSD 4.1 default apache (under chroot)

The default Apache instance on OpenBSD runs as chroot (8) in /var/www. This creates problems when trying to run mod_mp3, which needs binary modules outside the chrooted environment. To fix it:

mkdir -p /var/www/usr/local/lib /var/www/usr/local/sbin
cp /usr/local/ /var/www/usr/local/lib/
cp /usr/local/sbin/mod_mp3-enable /var/www/usr/local/sbin/ 
(not sure if mod_mp3-enable is really required, but wth)

Also consider that the directories containing MP3s must be reachable by the chrooted environment with the same path as in the original environment. So for example you want to do something like this:

mkdir /var/www/music
mkdir -p /var/www/var/www
cd /var/www/var/www
ln -s /var/www/music music
and then in /var/www/conf/mp3.conf you'll specify the directory as /var/www/music.

(And after figuring this out, I've found that I'm screwed anyway, because I'm storing the MP3 files on a different disk, which by design is not reachable inside the chrooted environment. Either I move the entire chrooted environment on that disc, or I stop worrying and learn to love samba shares.)

Technorati Tags: , , ,

Labels: , , , ,

posted by GiacomoL @ 3:32 AM   0 comments links to this post

25 August 2007

how to configure WG311v3 / Marvell Libertas 88W8335 on OpenBSD 4.1

This post is for Google (and for my future self).

The Netgear WG311v3 PCI wireless network card is listed as "supported" by OpenBSD 4.1 thanks to the malo driver. Unfortunately, you need a binary firmware blob which is not legally distributable, so it's not included by default; it's somehow available anyway and linked by the man page for the driver. The abovementioned man page also implies that you are only a pkg_add away from making it work, which is not really true. This is what you need to do:

  1. Go to the malo firmware repository and download both the 1.2 and 1.3 package.
  2. Install the 1.3 version with pkg_add (1)
  3. untar the 1.2 package
  4. copy the extracted mrv*.fw files to /etc/firmware
  5. set all your options with ifconfig, keeping the interface down (VERY IMPORTANT). In my setup, I set the nwid (aka ESSID) and nwkey (aka WEP key, which must have the "0x" suffix if expressed in hexadecimal); setting the channel or the bssid was counter-productive, better leave the interface figure it out by itself.
  6. Then bring up the interface, and do the dhclient dance if required.
NOTES: in my experience, setting a hostname.malo0 file for the interface doesn't work. Somehow, it only works if you use standard ifconfig (8) commands, making sure all the required options are set before bringing the interface up. I don't know if this depends on the network startup scripts or what, but eventually I had to add the command sequence in my rc.local.

Also, bringing the interface up & down can have unpredictable results. Sometimes the firmware won't load when you try to bring it up again, sometimes it will error out; in these cases, better to reboot. There must be a way to unload these blobs from the kernel, I just don't know it yet. Lazyweb...?

Ah, the evils of closed drivers. Unfortunately, my trusted hardware pushers didn't have any other supported PCI wifi card, and USB ones are even more evil. Anyway, I'm happy it works now. I hope this post will be helpful to somebody else as well.

Technorati Tags: ,

Labels: ,

posted by GiacomoL @ 10:21 PM   1 comments links to this post

23 August 2007

PyConUK 2007 update

The full schedule of tutorials and talks at PyconUK 2007 has just been posted. Yay! Anyone from Manchester going? I'm currently thinking of using the train, but I'd happily share car costs with someone else.

I'm probably going to see this list of talks: Saturday


Looks like it's going to be a fantastic weekend!

Labels: ,

posted by GiacomoL @ 10:11 AM   2 comments links to this post

20 August 2007

Live Search Maps sucks

I wanted to post a simple map about my daily commuting, using the "insert map" plug-in for WLW, but the map at Microsoft's Live Search Maps is so spectacularly bad and inaccurate that I really can't (and of course, the plug-in doesn't work with GoogleMaps). Entire areas of Stockport, UK (one of the primary business destinations in the North-West of England since the XIX century, not your average residential 'hood) are completely unmapped. The maps are provided by NAVTEQ, so shame on them... I remember seeing one of their cars regularly parked, when I used to live in Chorlton (one of the most expensive areas in Manchester right now), but apparently they couldn't be bothered to properly map that zone as well. And this stuff supposedly powers GPS navigators. Did Microsoft buy 10-year-old maps...?

Labels: ,

posted by GiacomoL @ 10:45 AM   1 comments links to this post

We Meet Again, Mr. BSD

Over the weekend, while weathering a cat.5 thunderstorm called "wife", I managed to finally install OpenBSD on the spare machine I got from a friend. These are my thoughts on the experience.

I had a few run-ins with *BSD flavours in the past (especially NetBSD, with which I was, for a few months, slightly obsessed when I was 19). I honestly didn't remember the "disklabel(8)" thing, which is, at the same time, quite an ingenious device and a fairly big PITA. The concept is that FFS, (the filesystem used by BSDs -- from what I understand, a variation on UFS) doesn't really need more than one primary MBR partition, and doesn't really want to deal with "classic" (DOS) logic partitions either. They take one primary partition and "slice" it in "labels", basically implementing their own logical partitioning scheme. This is all fine and dandy, but unfortunately the tools for this sort of slicing are really bare, and still force you to work with cylinders and heads and sectors; party like it's 1981!
Something slightly more intuitive, like cfdisk(8), would work wonders for adoption rates, but it's clear that the OpenBSD project doesn't really care about adoption rates(which is fine, their priorities are different).
So, the main giveaway is this: don't try to do anything clever, just get a big primary partition and leave other filesystems alone.

Once past this initial hurdle, however, installation is incredibly easy, and will leave you with a bare system in which everything is turned off, apart from (optionally) the OpenSSH server. This is perfect for a server machine, and that was exactly my aim for this box. 

OBSD's hardened version of Apache comes preinstalled, but I had to install Subversion, Python, MLDonkey and a few other apps, so had to learn a little bit about pkg_add(1) (ah, memories of Slackware here...). Apparently, you can configure it to automatically download binary packages (pkg_add -i), but somehow I missed this and ended up manually downloading the binaries, which was a bit slow. I didn't attempt to get java, I understand you have to compile it from sources and can take ages. I did setup the ports source tree, though, and successfully built a couple of utilities, just for kicks; being a predecessor to the Gentoo "portage" system, it looks like a simplified version of it, and works fine.

Samba was so easy to set up, it wasn't even funny.

The only thing I didn't manage to fix, being a newbie admin when it comes to serious stuff, is DNS. This machine will not act as DHCP server (have an integrated router for that), but I'd like it to work as nameserver for the other computers in the LAN. I read a few howtos here and there, but they either cover a dhcp+dns configuration or pure Internet-facing stuff, which is not what I want. Any pointers would be appreciated.

Now I just have to buy a wireless card for it, being careful to get a supported one (either this Netgear WG311 or the Edimax EW-7128G), and then I'll finally have an always-on box to use for downloads, mp3 streaming, svn repository etc etc. Who knows, I might even expose ssh and apache to the Internet. Scary! :)

Technorati Tags: , , , ,

Labels: ,

posted by GiacomoL @ 10:29 AM   3 comments links to this post

14 August 2007

Jonathan Mayor - thumbs up

Seen him at the iguana bar last night, it was funny. Black spin on stereotypical gay/trans stand-up routine, well executed, definitely worth the £3 ;)

I was wondering, there must be at least one or two places like this in every major city... What about Bologna? A cheap place where you can see live stand-up every week? There used to be the "Ruvido", but from what I understand it's now just another disco.


posted by GiacomoL @ 12:32 PM   0 comments links to this post

10 August 2007

Switching from Bloglines to Google Reader

Ok, I switched. Two things made me jump:

  • Bloglines doesn't understand when changes to posts are significant (e.g. one or two paragraphs added / removed versus single characters fixed here and there after normal spellchecking).
  • I tried to "claim" my feed to use the "Publisher Tools", and it fails to authenticate me to Blogger. From the support forum, this has been an outstanding problem for months, and nobody cares. Ridiculous.

So I proceeded to do the OPML dance and now I'm trying out Reader. First gripe: it doesn't let me rearrange folders in non-alphabetical order. Second gripe: you have to scroll the flipping page, even when it only contains one post, to mark it read while in "expanded" view. I don't understand why they can't launch the JavaScript on display, instead of waiting for the scrolling event. On the plus side, updates seem fast; the "starring" concept is more appealing than Bloglines' "keep new" and (slower) "clipping"; the "sharing" feature could be nice (once I understand exactly how it works). The provided stats are nothing more than novelty, I'd rather have some serious "publisher tool" (eh) without having to switch to flipping FeedBurner.

I've also heard good things about NetVibes, but I hate "boxes" views so I was instantaneously discouraged from trying it. Any other aggregator out there? I'm interested in "same or more features than Bloglines", not in "simple" tools.

Update: I'm also trying NewsGator. So far: very slow, cluttered, "unread" numbers completely made up, and for some reason I'm always subscribed to 100 feeds when Reader tells me it's 101.

(Oh, and I'm trying to tag this post.)


posted by GiacomoL @ 11:08 AM   2 comments links to this post

09 August 2007

Testing Windows Live Writer

It seems only fair to give WLW a shot as well. It's actually very, very good, certainly the best blog client I've ever tried (even though I wish it'd allow you to enter arbitrary HTML tags -- but hey, plugins!).

As usual, Microsoft gets there late, but will probably manage to steal the show.

BTW, just to test a few plugins... last night we watched this "little" movie:

(uhm, what a huge box. And why the hell does it include various people in the link? Whatever.)

Update: when you update a post, sometimes a Blogger blog is not automatically republished. Bit of a PITA.


posted by GiacomoL @ 11:42 AM   2 comments links to this post

Testing Atomic

Posting this with the Atomic plugin for Firefox, an APP client. Maybe i should try Windows Live Writer too...

Update: after managing to adding a "Service" (required a second Firefox restart after creating the new file to store preferences), it works very well. Pity that the WYSIWYG editor only works when creating new posts, not to edit old ones. Not sure what the "Categories" tab is supposed to work, I guess i'll have to RTFM. Who knows, maybe i'll start updating this blog again...


posted by GiacomoL @ 10:42 AM   0 comments links to this post