sjh - mountain biking linux geek spice - mtb / linux / canberra / cycling / etc

Steven Hanley hackergotchi picture Steven
Hanley

About

email: sjh@svana.org

web: http://svana.org/sjh

Other online diaries:

Aaron Broughton,
Alison Russell,
Allan Bontjer,
Andrew Pollock,
Anthony Towns,
Chris Yeoh,
Jeremy Kerr,
Martijn van Oosterhout,
Michael Carden,
Michael Davies,
Michael Still,
Rusty Russell,
Tim Potter,
Tony Breeds,

Links:

Linux Weekly News,
XKCD,
Userfriendly,
Questionable Content,
Planet Linux Australia,
Bilbys,
CORC,

Canberra Weather: forecast, radar.

Subscribe: rss, rss2.0, atom

planet sjh
(online feed aggrgator for all the diaries I read regularly)

October
Mon Tue Wed Thu Fri Sat Sun
   
7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

2008
Months
OctNov Dec

Categories:

Archive by month:

Thu, 25 Sep 2008

Doing it backwards or unlink returning ENOSPC - 16:28
So this is not directly Linux related, however it is kind of entertaining/strange. I have been mucking about with Solaris Logical Domains a bit this week at work, as part of this I was reading up on how ZFS works. This may well apply with LVM snap shots in Linux now also. However when reading about out of space behaviour on ZFS with snapshots I was somewhat entertained to see one specific point.

Due to the way snapshots work on ZFS there is a possibility you will get an ENOSPC returned when trying to unlink (rm) a file. This is of course completely reversed from the intuition most people will have, to free up space remove some files. Out of curiosity I looked in the unlink man page on Linux and in the rm source code on Linux, at a cursory glance neither of them will deal with ENOSPC (unlink does not mention it as an error).

Without testing my guess is that in such a case unlink (2) would return EIO.

[/comp] link

Fri, 18 Jul 2008

Obscurity, P=NP etc, Hash Visualisation - 16:00
Three things I saw online today I feel like mentioning, first linked from Schneier's blog was an article about how lock making companies are still very much in the security through obscurity world and how lock geeks getting together online and at (computer) security conferences are breaking their obscure secrets open. An interesting read.

It is interesting to see some companies such as Kryptonite eventually reacted, others seem intent on denying public information, or trying to shut down people who know about it. In computing it is a well known fact (although still ignored by too many people/companies) that security through obscurity will not work, public design and analysis by experts in the field however does work and should be used for things that need to be secure. Although one aspect that comes to mind here is that in the case of locks you may not want to make them impossible as other attack vectors are then used. As the article mentions crooks seem to prefer using a hammer (or maybe explosives) over opening the locks through lock exploits. There were some discussions about this in the car that were I think linked to by Schneier a few years back.

Next was an interesting wikipedia page linked to by kottke, a list of unsolved problems from a number of different field, those listed in Computing are familiar, however looking through the collected information on those in other fields is pretty fascinating. Mmmmmm wikipedia goodness.

Catching up on some LWN reading and I see the mention of a new OpenSSH version approaching, in the list of new features is "Experimental SSH fingerprint visualisation" with a paper (pdf) linked. So I download and had a read of the paper, largely to see what sort of images they generate. It is good to see some work on what is one of the biggest security weaknesses out there, the humans using secure systems.

[/comp] link

Tue, 08 Jul 2008

How to capture one image from a v4l2 device - 17:22
So after seeing Mikal wondering about it again yesterday, I had a look at some source code, decided that it could be done but it would be nicer to do it with existing software. I recalled seeing ffmpeg or mplayer commands that may in theory be able to do a capture of a single image. Then I stumbled upon a way to do this with gstreamer filters and sinks.

"gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! pngenc ! filesink location=foo.png"

As one command captures the image at that resolution into a file foo.png. This is on my laptop, however I tested this with the QuickCam 9000 on my desktop with a resolution of 1600x1200 and it worked, the focus meant it took a while but it popped out a good image. Gstreamer really is cool, I still remember seeing Federico talk about GMF (Gnome Media Framework, which is what became GStreamer) at CALU in 1999 and being excited by it.

[/comp/software] link

Fri, 13 Jun 2008

Interest in data from an email spike - 13:56
A few minutes ago in my work email I saw an email appear from the ACT NTEU division. The surprising thing about this email was they attached a 47 MB file to the email (they really should have put a link to it and said it was a large download). Sure if you are at work the size does not take long to download, however it is rather bone-headed for any members to be given an email that size at any other location. (once expanded with the attachment encoding it becomes a fair bit larger anyway).

I can not find the department NTEU person to learn if there are any numbers on how many staff on campus are actually union members, nor can I get hold of the campus wide email system admin people so I can not predict how much this hit storage and network load on the email systems campus wide. I could do some analysis on the department email server, though I am not sure if that would provide much insight. As I suspect there are a fairly large number of union members on campus and they all will have received this email as it is valid email and will have come in through the spam filters.

[/comp/email] link

Thu, 29 May 2008

Some system config updates - 15:39
So I have been using xterm as my default terminal for years, however on Wednesday morning when Tony noticed this he suggested I should look at gnome-terminal as it has some advantages such as ctrl click url loading. I could not however get my font (the default system fixed size 10) to look right or be sized correctly in gnome-terminal, even though in xterms it looked fine.

After lots of mucking around with fontconfig and other things trying to track down the issue, Tony suggested I look at the resolution for fonts in GNOME System -> Preferences -> Appearance :: Fonts :: Details wondering what my DPI for fonts was set to. His was set to 96, mine however was at 112. So I changed this and all of a sudden the font in gnome-terminal could look identical to my xterm fixed font. Rock on, something I should share with the world here in case it comes up for others. Getting the font size right in the terminal application is important as my brain is so used to a certain look there.

On another note I should probably stop bagging the nvidia setup as much as I have been, sure it is a pain I can not use xrandr commands to automatically do funky stuff in a scripted environment, however I can at least use the gooey tool nvidia-settings to do the stuff I want, even if it is not as nice as doing things automatically. Still it sure would be nice if nvidia opened up and allowed open source development with full specs to the hardware. If this laptop had been available with the Intel chipset I would have specced it with that for sure.

[/comp/linux] link

Wed, 28 May 2008

Yet another sign I may work with computers - 18:26
how many lcds is too many?
How many lcds is too many? (Full Size)
I noticed this is likely a sure sign I work with computers or am a geek today, in my office I had 5 lcds displaying something. Admittedly the two on the right are showing the same thing on a dual head computer doing an install without configuring the dual heads.

Sort of reminiscent of Jon's experiment in the office a while back (though not as cool). On a side note I am writing this post on the new laptop, the first time I have written a post on it. I must say the keyboard is awfully nice to type on.

On the whole most things work really well, which is impressive, not much configuring or mucking around and things just work, Linux really is improving all the time toward a better desktop experience. I am trialling using a normal default Gnome environment and so far it seems to be going well.

My biggest annoyance is probably the nvidia graphics card, that I can not yet use xrandr 1.2 stuff to do funky things with x output from within X and a few other problems (apart from the most basic problem of it being closed source crap). Next I need to work out how to enable vga output to projectors to be on all the time and a 1600x1050 output to a screen at home to watch dvds and such on.

When I tried to set up a 32 bit chroot yesterday debootstrap failed so I need to hunt down the reason for that if I want to be able to see flash (more closed source crap) videos. Still I like this new toy, infact I will be leaving my old laptop at work when I go home in a few minutes as this seems capable of doing everything I need in a laptop configuration wise already.

[/comp/hardware] link

Mon, 26 May 2008

It arrived - 15:09
two laptops, new and old
Two laptops, old oneiros left, new shiva right (Full Size)
two laptops, new and old
Lids open (Full Size)
So the new laptop I mentioned arrived this morning, I took the photos you can see on the left before I had even turned it on. Though I had already scratched the palm rest area slightly getting the vista sticker off and then I put a penguin sticker on the lid. The colour is really spot on, a metallic pink very similar to my mountain bike, I can sort of, in my head justify this as being race related gear as I download my GPS and HR training data to my laptop, and also do some CORC or Bilbys stuff on my laptop.

Anyway I have booted into a Debian Lenny daily amd64 build iso and installed Debian from that, still pretty bog standard. I will probably have to use the Nvidia closed source drivers as the NV driver though it is driving the screen nicely and appears to handle xrandr for using a projector nicely will not to DRI yet.

As choosing the name of the new machine is important I was a little worried about what to call the new laptop. However as I no longer had the machine shiva I was able to reuse that as a laptop name.

[/comp/hardware] link

Mon, 19 May 2008

Little laptops that can - 18:15
With apologies to Walty Piper I must say the power available in modern laptops is staggering. I am getting a new work laptop sometime this week (or maybe next). The laptop I have been using since August 2004 is a lovely Dell X300, a small, light portable laptop that I still find remarkably powerful and useful. Specs are "Intel(R) Pentium(R) M processor 1.40GHz, 640 MB RAM, 60 GB HDD". The laptop I chose to replace this is a Dell XPS M1330 (they come with pink lids, how could I pass that up). This will have a T9300 CPU (Dual core 2.5 GHZ, 6 MB of L2 Cache), 4 GB of RAM, 320 GB HDD, built in dvd burner, a host of other things, a pink lid (I may have already mentioned this, but I am excited about that) and still only weigh around 1.8 KG (thus still be portable).

All this in such a small package is mind boggling to pretty much anyone who has been around computers since 486 or earlier model chips powered most PCs. I doubt I will be getting any Heidelberg Scars now.

[/comp/hardware] link

Thu, 08 May 2008

Move a little thing to python - 13:44
At ANU there is an online (web page) searchable phone database for all ANU phone numbers. A few years ago (July 2002, according to the version control dates) I spent an hour or two writing a command line program in perl that queries this and prints the results. I find it much easier to use a command line application than open a tab in a web browser and find the appropriate page and enter a query when all I want is a simple bit of information back. I suspect most of the staff in this department are similar (Computer Science).

Sometime last year I realised that though the URL I was using on the ANU Internal Web still worked it seemed not to interface with the latest phone database for the uni so it sometimes did not match people I knew worked on campus, other times it contained out of date numbers for people. However there were other important uses for my time so I did not bother looking too closely into updating it when most of the time the old results were still good enough.

Finally this week Bob noticed there were no matches coming back, it seems the old interface no longer connected to the database correctly. Thus I opened the program and had a look at updating it. The old program used LWP to fetch the page with a GET request. The newer interface now on ANU Web works properly with a POST request. Also the result page is more complex to parse than the old one (more complex regular expressions, or maybe a small state machine needed). Still it did not look too hard to spend an hour or so fixing the old perl code up to get the new page and parse it properly for the desired results.

However I hit a snag when for some reason LWP did not fetch the entire result from the web server that was returning the data in chunks. A tcpdump session showed it simply closed the request rather then fetch all the data. At this point I could have debugged the perl code and fixed, after all there is no good reason LWP should not work. However I thought to myself, I have been keen to write python a bit for a while. Bob bought the Mark Lutz Programming Python book for my office and I read through about half of it. So why not rewrite the program in python. See how a perl hacker can transfer to using python at least for a small program.

I am happy to say that the page fetching in python even made perl look complex, the code that did the job (and worked, doing a post request fine) was

   name = ' '.join(sys.argv[1:])
   params = urllib.urlencode({'stype': 'Staff Directory', 'button': 'Search', 'querytext': name})
   f = urllib.urlopen(searchuri, params)
   r = f.read()

Cool I thought, this is hell easy, what a fantastic language, I will forever give up my perl ways if everything is this easy and obvious. Obviously this was not going to last, I guess partly because my brain meshes with perl well after so many years, and I am used to perl associative arrays, classes, modules, and regular expressions. Anyway I now had my result from the search and all I had to do was parse it and extract a form that can be printed on a terminal nicely.

First I tried using the python regular expression matching and needed to create some hideous regexp to match the data returned. I also discovered that when a search matches more than about 2 people the data is returned in a different format. Fortunately in this second case the format is really easy to match against with a regexp. Even though the regexp language is similar/identical to perl I was still getting my head around the documentation for all of what I was doing and could not at first construct a regexp that made sense to parse the first sort of data. So I decided to get a HTMLParser and extract the data I wanted without the crap in the tags.

My first attempt was to use the HTMLParser module, however I soon found that this threw an exception when ever I fed it the page from the uni with the matches in it. I tried except: pass in the hopes it would keep on going, however it stopped there and did not process the rest of the page. So I had to change to using the htmllib.HTMLParser which was almost identically easy to use and managed to process the entire page.

Next I wanted to store the data until all matches were found, in perl this would be trivial using a multiple level hash or an array of hashes. Of course the most obvious way to do this in python now I think about it is using a list of dicts. However I had my brain stuck on using a multi level hash. I found this was most difficult in python as you need to initialise dict entries and can not simply assign arbitrarily into them when you need. I needed to use the following construct.

if (D.has_key (key1) == 0):
   (D[key1]) = {}

if ((D[key1]).has_key (key2) == 0):
   D[key1][key2] = ''

s = D[key1][key2]
D[key1][key2] = s + data

Which is obviously a bit more verbose than the perl vernacular of $H{key1}{key2} = $s; I think that dicts do not yet work this easily is a problem, however someone has assured me that future python releases will have dicts that can work as easily as a perl hacker would expect. Anyway rather than next go on to the now obvious that I thought about it list of dicts I was still stuck on the idea of using a pair of keys to access some value, thus a tuple seemed obvious to store the data in a dict still. However this meant that when I extract the values from the dict I can not simply use len on the dict collection as it does not accurately reflect the number of records.

Which of course was the perfect chance to go and learn how to use map and lambda in python, after all I use map in perl often and it really is lovely to have functional capabilities in a language you program in. Using a number as one of the record keys I was then able to have constructs such as (after refactoring to list of dicts I did not need the high = expression and modified the second expression slightly)

high = max (map (lambda k: k[0], D.keys()))
and
name, phone, address = map (lambda k: D[(i,k)],['Name', 'Phone', 'Address'])

The first to find the number of records from the numeric key and the second to extract the information I was interested in printing. The second especially is often used in perl to extract matches with a [0..N] or range(N) sort of thing when you get things with multiple function calls into a list. Such as the perl expression

my @emails = map { $res->getvalue ($_,0); } (0..$res->ntuples-1);

The final problem I had was when printing the data, in perl and c I can do

printf ("%-20s %-12s %46s", name, phone, address)
However in python the string formatting in print did not justify or cut off arguments as expected. Also string.rjust and string.ljust did not limit the size of strings if they were larger than the field size. So I needed to do the following.

   print "%s %s %s" % (name[0:30].ljust(30), \
                       phone.rjust(12), \
                       address[0:45].rjust(45))

That final concern is not really a problem, and arguably clearer as to what is going on than using printf formatting as a c programmer is used to. Anyway if anyone who works at ANU wants to use this from a command line or anyone wants to see it I have it online for download/viewing. There may be a few places I can clean this up better, and the version online is stripped of comments. I can understand how people like the way python works, the code really is almost like pseudo code in many ways, it does most of the time work the way you expect it to, it is a little hard to wrap my perl oriented brain around, however that does not take long to work around I expect. Also anyone complaining about whitespace formatting in python, IMO you are deranged, it really is not an issue needing to use whitespace for program layout.

[/comp/prog] link

Thu, 01 May 2008

Another Ubuntu annoyance - 22:03
I was bitten once more today by Ubuntu forcing the use of UUIDs for disk labels (in grub and other places). We have a lot of systems at work (student labs) where we update or synchronise them with rsync rather than some install mechanism such as cfengine and fai. Thus if a grub menu.lst or an fstab is copied over and not automatically modified a machine will not boot if it uses uuid for a disk label.

Unfortunately in Ubuntu there is no way to disable this in grub, the uuid change is hard coded into update-grub in /usr/sbin. At least in Debian it is still optional. Anyway I had forgotten to modify update-grub to remove the uuid stuff and had installed a new kernel on a student server, then reboot the machine and hey presto it did not come back online.

If it were not for the need to run this server on Ubuntu to be similar to the lab image and easy environment for a student to duplicate at home it would be so much easier to run Debian on it again. Of course to compound the issue this was a server I had to wait until after normal hours to take offline so I was messing around with after 7pm.

[/comp/linux] link

Mon, 28 Apr 2008

Update on deb package archive clearing. - 14:44
In response to my last post, In email and online a few people have suggested using file:// URI's in sources.list as that stops apt from using the cache. That would indeed fix the problem for the one machine I was talking about in the post (the mirror itself) however I should admit I had also been thinking about it with respect to all the desktops and servers and such that use Debian or Ubuntu in the department here at work.

They all have a 100 Mbit (or better) link to the mirror, and it seems silly to have them using local disk storage once an entire successful apt run is finished. Andrew suggested the Dpkg::Post-Invoke rule could be used to run apt-get clean, my understanding upon reading the documentation last week was that would run clean after every individual deb package as installed. I guess it is likely when installing large numbers it may not be run until after the post-inst script, however without looking close it appeared to me it may mess up install processes somehow. I may have gotten that intuition wrong, however as pointed out in the other online response it will not work for some use cases.

It still seems the only current way to solve this is to add apt-get clean to cron (or of course write a patch for apt that allows a Apt::Install-Success::Post method or something), not really a huge problem for now, however as I said strangely different to dselect and my expected capabilities.

[/comp/linux] link

Wed, 23 Apr 2008

Keeping /var/cache/apt/archives empty. - 13:02
On mirror.linux.org.au I noticed we stored packages in /var/cache/apt/archives. I think this is somewhat silly considering the machine is a full debian mirror (it is ftp.au.debian.org) (okay so we do not have security updates on there, but that is not a big download cost).

So I had a look at the apt.conf and apt-get documentation and /usr/share/doc/apt/examples/configure-index.gz and a bit of a look around online to see how to disable the cache. I thought it may be bad to completely disable the directory for packages to sit as apt places them there when it downloads them. However as the partial directory being used for packages in transit I wondered if that was where packages were kept during the install process.

Anyway I tried adding Dir::Cache::Archive ""; and Dir::Cache::pkgcache ""; to a new file /etc/apt/apt.conf.d/10pkgcache. This however did not change anything and packages were still left in the archive. Next I tried setting both items to /dev/null, that caused a bus error when running apt-get install. I was kind of hoping there was some way to tell apt not to store files after it has run, dselect runs apt-get clean upon completion, there appears to be no way to tell apt to do a post install hook and run clean when finished. (assuming apt ran with no errors in the case the post install hook runs)

The only way to do this appears to be to place apt-get clean in a crontab somewhere, which is a pain if you are short on disk space so would like to get rid of packages as soon as installing is finished. Interestingly /dev/null was also changed by what I tried above, it became a normal file and I caused some other processes depending on it to fail. Restarting udev did not recreate the device (even though the udev config said to recreate it as a char device with the correct permissions set) instead it reappeared as a normal file with the wrong permissions, some other running process seems to have interfered with /dev/null creation. Anyway that was easily fixed with /bin/mknod, now if only the emptying of /var/cache/apt/archives were so easy without resorting to cron.

[/comp/linux] link

Sat, 19 Apr 2008

Participating the BarCamp way - 15:02
So I suspect this is of course one of the main interaction channels that Barcampers are expected to use, however I am finding it interesting to do it here today. Barcamp is promoted as a place where you sit around with your computers engaging in the content online as well as off line all throughout the day. Part of the online thing is most of the people there will have a web presence, likely a blog of some form.

So when I have talked to people during the day, or when someone has given a presentation, I have looked for the link they placed on the Barcamp page and been able to go read some of their blog and see what they talk about more. I probably should participate to the extent of adding myself to the wiki, after all I am here all day. However it is interesting to note Bob and I have both had the same sort of reaction to our involvement. The Unorganisers suggested we all sign up to some yahoogroup or something for more of the discussions leading up to hosting the event. As far as I know Bob did not join, and I did not either, too much effort involved to sign up to another mailing list. So I just had a look at adding my name and diary link to the BarCampCanberra page and to edit the wiki requires a login so I decided not to bother.

Sure it makes perfect sense that to edit the page you need to go through some form of authentication to stop spammers and such from blowing the wiki apart. I simply can no overcome my web forum/online login apathy enough to sign in here, kind of strange, though I notice Bob has not done this either.

[/comp] link

Reminder that other people exist - 14:33
Listening to Dr Stephen Dann (or ANU Page, he really needs to get his staff photo updated as he does not look that silly/wrong I promise) giving a talk about getting his completely non Internet savvy and seemingly not up on modern Internet culture students up to speed on what many of us geeks and Internet people consider normal and everyday.

It is a highly amusing presentation, he has been talking about many things we all know and recognise that his students seem to not understand or know about. He mentioned that the Comp Sci students he had the first year or so he ran the course no longer do the subject as they seem to think they do not need it, so all the students are marketing commerce students who do not live in Internet culture.

Something that I am reminded of listening to this is that we often forget there are people dissimilar to ourselves out there. For example a somewhat elitist example I often have to remember is that most people in the population are not university educated, however living in Canberra and hanging out with people who generally are, and working at a university, I often forget that not everyone shares my background. Dr Dann is dealing with non Internet savvy people and trying to induct them, it is interesting to hear his experiences. Good talk.

[/comp] link

Getting deeper into the materials - 13:31
On the badges being worn by the people at Barcamp most people in the room have various letters across the bottom that describe what geek things they are involved in in shorthand. The short hand is a geek periodic table of elements that is hanging up on the wall in N101. I was briefly chatting with Kate Carruthers before she headed off to the speed networking session. I instead of being a sociable well adjusted geek and joining in that session remained sitting here typing away on the laptop. Wondering something about the Unorganiser Stephen Collins I headed to the BarCampCanberra1 page to see what he put up there. Realising that people had put their website links on there I paged down and found the Kate Carruthers link there. On her blog there is a link to the Geek Periodic Table of Elements which was created in Sydney a few weeks ago.

So the fact that people using the abbreviations on their badges is so prevalent today it had me wondering if there would be a cool way to obfuscate this a little bit (so I admit I like geek in jokes). Alas the symbols on the table are not the same abbreviations as found on the real periodic table so his is not quite as simple as I first hoped. My idea is if you select your list of elements to put on your badge and then could arrange them in such a way as to create materials or more complex things made up of the elements bonded in specific ways. For example water is H2O (two hydrogen molecules bonded to one oxygen molecule), so if you had a drop of water drawn on the bottom of your badge you are indicating your geek interests included H and O (you could even use it as a way to indicate you do H more than O if you want to be exact about this).

The idea above falls apart a bit as the letters do not match the elements. However if you wanted to go ahead with this obfuscation you could simply use the elements in the same place on the table as those you select to try and choose various compounds then represent these compounds on your badge rather than the letters them selves. However no one would easily be able to work out what you mean now as they would need to know the chemical make up of the compounds you use, know where those elements are placed on the periodic table and then have memorised the geek periodic table to the extent they know what geek interests are in those positions.

This is however a unconference that focuses on cool geeky online apps to some extent, you could fairly quickly extend the geek periodic table to enable translating from a selection of geek elements into a selection of real materials and have some symbol suggestions for the materials. People who want to use the obfuscation could use the tool (in both directions) to work out what is on a badge.

[/comp] link

User interface discussions - 12:23
So the talk that just finished a few minutes ago was asking why we have not evolved our computer interfaces significantly in the last 40 years. The presenter mentioned the 1968 Douglas Engelbert Demo (definitely recommended watching). A few people in the audience suggested a large part of why alternative interfaces (touch screens etc) are not pushed out to the world at large is the technology and reliability of these devices is still not there for reliable and cost effective deployment.

The presenter did have a definite point, when you consider where interfaces were at in 1968, why has there not been more research into different interfaces for different use cases and scenarios. It occurred to me that it is interesting to look at life possibly imitating art. In the Neal Stephenson book Snowcrash. Most users interface to the virtual reality world via the real life interfaces there and also appear to access computers in reality via a VR environment. However the hard core hackers all still access the low level real code with a keyboard and VDU and a Unix style command line interface (not too surprising from Stephenson when you consider his brilliant essay In the Beginning ... was the Command Line)

So there are likely to be real uses for the currently accepted interfaces all the time, however the uses of alternative interfaces is likely to apply in a more specific use case scenario, and thus manufacturers, designers, researchers exactly need to somehow align and market them in specific ways and inform the people who want that use of a better (if it really is better) way to use the technology.

An amusing aspect that came up for me (from a cycling background) was the question asked why in The Tour de France the UCI has banned recumbents. The person asking the question has obviously drunk the kool-aid on offer from the HPV community on this issue with there constant claims that they are obviously faster and superior for all uses. The reality of this is that they simply can not climb as fast, thus any race with climbing (such as The Tour de France) will make them useless. The reasons they do not climb well is they can not be made as light as a modern diamond frame road bike (they can be easily purchased at 6 KG ready to ride now) and you can not get out of the saddle in a recumbent and really work more muscle groups, the limitations of muscle uses restrict the ability to go hard up hills. Also when climbing with the rather limited motor available in a human body the aerodynamic advantages of a recumbent do not matter at such low speeds and can not overcome the advantages of low weight and more muscle groups.

Thus Paul had some basis in suggesting that one reason computer interfaces have not advanced is that they are rather optimal for the purpose, though I strongly tend to agree more with the presenter that computer interfaces have a lot of room for improvement.

[/comp] link

Barcamp thing - 10:28
So a bunch of people were keen to hold a Barcamp in Canberra. Bob and I were asked if we could ask DCS if the event could be hosted here. So Bob and I are here today (with a broken collar bone I am of course unable to do anything active, I had however volunteered to be here today anyway if Bob had been unable to make it) to provide any venue stuff and setup and venue care.

So it will be interesting to see how the talks and other stuff go all day, there are a rather large number of people here so it is likely to work well. Right now there is a talk about Meraki on.

[/comp] link

Thu, 10 Apr 2008

Not meant to own one - 15:51
just before lca2008 this year I saw a fantastic 2 GB usb memory key in the computer shop on campus here at ANU. Around 4mm thick and 1cm by 1.5cm square with a metallic pink top, made by pqi. I bought one and took it with me to Melbourne. However I did not attach it to anything (such as keys or phone) and lifting m wallet out of my pocket one evening in Melbourne it also came out of my pocket and was lost forever.

On my return to Canberra I bought another one and all seemed fine. I tied it onto my phone and was able to slip it inside the leather phone cover so it stayed put and was out of the way. This was until last Wednesday morning when I crashed and fractured my collar bone my phone was in a back pocket of my cycle jersey. Though the phone has come out of the crash unscratched and working as well as it was previously. The usb key has a bent pink metal cover and the back of the plastic bit where the chip contacts are is scratched a bit.

After seeing APC tests in which the USB keys still often worked after much more severe torture than this one would expect it would still work. Alas I plug the key into a usb slot and nothing happens, definitely dead, tried it in multiple computers with a lot of wiggling around of the key. So small pink usb key junkie that I am I wandered over to the store today and they no longer have the 2GB key in pink, and they rang the importer who also no longer has them, only blue or black which really is not as cool. Thus it appears I am simply not meant to permanently own a cool small pink usb key.

I did however see a helmet in the Giro line up that is a rather cool pink, maybe I should get that to replace my broken helmet.

[/comp/hardware] link

Mon, 25 Feb 2008

API design and error handling in code - 21:12
I am catching up on some posts on planet Gnome and I came across this post about error handling with g_malloc and a response agreeing with it. I find this interesting for a few reasons.

First it is true that putting in full error handling in code when using fairly standard libraries can take a lot of time, complexity and ugliness. However there should be some way somewhere to find out if errors happened I suggest, largely so you can deal with them if there is a situation they may be likely. Also understanding that libraries can fail in calls and what this means is important for coders, even if they do not handle them all. When marking assignments at uni I am keen to see that students have thought about error conditions and made the decision about what level of complexity to trade off against what likleyhood certain errors have of occurring.

The above issue with assignments however does tend to be students who are newer to programming than most free software hackers so there are considerations in both directions there. As for the other reason the above posts interest me, it is cool to see Cairo getting such props for great design again. Carl and co have done a stellar job with that library.

As I continue reading the planet I can see more entries in the thread.

[/comp/design] link

Thu, 21 Feb 2008

X and KDE out of sync - 17:59
So a new Dell Latitude D430 one of the academics at work has was showing some problems with getting X to work as we wanted. It is now running Gutsy, which seemed to not pick up on the intel video driver at first when I removed the i810 driver. However the more annoying thing I found in this setup is that when there is no xorg.conf kdm works fine, however kde reverts to some lower resolution. Although I can change that with xrandr, if I try going into kde display resolution settings they do not work if there is no xorg.conf.

In the last while the Xorg crew have been doing some great work to ensure X will generally run better with no config file around, working things out as it starts up and all that. However kde (at least the version in Kubuntu 7.10) has not caught up to the idea of querying the X server or working with it to that extent yet.

I hope the newer kde releases are heading this way, also I should check out gnome and see if it handles this cleaner. One thing I should note though is xrandr really is seriously cool. I found the thinkwiki xrandr page to be one of the best for describing cool stuff it can do.

[/comp/linux] link

Thu, 25 Oct 2007

A wireless scanning tool - 19:26
I just wasted about 15 minutes trying to find online the name of the program I have installed on my laptop that I regularly (though not for a few months now) use for scanning for wireless networks.

Hopefully I can remember this post and look it up, the tool in question is swscanner (a kde wireless scanner applications).

[/comp/software] link

Fri, 05 Oct 2007

No count-words-region or similar in emacs? - 14:10
I have no idea how I never noticed this before, I was writing something a few minutes ago and wished to know how many words were in a section of it. Plain text in emacs. I tried Meta-X count-<tab> and a few variations and could not find a command that would count the words in a region of text, or a buffer or anywhere else. Strange I thought and decided to search online.

From search engine results I found that somehow emacs does not natively have the few lines of lisp required to do this seemingly simple function anywhere by default. So there are some reasons this may be the case, the first of which is the definition of what constitutes a word may be in question, especially in different modes. However I just want a basic text mode word count capability.

Many online suggestions seemed to launch a sub-shell and run wc on a buffer or section of a buffer, this is obviously overkill. Fortunately one of the first search results is to an elisp intro that has a section detailing a function defined to do count words region, which is exactly what I needed, so it is now in my .emacs file.

The two things I find most surprising with this state of affairs are: 1. emacs does not have the capability somewhere in the huge amount of elisp distributed with it to do this natively and 2. Though I have been using emacs a lot for more than 10 years I never before noticed this was lacking.

[/comp/software] link

Tue, 18 Sep 2007

Keyboard training - 15:04
I have noticed my wrists getting sore when typing on my computer at work for long periods form time to time. I decided I should put more of an effort into trying out a Natural shape keyboard for a while. When Mikal was here for a month recently he recommended the Microsoft Natural Keyboard 4000 model. This is a mostly black keyboard with a usb cable to the computer (none of this silly wireless stuff) and appears to be the most recommended keyboard on most RSI and similar topic websites and blogs.

I finally convinced Bob to purchase three of these (one for me, one for the head of department and another in case Mikal^Wanyone requests one). Of course I am writing this diary entry on my laptop which sort of defeats the purpose, however I will be making an effort to get used to the new keyboard. It is quite a change as I had previously been using an old ps2 keyboard that I liked the feel of. One of 5 or so I found a cache of at work and had snarfed up and connected to my home computer, work computer and any other deskbound computer I had to type much on.

My typing is a little slower on the new keyboard, only having used it for an hour two now, however it feels nice and the shape is not strange or keys in the wrong places it seems. I had wondered about using the non standard keys and the strange zoom switch (though as a scroll wheel) however most of the extra keys do not show up as having an event in X (using xev). Searching for information on this I find a few Microsoft Natural Keyboard 4000 howtos or forum discussions, however the methods to get the extra keys all seem to require a kernel patch, one which is not integrated into the distribution kernels. Thus unless anyone can suggest some other mechanism to get the events to user space I guess I will leave it be for now, after all I need it to type, not to press weird buttons on.

I also have to train my fingers to hit q rather than tab in mutt to get out of an email all the time.

[/comp/hardware] link

Wed, 12 Sep 2007

Google maps API is kind of neat. - 11:31
I purchased a Garmin Forerunner 305 a few weeks ago, this is a combined HRM and GPS device. Pretty much aimed at sports people as a training tool. Mikey and Tony from ozlabs have been working on some code (gpsruns) that easily grabs the data and uploads it to your website to interface with the Google Maps API.

For example here is the API and Maps link from an 18 KM run I did last night. I wear it cycling, paddling and running and it is interesting to see the data. However I have been thinking there are ways to represent some of the data in the graphs in more interesting ways over time. I had a look at the Google Maps API documentation yesterday and am impressed with how much you can actually do.

I was thinking it would be cool to be able to display information such as distance, HR, speed, direction and other things in the line plotted on the map. Looking at the PolyLine documentation I am happy to see it can be done. I will need to divide the plot into sections over whatever range of change I want to display. However I can for example put a key for what colour is what heart rate on the page then display the map changing colour for different heart rates over time during the exercise. I can also put up more plot points for displaying distance covered or speed or gradient changes in different colours. I guess it is time I got hacking on this code along with Mikey and Tony.

[/comp/software] link

Wed, 01 Aug 2007

And the k bone is connected to the - 17:47
So after checking with dell today to ensure we would not mess up the warranty to play with my laptop and reseat the keyboard I had a look at fixing the problem. I must say this is a remarkably easy fix, there are 4 screws on the bottom marked k, these hold the keyboard in. Unscrew them, seat the keyboard how you need to, screw them back ensuring they are tight. Job done.

I am sure Bob is laughing at me right now as he tends to pull anything he buys apart the minute it is in his hands, ignoring any other issues.

[/comp/hardware] link

Tue, 31 Jul 2007

Please go away clicky key - 22:58
I am sure the old ibm keyboards that had a positive key click and made a noise on each key press are all well and good. If that is what you wish to use and are used to it. On my laptop it is getting on my nerves.

I have had a problem with the screen on my laptop (dell x300) for a year or so. There has been a brighter circle in the middle of the screen, also the screen hinge has been a bit loose and wobbly. The machine was still usable and functional so I did not give it much thought and got on with things. However as the warranty runs out in August sometime I decided I had better do something about the problem.

Thus we had a dell technician in the other day (Monday morning) to replace the screen. All good the replacement screen is fine, no bright circle and it has stopped wobbling all over the place.

Well all is fine with the screen now, however the technician had the keyboard out while making the screen change and somehow it seems has not reseated the bottom right hand side of the keyboard. The outcome of this is there is a noisy click sound when ever I press right arrow, page up or page down, or enter.

I could open it up and fix it at work tomorrow I guess, however it is still under warranty so maybe I should get dell back to look at it. Having only a few keys on the keyboard behave as if they were on an old ibm keyboard is not really a desirable behaviour.

[/comp/hardware] link

Wed, 18 Jul 2007

Far less painful than expected - 16:47
I asked Mikal if he had any experience in burning copies of DVD's, notably where there is more than 4.7 GB of stuff to fit onto a a dvdrw disc. He said no and asked me to report on the details of all the pain and suffering I went through to make it happen.

I feel almost cheated, and I am sure Mikal will be sad to hear how easy it all was, however because he asked, here are the details.

The only caveat with this method is it appears many (possibly all) of the extra features on the dvd will not work from menus (and looking at the mounted iso image may have been removed). However it has copied the primary documentary that is the reason for owning the dvd across, the resolution is reduced in parts, but that will probably not be particularly noticeable on a tv screen.

The simple process used for this is "apt-get install dvd95 vamps ; dvd95 &"

The dvd95 program will even burn the iso image it creates for you, or you can ask it not to and burn it yourself with growisofs or similar. I think the next step if I am feeling keen is to read up on ways to split the dvd up into two, retaining the menus but having the movie on one and the extras on another dvd or some other way to retain all the extra features. Right now however I do not feel that need.

[/comp/software] link

Fri, 13 Jul 2007

My software works too well, change it back - 22:06
I have upgraded a few of the systems at work recently to a far more recent image, this one based on feisty (users get to choose what environment they log in to though (kde, gnome, something else, etc)). A short while after putting the image on James' desktop he wandered over and asked if I had doubled the size of the swap partition. When I said that had not changed he was almost amazed as he said around half the memory used before the upgrade was now in use.

It appears the profiling and lower memory foot print work various gurus in the kde and gnome and similar camps has paid dividends as there appears to be a pretty big drop in usage and memory leaks here and everything feels a bit faster all of which is good news. Not that I have done any real testing but perceived feel is relevant to some extent in a computing environment.

The most amusing thing here I thought was my interpretation of how he asked the question, it sounded almost as if something was wrong. As if James was saying "my computer is not using enough memory, and is running to fast, fix it, make it as slow and hoggy as it used to be". I guess at least he was not about to request a change to a computing system that seems to constantly get slower and more user unfriendly with every major release.

[/comp/software] link

Thu, 05 Jul 2007

SDVO cards are an answer - 11:34
After my question yesterday regarding DVI outputs on motherboards with Intel Graphics, JK and others have pointed out that SDVO cards will do the job. The Xorg wiki even has a page detailing which SDVO cards work which is good to see.

I had a look around and found HT sell one of the HP cards and it should work (if it is the DY674A) and there is another mob in Queensland selling a HP SDVO card that definitely the correct chipset. Next time I am in Fyshwick I should check out HT and see if they have one.

[/comp/hardware] link

Wed, 04 Jul 2007

Any boards with onboard Intel graphics with a dvi output? - 17:10
So I have been wondering if there are any motherboards available in Australia with onboard Intel Graphics and a DVI output plug on the board. From searching the web it appears the Intel G33 Chipset includes the GMA 3100 graphics which can have DVI output and some of the boards with this chipset sold in the US appear to have a DVI output. The Intel DG33FB board for example should be available with a DVI output.

However I can not from a few searches find a board with the chipset above or some other Intel graphics chipset which has DVI output being sold in Australia. The reason I ask for the Intel graphics is that it means having a supported graphics chipset with open specs under Linux and full capabilities available.

I do not have my heart set on that model specifically, DVI output capable board that works with Socket 775 and allows me to run a computer with the Intel open video driver under Linux would be good. Anyone know of one being sold in Australia?

[/comp/hardware] link

Mon, 04 Jun 2007

A Google mail complaint - 20:46
So like all the other sheep in the world I do have a Gmail account, though I do not use it for anything much or tell people what it is. However a while ago I set it up such that it will forward all email received to my main email address. Then I subscribed the account to a mailing list I found was not delivering to my normal address correctly for some reason.

So far all of this sounds fine, however I noticed over the past week there were a fair few email on the list I seem to have missed. I logged into Gmail and found it had rather nicely stopped a bunch of spam. However it had also stopped 42 list email in the past month or three. So I went through all the spam it had stopped and marked the list mail as not spam and thus they were moved into the inbox.

Now I thought to myself I simply have to forward (or bounce) all these 42 email to myself (there is no option to reprocess them with the default forwarding rule). Unfortunately this can not be done, there is no way to mass forward or bounce email to another location. Sure I could open every individual email and forward them, but that would take forever, and I admittedly would prefer to bounce them to me so the headers remain as they should be (bounce being a feature Thunderbird also does not have even though there have been open bugs against Mozilla mail since Mozilla was open sourced, but that is another rant for another time (I am aware there have been thunderbird plugins to do this sometimes but they tend not to be up to date)).

So looking through the help files for Gmail I find they are serious that there is no way to get more than one email at a time sent on. They suggest enabling pop3 and downloading the mail. Okay so I can do this, however upon trying it is about to download all the email that has ever come through to Gmail, not just the stuff in the inbox. I only want a local copy of these 42 email, if only it were not so hard. I guess I have heard of API's for Gmail that may be the next place to look.

Admittedly I use mutt as my primary email client and am not at all familiar with Gmail so I may be missing something but so far my rather specific needs are hard to come by. I guess at least I do have access to all my email data there rather than it be closed off and locked away somehow.

[/comp/software] link

Mon, 21 May 2007

Unix command scheduler graffiti - 11:52

Unix Command Scheduler Graffiti: CRON! (fullsize)
I was interested to see this on the Braddon Telstra building yesterday. Graffiti artists are getting into unix in a big way when they feel the need to pledge their support for the unix command scheduler on the side of buildings.

Of course I guess, as it was on the side of the Telstra building, it may be some statement about how telstra is run, all from a series of cron jobs. That may actually explain a lot about the organisation if you give it some thought.

[/comp] link

Thu, 10 May 2007

Recovering data from a dbx file - 17:10
Maybe this should have a Dear Lazyweb heading?

So I have been trying to extract some email from a Microsoft Outlook Express 6.0 DBX file for a friend. She has deleted a lot of email in a mailbox by accident. However the email is all still in the file, however there is no way I can find to get it out cleanly.

Running strings over the dbx file it finds all the old email, though in a corrupted sort of output. There are some dbx libraries for linux and they have programs to readdbx or similar (perl libraries based on them). However running these it extracts the email that still shows up in the mailbox in outlook, but not all the deleted content. The DBX file is over 5 MB, however the available linux dbx libraries extract about 120 KB of data. Strings output is close to the 5 MB (the attachments, due to being base64 encoded of course are recognised as strings)

I wonder if anyone knows of linux software that can extract all the email from a dbx file even those with the leading few bytes or whatever outlook changes to indicated they do not exist any longer?

The best option I can find so far that may possibly work, though I have no idea what it can do is a utility called DBXtract that runs on windows for USD $7. It would be nice to extract this to mbox format on linux though.

[/comp/software] link

Wed, 09 May 2007

Silent G - 15:41
I commented to jdub and a few others it is sort of a shame Ubuntu releases are named with the same first letter of both words, with the next release named "Gusty Gibbon". As they are bringing in the Gibbon it would be so much better to call it Funky Gibbon in reference to The Goodies.

However when I mentioned this problem to Bob he had a rather brilliant suggestion, they should have used a silent G as is used in most open source recursive acronyms derived from the letters GNU. (GNU itself, Gnome, etc)

Just think Ubuntu GFunky Gibbon.

And for the bad pun lovers out there, I bet you can't wait until your UGG Boots.

[/comp/linux] link

Tue, 27 Feb 2007

Times when you wish etch were stable - 11:21
I really can not whine about this as I do not do work to fix it myself, however I tried to install sarge (3.1r5) on a recent dell machine (Dimension C521) for something I was working on yesterday. First the cd would not see the cd drive or the hard disk. So I found a sarge install cd someone had created with a 2.6.20 kernel and that worked. However the next hurdle, once packages were installed was that X did not just work with the nvidia card (nv free driver in 4.3.0) in the machine.

At this point I could either try testing/etch or install from a dapper cd I had sitting in the office. As it would save burning an etch/testing cd (which we may need rc2 for a clean install anyway?) I ended up installing dapper. At least I can still use the debian packages if need be, however I am definitely looking forward to etch being stable so it will work on more recent hardware for a while.

I guess the argument could be made I should have simply used etch, and if I am going to complain at all I should get off my arse and do work on debian to help get it out the door. Ahh well, machine is up and running now and I can get the work I need done on it.

[/comp/linux] link

Fri, 19 Jan 2007

The kernel hacker culling plan - 11:13

Linus riding along on Geoffrey's Segway (fullsize)
Back in 1994 when Linus visited Andrew Tridgell and Canberra, Tridge took him out to the National Aquarium and tried to kill him off with a bunch of rabid penguins biting him. Then a few years later after an lca Alan Cox came to Canberra for a visit also and Tridge took him horse riding, he fell off a horse, more proof that Tridge is trying to kill off the kernel hackers. I suspect this is a large part of why Linus did not want to come back to Canberra in 2005, apart form having been there before he was wary of being near Tridge on his home turf.

Anyway at lca this year Linus and various other Kernel hackers are in attendance. However because all Kernel hackers are trained to be wary of Tridge at Kernel hacker school Tridge had to get someone else to do the culling effort this time. In this instance it is Geoffrey Bennett with his Open Source/Hardware hand built Segway vehicle.

Geoffrey has mentioned to a few people that if you go too fast on his it can cause a face plant or other problems as it does not yet back off correctly when it hits top motor speed. He will I am sure have that fixed soon, however he left that feature off here so the experienced kernel hacker Segway riders may be tempted to take it for a fast spin and possibly have an incident furthering Tridge's Kernel hacker cull.

[/comp/linux] link

The new camera - 08:04

Old camera front (fullsize)

Old camera back (fullsize)

New camera front (fullsize)

New camera back (fullsize)

As I mentioned last week I purchased a new digital camera. A Panasonic DMC LZ5, I have used it a fair bit so far, on the Friday morning mountain bike ride last week, riding up to Sydney and for various other photos in the last week.

I like the camera, and I took the above photos of both cameras last week just to show them off, the new one is a bit smaller and definitely lighter. It was just as well I had two cameras last week or I would have had a chicken and egg problem, how do you take a photo of a camera if you only have the one camera. (okay so a mirror is one solution, but I am ignoring that for the purposes of this lame chicken and egg reference).

[/comp/hardware] link

Wed, 10 Jan 2007

Neato, new and shinier photos to come. - 14:33
So after much deliberation I finally decided to get a new digital camera yesterday. Most of what I use a camera for is photos while doing events or outdoors doing something, thus a small easily pocketed model is a good thing. I notice often I have a lot of blue induced by shaking in my photos so getting good image stabilisation in a compact camera was the plan. Also a really short auto focus time and shutter release time was a good target. I was pretty much settled on getting a Panasonic camera for a bunch of reasons. In the end I decided on the Panasonic DMC LZ5 to replace my 3.5 year old Canon PowerShot A60.

The camera was ordered yesterday from a mob in Adelaide, Camerastore.com.au and arrived at work in Canberra around an hour ago. More details and photos and stuff to come once some playing has happened. I am sure my sister will be happy as I intend to give her the old camera (she does not have a digital camera) and it is still a nice sturdy camera.

[/comp/hardware] link

Tue, 09 Jan 2007

The sync option to mount does not mix well with vfat and memory cards - 16:41
So I was wondering why the performance of USB memory sticks appeared to be so pathetic on my laptop and my desktop at work the other day. Read performance was fine with 10 or 1 MB per second, however depending on which memory stick I used I got between 70 KB/s and 600 KB/s.

After banging my head against this for a while I googled for details about bad usb memory performance on Linux. I came across a lkml thread from may 2005 that seems to have helped enough. Apparently the performance of USB memory with the sync option and vfat filesystems is really pathetic, this is largely due to the repeated hammering of 2 blocks with every sync.

Alan Cox has some good and salient points in the discussion (to be expected from such a guru I guess), notably he points out most quality flash memory is very unlikely to be too adversely affected in a short time by using sync and he has a link to some details of life time guarantees from some companies for their flash products.

Anyway I disabled sync on the desktop image and my own desktop and disabled it on my laptop, all of a sudden I get 2MB/s or better depending on the memory stick I am using. Neato.

Interestingly Alan suggests the documentation for mount is generated form the kernel docs somehow and should be up to date and thus not continue to suggest that vfat filesystems ignore the sync flag. It is interesting to see that my Debian unstable copy of that man page on my laptop today still suggests that vfat ignores the sync option. At a glance I can not see any mention of this on the Debian bugs page for mount.

[/comp/hardware] link

Wed, 01 Nov 2006

Kernel command line for environment variables - 14:56
So installing a debian based system from a network boot server, ie plug in a computer to the network and the debian installer appears (or similar, in this case it is actually ubuntu). Trying to work out how to ensure a proxy would be used for fetching all the files downloaded during an install (debian Packages files, .deb's, etc). The default d-i can still ask you for a proxy, however this one we are using did not.

I remembered reading something somewhere about setting the proxy environment variable on the kernel command line that d-i would then be able to use. I can find no documentation about this with respect to d-i. However it seems to work correctly by putting append="http_proxy=blah" into the correct pxe boot file. AJ pointed out it is a kernel feature that allows variables entered in such a way to be passed to init (this is sort of hinted at in the kernel Documentation/kernel-parameters.txt file, though not made clear). Anyway because d-i uses wget (and even when it gets to apt, apt understands the same variable) to fetch files this works correctly.

[/comp/linux] link


home, email, rss, rss2.0, atom