Search Results: "noodles"

7 January 2006

Jonathan McDowell: Beware my study.

Rar. Beware. I've now got the M&S USB missile launcher working under Linux. I hate libusb, it's very badly documented and seems to assume you know the USB spec inside out. Anyway, usblauncher-0.0.1.tar.gz does the appropriate magic (if crudely) and includes a basic GTK2 Perl program to control it. Ian Jeffrey has also produced some code that works in much the same way, but it's only a command line example and I couldn't see a license that allowed redistribution attached to it. It looks like he went about things in much the same way as I did though.

1 January 2006

Jonathan McDowell: Happy New Year

Not long back from Oxford where Dom had a rather good New Year's Eve party - good to see people and I'll stick photos up later today hopefully. Kim asked me what I'd remember about 2005 (her engagement was obviously her big thing) and I didn't have an answer. However I thought some more about it during the drive home and Tristam and Angharad (two of my best friends) getting married is probably my best memory of the year; I actually had to remind myself that it was only back in March - it seems like ages ago! It was a great day and lovely to see the both of them so happy (and I confess to rather enjoying my role as best man as well). Let's see what 2006 has to offer all of us...

31 December 2005

Jonathan McDowell: It's good to be back.

I finally had my first flight cancelled on me yesterday. I suppose given that I've been flying a few times a year for at least the past 8 years (even if it's only back and forth to Northern Ireland) I should consider myself lucky. I arrived at Belfast City Airport at about 8am, for a 9:45am flight (the last time I flew from Belfast we hit really bad traffic, so we ended up overcompensating). On check in I discovered it was delayed by 15 minutes. Shortly after I'd made my way through security it was delayed by 45 minutes. Then they delayed it until midday. Then at 11:30 they said they'd have an announcement at midday. And then at 11:45 they cancelled it. Now, I was flying from Belfast to Norwich. There's only one such flight a day. So I'm a bit stuck. And by the time I get to the front of the refunds queue they've filled up the flight today (Saturday), leaving me the option of a direct flight to Norwich on Sunday, or any other flight leaving Belfast City on Friday that they have seats on. So I go to London Gatwick, supposed to leave at 14:30. And it gets delayed by 45 minutes straight after I check in. Thankfully it does actually take off at 15:15 and I manage to get to England. On the wrong side of London for Norwich, but hey, the trains are running. I negotiate the Gatwick Express, get a tube to Liverpool Street and get on a train to Norwich. Which then gets delayed for 25 minutes because a train breaks down in front of it. Bah. I finally get home just after 9pm, rather than the 11:30am or so I would have managed if my initial flight had taken off on time. The house is still in one piece, the plants haven't died, I have food again. Rar. And I know this is small fry compared to American flight horror stories, or the potential problems we could have had when Uncle Steve lost our clothes en route to Brazil, but it's the first time I've had a major problem with flights. (We'll ignore the fun I had when turning on my desktop machine and seeing "GRUB Read Error" displayed. Damn scanner had decided to frob the SCSI bus enough that the BIOS could boot grub but grub couldn't then see sda.)

30 December 2005

Simon Law: WvDial 1.55

My day at the office has been pretty grand. I got to talk with a whole bunch of people about their problems and promised to look into some of them. Then I talked to someone about sales and marketting. Then I talked to Chris and we struggled with PHP. And finally, a chat with Tim about release management. It was like a day at the Montr al office, but with people who are less bouncy. I tried to smile at people and make them feel happier, at which I think I was mildly successful. Perhaps my motivational poster will help? I had some tasty ph for lunch at Ph Vi t which is a Vietnamese restaurant run by Cantonese people. It is also within walking distance of the office. Their soup was rather filling for a small portion and they had delicious spring rolls. Alas, they are not UltimateSpringRolls, but one can't expect to find those everywhere. A special bonus was that I got to talk with Deidra, in between happy bites of noodles and soup. It is now late and I guess I should be heading out. I was hoping to hang out with people after work, but they seem to have gone home. Oh well. So to pass the time, I released WvDial 1.55. Hurray!

28 December 2005

Jonathan McDowell: Linux WMDs

So, the delightful Kathy bought me a Marks & Spencer USB Missile Launcher (unfortunately out of stock at present or I'd have linked directly to it. Try searching on eBay / Google to see what I mean.) Problem. WinXP/2k only drivers. That's no fun. Plugged it in to my laptop (as you do). dmesg reports:
input: Tenx Nonstandard Devic as /class/input/input6
input: USB HID v1.10 Device [Tenx Nonstandard Devic] on usb-0000:00:1d.1-2
input: Tenx Nonstandard Devic as /class/input/input7
input: USB HID v1.10 Device [Tenx Nonstandard Devic] on usb-0000:00:1d.1-2
lsusb says:
Bus 002 Device 004: ID 1130:0202 Tenx Technology, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1130 Tenx Technology, Inc.
  idProduct          0x0202 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      43
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      23
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
The Windows software appears to consist of TenxHID.dll (24k) and Missile_Launcher.exe (908k). TenxHID only exports DeviceIni, ReadBuffer and WriteBuffer AFAICT. Which implies the higher level stuff is done in the exe to me. I think it's a job for USBSnoop and a Windows box, but that'll have to wait for a few days until I get back to a WinXP box I can use to fiddle. Unless someone else manages to write a driver in the meantime. :)

22 December 2005

Martin F. Krafft: Socks

noodles, this is what keeps me afloat. The best investment in years!

21 December 2005

Jonathan McDowell: It's not easy being green.

I can't believe I did this, but: You are Hulk
Hulk
70%
Spider-Man
70%
Iron Man
65%
Supergirl
60%
Catwoman
50%
Green Lantern
45%
The Flash
45%
Superman
45%
Robin
40%
Wonder Woman
35%
Batman
35%
You are a wanderer with
amazing strength.
The Hulk
Click here to take the "Which Superhero are you?" quiz...

Jonathan McDowell: Socks

When I had a real job I used to hate having to iron shirts every week. While I'll occasionally wear one when I go out it's not something I'd choose to wear to code in, so it grated that I had to expend effort in order to be able to wear something I didn't really want to. These days I'm a lazy layabout who largely works from home and I can wear what I like. However I still have to deal with socks. Now, at least I like wearing socks, but they're still a PITA. Pairing them up in particular. I think the problem is that almost all my socks are plain black and while you think that would make things easy it really doesn't. They're different shades of black for starters. Or different shapes. Or feel different. Or are lost for months and then suddenly turn up and the other half of the pair that kept annoying you out of the corner of your eye has suddenly disappeared. Gah.

17 December 2005

Jonathan McDowell: X11 Programming

I'm feeling somewhat stupid. I sat down tonight to have a look at writing a basic fire/flame demo thing under X (the sort of thing people used to write in 3 bytes of x86 assembly 10 years ago). See, I'd quite like a funky xdm/login thingy for my laptop, so random people who see me use it on the train think "Woah, cool". I'm sad like that. Anyway, my idea is a ring of fire with the login prompt in the middle. This seems simple. Except when I try to get involved with programming X. Now, I'm not a graphics programmer by any stretch of the imagination. But all I want is a nice simple framebuffer I can store pixels of 24 bit colour into. Or 8 bits with a colourmap is fine too. If the functions for dealing with the colourmaps are decently documented. This isn't much to ask, is it? Perhaps the issue was that I assumed Xlib would just provide me something that could do this. Or that I'd be able to find decent docs easily. Or that I had more than 2 braincells to rub together. But I've given up now. I really don't understand how to get Xlib to just let me XSetForeground to a 24 bit colour and then XDrawPoint. I tried to fight XAllocColor. I even accepted defeat and had a quick look for a simple X framebuffer library. No joy. So, can someone point me at the right docs to inhale for this sort of thing? Or a really lightweight C library that'll make it all really easy?

16 December 2005

Jonathan McDowell: Noodles<sup>3</sup>

Today I'm a cube. 33 to be precise. It's probably the last time I'll be a number raised to itself; I'd like to reach 256, but can't see it happening. If you're in or around Norwich I'll be in the Fat Cat from 7:30ish onwards. Do feel free to drop by.

15 December 2005

Jonathan McDowell: Grabbing LJ posts via OpenID authentication

Sometimes I love Perl. Thanks to Chris Ball, whose article on WWW::Mechanize I always seem to come back to for this sort of thing.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use HTML::TokeParser;
use WWW::Mechanize;
my $openid_server_url = 'https://the.earth.li/openid/';
my $openid_username = 'noodles';
my $openid_password = 'password';
my $openid_url = 'http://www.earth.li/~noodles/blog/';
my @ljusers = ('beccus', 'brrm', 'dpash', 'karen2205', 'lnr', 'padzor');
my $agent = WWW::Mechanize->new();
$agent->get($openid_server_url);
$agent->form(1);
$agent->field("username", $openid_username);
$agent->field("password", $openid_password);
$agent->click();
print "Logged into OpenID server.\n";
$agent->get('http://www.livejournal.com/openid/');
$agent->form(1);
$agent->field("openid_url", $openid_url);
$agent->click();
print "Logged into LiveJournal.\n";
foreach my $user (@ljusers)  
        print "Fetching feed for $user.\n";
        $agent->get('http://www.livejournal.com/users/'.$user.'/data/rss');
        open(RSSFILE, ">$user.xml");
        print RSSFILE $agent->content;
        close(RSSFILE);
 

Jonathan McDowell: Car Keys

I have a remote control doofer for my car, to lock/unlock the doors. Why is it, even if there are hundreds of miles between me and my car, that if I knock the buttons on it pulling my keys out of my pocket I worry I've accidently unlocked the car?

14 December 2005

Jonathan McDowell: Looking for RSS reader advice

I currently use Google Reader to read most of the blogs I track. It seems to work in a way I like. However I'd like to be able to aggregate in Livejournal using my OpenID so I can read friends-locked posts. I don't think it's appropriate to use a public service like Google or Bloglines for this, which means running something myself. I've had a look around but not found anything that's close to Google Reader. I like just having all the posts in chronological order, not listed under each source feed. Most things I could find give you a sidebar of a tree for each feed and then you have to look at each feed in turn. I just want my content splurged at me goddamit! Planet does this, but I also want content I've read to go away by default, which Planet doesn't handle (being a generator of a static web page). So, any suggestions? I'm using Firefox under Linux, but I'm not tied to an in browser solution (I've a feeling it would be easier to get my OpenID stuff working that way though). So far I've tried Sage and Wizz. I've also looked at Straw but not installed it as it looks a little unmaintained. Liferea looks like it could be an option, so I think I'll go play with that for the moment.

Jonathan McDowell: It's cool to talk SCMs

It seems everyone is talking SCMs these days, usually touting their favourite option while deriding everyone else's. (I exaggerate for effect.) Years ago we mostly used CVS and were happy. Some people are still happy with it. I still have a bunch of code in it, though migrating it to something else is on my list. Why? Niceties like being able to rename a file. Or atomic changesets. Things that all the new breeds of options can do. For the tress I manage myself distributed working isn't a big issue, so they'll probably just get migrated to Subversion as the easiest option. However I'm not really tied to any SCM. I've used at least Arch (tla), BitKeeper, ClearCase, CVS, Monotone, PVCS and Subversion for both checking out and committing files, and handful more to check out files from things I wanted to look at. The only one that is unusable is PVCS. The rest have all been fine for whatever I've used them for. So, if I don't care about which SCM, why blog about them at all? Because I care about how they get used. I'm a big fan of small granular commits with descriptive commit messages. Not huge big dumps of code with "check in new code" as the comment. Gah. Take, for example, the Linux kernel. Commit messages are fairly descriptive there and if you have enough time you can read through the changelog since the last release and really know what's gone on. This is great. Also the changes are granular enough that if you hit a problem it's likely that you can narrow it down to a single commit that doesn't do a lot other than break things for you. Not all projects I have been part of manage either of these. People often seem to view the SCM as a punishment, using it only under sufferance and as infrequently as possible, leading to large commits of many items at once. Which then means they don't see the advantages of it and are more likely to hit merge problems as the tree has changed under them. Meaning they end up hating it more and avoiding it as much as possible, making it all worse. Not good. Or, you get people who'll commit alright, but without any sanity testing at all. Like, even a compile. What's the point? I know you can roll it back, but if you're not sure it works and haven't even compiled it, what the hell makes you think it's suitable for committing? Bah. I can't see that my desired usage is that unreasonable. Am I missing something?

Uwe Hermann: EU adopts Big Brother data retention directive, ignores industry and civil society [update]

Heise (and many other sources) report that the EU parliament has voted for the abysmal data retention directive, simply ignoring objections from the industry and the civil society. The EU has turned into a police state where more than 450 million citizens are treated as criminals by default now! 1984 is a joke compared to this. We're all fucked! Bigtime! Please, someone go out and sue the shit out of the fucking idiots who are responsible for this kindly remind the responsible politicians that this directive is a really bad idea! Update 2005-12-15: OK, so I might have overreacted. My first answer to the accusations would probably be (abusing an unrelated quote from Jonathan McDowell): "I exaggerate for effect". But honestly, while it's not as bad as 1984, I really do think that this law will bring us all a big step nearer to a 1984-type horror scenario. (via netzpolitik.org)

6 December 2005

Jonathan McDowell: Dubby-Dub-Dublin

Kathy and I had a nice long weekend in Dublin this weekend past, celebrating 10 years of hell together. Was good, except for getting rained on lots on the Friday (solved by buying umbrellas) and Kathy starting the weekend with a cold and me finishing with one. Bah. I realised it's been about 5 years since I was in Dublin itself, rather than just the airport. Various comments:

5 December 2005

Jonathan McDowell: Toshiba++

As I've previously said I bought a http://uk.computers.toshiba-europe.com/ Port g R200 a few months ago. It's lovely and wonderful and makes my old laptop (a Compaq N200) look tiny, but is still quite small. However I discovered it wouldn't hold charge. If I unplugged it and used it I'd quite happily get 3-4 hours use off the battery, but if I charged it up while off, then unplugged it (leaving it off) and didn't touch it for a couple of days it wouldn't power on and needed fully charged again. This is a bit of a bummer, but I hadn't got round to sorting it out as I wasn't finding it too inconvenient. I decided I should really get it dealt with before I go back to my parents' for Christmas, so rang up Toshiba's repair line a few weeks ago. Told them what the problem was and they said they'd ring back in the morning to arrange a pickup time. Except they actually rang back that afternoon. It was too late for collection the next day, but they said they'd pick it up the following day in the afternoon. Also I wasn't to pack it or provide any of the accessories; just the bare laptop. Handy. Lo and behold the nice man from DHL turned up when Toshiba said he would, had a piece of paper with the right reference number on it (though in quite small print) and didn't want the laptop packed up as he had a suitable box already prepared. Time passed and I heard nothing. I was getting a bit worried, but Tosh say it can take 5 working days and it hadn't been that long (and given the nature of the fault I guessed they'd need to charge and discharge to check). But it was a bit weird that they'd not asked me to do any of the stupid things you're normally asked to do. (Have you rebooted? Reinstalled? Repented?) Plus the laptop only has Linux on it, so I was worried they'd be freaked by that (though they'd been fine when I mentioned it on the phone). It came to day 5 and I decided I'd ring them the following day. And then the nice man from DHL turned up with a big, well padded, box containing my laptop. At first glance it appeared to only contain my laptop, but when I opened up the laptop there was an A4 sheet saying that the battery had been replaced and the BIOS upgraded. Since then the laptop has actually held charge, so it looks like they did the job. So, congrats to Toshiba. More communication would have been nice, but it got fixed, you didn't wipe my Linux install (though I'd backed it up and removed any personal data anyway) and it was done within the period you claimed. I've not had to get a laptop fixed before, but iDunno hasn't had fun with Acer in the past, so I was prepared for the worst.

30 November 2005

Jonathan McDowell: OpenWRT on the Netgear DG834G

I spent too much time today reading MIPS disassembly of the ADAM2 bootload, as used on the Netgear DG834G. The problem is that the version used on the Netgear performs a checksum over most of the flash device on every boot. This makes the use of JFFS2, as done by OpenWRT, somewhat problematic. In an ideal world I'd try to compile up a newer, less restrictive version of ADAM2 but there's no JTAG on the Netgear that I've found and the thought of frying the bootloader and bricking the device wasn't appealing. So what I've ended up doing is finding where the checksum is done and changing the branch instruction that aborts the boot to a nop. It's still scary, but it appears to do the job. PLEASE NOTE THE BELOW COULD PERMANENTLY BREAK YOUR ROUTER First, obtain your ADAM2 image. This is 128K and is mtd2 from the bootloader view. It should have an md5sum of 0530bfdf00ec155f4182afd70da028c1. If it doesn't, stop. The version I'm talking about is 0.18.01 as distributed by Netgear. Assuming you have the right md5sum you want to go to offset 0x3944 where the 4 bytes should be 44 09 00 0C (representing a jal 0x90002510 during execution). Replace these 4 bytes with 0 (representing nop) and you should end up with a new image with an md5sum of d8a2f4623bf6f64b7427812f0e849aa7. You'll then need to do something like dd if=adam2-fix.bin of=/dev/mtdblock/2 on the device (I don't believe you'll be able to rewrite the bootloader from the bootloader for some reason...). After that ADAM2 will still checksum the flash, but will continue to boot it after printing a checksum error message. This means you can go off and build yourself an OpenWRT AR7 based image and install it on your Netgear. Rock.

29 November 2005

Jonathan McDowell: X session management

I use evilwm as my window manager. I like it; I mainly end up with a whole bunch of xterms and only a handful of graphical apps (Firefox, Psi, xmms and GKrellM). evilwm's minimal decorations mean I can fit everything nicely on my screen without clutter, and the virtual desktops let me have various separated out bits (eg Firefox gets a full desktop to itself). What I would like however is some form of session management. I'd like to be able to shutdown down my machine and when I restart it have my X setup look similar to when it was shut down, rather than having to start up a dozen apps and position them as I like them. I know I can do software suspend, but that doesn't cover kernel/library upgrades. I had a play with xsm, but although it could start up my xterms it didn't place them correctly. And didn't seem to restart Firefox, but I didn't poke that hard once I realised the xterms weren't getting placed. Am I doing something wrong? Do I need some different window manager setup? I think I'd rather live with having to place stuff myself rather than pull in large amounts of GNOME. I've previously used Window Maker and Fluxbox for prolonged periods of time - can either of those do what I want better?

25 November 2005

Jonathan McDowell: I was a brave boy at the dentist today

My main fear in life is pain. I'm a wuss. Nowhere is this more obvious than when I'm at the dentist. I literally start shaking when I sit in the chair. While he's prodding around inside my mouth I can feel myself tense up more and more until I force myself to relax and then the process repeats. Being 6'1" I don't get a lot of people believing me when I tell them just how nervous the whole thing makes me. Anyway. When I came to Norwich I managed to find a dentist who claimed to be suited to nervous patients. I went and didn't find them that good, but did make an appointment for my next checkup 6 months after my initial appointment. And then they cancelled it and I spent the next 3 years thinking I should really get round to sorting it out again and not doing so. Then several weeks ago I was having a conversation at an ALUG meeting with Becca and she recommended her dentist. So I decided I should give them a go and discovered that Phill also uses the same one and said they were good too. I finally got around to going today (having filled out all the forms last week). The dentist was nice and friendly and took me on board about being shit scared. And said some consoling words about my teeth being in reasonable shape. I got away with a scale and polish (which I have to go back to get completed in a couple of weeks) and no mention of a drill anywhere. Rock. Now let's see if I can manage a regular checkup schedule. :) Oh, it's the Guildhall Dental Practice at 9 Upper Goat Lane, Norwich if anyone else is looking. 01603 760032.

Next.

Previous.