loge.hixie.ch

Hixie's Natural Log

2005-02-10 08:57 UTC It's a great big whirl

I bought more track for my train set (four expansions' worth), as well as electric motors and integrated digital decoders for every point, so now all the points on the entire layout, as well as every train on it, can be individually remotely controlled. The whole thing uses only two wires (linking the control unit to one piece of track). I'll have to add a bunch more wires when I add the sensors to the layout, since those have to be separately wired to the s88 decoder and the Interface unit, but that's for later.

I currently run the trains from a little perl script which acts like a shell:

Train Command Line 0.1
Type 'help' for help.

> e 42 5
Engine 42 set to speed 5.

> g19
Switch 19 set to position green.

> e 46 9
Engine 46 set to speed 9.

> r27
Switch 27 set to position red.

> 

...and so forth. It's fine for broadly controlling the layout but when you're trying to do fine maneouvers it's a bit tedious. My next plan is to make a Web-based interface that uses the Web Forms 2 and Web Apps 1 features to provide a better UI. I'm not sure about how to present the tracks yet, but maybe an image map with some overlapped divs for indicator LEDs.

Or I could just bite the bullet and do the layout part using SVG.

After that I'll probably get more track and more trains and then make a layout that has two separate stations, and have the computer run timetabled trains.

To set up the layout I have now I actually used Trigonometry. I was quite glad to see that I hadn't forgotten how to use sines and cosines (SOHCAHTOA!), Pythagoras' theorem (the sum of the squares of the sides equals the square of the hypotenuse), the properties of triangles (all inner angles add up to 180°) and how to contruct right angles out of arbitrary triangles so as to make everything easier. Of course that's all elementary algebra. I have forgotten everything about how to use Fourier transforms and everything else I learnt at University.

Eirik moved out last week (or the week before), and Kam moved in. Funny how things happen. I would never have imagined, several years ago, that I'd end up living with Kam in Oslo. The first thing he did upon moving in is plug in his GameCube and its bongo controller.

...

Over the last week or two I've been reading three books by Fred Vargas: L'homme à l'envers, L'homme aux cercles bleus, and Pars vite et reviens tard. Very good crime novels based primarily in Paris but also around France, about an intuitive inspector's career and personal life.

My Salsa lessons are going great. I'm taking the intermediate course (we did the Butterfly this week) but the beginner's class this semester has not enough guys so we were invited to retake that course so as to balance them out. It's a lot easier to practice dancing when everyone has a partner. It's funny, now that I know what I'm doing it's blatently obvious when the girls have what our teacher calls "Spaghetti Arms" — that is, when they don't follow the lead — or worse, when they try to lead themselves.

The other day, the company underneath Opera released one of their products (Qt for Windows) under the GPL. Scott Collins (or rather, scc, as I know him) asked me to mention this, but it's good news all around. Especially in light of ridiculous statements from Microsoft such as "we focus on interoperability!" written on pages that fail to validate and that use server-side client sniffing to gratuitously serve different stylesheets to different browsers.

My favourite part in that was the way that Microsoft put forward the Internet as a shining example of Interoperability, and then in the same breath said Free Software (upon which most of the Internet is built — c.f. Bind, Apache, etc) cannot be interoperable.

Speaking of Interoperability, Monday was a big milestone for some of the work I'm doing at Opera. The next stage is going to be very interesting. Since it's all confidential, though, I can't comment on what it actually is here, so tough!

By the way, I've actually been having breakfast this week, in what I hope will be a new trend. By breakfast I mean cereals and milk, the only true breakfast. I used to have it every day as a kid but for some reason with going to University I stopped, and since I often get up in late morning, I didn't start again. However, I'm now eating Frosties and whole milk whenever I get up. We'll see how long that lasts...