badcomputer.org
Monday, March 24, 2008
Brand new rig
I have bought and built a new computer. The sad thing is that I really didn't need a new computer. The old Athlon XP 3400+ was still just as fast as I ever needed. However: all my media files were getting increasingly cramped on my old fileserver and I needed to add space. I looked into getting more disks for the old one, but it has IDE (no SATA) and large IDE disks are getting hard to find. Plus I wanted to check out some RAID action for the first time. So, I decided on a whole new machine to assume the roles of my main desktop and media server. Here are the specs:
- AMD Athlon 64 X2 5200+ Dual Core Processor.
- ASUS M2N-E Motherboard.
- OCZ Platinum XTC DDR2-800 Dual Channel Memory (4 x 1GB).
- Hitachi Deskstar 500GB SATA2 HDD (x 3).
- EVGA E-GEFORCE 9600GT PCI-E video card.
- Samsung SH-S203B Black SATA DVD+RW 20X8X16 DVD-RW 20X6X16 DL 18X/12X INT DVD Writer.
- Acer X203W 20" widescreen LCD monitor (x 2).
- Antec Fileserver Case.
I was originally only going to get 2GB of RAM, but it was so insanely cheap that I doubled up. The upshot of this is that I can now compile gambit with the big-iron USE flag set. Also, I usually only ever purchase either WD or Seagate hard drives, but I cheaped out this time and got the Hitachis. The significant savings over the "name brands" spread over the three disks sealed the deal. Hopefully my cheapness won't burn me. I am not used to being so bleeding edge: The 9600GT vid card required beta drivers from nVidia released just a week prior to my building this computer. Ironically, I purchased this card because it was the cheapest nVidia dual-port PCI-E card I could find. Once again I am using Twinview to run a dual-head setup. This time I am running the two 20" widescreens for a desktop of 3360x1050 px. Replacing the CRTs with LCDs has freed an incredible amount of space on my (real) desktop.
I mentioned that I wanted RAID. I used one of the disks for the OS and my personal files. The other two I used to create a RAID 0 (striped) array to simulate one large disk. After the RAID and filesystem overhead I was left with 932GB of usable space:
[13:37][bulliver@xenon ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 187G 4.5G 182G 3% / udev 10M 92K 10M 1% /dev /dev/sda4 278G 11G 268G 4% /home /dev/md/0 932G 211G 722G 23% /home/media shm 2.0G 0 2.0G 0% /dev/shm
Down the road I will pick up a couple more drives (plenty of room left in the Antec...) and make a proper RAID 0+1 setup. It is sad to note that my files are less safe now because it will take one of two disks failing to lose the works. That would mean a lot of wasted hours re-ripping CDs.
So I now have plenty of space to hold all my media, which is of course exported using NFS to all my other computers. I also shared the portage tree itself on NFS, whereas before I only shared my distfiles. Speaking of media, the Ruby script which creates playlists and html menus for all my music reports this:
There are currently 19579 songs in the archive. * 13848 are Ogg Vorbis. * 1036 are Mp3. * 60 are M4a. * 3157 are Flac.
Yessir, I love music.
New Ruby books
While it is still a great reference, I feel I have learned all I can from the Pickaxe book so I picked up a couple of new Ruby titles, both of which bill themselves as being targetted for a more experienced developer. Ha! So why am I reading them? Seriously though, the first is The Ruby Programming Language written by David Flanagan and Yukihiro 'Matz' Matsumoto, the creator and lead designer of Ruby. This book also has some charming chapter frontispieces by the enigmatic why the lucky stiff , and has a large chapter on Reflection and Metaprogramming. Should be good.
However, the book that I started reading, and am now 332 pages into is The Ruby Way by Hal Fulton. I am enjoying this book a great deal, and I am learning. Especially from the great chapter "Internationalization in Ruby" which actually taught me a great deal about i18n issues in general. Hal has some real clever code examples as well:
logfile = File.open("captains_log","a")
logfile.puts "Stardate 47824.1: Our show has been cancelled."
and
str = sprintf("Nietzsche is %x\n",57005)
At 795 pages of content, I still have a lot more to read and learn.
sneetchalizer-0.8.0 released
Today I have released a new version which should squash all known bugs. Feel free to download and test if you can. In particular the niggling recursive/out-directory bug is fixed, and I must specially thank Oleg Lyashko for his eye-opening help which taught me a lot about making things overly complicated. Also, I have added some experimental threading support. See: a while back a fellow named Peter sent me a patch to support Monkey's Audio files. He also sent some code which used this ThreadPool class, but I could never get it to work. I do not have the knowledge to debug threading code so I just set it aside for a while. I dug it out again yesterday and still could not get it to work. So: I just created a simple loop and spawned some threads myself. In some bogus benchmarks it appears to work well:
$ time sneetchalizer --in=mp3 --out=ogg -r -D ./delete_me ./test ...SNIP OUTPUT... real 3m11.800s user 3m6.474s sys 0m4.738s $ time sneetchalizer --threads 2 --in=mp3 --out=ogg -r -D ./delete_me ./test ...SNIP OUTPUT... real 2m4.738s user 3m7.888s sys 0m5.288s $ time sneetchalizer --threads 4 --in=mp3 --out=ogg -r -D ./delete_me ./test ...SNIP OUTPUT... real 1m45.389s user 3m9.724s sys 0m5.170s $ time sneetchalizer --threads 6 --in=mp3 --out=ogg -r -D ./delete_me ./test ...SNIP OUTPUT... real 1m44.768s user 3m9.695s sys 0m5.330s $ time sneetchalizer --threads 8 --in=mp3 --out=ogg -r -D ./delete_me ./test ...SNIP OUTPUT... real 1m43.865s user 3m10.523s sys 0m5.258s
These tests were run on my new computer (see above) and were comprised of 15 files. Note that the benefit curve levels out quite quickly, and in fact, with smaller samples the results show deminishing returns if you start more threads than you have cores/CPUs. I will admit my implementation is a little naive. For example, if you set '--threads 4' you must wait for all 4 threads to complete before another 4 can be spawned. This means that a single large file can hold up the script.
I gather this is what the aforementioned "ThreadPool" class was supposed to accomplish. If anyone is handy with Ruby threads feel free to have a look and send in a patch!
Monday, December 3, 2007.
sneetchalizer and read-only filesystems
Woke up to a nice email today from a gent named Sam who said: "I literally looked at 10 different programs to convert flac to mp3 today, and all of them sucked except for yours". Very kind words, but all was not well. It seems Sam was trying to convert files from a read-only filesystem and it failed on him because sneetch was writing the temporary wav files to the 'in' directory, which of course is read-only.
So, the easy solution was to write the temp files to the same directory as specified by the '-D' or '--out-directory' argument. Some may say 'write the files to /tmp as you should' but I am unwilling to do that until I can investigate some cross-platform temp solutions for Ruby. It also occurs to me that this will require some non-trivial rewriting of the script, whilst the solution I used required a few quick edits to a few lines.
Anyways, the whole point of even mentioning any of this is that I personally never tried to convert files from a ro filesystem, so I had no idea there was an issue. So: if ever your favorite software has a glaring omission of some feature that is 'obvious' to you, simply write the developer and ask about it. Perhaps (like me) the developer didn't consider it because it did not affect him/her personally. Remember that most developers are "scratching an itch", and writing the code to solve a problem which affects them personally. They may not be aware of issues surounding alternative use cases.
Winter has arrived
Here in Edmonton we usually have snow on the ground for Halloween. This year, however, the snow has been late arriving. We had a couple of minor falls (that melted the same day), but today the snow finally arrived. Woke up to about five cm, and it should continue throughout today and tomorrow. Time to start thinking about snowboarding ;)
Monday, July 16, 2007
FIFA U20 World Cup - Spain vs. Czech Republic
As you football fans may know the FIFA U20 World Cup is currently taking place in various venues across Canada. I have never really been a huge football fan. As a Canadian it's generally all about the hockey. However, I did start watching some matches when the World Cup took place in Germany a few years back (I found myself cheering for France, not sure why, as I am not French). Since a few matches are taking place in Edmonton where I am currently holed up, I had to take the opporatunity to see a world class match.
I bought a couple of tickets for the quarter final match for me and my son before I left for Penticton on vacation. At the time I had no idea who we would be seeing, as the group stage of the tournament had not yet been played out. It ended up being Spain vs. Czech Republic, not a bad result. I enjoyed watching Spain upset Brazil on the tele with their 4-2 come from behind victory.
The atmosphere at Commonwealth Stadium was fantastic. The pictures seem to imply there was not much of a crowd, but to be fair, Commonwealth is a huge facility (seats 69000) and the large majority of the crowd was on the shady side of the stadium with us. The official attendance was 26801, which is quite respectable for this sort of event, in a city the size of Edmonton (850000 people). The crowd was lively, and seemed to me to be supporting Spain predominantly, at least the section we were seated in. Having no particular allegiance to either side, I simply cheered for a good match, and I would not be dissapointed.
Full time ended without a score, to the chagrin of Dylan ("Why can't somebody score a goal already?"). What can I say, a six year old wants instant gratification. Thirteen minutes into extra time the deadlock was finally broken by a strike from Luboš Kalouda. Not willing to bow out, Juan Manuel Mata answered back for Spain a mere seven minutes later. Deadlocked once again, we were off to Penalty kicks, which the Czechs won out by a margin of 4-3.
We even had some genuine 'Scottish Soccer Hooligans' complete with thick accents seated in front of us (see picture 3). Thankfully, they were quite well-behaved despite their copious beer consumption, and they added a lot of flavour to the match, rather than simply being an annoyance. All in all, I had such a great time that I am going to go see the Czech Republic vs Austria semifinal on Wednesday. This time I will leave the boy, so I can get into some trouble with beer myself ;)
So congratulations to FIFA for converting another fan! When I finally get my ass over to Europe I am certainly going to put "Attend a professional football match" near the top of my todo list.
Updates to sneetchalizer and FlacInfo
Well, this is rather old news now, but here it is. On June 26 I released version 0.6.0 of sneetchalizerwhich now includes support for ape (Monkey's Audio) tags, and includes encode/decode support for both Wavpack and Musepack formats. There are also many smaller fixes which are enumerated in the changelog.
I have also recently released new versions of FlacInfo. Version 0.2 includes support for parsing and extracting embedded images from METADATA_PICTURE blocks (introduced in Flac 1.1.4). Version 0.3 which I released about a week later includes write support for Vorbis metadata (ie: tags). This should be treated as expirimental until more testing is done. I am currently working on support for writing/resizing PADDING blocks. Look for a new release in the next week or so.
Chasm between Gentoo Devs and Users widens
I am saddened and dismayed by the current plans to moderate user contributions on the dev list. Ostensibly this is to clean up the off-topic garbage and flames that seem to clog the list these days. Why single out the users though? Seems to be this is a solution to a problem that is precipitated, if not started, by certain devs more than any users.
Lets call a spade a spade: all this is is more pointless beureaucratic bullshit that further alienates users, and makes it harder and less enticing for users to contribute. It's also a nice big middle-finger pointed square at the userbase and potential developer pool. Attitudes from devs seem to be getting progressivly hostile. This complete rubbish was posted to -dev today from a developer who shall remain nameless:
Gentoo's always been exclusively for the developers. Nobody's paying us to do this. It just so happens that the things we want to do also benefit other people, and so they use them.
That's a really great attitude. If I spot a bug with one of this developer's packages in the future I'll be sure to post "Your package is broken, get off you ass and fix it" rather than a proper, well-written, and useful bug report. After all, I'm not getting paid for my time, so I should focus on myself first right?
Wednesday, May 23, 2007
Top 6 songs for hackers and tech-geeks
I've has this idea of collecting songs that are computer themed, or otherwise of interest to tech/computer geeks for either the musical or lyrical content. Today I finally made such a list. So without further ado, in no particular order:
1. Deltron 3030 - (tie!)Virus and Upgrade (a Brymar College Course)
Deltron 3030 is a concept band/album created by Del, Dan the Automator and Kid Koala. Set in the year 3030, it pits our hero Deltron Zero against a government run by huge corporations (sound familiar?). Choice lyrics from Virus:
You see late in the evening / Fucked up on my computer and my mind starts roaming / I create like a heathen / The first cycles of this virus I can send through a modem / Infiltration hits your station / No Microsoft or enhanced DOS will impede / Society thinks they're safe when / Bingo! harddrive crashes from the rending
and Upgrade (A Brymar College Course) (In computer simulated voice):
Here at Brymar College we can get you prepared for the 31st century with advanced programming in quad-rendering and Java+++ scripting language. We offer advanced job placement assistance. So upgrade your grey matter, cause one day it may matter.
2. Bad Religion - 21st Century (Digital Boy)
Seems to me a lot of hacker-types are anti-establishment and anti-authority. So it stands to reason that a few of them are probably old-school punk-rockers. Released seventeen years ago, this song may well have foreshadowed current privacy concerns over RFID enabled passports and the USA's unpopular federalized ID card:
And I don't want it / The things you're offering me / Symbolized bar code / Quick ID, oh yeah
3. Combustible Edison - Solid State
This track may not have much to do with computers, but the lush and hilarious electronic bubbling, gurgling, and tinging sounds would make it the perfect background music for the elevators at IBM headquarters. One could also picture listening to this while roaming amongst clinical rooms of server racks, or perhaps putting the finishing touches on some home-brew electronic doodad out in the garage. The song does have a couple lines of lyrics at the end, but they are all but undecipherable, and besides, I am fairly sure they are in Spanish, so I wouldn't be able to decipher them anyway.
4. Fatboy Slim - Slash Dot Dash
Well, this is pretty self explanatory. Lyrics:
Slash dot dash dot slash dot com...
...and variations thereof repeated ad infinitum
5. And You Will Know Us by the Trail of Dead - Source Tags and Code
As best as I can tell, this song has nothing to do with web scripting, but with a title like that, I had to add it to the list. Here's a lyrical sample:
From lives I've tried to lead / To the one that I received / Each painted sign along the road / Will melt away in source tags and in code
6. American Analog Set - We're Computerizing and We Just Don't Need You Anymore
Another song that appears to have nothing to do with computers other than the name. It reminds me of a poster on motivation I purchased from despair.com. I have included this song simply because I like AmAnSet so much.
...
And finally, we have a dishonourable mention:
Ricky Martin - She Bangs
I listened to this song thinking it might be a nice little ditty about UNIX shell scripting. Much to my shock, it wasn't about computers at all! It's about loose women, and loose morals! For shame, Ricky Martin, for shame. The music is terrible too...
So there you have it. Think my list sucks? Think you could do way better? Did I forget a totally obvious song? Well, send it in to me along with a link to your blog, website, publically addressable networked toaster, or whatever, and I'll put it up here.
Daniel de Oliveira has sent in this:
Hi man. There's another one from Bad Religion: I love my computer. But I think it's specially a computer running windows, if you see the lyric. lol
That is all
older stuff...
stats
It is
Monday May 12, 2008 1:12 am
This page served 70441 times
This page last modified: April 14, 2008 11:28 am
Your IP address is: 38.103.63.18
You are browsing using: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
You are browsing from: United States.
badcomputer.org's uptime: 01:12:31 up 18 days, 01:54, 1 user, load average: 0.00, 0.00, 0.00
local
home | unix stuff | dir2ogg | sneetchalizer | wmainfo | q&d guide to permissions | q&d guide to tar and gzip | code | MS rant | browser shootout | linux & iAudio X5 | photos | music | programming poetry | sieve of Eratosthenes | plea | rain | suffer | archive | about | recipes | compaqr3000 | sitemap
search
credits
This page, and all pages on this site were created and are maintained by Darren Kirby using valid XHTML 1.0 and CSS, and are ©copyright 2002 - 2008. The Penguin image was created by Tukka, and is used by permission. Inspiration for the look of this site was provided by Eric A. Meyer's CSS gallery. This website runs on Gentoo Linux. It is served by Apache. PHP and MySQL hold together the backend.
