peteg's blog

Chicken Run

/noise/movies | Link

Good Night, and Good Luck

/noise/movies | Link

In the later evening at the dear old Verona. David Strathairn, the lead actor, is good, really good. Clooney doesn't irritate and does a great job of running the show. There are some loose ends to the plot, and the editing feels a bit weird at times. Great to see Frank Langella again.

The Odd Angry Shot

/noise/movies | Link

On DVD from Dr What!.

/hacking/mindstorms | Link

Quick hack to fix the slow downloads: somehow the leading 0xf1 byte of a response packet from the RCX is getting lost quite often, so I simply make it seem that if the host gets a packet from the RCX then that packet starts with that byte. Things are a lot faster and more reliable now. The tarball has been updated.

Using the light sensor and a circular 2x2 plate to simulate a rotation sensor is a bit tricky, not the least because the (active) light sensor readings don't seem to vary much - 50 to 54 for me. Secondly there's the question of sampling frequency, and then relating the number of events to the quantity we're really interested in (distance or angle in the case of the turtle). Oh well, I'll see what I can do.

From the point of view of interesting programming, the turtle isn't such a great starting point. The robot is severely limited in the amount of concurrent activity it can engage in; I think one could raise or lower the pen while rotating or moving, but this is hardly useful. It seems to me that the cleverer the mechanism the more limited the concurrency possibilities.

Brown has an interesting course with some labs that help with getting started. Another way to get into interesting-program-land is to sophisticate the task.

/hacking/mindstorms | Link
As always, I spoke a bit too soon. My hacked version of dll is pretty damn unreliable. (I began writing a control program for the turtle, see. That bit's easier than I thought.) Oh well, another problem for another day.

/noise/movies | Link
Watched the rest of Bangkok Hilton. The final ninety minutes is relatively lame.

/noise/movies | Link

Went out to Blacktown with Lucy to see The Nightingale's Prayer as part of the Sydney Arab Film Festival.

Couldn't sleep, so I watched the first two thirds of Bangkok Hilton.

/hacking/mindstorms | Link

Wow, things start working. I ripped Markus Strickler's mostly-beautiful osx_usb.{ch} out of the aforementioned lejOS tree and started hacking it into brickOS's mangled dll (dynamic linker and loader). The code for all these sorts of tools starts out as a minor variant of Kekoa Proudfoot's seminal work, is extended with various hacks to get things working under Windows, Linux with that new USB driver, on Solaris, etc. etc. and ends in Mac OS X users tearing their hair out. The code started out as a proof-of-concept and is now more-or-less unmaintainable.

Well, that's my excuse for ungently hacking out the bits I didn't need (viz the old serial device mechanisms, and Windows and Linux support). If the brickOS website looked less dead I may have tried to do it tidily and submitted a patch. As it is, I'm just going to package it up to save the hair of my fellow Mac OS X users. Some notes:

  • Things are slow; quad-rate download is unsupported.
  • My RCX had a default LNP (brickOS's "LEGO™ Network Protocol") address of 2. You need to specify this when using dll. The following worked for me:
    dll -v -p1 ../demo/helloworld.lx --rcxaddr=2
    
    You can find the address by using the View button: the address is the number that comes up after Addr when you cycle through it, ignoring the final '0'. You can set it by pressing Prgm when it is displayed.

The tools are available here. They are imperfect but enough to get started. I may hack them a bit further into shape in the future, and if you do please send me the results.

With the confidence that I can now get my programs onto the RCX I started building the Logo turtle featured in the Syngress 10 Cool Lego Mindstorms Robotics Invention System 2 Projects book. It's a mechanical marvel. I wonder if it's capable of drawing a smooth curve.

/noise/movies | Link
The Island. What a turkey.

Hal Hartley: The New Math(s)

/noise/movies | Link
Pretty damn obscure.

/noise/movies | Link
Headed out to Campbelltown with Lucy to see Terra Incognita, part of the Sydney Arab Film Festival. A bit too scattered for my taste, but it had some beautifully subtle moments, such as the moment the radio news reader shares with his taxi driver on the way to work. I couldn't keep track of all the male characters, and the alluring supporting lady-character was underused. Made with French backing.

You and me and everyone we know

/noise/movies | Link

With Rob at the Dendy in Newtown. It chugs along quite pleasantly.

/noise/sport | Link
Rugby: Australia v Ireland at Lansdowne Road. It started at roughly 1:30am in Australia. A pretty crappy match, with O'Driscoll out injured and the Irish number 10 somehow having an off day. Latham played well and the (starting) front row didn't cave in.

/noise/movies | Link
Hal Hartley's The Book of Life. In some ways (due to the cast) this feels like a failed attempt to recapture his magnificent Henry Fool, and in others it seems like a dumbed down version of Surviving Desire. Let that not dissuade you, this is a Hal Hartley after all. PJ Harvey is wonderfully languid as she cuts a swathe through millenial New York.

Salaam Namaste

/noise/movies | Link

At Cinema Paris, Fox Studios, with Jacob and his mates.

/noise/movies | Link
Salaam Namaste at Cinema Paris, Fox Studios, with Jake and his mates. Three hours... with an intermission.

/noise/sport | Link

Went over to the Duke of Gloucester to watch the roundball football (as my SBS reception is no good). Wow, we beat Uruguay at long last. I think they should field a team consisting of clones of the goalkeeper and Harry Kewell and let the rest go.

As I walked over I thought the worst thing that could happen is for us to win the match 1-0 and still miss out on going to the World Cup. When the extra time kicked in I got thinking that having a super goalkeeper meant we really had nothing to fear from a penalty shootout, as indeed we didn't. Still, not the best way to win a game, and I fear we're in for a mauling at the hands of a real team (Brazil or France, or heck, even a north European one). I'll be satisfied if all the Soceroos do on the field in Germany is to score a goal against the Frenchmen, especially if Bartez comes out of retirement.

/noise/movies | Link
Inside Deep Throat. Largely pointless and uninsightful. The porn industry was once young and idealistic? Really? I always had the impression that the second thing (after the Bible) to be distributed via a new medium was pornography, and I can't see what's so special about this movie.

Kiss Kiss Bang Bang

/noise/movies | Link

At The Ritz. Pretty funny, with Robert Downey Jr chaotically funneling his Wayne Gale character from Natural Born Killers and Kevin Spacey's from The Usual Suspects. Knowingly subtle, but not annoyingly so. It felt like something out of the 90s.

/hacking/mindstorms | Link

Wow, some success. Back at my parents' place for the weekend, I had access to a Windows machine. This allowed me to get the official LEGO™ firmware onto the RCX, and then, well! The wonders one can work with known-good hardware.

The only Mac OS X 10.4.3 / USB Lego tower firmware downloader that worked for me is packaged with leJOS. Indeed, if I was more charitable I would try out their whole system, the core of which is an implementation of most of the interpreter-part of a JVM on the RCX, a nice piece of engineering. That's more than I hope I'll need, but we'll see.

The lejosfirmdl program happily downloaded the brickOS kernel to the RCX for me. I have a minorly hacked version of it that I can supply on request.

Once the brickOS firmware is on the RCX it doesn't take too kindly to attempts to replace it. Apparently one must ask it to commit hara-kiri, leaving only the LEGO™ ROM intact and in charge. To quote the aging FAQ:

Because of a limitation in the LEGO™ firmware, firmdl3 cannot delete brickOS. Instead, before downloading the new firmware, you must first stop the old brickOS program, and then hold down the Prgm button while hitting the On/Off switch. This will delete the old brickOS firmware, allowing a new download.

Next step: getting a brickOS program onto the RCX. I observe at this point that the linker and program downloader are fused together, and so I cannot just hope that NQC or leJOS will save my bacon this time.

/hacking/mindstorms | Link

Lesson of the week: don't be heroic. There's a pre-packaged GCC 3.2.2 and binutils 2.13.2.1 available, linked from this rather intriguing summer class at Lund (hello Calle!). Download and install. Trust me, it's much easier than compiling things yourself.

Compiling brickOS itself is still a bit fiddly. I did the following to a virgin brickOS 0.9.0 tree:

  • util/firmdl/rcx_comm.c fails to compile. I later found the firmdl3 program included with brickOS to be useless, so the quickest "get the compile to go through" hack is just to add #define linux near the top of that file.
  • blinks that seems to do it.

The tricky part is talking to the USB tower. Almost all the non-LEGO™ Lego™ Mindstorms projects appear to have stalled right about when the USB tower became the only thing one could buy. I take that to mean that the people who got all excited in 1998 or so and did all this wonderful work never bothered with the newer RCXs, and that it seemed to have lost its geek chic by 2001 (excepting the Linux afficiandos, of course, who appear to think that this device is worth a kernel driver... in 2.6.something... say no more.).

Nightwatch

/noise/movies | Link
At The Ritz in the later evening. Those crazy Russians. This movie was in little danger of making sense.

/hacking/mindstorms | Link

Picked up the Lego™ Mindstorms I ordered from Dick Smith Electronics from the post office yesterday. (This courier company thoughtfully leaves one's package at the post office if they can't deliver it.)

The first step, beyond opening the box and aahing over all the bits in the kit, is to get a decent development environment working on Mac OS X - and that means GCC, of course. I tried 4.0.2 with little joy, and from a fair bit of googling I got the impression that 3.3.x is a goer.

Some details: we need a cross-compiler to GCC-target h8300-hitachi-hms. The Mac OS X internationalisation appears to cause GCC some grief, so I'm just going to have to read American English for a while (shock horror). Using the various Fink and DarwinPorts tools lying about, and after a painless binutils v2.16.1 installation, the following worked for me:

% tar xfj gcc-3.3.6.tar.bz2
% mkdir build-gcc
% cd build-gcc
% ../gcc-3.3.6/configure --target=h8300-hitachi-hms
    --prefix=/opt/local/crossgcc
    --exec-prefix=/opt/local/crossgcc/h8300-hitachi-hms --enable-target-optspace
    --enable-languages="c" --disable-nls
% make

You can change that to --enable-languages="c c++" if you like that sort of thing.

My choice of putting everything in /opt/local rather than /usr/local confuses brickOS's (ad-hoc, not autoconfiscated) configure script. The obvious change in that script makes it work.

Next step: build brickOS.

Angel Baby

/noise/movies | Link

Serpico

/noise/movies | Link

In the Name of the Father

/noise/movies | Link

I was quite impressed by Daniel Day-Lewis in The Unbearable Lightness of Being and he's also excellent in this one. It's somewhat eery to watch this old classic in the pall of the Howard Government's proposed anti-terrorism legislation.

Layer Cake

/noise/movies | Link
With Rob and Lucy.

Notorious

/noise/movies | Link

The Life Aquatic with Steve Zissou

/noise/movies | Link
At Fox Studios with Pete R. et al.

A Streetcar Named Desire

/noise/movies | Link

One Perfect Day

/noise/movies | Link
Pretty trashy.

2010

/noise/movies | Link

Matrix Reloaded

/noise/movies | Link

Matrix Revolutions

/noise/movies | Link

Supevixens

/noise/movies | Link

Vera Drake

/noise/movies | Link

Mystic River

/noise/movies | Link

The Matrix

/noise/movies | Link

Constantine

/noise/movies | Link

Closer

/noise/movies | Link

The Machinist

/noise/movies | Link
A post-Fight Club Fight Club.

Terms of Endearment

/noise/movies | Link

Shame of the Jungle

/noise/movies | Link

Children of a Lesser God

/noise/movies | Link

Cube Zero

/noise/movies | Link

Pretty crappy.

Collateral

/noise/movies | Link

Paulo Coelho: The Alchemist.

/noise/books | Link

The Wounds

/noise/movies | Link
Serbian, similar themes to Natural Born Killers.

My Own Private Idaho

/noise/movies | Link

City of Lost Children

/noise/movies | Link

The SpongeBob SquarePants Movie

/noise/movies | Link
On Bernie's recommendation.

VS Naipaul: The Mystic Masseur

/noise/books | Link

The Rage in Placid Lake

/noise/movies | Link

Spartacus

/noise/movies | Link

Butch Cassidy and the Sundance Kid

/noise/movies | Link

Million Dollar Baby

/noise/movies | Link

A Clint Eastwood insta-classic. Paul Byrnes wrote a glowing review in the Smage.

David Malouf: An Imaginary Life.

/noise/books | Link
A slow start followed by a gallop.

Fat Pizza

/noise/movies | Link
A bit funny, very trashy, and robustly representative of the contemporary Australian cultural output.

Key Largo

/noise/movies | Link

Intermission

/noise/movies | Link
A terrible, cliché-ridden, Lock-Stock clone starring Kelly Macdonald.

The Shining

/noise/movies | Link

Storytelling

/noise/movies | Link

Finding Neverland

/noise/movies | Link
It's a fabbo effort with Johnny Depp sporting a soft Scottish burr. Good to see Kelly Macdonald again.

Good Will Hunting

/noise/movies | Link
It made the most satisfying sound as it hit the trashcan.

Shrek 2

/noise/movies | Link

The Merchant of Venice

/noise/movies | Link

Cecil B. Demented

/noise/movies | Link

What's Eating Gilbert Grape?

/noise/movies | Link
An early Johnny Depp effort.

David Malouf: Antipodes.

/noise/books | Link

Pirates of the Caribbean

/noise/movies | Link
It just hit me (on this second viewing) that there is a complete absence of plot.

Up!

/noise/movies | Link

Shine

/noise/movies | Link

Teknolust

/noise/movies | Link

Sunset Boulevard

/noise/movies | Link

Sergio Leone: Once Upon A Time In America

/noise/movies | Link

Muriel's Wedding

/noise/movies | Link

The Motorcycle Diaries

/noise/movies | Link
I saw the short for this when visiting Delvin back in July. Great cinematography. I am surprised that it (apparently) hasn't been released in Australia. (Pete R. tells me it has; I guess this means IMDB is not omniscient.)

Michael Moore: Pets or Meat: The Return to Flint

/noise/movies | Link
A follow-up to Roger & Me.

Touch of Evil

/noise/movies | Link

Maria Full of Grace

/noise/movies | Link
I saw the short when visiting Delvin back in July, but have only now got around to seeing it. I'm not sure what to make of this movie; the players more or less directly represent a few kinds of people from a lesser-developed-country: the expats, the downtrodden workers (one stuck in the loop, one with the courage to break out of it), the mafioso, etc. and as such fail to become characters. I fear my hardboiled cynicism blinds me to the redemptive moments in it, for all I see is a whole string of pragmatic decisions, none of which are principled or pretty. The leading actress is luminous and there is some art in the cinematography.

/noise/music | Link
Got all geed up to go to the Elvis Costello concert this evening, only to be told (when I arrived) that it had been cancelled due to poor ticket sales. sigh It had actually been cancelled back on January 9 (or earlier) but I didn't think the check.

Pulp Fiction

/noise/movies | Link

National Treasure

/noise/movies | Link

My Name is Joe

/noise/movies | Link

Dead Man

/noise/movies | Link

The Corporation

/noise/movies | Link
The basis for the movie?

Van Helsing

/noise/movies | Link
Richard Roxburgh does a great Gabriel Byrne (End of Days-style), and this is his finest outing since Blue Murder. Hugh Jackman does the wolf thing again (or I guess lets the CGI do it for him, really). David Wenham camps it up as the geek assistant, in the Noah Taylor Tomb Raider tradition. I was wondering where it was filmed, but as they used the Lord of the Rings CGI equipment it doesn't really matter. The film itself is a pastiche of recent movies and European myths, a smooth integration of clumsy adapatations. For example, the collapse of the bridge in the first Lord of the Rings movie had far more moment, and there's not much going for the "don't talk, shoot"-line lifted lock-stock from The Good, The Bad and The Ugly. Who cares, for a blockbuster it ain't bad.

Fucking Åmål (Show Me Love)

/noise/movies | Link
A Swedish classic that I saw with Pete R. back in '98 or '99. The acting by the two leads is brilliant.

Hal Hartley: Amateur

/noise/movies | Link

Dune

/noise/movies | Link

The Maltese Falcon

/noise/movies | Link
I thought Elisha Cook Jr. looked familiar, and indeed he was in Kubrick's The Killing.

Team America: World Police

/noise/movies | Link

Strictly Ballroom

/noise/movies | Link

The Big Sleep

/noise/movies | Link

Eternal Sunshine of the Spotless Mind

/noise/movies | Link

Carrey is actually decent in this. I'm starting to get worried. (I was curious to see what Thomas Jay Ryan was like outside Hal Hartley's movies.) The computer that reprograms Carrey is an Amstrad® PPC 640, and I have one gathering dust at my parents' place.

Distorted Morality

/noise/movies | Link

Another Chomsky movie, this time just a recording of a lecture he gave at Harvard in 2002. I find it a bit annoying when he gets sarcastic about things as it becomes difficult to know when he is and isn't being supercilious. It's a weak oratory technique IMHO, at least coming from an MIT professor. Politicians use it all the time.

The solution, of course, is to realise he's primarily criticising the US and factor that into all his comments. This is hardly satisfying. It would good if he practised summarising his proof, at indicating how one might validate what he says without studying all media in existence (or the US at least). His common refrain of "It's either like what I say or I'm not aware of a counter-example" would've got me fails on my undergrad essays. :-)

But this is merely nickpicking his presentation. I don't substantially disagree with what he's trying to do — a skeptical analysis of media and the US government — and indeed think it quite worthwhile. What's interesting to me (in a "I'm not likely to do much about it" way) is how we might redirect these economic forces that apparently result in these negative outcomes (excuse the Watson-esque weasel words). Bluntly, why should Rupert Murdoch (Australia's finest export) do anything else but support the various wars if that's in his financial interest? I am not a believer in corporations-as-people, either way (rights or behaviour).

East of Eden

/noise/movies | Link

Chomsky's Manufacturing Consent

/noise/movies | Link
Penka told me about this film back in July, but I've only got around to watching it now. Chomsky reminds me a lot of RMS in that his working assumption is that no-one's ever read his stuff, and so he always starts from first principles.

Hal Hartley: The Book of Life

/noise/movies | Link