Fred's Home Page

About me
csh is bad
Help out
KRoC/Linux (old)
occam upgrades
occam tutorial
Projects (PhD)
Quick gdb
UNIX crashcourse
WG / WGBuilder


(some people call these things blogs)


Happy New Year! :-). Picked up where I left off getting an MSc student project from last year ready for teaching in a few months. This is a simple IDE for writing AVR assembly aimed at the Arduino Uno, written in C++ (g++) using Qt (and the pretty snazzy Qt Creator IDE) also using QScintilla, calling nocc to do the lexing for QScintilla and for assembling the code proper (then avrdude to upload to the Arduino). Decided for a second time that I don't care much for object-oriented in C++. Whilst the abstraction is mostly comfortable (and does apply well to some things), layer on layer of inheritance and overriding can make it very hard to follow independent bits of code within the system, without some broad global knowledge. For the time being I'll stick to my default C approach of structures and lots of parameters-passing.


Had some crazy wind+rain on the 23rd that nearly took a tree out (now it's just leaning precariously). The storms managed to take the power out too (again, really need to replace the UPS..). The only device that survived the 8+ hour outage was my LEGO EV3 (running at essentially zero load) which has now been up for 15 days!


Dangers of living on the edge (of operating-system distributions): after several days of NVIDIA kernel mismatch warnings and other semi-upgraded machine unhappiness, the X server finally vapourised itself, taking with it around 80 xterms and 83 VIM sessions (neatly awaiting recovery) :-(. At least things seem more stable after a good reboot :-).


Erlang up and running on the EV3 again, so time to continue prodding that one. Also writing some code for the Arduino Uno based RF receiver for a student project, getting close to the point of having it send UDP packets (with nothing much in them to start with!).

One of our cats broke my yellow plate, very sad. broken plate Bought this back in 1998 from Tesco, along with a yellow duck (I think Steve still has his!), whilst a student. Keeping eyes open for a replacement though!


Was about to start doing something more serious with the LEGO EV3, then got distracted because I'd somehow bricked the SD card. Lots of block device errors started appearing, which led to something going bad. Possibly some issue related to my D-Link USB hub, or software handling of it, since plugging it direct into the host made all those problems go away. Also discovered that the good folk at mindboards github repo (Ralph Hempel) have made a Debian distro for the EV3. After some prodding and poking, this now boots successfully :-). Just in the process of getting Erlang running on it again, using the same cross-compile toolchain (Sourcery G++ Lite 2009q1-203), which built hello-world okay. Tried a more recent version (Sourcery G++ Lite 2011.03-42) but that failed to build an executable, for now.


Another year ticks by, many thanks to all for birthday greetings and presents :-). Many thanks and love to wife for a shiny espresso/cappuccino machine, which does a lovely job :-).

Some more prodding around with the LEGO EV3, this time to get Erlang running on it. After some prodding around with the cross-compile stuff, which by and large worked as the HOWTOs suggested (++), have a seemingly working Erlang system running on the EV3. This (probably a poor example) hello-world program:


hello_world() ->
	io:fwrite("Hello world from Erlang!\n"),
	io:fwrite("  version:   ~s\n", [erlang:system_info(version)]),
	io:fwrite("  OTP release: ~s\n", [erlang:system_info(otp_release)]),
	io:fwrite("  system ver: ~s\n", [erlang:system_info(system_version)]),
	io:fwrite("  system arch: ~s\n", [erlang:system_info(system_architecture)]),
	io:fwrite("  machine: ~s\n", [erlang:system_info(machine)]).

is compiled and run in the Erlang shell (erl) thus:

frmb@EV3:~/erlang$ erl
Erlang R17A (erts-5.11) [source-236b48c] [async-threads:10] [kernel-poll:false]

Eshell V5.11  (abort with ^G)
1> c(hello).
2> hello:hello_world().
Hello world from Erlang!
  version:   5.11
  OTP release: R17A
  system ver: Erlang R17A (erts-5.11) [source-236b48c] [async-threads:10] [kernel-poll:false]

  system arch: arm-none-linux-gnueabi
  machine: BEAM

Next up, time to prod around with the EV3's motor and sensor interfaces, which the LEGO folk have done a great job of documenting nicely :-). Then some gluing together of this stuff with the Erlang Embedded ALE framework.


FIRST LEGO League regional finals happened, successfully! :-). Managed to get myself on the evening news too, which was nice! (although perhaps slightly odd, since it's me responding to the presenter/interviewer's question, but without the question). Well done though to the independent team of three who came up an awesome contraption to solve this year's challenges (and got a score of 500 plus). Apparently there was some scepticism about whether they had done the work, but having (randomly as head tech-judge) sat in on their technical interview, I'm pretty confident that they did! That consumed most of last week, the rest of which was getting over some cold/flu thing (and a necessary trip to the GPs for some antibiotics).

Previous hamster (Muesli) died a month or so ago :-(, but we got another one from the local RSPCA centre (Leybourne) :-), newly named Twiglet. He's a touch overweight, confident, but not too sure how to drive the hamster-ball yet — more learning required.

Built a fun box of hack for part of a final-year student project, involving an Arduino Uno, ethernet shield and a hacky home-brew board to connect an RF650. Just spent part of the weekend finishing off the soldering and cramming it into a project box. box shut box open Completely untested and unprogrammed as yet, but a prod around with the multimeter suggests it's electrically viable at least. The plan is to have a bunch of these (minus the ethernet shield) dotted around the lab, sending sensor data to the one shown, which will then dispatch over ethernet (and the project group will do something useful/meaningful with the data collected). This one needs to be plugged in, but the others can likely run off 9v batteries (as they're not trying to drive an ethernet).

Due to running rsync --delete-before in the wrong place, managed to trash a whole lot of my files :-(. Mostly my Z80 collection of stuff, which was a little tragic, but not catastrophic. Looks like I'll have to start Spellbound Dizzy again, since my save-game-image got trashed. This is where colleagues probably remind me about the value of backing stuff up... (I settle for mirrored disks mostly).


Spent most of the last month or two preparing teaching material for next term, but nearly halfway there! Also poked around some more with the LEGO EV3, and the results are promising!:

frmb@EV3:~$ ./test_g42 
context switch: 38511 ns
context switch: 36952 ns
context switch: 35969 ns

This is the occam style commstime benchmark running on the EV3, where the benchmark (test_g42) is written in Guppy (experimental successor to occam-pi) and the run-time system is an ARM-only version of CCSP that I quickly hacked together. The runtime only supports as much as is needed for the benchmark at present, i.e. channel I/O, parallel processes and timer-reads. NOCC (github repo) compiles Guppy down into C code with CIF-style calls to the runtime, that is then (very crudely) fed through the cross-compile gcc toolchain to make the ARM binary. Due to the lack of debuggers and whatnot on the EV3 (though undoubtedly portable, if not already existing) the implementation is pretty inefficient (and I'm learning ARM assembler [again] as I go) gingerly compiled with -O0. But in any case, 36 microseconds is not a bad result, even with lms2012 (the LEGO software that drives the brick UI and I/O) hogging at least half the CPU! Haven't tried this on my Raspberry Pi yet, but that should be straightforward now :-). Of course, the whole lot won't do any more than commstime yet, but that's on the way!


Had a successful prod at getting some modified firmware running on the EV3, courtesy of Xander / Bot Bench. Initial attempts were unsuccessful, as evidenced by the "loading kernel" message followed by nothing — turns out I was trying to use the wrong C++ toolchain; correct was/is Code Sourcery (858). Temporarily disabled the LMS stuff and got a pretty login banner (as a getty is enabled by default).

 _____       _     _ ___
|  _  |_ _ _| |___| | __|
|    _| | | . | . | | _|

Rudolf 2011.01 EV3 ttyS1

EV3 login: 

For some reason (as yet uninvestigated) I cannot login via the serial line (right voltage levels are arriving at the EV3's input, but nothing being picked up). The suggestion from the above link is to use a particular WiFi dongle, probably a good idea — was hoping the host USB interface might do something more, but not as yet it seems; more prodding required! Thinking of trying to get the Transterpreter ported to it, which could be fun, and perhaps the Erlang VM too so we can play around with embedded Erlang.


This weekend's learning lesson: if you have a not-tidily-aligned structure, C and C++ compilers may do different things with it (leading to some real odd behaviour) — there's probably a g++ compiler flag for backwards-compatibility hiding somewhere that I haven't found yet!

The LEGO Mindstorms EV3 bricks that were pre-ordered finally arrived :-). Initial tests show it works, and got some meaningful boot stuff out from the serial port (S1):

EV3 initialization passed!                                                                               
Booting EV3 EEprom Boot Loader                                                                           
        EEprom Version:   0.60                                                                          
        EV3 Flashtype:    N25Q128A13B                                                                   
EV3 Booting system                      
Jumping to entry point at: 0xC1080000   
U-Boot 2009.11 (Oct 26 2012 - 10:30:38)

I2C:   ready
DRAM:  64 MB
MMC:   davinci: 0
In:    serial
Out:   serial
Err:   serial
ARM Clock : 300000000 Hz
DDR Clock : 132000000 Hz
Invalid MAC address read.
Hit 'l' to stop autoboot:  0 
Card did not respond to voltage select!
16384 KiB M25P128 at 0:0 is now current device
## Booting kernel from Legacy Image at c0007fc0 ...
   Image Name:   Linux-2.6.33-rc4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1965008 Bytes =  1.9 MB
   Load Address: c0008000
   Entry Point:  c0008000
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
IP-Config: No network devices available.
INIT: version 2.86 booting
Please wait: booting...
Starting udev
Remounting root file system...
Caching udev devnodes
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Setting up IP spoofing protection: rp_filter.
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Setting up VirtualDrive...
Initialize Bluetooth...
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_6.2.31.bts
Loaded BTS script version 1
texas: changing baud rate to 2000000, flow control to 1
Device setup complete
Serial Port service registered
Starting telnet daemon.
Starting lms2012

So there we have it, it's running a moderately old version of Linux (presumably one that is well tested for this ARM). Had to jury-rig the serial interface as I didn't have any 3.3v TTL USB serial interfaces handy (so USB-RS232[5v]-MC1450-EV3[3.3v]).


April, and most of the University's Easter vacation, seems to have sailed by! Nice to have a rest from teaching though. Discovered an excellent descaling product, "Spirits of Salt" (direct from Kilrock), that turns out just to be a 25% hydrochloric acid solution. Much better than things found on supermarket shelves, but with the slight downside that this stuff really is dangerous. The smell it gives off (hydrogen chloride) reminds me of secondary school chemistry labs/classes.

A FIRST LEGO League team from the UK (Bath), Untitled 1, won the international competition in St. Louis (USA), with a very imaginitively crafted robot — a good video of it on YouTube.

Fully (or almost fully) embraced Git for source-code management, so now have a profile on GitHub. We've (well Martin, Matt + co.) have moved KRoC from its home on cs-projects to GitHub, here: Also did a version-up to 1.6.0, and popped a new tarball on my KRoC page. Managed to sneak in (before we all agreed to adopt a more community-oriented approach to bunging code in the KRoC toolchain) a new occam-pi module and some examples for CUDA programming within occam-pi (amounts to external C calls for GPU kernels proper, but does give occam-pi programs a convenient framework for discovering devices, plus obvious benefits of concurrent GPU+CPU execution). Involved a fun re-learning of writing M4 macros for autoconf, and whilst that's still in my brain, I ought to write some others.. Also migrated NOCC over to GitHub: Probably only of interest to a few at the moment; have recently put some more time into the Guppy programming language, along with some (weak) justification for why we need yet another programming language.

Found a bit of time to play with my Raspberry Pi, and as part of an ongoing knowledge transfer project with Erlang Solutions, hacked out a PWM driver for the Raspberry Pi's onboard BCM2708/BCM2835, that allows userspace control over the PWM pin (GPIO pin 18, P1 header pin 12). Specifically, it adds a PWM driver to the Linux kernel (pwm-bcm2708), but not the cleanest thing at present, so I've not attempted to push it back to the kernel. Code (forked from the Raspberry Pi 3.8.y kernel code-base) can be grabbed from here: I'll blog on this again once I'm a little happier with it, though Omer tried it on his Raspberry Pi and reported success :-).


Did some more work on the AVR assembler and generated some documentation for its use (incomplete as yet). Managed to get the email inbox down to sub-250, before it exploded back up to 400+ in the last week or two..! Some amount of the Easter vacation will be spent on this, though we're not there yet — Easter falls over the last two weeks of the term, so we've lost two teaching days to bank holidays this year. A side-effect of the University switching from 10-10-10 to 12-12-6 term organisation...

Spent a bit of time poking around with one of Alpha-Data's AD66 ISA boards, so had a bit of fun installing DOS on a PC-104 board (AMD Geode GX device). installing DOS 6.22 The last time I installed DOS on anything was in the first half of the 1990s I think.. Fun though! (after I managed to find a working floppy drive and some working disks). Decently manufactured ones seem to have stood the test of time; clearly cheap ones haven't. Eventually got DOS and the AD66 tools installed, but nothing happening yet -- need to RTFM, but lacking that. The good folk at Alpha-Data did manage to dig out the software for me, and some manuals, but still in 3L's homebrew LaTeX sources, and it looks strongly like a reference for Parallel C on the Alpha-based AD66 board (it's an Alpha 21066). Found a Transputer reference for the Parallel C language, which might come in handy at some point, on The particular AD66 board we have has the ADM-T9 daughterboard, with 4x 100 MBit DS-links. Apparently it might work stand-alone, if I can't get the Alpha up and running, so some potential fun there!

installing new Arduino (Mega 2560) raspberry pi to sit on top assembled and ready to go sitting on the floor Also spent some time prepping the Lynxmotion AH3-R hexapod for an MSc project over the summer, who will do some cool stereoscopic computer-vision stuff with it. Took a bit longer than anticipated to get this going again (had been sitting on my desk for a year or two), but took the opportunity to replace the Arduino NG with a shiny new Arduino Mega 2560 (dispensing with the need for external analogue signal multiplexing) and providing lots more I/O in the process. Instead of having a PC-104 board on top, went for a Raspberry Pi. Not quite as much grunt, but enough to do the job, and much less weighty. Also tied in the SSC-32 servo controller to one of the Mega 2560's USARTs, reducing the amount of external cabling needed. Now the thing should be able to operate standalone, or with an ethernet cable.


Successfully did the Robot Challenge Family Day for the second time (first in March 2011), organised mostly by the partnership development office. Got a bunch more outreach requests that I really ought to respond to sooner rather than later, but more pressing things first. Spent some quantity of time this week reading a student's PhD thesis, good read! Got asked to try and fix/empty someone's harddisk: had some success. This is one of these Samsung/Seagate 1TB direct-to-USB drives, that seem to have troubled users in the past (though I guess they're mostly reliable; personally, solid state for portable storage only I think). harddisk hospital After taking the USB connector to pieces (as it was pretty worn and a bit twisted), still no joy, until I started prodding it with a scope probe, then suddenly it sprang into life. Running at 4.9v ish, managed to get a bunch of data off it, before it started giving more errors than data then went into click-click mode. Turning up the voltage to just over 5v fixed that temporarily, and got some more data off before it started spewing out errors again.

University suffered a campus-wide power outage on Thursday; not sure what happened there. UPS in the office managed to get everything shut-down more or less nicely. Unfortunately many of the card-locks were confused when the power came back in the evening, but did get in to revive the office. On the plus side, forced a clear-out of my accumulating awesome WM tags (using shifty).

In other things, added some more things to NOCC's AVR assembler. Still need to sort out the documentation (all in test programs at the moment!) and perhaps add some more options to the compiler command-line for it (like target selection, rather than via a ".mcu "..."" directive). Test programs for most of the functional instructions work fine, so have been poking around with a T2/T4 Transputer scheduler for the AVR (written in assembler for now). More to do still..


Finally got around to ordering some Arduino bits and bobs, plus a couple of shields and other gubbins, partly for teaching purposes and partly for research. Aiming to teach the 2nd year's some AVR assembler programming next year (as some exposure to programming at this level is generally considered good for CSers). All done with exam questions at any rate, now dealing with coursework.

After some prodding around, did get KRoC working with 64-bit Windows 7 and Cygwin — needs the subversion trunk branch of KRoC (rev. 7337) and the following of instructions here (under WindowsInstallation). Haven't tried the SDL stuff that's been built yet (paused to add an X server to the Cygwin install, which initially lacked any sort of window-manager I think) but on the 10-minute-job list.


The UPS eventually blinked out after a self-test decided it couldn't power off the battery; so back to the 4-way version for now.. At least the electrics are a bit more sane since the installation of a dedicated circuit and MCBs/RCDs (now a light-bulb frying doesn't trip the whole place!). New wi-fi and ADSL modems installed and working as expected.

Just spending a bit of time bashing KRoC on Windows into submission. Updated the windows installation documentation, and so far so good, though it's taking a very long time.. (not the fastest machine on the planet though, and running with 64-bit Windows).


New battery installed in the UPS (an APC Smart-UPS 1000), but it's still not happy: now suspect that the problem is probably with the UPS, and not its battery. Got some more exam questions written, plus a bunch of email processed (down from ~500 to ~350); still more to go though. Just replaced the ageing BT Home Hub (mark 1) with a shiny new Zyxel P-660R ADSL modem wotsit. Hopefully this will be a bit more reliable; the BT hub was beginning to have issues with wireless devices causing it to fall over. Got a Buffalo Wireless-N thing to replace that part of it (plus means we can have secured WiFi in-firewall, and the BT Hub outside).

Fixed a bug in the KRoC occam-pi compiler; definitely a heisenbug that one.. (repeatedly defeated by gcc's loop optimisations, and too idle to force -O0). Poked around with the AVR assembler a bit more too, attempting to get my Arduino Duemilanove (Atmel ATmega328 device) talking over SPI to a DFRobot ethernet shield (DFR0006-ish), or more specifically, a Wiznet W5100. Initial attempts not entirely working; scope on the SPI lines shows the right sort of thing, but more debugging required (and probably a peek at the Arduino ethernet library code for this). about 30 minutes pass. Fixed! (manual SS driving required; wasn't immediately apparent from the docs). Can now at least ping the device happily :-), might try and find an SD card next, if the slot in there works right. The latest revision of DFRobot's ethernet shield takes a micro-SD, will order next month..


In that slightly dark place where academics spend their time setting coursework and exam questions, popping my head up periodically to deal with other things. To people who have emailed me [in the last 9 months or so] and have not had a reply yet: sorry, I'm getting around to it..!

Had a surprise water-leak last week, in one of the few bits of original water-main pipework that I hadn't replaced yet. Would have been survivable with a jubilee clip and some rubber, but unfortunately this time the leak was in the middle of a soldered T-piece; not something I would have expected. Clamping a bit of rubber over the hole last time worked fine, until another one sprang up beside it, at which point I figured it was probably time to replace the entire pipe; but didn't replace the bit where the mains supply goes off to the house next door. That's all fixed now anyhow. The big downside was that the fine jet of water coming out of the fitting landed mostly in the house's network switch: not the most likely cause of "internet broken"! After a thorough drying, switch still busted, so bought a new one (same brand, Netgear). Also took the opportunity to put a new battery in the UPS. The fine spray of water had also filled up the 4-way temporarily replacing the UPS, which pretty soon tripped the electrics.. Now off to put the UPS and whatnot back in the newly piped cupboard, before continuing with exam questions.


Today's welcome-home message:

inbox+ has 666 messages  (1-36383); cur=36354.

A strong indicator that I should spend some time dealing with piled email. Unlike leaves in Autumn, these won't blow away on their own (unless someone blows away the server, of course).

In other things, wife's GoPro HERO3 bricked itself after a software update (which did go successfully, and it managed to record some decent amount of video after the update). It's gone back to the shop for "repair" (though, probably just a case of opening it up, reflashing, and putting back together). Idly looking through the firmware update file, the device itself seems to be a blend of an ARMv5 Thumb, Ambarella (who seem to be some hardware/software/IP vendor) and PrKERNEL. There seems to be a bootloader in there called "BOSS" (from what I can tell) and enough references to Linux to suggest some heritage from there (or that BOSS is also used to boot Linux on certain devices). Probably costs a lot for the company to repair these bricked devices (and there seem to be a lot of these!) — much easier if they told us how to get at the serial port so we could debug for ourselves! (and potentially reflash the device if that's possible over exposed I/O pins on the back, or a JTAG/etc.). Despite the bricking, it's a nice device.


Had a successful day yesterday at the Simon Langton School (star centre) Stargazing Live event, with a bit of coverage on the BBC site and in Kent News.


mars-inspired NXT rover mars-inspired NXT rover (detail) mars-inspired NXT rover (underneath) Finally finished (more or less) the dual-NXT rover hardware. Successfully using the RS-485 high-speed link to get the NXTs talking to each other — no accidents yet. Bluetooth has the slight disadvantage of reduced battery life. Code could still use some (a lot) more work; currently depends on the user to drive the bot around using the mindsensors PSP-Nx controller. Have mostly fitted the rest of the bot out with sensors and motors though: temperature, distance, colour, accelerometer (used to keep the middle portion of the robot flat).

On a related note, Martin pointed me at the EV3 next-generation LEGO robotics. Looks like it could be fun :-).


Happy Christmas and New Year all :-). Mixed time spent preparing for next term (still some distance to go however), bashing around with the NOCC AVR assembler and building a LEGO mars-rover (curiosity style) for an outreach event next week.

Came across this hilarious article via slashdotForbes: least stressful jobs of 2013. Okay, can't really blame Forbes outright, as they used someone else's research/data, but it does highlight the issue of blindly drawing conclusions from thin evidence (though we've all been guilty of this at some point in real life I guess). A social scientist from the USA politely puts that in context on their blog, which gives the real truth about being an academic (no, we don't get all the holiday time "off" — and neither do most school teachers!).

This weekend's minor technical challenge was getting two LEGO NXTs to talk to each other, as a tidy alternative to having to build some sort of I2C motor switch widget to drive more than 3 motors. Common sense says to use regular cabling to connect the two NXTs together directly, which is possible using port 4 — the one with the Atmel AVR sat behind it, and can do high-speed RS-485 comms. Haven't experimented with that one yet, but may do soon. Did manage to get the two NXTs talking over Bluetooth, but after some poking around, this is prone to sporadic connection dropouts (inbetween program runs and power cycling). A real bit of wire between them seems more sensible (though I wonder if the power connections in the ports are adequately protected — one would hope so, who knows what an 8 year-old might try and plug into an NXT!).

Only two minor gripes so far this year: Matlab's lack of useful or meaningful error messages, and UltraViolet "copy protection". Both of which seem geared towards making modern life just a little bit more awkward.


Poking around more with the AVR assembler stuff. Mostly happy with the basic assembler syntax now; supports all the stock AVR instructions, but doesn't yet barf on those that a particular device doesn't support. Successfully driving the cheap-and-cheerful TM12864L-2 display module now, though not very featureful yet. Took quite a while to find some convincing documentation for this device, not readily available in English it seems! However, found enough related datasheets and translated webpages to discover it's two KS0108 style controllers (and the command set for it). The Arduino GLCD library was quite useful too (though I'm programming this in assembler at the moment). Made a video-clip of "Arduino Invaders 0.1", doesn't do much other than move the ship left and right at the moment. Currently working on some higher-level extentions to the assembler to make it a bit easier to write vaguely complex code.

Added some stuff on occam-pi/GPU boids to the occam page. Mostly so other people can experiment with this stuff if they want to.


First attempt at (trans)porting avrasm (Atmel AVR assembler) into the NOCC compiler framework — has been slowly ongoing over the last month or two — producing something successful. Managed to assemble the stock blinkenlights assembler program (with naff timed-loop delays), test_avr8.asm, and get it working on my Arduino atmega1280 clone :-). Compiler drops Intel HEX files for flash/eeprom/etc., readily uploaded into the device with AVRDUDE, e.g.:

avrdude -F -v -p atmega1280 -P/dev/ttyUSB0 -carduino -b 57600 -D -Uflash:w:test_avr8.flash.hex:i


Another term almost through, been a busy 2nd half of the year; got married amongst other things :-). Had a successful two days of FIRST LEGO League regional finals, with roughly 20 teams in all. I got to play the head technical judge (for the robot design award) again, though most of the hard work was done by the 5 judges (4 on each day) actually looking at the robots and quizzing the team. Technical design award on the first day went to the team from Simon Langton Grammar School for Boys.

Kemdroids on the FLL table Langton Lions receiving their trophy for robot design

The UK side of the competition was organised by The IET, Ahmed Kotb in particular, and very well done based on our experiences!


Spent a reasonable amount of time over the summer (and just into the start of term!) working on GPU acceleration of the CoSMoS boids demo. Net result: yes, it can go faster, a lot faster in fact (running on my office Core i7 Quad 2600K at 3.4 GHz) the basic boids manages about 100,000 boid-cycles-per-second. After a bit of optimisation along the road to the GPU version, got the CPU-only one up to 150,000 boid-cycles-per-second. Some time later, using both halves of the installed NVIDIA GTX-590, got performance up to around 2,000,000 boid-cycles-per-second. 300 MB video: 30000 boids on the GTX-590


Had a successful Robot Challenge Day on the Medway campus last week, involving roughly 120 school pupils from across Kent and Medway. Two hours for teams of 5 pupils to learn to program the LEGO Mindstorms MXT robot, modify a fairly basic robot and complete a subset of the challenges from the FIRST LEGO League 2011 (Food Factor) table; the best teams racked up 50 points (out of a maximum 100) which is pretty good considering that they started from knowing nothing about programming robots! In the other half of the day, the teams undertook a research and presentation challenge (as they would do for the full FLL competition). Now getting prepped for the Faculty's Science Extravaganza, which is happening on Tuesday and Wednesday next week.

One of my research students, Martin Ellis, found a nice primer on lock free algorithms which gives a good explanation of some of the properties of these (lock-free, wait-free, obstruction-free, etc.).


Longest time ever without blogging (other than random blips on facebook). Just at the end of the academic year, plenty of teaching this time (concurrency, operating systems, functional programming) and convening. Re-arranged the office, lost one small table in the reshuffle, but looks much better now!

office before reshuffle clearing the shelves desk moved unwiring the rack rebuilding the rack rewiring the rack (back) rewiring the rack (front) office after reshuffle finished rack

Lots of other things done in the past year too! Finished assembling the bathroom, so that's now functional, if not completely finished! (just needs the last two and a half rows of tiles on the walls and in the window recess). Pretty much rewired the whole house too, a lot more stable now. Got some research done too, and had some project students look at doing occam-pi simulations utilising GPUs. Won a bit of funding from the faculty which paid for an NVIDIA GeForce GTX 590 (dual GTX-580 pretty much), a GTX-570 and an ATI Radeon 7970. Experimentation done using CUDA (NVIDIA's offering) and OpenCL.


Many months since the last blog, been busy as usual. Did Christmas and stuff, nice as always to spend time with the family. Got engaged too, so adding wedding stuffs to the life-to-do list! Grabbed a bit of time to play around with the Korg Triton and tweaked the software that turns SoundTracker files into Tutka XML files; I like SoundTracker's interface, and almost detest Tutka's. Tutka (at least the version I have installed) suffers from inaccurate MIDI-sync sometimes. Works fine from a fresh start, which is just as well, since I'm only using it to output MIDI! Churned out some pretty prototype music (fred23-1.mp3), which isn't entirely well balanced, but sounds okay for a first go.

Still trying to get my head around how many threads will actually execute in parallel on NVIDIA's Tesla C1060; the documentation seems to be somewhat vague about how the internals work (or maybe it's just me not understanding!). After reading around a bit, I think it's 240, i.e. each core can execute just one thread instruction at a time. The way things are scheduled makes it complex, since 32 threads are grouped into a "warp", and 8 cores comprise one streaming multi-processor (MP), thus one MP can execute one instruction in all the threads of a warp in 4 clock cycles (32/8). However, each group of 3 MPs (or 24 cores) is managed by one thread scheduler. Thread schedulers schedule threads in blocks, and NVIDIA recommend 192 threads per block (or 6 warps) for the Tesla C1060, to hide internal latency of moving data in and out of core-local memory/registers (16k x 32-bit). In my mind, that means each block of 196 threads can all get one instruction executed in 8 cycles across 24 cores. With a 1296 MHz core (shader) clock, each core manages (obviously) 1,296 MIPS. 240 cores thus gives 311,040 MIPS. For a while I was wondering how NVIDIA got it's 933 GFLOPs figure for single-precision in their marketing stuff; answer is (not unsurprisingly) more than one FP-op per instruction. In theory, 3 single-precision operations per instruction, with a fused multiply-add as two of them, and some stuff for the special function block that lives on each MP (doing sin/cos/etc. and double-precision). Thus giving the 933 GFLOPs "theoretical" peak performance. Of course, this is unattainable for any practical computing application; for mortal programmers like me, we should probably be happy with around 200-300 GLOPs. At least now I'm happy in my head about how this stuff works :-); unfortunately the slightly cheap GeForce 6600 GT I've got in the home PC doesn't do CUDA. The GeForce 9800 GTX I've got shelved in the office does do CUDA (128 cores), so will probably drop that in the lab PC for a go!


Weather cooling down a bit, which is nice. Had another successful BBQ (second one so far!) on our "bricks and mortar plus two paving slabs" BBQ, which came as part of the house pretty much. Couple of busy weekends with assorted parties and BBQs, this one was the first empty one in a while. Whilst travelling around the country got stuck in several M25 traffic jams, including one where they stopped the traffic just ahead of me and closed the motorway to spread some more sand around.. closed M25 Put some more kit in the office rack, including fresh batteries in the existing UPS (as it was insisting on a battery change) and a new UPS to supply the various new kit. New kit includes some Dell PowerEdge 1650 servers (one with dual processor and hardware RAID) and a Sun Cobalt RAQ. new rack clobber new rack clobber Spent some considerable time trying to get the fan speed down on the Dells as they make quite a racket, and gave up in the end. Seems that no-one has managed to do this successfully yet. Foolishly tried disconnecting one of the (six) fans inside the box, but that just made it whinge about a broken fan and sped the other ones up.. After managing to install the Dell server utilities (OpenManage) on Debian (thankfully someone made some packages/documentation!) it just said that the fan-speed feature wasn't supported anyhow. The noise isn't too horrid, but I'll do without for now! The RAQ is even more noisy.. One of the cooler pieces of kit added was a BayTech DS4-RPC which can turn on/off four power sockets over ethernet (and has a bunch of RS232 links to connect to this stuff).

After re-arranging the office a bit, re-assembled the train set. Layout this time is a bit more straightforward — no closed loops to give power issues, three switching points, 16 lights and a bunch of track sensors. Still using the same controller board over RS422, and still need to write some pretty occam-pi software to drive it. Did at least get around to soldering up the RF transmitter device and adding it to the tower (hopefully there's enough grounding in these boards to not screw up the RF signal too much!). train set version 2 incomplete level crossing station and passengers In the process of creating another RS422 device to control the level crossing (which was a present from Carl). More specifically, a device to control a number of H-Bridges. One bridge will drive the gates, and one the flashy red lights. Things here on hold whilst I wait for RS to deliver me some fast recovery rectifier diodes (today hopefully). Also waiting for various other deliveries from Amazon and Dabs. One of the RAID'd disks in my desktop PC is whinging, but not quite dead yet. Currently a 160 GB disk, upgrading to 500 GB (for only a few pounds/pence extra!). Also had some other hardware failure — a fairly old PC mysteriously freezing up from time to time. Not a huge problem except it was the internet gateway, DNS, Asterisk, UPS monitor, etc. Suspected motherboard failure so spent a good few hours thisevening transplanting its disks into a new (old) PC. On the plus side, a slightly faster CPU. The machine also acts as my music/MIDI interface, so getting it back up was moderately high priority (work has internet if all else fails..).

In the land of music, have been spending some time writing a bit of software to turn XM files (as I have generated by Soundtracker) into XML files for Tutka which can play them over MIDI into my Triton Rack. Experiments earlier today showed promise :-). Old songs sounding much richer (and potentially different). The slightly incomplete software takes selections of instruments from XM files and maps them to one or more MIDI channels (because of the way panning works in MIDI, can't do too much in one sitting). The plan is to play different instrument sets into the multitrack and lay them on top of each other. Unfortunately getting the MIDI sync right (generated by the multitrack) will require an extra MIDI input into the [newly fixed] PC, as I'd also like to be able to dump the "multi" settings from the Triton to avoid having to reprogram these all the time.. (it's interface is a little limited). Nothing committed to the multitrack yet, but musical emissions from the Triton were sounding promising.

Kittens and the cat also exercise their musical abilities by trampling over the keyboard(s) to reach their favourite perches.. Custard Rhubarb


Slowly settling into the summer, had a few hot days (by my standards, which would be 25 degrees or more!), now just warm and muggy with light drizzle. Worth noting that I moved house a couple of months ago, now own our own property :-). Downside is that we have to deal with all the house-owning stuff, like mortgage, insurance, gardening, tree-trimming, etc. Just about settled in though! Cat rejoined us from his sabbatical on the Isle-of-Wight, and has recently been joined by two little kittens (Rhubarb and Custard), who don't have their own webpages yet! Bob managed to get his new kitten on Facebook already; ours are still learning how to operate a keyboard properly, at the moment they just bounce over it and trash vim sessions. Yay for undo and subversion!

Spent a lot of time writing LEGO® Mindstorms NXT materials, and successfully delivered a couple of workshops using these (University's "Science Extravaganza" and a "Robot Challenge Day"). The latter worked like a mini FIRST LEGO League (UK, FIRST Hand Technology) and was overall very successful! (and many thanks to all the postgrads/staff who helped out to make it so :-)). Just one more event to go, for a residential summer-school, then some proper summer time. Along with this, usual admin things, plus some research (but not much). Recently been looking at generating LLVM code from NOCC, instead of going via Transputer code first (which given it's a 3-deep integer and FP stack machine makes things a little ugly in code-generation, plus the LLVM people and many others have already solved these problems several times over!). Also did some more poking around with the "Graphics3D" library in KRoC, attempting to add some more useful graphics primitives. Ongoing..

Had a mild disagreement with Matlab after Lucy bought a copy and installed it — activation failed to connect to the network. After going as far as strace'ing the binary, found it was trying to connect to an IPv4 address through an IPv6 socket. As we're not IPv6 enabled here, that obviously failed. After various failed attempts to setup IPv6 and IPv6-in-IPv4 routing (although learnt plenty about how IPv6 works!), even tried Miredo, which provides a simple way of providing IPv4 hosts behind NAT/firewall/etc. with routable IPv6 addresses via something in France (I think), eventually found "/sbin/sysctl net.ipv6.bindv6only=0" on a Matlab help forum (although completely unrelated to activation). Problem solved! Instead of falling back to IPv4 if IPv6 connectivity fails, it just gives up. Not the most helpful behaviour I've seen in software..! At least activation can be done off-line if required, which might have been simpler in some respects, but not to be beaten by a bit of code..


Just to follow up on the last post, an old student of mine pointed me at this Slashdot story (the unstoppable "tech support" scam). Sounds like it was that sort of thing. Luckily though, most of our phone calls are for wood-worm and dry-rot treatments, as BT handily gave us the number of someone who is listed in the yellow-pages etc. as doing this kind of work. Presumably they aren't trading anymore, or at least have changed their number, but it would be nice if BT gave numbers some cooling off period! We even get the occasional call requesting plastering services..


Five and a bit months on from the last blog entry (busy year!)..

Interesting phone call this morning (caller ID reports "unavailable"), approximately along the lines of:

Person: <Indian accent and busy call-centre background> hello, is that Mr. Bar-nes?
Me: yes, this is Mr. Barnes
Person: this is (unintelligable) from (unintelligable), our company has received several packets from your computer operating system which mean you may have spyware/malware on your computer.
Me: home or work computer?
Person: your home computer.
Me: I don't believe you.
Person: why not?
Me: I'm a computer scientist.
Person: well, when you're browsing websites your computer can get infected with malware and spyware.
Me: um, well, no, not really. Is this a Windows issue?
Person: yes, your browser in Windows has probably picked up some spyware which is sending out packets.
Me: well, we don't have any Windows PCs here.
Person: oh, really?
Me: yes.
Person: what operating system do you use?
Me: linux.
Phone hangs up quickly.

So who knows what this company was trying to do (or perhaps sell).. Besides, if my computers were sending out duff packets into the internet, I would expect my ISP to be contacting me, rather than some strange Indian call-centre. Another case of bluff-cold-calling.. Muppets.


Hello 2010! Successful Christmas and new-year had, with the family and suchlike. Got a new wooly hat, USB mug-warmer (within the initial 100mA power limit..?) and USB hoover, amongst other things. Spent a reasonable amount of time over the last week writing a Sound Blaster 16 driver for RMoX. Now have something that at least outputs audio samples correctly! Doesn't quite interface with the RMoX audio sub-system properly yet, but provides an alternative raw interface for just dumping bytes. Doing this also required a new 'lowmem' driver (for reserving DMA space in the low-memory area, which was also abused by the x86 multiprocessor driver), and various fixes to the DMA driver. Topped it off by having the LCARS graphical interface make appropriate beepy noises :-). More for proof of concept, rather than full implementation. The SB16 driver just uses single-shot mode at the moment — should really be auto-initialising, but modern CPUs should be able to reprogram the hardware and DMA controller fast enough. Not tried on real hardware yet, but have an ISA breakout for PC/104 and some old SB cards lurking around to give it a go at some point. Also got hold of some more Kontron and Eurotech embedded PC/104 mainboards to play with. Just this evening started work on an ICH AC'97 audio driver, looking promising, but doesn't do much — more work required on the general AC'97 interfacing mechanisms, some of which were already in place to access the UCB1400's touchscreen interface, sat behind a CS5535 AC'97 interface on some of the embedded boards we have. Need to context-switch into exam questions, coursework and other administrative fodder at some point.


Had a successful time at the SOSP 2009 and CPA 2009 conferences, back into term-time and teaching at Kent. FLL 2009 Kent Regional Final This year's Kent regional final of the FIRST LEGO League (Wikipedia page, main site) went smoothly :-). The children seemed to have fun at any rate, and produced assorted creative solutions to the robotics challenges.

train-set hardware interface Did some more work on the LEGO train. Mostly finished putting together the main train control circuitry — basically a 64-port digital I/O board on which sits another board that breaks out to the various train-related hardware. This currently consists of 3 "points" devices (for switching tracks); 16 street-lights (though only 8 exist at the moment); and 16 magnetic reed-sensors attached to various bits of the track. There's currently a bit of C code running on the PC that talks to this over the RS422 bus (along with various other things).

onboard train control Talking to the train is handled with a dedicated serial port at the moment (soon to be condensed into an RS422-bus device, as it only does simple things). Some RF650 modules from RF-solutions are used to transmit serial packets over 433 MHz to the train. train transmitter On the train is the insides of a LEGO infra-red serial tower, together with some circuitry (and an Atmel AVR) that picks up radio messages for the train and relays them to the RCX that is actually powering the train. The train's RCX runs a very simple program that receives these messages then does something (forwards, backwards, stop). If no new messages are received in a fixed amount of time, the train stops dead (safety feature!). The RCX is nearly redundant currently (similar control could be extracted from the onboard Atmel AVR fairly easily), but it allows for extra things in the future (other sensors and motors -- jobs for the train..?). The whole train thing still gets its power from the rails, which saves on batteries. Next step is to put together an RS422 device to relay train control messages over radio directly (rather than using up another serial port), followed by a software system (written in occam-pi) to drive the whole thing (and a simulation of it on-screen).

Also found some time fairly recently to hack around with RMoX some more. I've got a final-year project group working on providing a harness for Linux device-drivers, file-systems and suchlike (easy code integration), and have nearly finished an IDE disk driver (works on QEMU, fails with VirtualBox).


Mostly busy with real work, including things leading up to SOSP 2009 and CPA 2009. Not had a lot of time for hacking just lately, but at least the exam marking is out of the way now :-). trainset under construction Finally getting around to spending some time on the interactive train-set, which will be something for open-days and school workshops, essentially building bits of software to control it. Got some initial hardware for the "street lights" and "points switching" sorted out, but still working on how to control the train itself. Also poking around with a way of detecting the position of the train on the track — leading solution is a magnet and reed-switches. train detection prototype Also includes an SR-latch, as the reed switch is likely to pulse faster than the input polling. All of these things are wired into a multi I/O board that the PC (and thus control software) can talk to. Once the various component parts work, this will be transferred to some proper prototyping board :-). train-set control board Controlling the train remains an unsolved problem, particularly with the RCX brick. My current thinking is to build a small ~433 MHz transceiver setup, using the RF650 from RF-solutions. This will simply retransmit data into the 'modified' internals of a serial IR tower, and then onto the RCX. The track has plenty of juice going through it, so no problems there :-).

RMoX paint
program Have also managed to spend a bit of time writing some code for RMoX. Now have a mostly functional paint program :-). Not a sophisticated application by any measure, but a good test of basic interactive graphics handling. For some reason, the GD5446FB hardware cursor isn't working in 16-bit modes, so the current settings are for 24-bit modes. If I've got some spare energy/time later, might look at spicing up the interface slightly by animating some things.


Done with another successful University open-day, and a big thank-you to all those who helped out. Carl and Jon have been working with the recently complete (mostly) Hexapod robot. Hexapod robot

Decided to have a quick play around with some phyics modelling (probably of the worst kind imaginable!), simulating balls falling down a series of ledges. Gravity in free-fall is the only useful thing programmed in so far. After running for a while, a pile-up happens..! ball jam


Nearly June already! Currently stuck in the depths of exam marking, and quite behind on email.. (sorry!). Also moving forward with various research things, mostly RMoX related. Fixed a nasty bug in KRoC's occam-pi compiler, which suddenly made a lot of odd RMoX bugs go away :-). Changed (fairly fundamentally) the way that links are established with standard server processes; now a client creates a return channel-bundle and passes one end of that along with the request, waiting for a response on the other end. Whatever's communicated with can route that connection request around, finishing it with a response, which will probably include some other channel-end, communicated back to the original client. This saves some of the mess associated with routing responses back through the request infrastructure — keeping these slightly separate appears to be better. Also tidied up some of the RMoX graphics; still not particularly sophisticated, but looks a bit nicer. usermode rmox screenshot This also included various updates to user-mode RMoX, including full support (with suprisingly little effort) for the dynamic loading mechanism used by the bare-metal build. The graphics (and text-console) drivers for user-mode RMoX are provided by KRoC's SDL raster library.

Did some more work on the 3D graphics for KRoC ("graphics3d" library), which does things the old fashioned way (lines and rasters). And fairly inefficiently at that currently (partly deliberate). The whole rendering process is essentially serialised at the moment (which makes tracking down some bugs a lot easier), has the debugging turned on, and makes generally inefficient use of the FPU (no SIMD/SSE2 or nice things like that yet). On a 2.4 GHz Core2 processor core, I get around 6000 polygons-per-second. However, for the fairly trivial test programs, this is currently enough :-). Includes something I've been meaning to do for a long time, a 3D chess program; though just the rendering, it uses GNU chess for playing the opponent. graphics3d chess The chess-piece models are extremely crude, but enough for me to distinguish them anyway. The board doesn't always get updated in quite the right way (still a few bugs to iron out of it), and KRoC currently leaves the spawned gnuchess instance running (needs changes to the run-time to fix this), but it's enough to play a game of chess with :-). If gnuchess isn't installed, it'll just let you move pieces around randomly. Uses some generic "scene" handling components to provide mouse/keyboard controlled rotation and translation on 3 axes, as well as camera lens adjustment. As the picture shows, some low-level z-buffering and similar problems remain. Zooming in too far (polygons off-screen) tends to blow up inside the 3D library currently (overflowing fixpoint arithmetic). Some more things that need fixing..

Assorted admin related things have also been happening, including an upcoming University open-day (4th July, Canterbury campus). Lots of fun things from the computing department will be on show, so if you fancy a look..!


Been busy with various things, mostly teaching related. Research wise, recently been playing around with the robot arm we have and controlling it from occam. So far so good. Trying to tie this in with a basic 3D raster graphics framework added to KRoC, which is proving slightly trickier than I had first thought! Sort of works though: robotic arm simulator. Suspect the problems are largely related to my geometry skills.. Another piece of code (which actually works properly!) can drive the SSC-32 based board to move the physical robot arm around. Also have some webcam related utilities in KRoC now ("video" module), so shouldn't be too far away from sticking these things together :-).

In other things, Adam posted an interesting link to some parallel algorithms lectures at MIT.


Remembered that I have a blog and ought to write stuff into it occasionally! Busy December, fun Christmas, and back to new term. A decent amount of teaching and research going on at the moment.. Spent a good amount of time working on RMoX, including web-page and occam-doc updates. Still got some subtle compiler bugs which are tripping things up, but by and large it seems happy :-). Recently got a Core2 embedded PC to play with this on — another graphics framebuffer driver to write! The Cirrus Logic GD5446 driver is now pretty solid, though the graphics infrastructure doesn't do overly well at speed in graphics updates.

Added a new dynamic calling mechanism to occam-pi (KRoC), that dynamically allocates memory as required. This means that with a bit of creativity, can now do arbitrarily recursive procedure and function calls in occam-pi if desired. Used in RMoX for handling dynamically loaded device-drivers, services and applications. That also required implementing a bunch of ELF and symbol-table handling things..


October and November slipped by pretty quietly, mostly working on various things. Turned my attentions back to RMoX for a while, and rebuilt all those web-pages (so they're now up to date again!). Just recently added multiprocessor support code to RMoX, and as expected, it all pretty much worked first time. Few tweaks required to get it running on real MP hardware (a dual processor 3.6 GHz hyperthreaded Xeon), but that booted thismorning quite successfully! The scheduler is MP safe (including all channel comms and suchlike), but the memory manager is totally MP-unsafe. Didn't blow up yet, though.. :-). Also started putting in lots of technical documentation, intermixed with the source-code so it gets maintained sensibly.


Heading towards the end of September! Intro-week (aka, fresher's week and welcome week), next week. Prepping for an occam-pi LEGO robotics session with the new CS1 students, using the Mindstorms RCX brick. Recently back from the Communicating Process Architectures (CPA) conference, which was much fun. Didn't present any real papers, though did give a "fringe" presentation on "towards guaranteeing process-oriented program behaviour", all about how we can get the compiler to do clever analyses on occam-pi code, at the local level ensuring that processes behave correctly with respect to their environments, and at the global level (but not yet), that parallel compositions of processes behave correctly. At the moment, the plan is to use something like FDR2 to model-check process networks -- the compiler will only go as far as traces analyses (refinements); FDR2 will check failures and divergences refinements too. Lots of interesting things presented, including a fringe talk from XMOS. These guys have produced something of a mix between programmable hardware (FPGAs), the Transputer, and a modern embedded processor. The current fabrication contains 4 XCore tiles (making it a quad-core processor in effect), masses of timed programmable GPIO, 16x 400 MBit/s external XLinks, and per tile, support for 8 hardware scheduled threads.

Decided to have another play around with 3D graphics in occam-pi, crudely. Worked quite happily with 1000 butterflies, at around 50fps, although there is no depth ordering (Z-buffering, etc.). 100 butterflies is a bit easier to see (just!): butterfly demo butterfly demo. Also had another play around with NOCC. Now got dynamic mobile arrays allocating and releasing themselves successfully. Side-lined a bit to look at direct-to-C code generation, which has the advantage of getting gcc's clever optimisations, as well as better portability. This is what the Tock compiler does. Both still use the existing occam-pi runtime system (CCSP).


Still keeping fairly busy. Found a day to poke around with some graphics code though, doing glenz-style vectors in occam-pi screenshot. Code is pretty basic at the moment, with the algorithm a parallelisation of Marcus Lindblom's glenz.cpp. Get some parallel core usage on my Intel Core2 quad CPU :-). Also hacking around with NOCC, getting dynamic mobile arrays together, using Carl's new mobile type descriptors.


Tuesday already. Phill sent me a cool link about how they make LEGO bricks in the LEGO factory. Wow, that's a lot of LEGO! Finally finished editing papers for CPA-2008, now for some downtime. And then back to work on RMoX and NOCC. Did some poking around with NOCC the other week in an attempt to get floating-point stuff working a bit -- so far so good!


Had a successful open-day on the 5th July! Now spending some time editing papers for the CPA-2008 conference, some exciting ones here this year! After an unforseen power-outage (although the UPS did shut everything down nicely :-)), decided to have another go at installing the NVidia Linux drivers, version 173, with success! Had to butcher the rss-glx package into submission a bit, and nvidia-glx ... (but so far, so good!). And the really slick screensavers are pretty damn cool. Pulling about 70 FPS on my GeForce 8600 GT for most of these. Maybe time to give quake a go..


Busy doing various administrative and schools-outreach things. Ran some successful robotics workshops for year 9 on Monday, and a more advanced one for year 12 on Friday, yay :). Mostly using David Barnes' material and some other stuff that we produced a while ago. Also got around to putting some of our occam-pi on LEGO robotics material online. Been fiddling around with RMoX some more, now with a prettier user-interface (of sorts!). Here are some screenshots: screenshot screenshot


More work on RMoX, rebuilt the windowing system infrastructure -- at least with concurrent processes, it's fairly easy to do small-scale changes without breaking anything else. Got something vaguely resembling an interface (going with the star-trek LCARS style for now, ish). It looks pretty, works nicely with a touchscreen, and is probably suitable for some of the intended applications of RMoX. Robotic-arm control program to be created at some point! Students have left University for the summer, so plenty of time for more research :-). Really need to write some of this work up, didn't publish very much this last year..


Into June now, more busy busy. Done marking exams now, a definite path to insanity. Steadily organising some fun departmental demonstration things for the University of Kent Open Day [subliminal message: come to the open-day on 5th July! come see the Computer Science department 10-2pm!]. Aiming to have some of our concurrency-related projects on show, including LEGO robotics (the transterpreter), embedded computing and concurrent OSs (RMoX), and complex systems simulation (CoSMoS). We'll also have a bunch of final year projects on show, multimedia demonstrations, a panel, and a talk on computer programming in the present day (from Michael). Put Linux on the PS3 on hold for now -- that's currently a for-fun-only project..

Spent most of my time recently working on RMoX, which seems to have paid off! Been working with our embedded PC/104 SBC-GX533, which has a nice NEC flat-panel controller and 4-wire resistive touchscreen. Got the Geode GX framebuffer driver working at long last -- stumbling block was that I hadn't turned off the VGA compatibility (which makes the whole thing behave like a standard VGA). Now running in 32-bit graphics mode (alpha bits included), mashed down to 18-bit on the physical display. Got the hardware cursor working with the pointer infrastructure, so the PS/2 mouse works (unaccelerated). But better than that, got the touchscreen interface working (and learnt a lot about the AC'97 audio codec in the process). So that now works happily with the pointer infrastructure, and looks to be accurate to within a couple of pixels (more fine-tuning needed probably!). Just doesn't "click" yet.. (pressure detection fun). Couldn't get the interrupt mechanism to work reliably yet (missing acknowledgement to some bit of hardware I think), but polling does the job. Ticket added to the RMoX Trac..

Also trying to get our Lynxmotion Lynx 6 robotic arm working. This came with an embedded control board (serial interface), which didn't quite work because it doesn't to flow control (and RMoX's serial driver doesn't do without-h/w-flow-control). The SBC-GX533 board has a bunch of GPIO pins on it, so tried driving the RC servos directly from that (after writing a driver for the PC87364 SuperIO chipset to which these pins are connected). That didn't quite work either because of timing issues -- once the kernel goes to sleep, wake-up accuracy isn't quite good enough. Could be forced by busy-waiting, or wake-up-early-and-spin behaviours, but that's not nice.. Need a micro-second precision timer somewhere (probably one lurking around on the board). Got some PC/104 prototyping boards, so some clever (and precise) interrupt timer mechanism should be easy with a bolt-on microcontroller. On that route, just soldered together a board with ZIF sockets for programming Atmel AVRs (got a pile of AT90S8515s, ATMEGA8s and things lurking around). That plugs into the AIM104-IO32 board we've got (and subsequent driver for). Just about to sit down and write some code for that.. Later, think about the LCARS interface and get testing the hardware rectangle-fill, blit and line operations.. Could also do with BOOTP and TFTP support to get ROMs for burning..


Been another busy month! Got the systems architecture research group web-pages up and running properly, looking quite nice now :-). Put a decent amount of time into some schools activities led by Creative Partnerships, a fun bunch of folk who do interesting things. The other week 60-ish of us from the University visited a school in Kent and did a variety of activities with the pupils there; think it was successful, and hopefully taught the kids a bit about what Computer Science is! Also visited Nexor and gave them a talk about the Cell BE processor. Spent some time doing Cell programming on a Playstation 3, which is pretty interesting. Got Ubuntu Linux running on my own PS3, albeit with 2.6.22 rather than 2.6.24 at the moment; couple of cool-points to Sony for producing a console that actually allows you to install another OS without completely breaking its use as a games console! Still not played any games on it yet, but will be experimenting with its Blu-ray video functionality at some point. Some of those cool points lost for requiring a display with HDCP to get hi-def output. HDCP joins my list of annoying technologies, designed foremost for copy protection, but in reality just irritating (and a bit flawed). Had our quarterly CoSMoS meeting, and learnt lots of fun things about immune systems and the like! Put lots of programming time into NOCC, in particular to support occam-pi PROTOCOLs (including protocol inheritance), better type-checks, traces-checks and some experimental support for a PLACED PAR (thinking of the Cell). At the point where basic occam-pi programs compile and run okay, although still some distance from compiling the CG-tests. Did at least fix the NOCC parser to cope with occam-pi's sometimes odd positioning of declarations.


Second blog entry for 2008..! Been busy.. Spent some portion of time writing papers (though they may not go anywhere!), writing slides, lecturing and other admin stuffs. Been hacking around on RMoX as well. Finished off the i8042 driver (for keyboard and mouse ports), and this seems to be working sensibly now! Not done much with the pointer data yet, but it appears to deliver the correct values :-). Put some more infrastructure into RMoX for handling pointer devices generally -- the PC/104 board we have (SBC-GX533 AMD Geode board and dev-kit), has a touchscreen on the flat-panel display which it would be nice to use.

Finished off (mostly) the multiple-choice-quiz software too, which seems to have worked quite nicely! (even if it is text-based and Unix only). Put this on the software page ("aquest"). Also spent some time knocking up a bunch of PHP scripts and PostgreSQL tables to look after our research group's data, but not live yet.


2008! January seems to have escaped a blogging, never mind.. Mostly been doing work stuff, reasonable teaching load this term (and renewing slides/module-content). Still need to solder up some H-bridge circuits, ended up using a design found on Chuck's robotics notebook, which successfully switches LEGO train points :-). Train simulator (screenshot) is mostly there now, just need to do the low-level bit and connect it up with the hardware. May end up using RMoX to do this, as we've got a collection of PC/104 I/O boards which can drive/sense the hardware quite nicely. Spent the last couple of weeks working on some software to do multiple-choice question asking. Unfortunately software like WebCT is incapable of doing what I want, and everything else I've looked at is a total sod to setup/configure. About 15,000 lines of C later and I've got something pretty much working — hopefully so anyway, as it's being used in coursework very soon! The program reads and writes XML files (yeah, bloat-mode, but easy to post-process with XSLT and the plethora of XML tools out there), and is capable of giving each student a different quiz (different questions and answers, randomly selected mostly). Questions have different weighting depending on their difficulty, with each section either having N questions, or a weighting of up to W. Some negative scoring and some partially-correct answers thrown in to make it more interesting (and to discourage random answering). Time to finish that off and write some instructions..


Nearly the end of 2007! Plodding on with work, still got a small pile of marking to attend to and some exam questions to get written.. Been taking some time out to work on a train simulation framework, to be combined with the RS422 bus, which now has a "train controller" — basically a bunch of input and output ports (which has been sat on the desk since September waiting to be finished..). Do need to solder up the motor H-bridge circuits (for changing track points) and build some sensor circuits soon.. Maybe early in the new year :-).


December already! Did some more work on NOCC, which is now looking quite hopeful (imo!). Support for trace analysis is mostly there, and started adding support for exceptions in occam-pi — for sequential process use only (avoiding the problem of what happens to processes parallel to an exception).

Put together a new KRoC release, kroc-1.5.0-pre3 (tgz) which is now the merged multiprocessor branch. Carl also got RMoX working with this, although that's not multiprocessor-capable yet (needs the relevant MP startup code adding!). Also found a bit of time to finish off some music, Crystal Worlds (MP3). Now to put some more pictures on the UKCMC website!


November already, busy busy. More work on NOCC's support for trace analysis (OEP), looking fairly sensible so far! Also updated some of the compiler documentation (need to regenerate the diagram at some point..). KRoC, NOCC, RMoX, jctld, UWG/UWGBuilder and RAPP have now moved to the CSProjects subversion repository (easier public access!). Found a bit of time to update some music, Crystal Worlds (pre6, MP3), almost there with that one I think!

Put together a new KRoC release, kroc-1.5.0-pre2 (tgz), which builds with multiprocessor support by default (well, attempts to auto-detect whether or not it's supported). This is pulling from Carl's "cgr-mp" branch in CSProjects, due to be merged back into "trunk" soonish, but still a few small things to fix! Recently put some more demo programs into the repository, will emerge in the next release.


Almost the end of October, and a pretty busy one! Got the Sipura boxen all configured and working right now, so all voicemail enabled (including silly messages!). There was a problem with the PSTN line disconnecting after 10 minutes or so, but that's now fixed :-). Caller ID also works nicely. Next stop, Zapateller.. Spent quite a bit of time fiddling around with the KRoC distribution and its repository. The sources have now moved to CSProjects (, and the next release (1.5.0-pre2) will be the multi-processor enabled version (soon to be moved back into the main trunk). NOCC is moving over there currently. Put in some hacking time to NOCC as well, working on trace specifications (e.g. to guarantee that a process behaves in a particular way); CSP really helps here! However, it means that the "trace specifications" are really minature CSP programs, rather than strict sets of traces. This has the advantage of [later] enabling the failures and divergences of an occam-pi process to be calculated (by the compiler). Also been doing some related work on escape analysis for occam-pi, although here that could be more readily described as memory reference segregation (and obvious implications for network distribution).

Recently upgraded my PC, all new and shiny now! Got a 24" TFT display (widescreen), which is excellent for getting vast amounts of code on the screen (and good for firefox tabs). Plus a new mobo, core-2 quad (2.4 GHz), 4 gigs of RAM and a GeForce 8600 GT. Not quite got the native NVIDIA drivers working in Linux yet, but the Xorg are doing a decent enough job! One of the really neat things is that I can now run DOSBox with all the old assembly demos (and some not so old ones!) at a sensible speed. Mouse behaviour is a little erratic though..


Back from a fun walk with the Uni. mountaineering club, though feet a bit sore! (out of practice..). Walked from Wye back to Canterbury, stopping in a pub (or three) for lunch and refreshments. Somebody posted a link to this funny synthetic music video (quite a while ago, but only just got around to watching it).


Almost the end of September, term started. Now mostly got Asterisk working at home and in the office using the Sipura boxen, with some help from and Dave. Unfortunately the IP link between home and the office is sufficiently lossy to blow most attempts at communication. Might try and solve this at some point, but at least have voicemail working sensibly! Unfortunately the SPA-3000 cannot distinguish between different types of incoming ringing, however, plans are afoot to build something using an Atmel ATmega8 which can. The Sipura passes the call to Asterisk about 2 seconds after ringing starts, so plenty of time to figure out the ring for Asterisk. Hopefully I won't have to hack Asterisk..!

Went up to York Uni the other week for the CoSMoS kick-off meeting. Many interesting discussions had and things learned. Plants, fungi and liquid crystals suddenly seem a lot more interesting :-). Put a few more hours into NOCC hackery, will leave the parser alone for now (it needs a fairly heavy tweak to deal with parsing occam-pi correctly). Also looking towards a 1.5.0-pre1 release of KRoC, which will hopefully work on Linux, FreeBSD, Cygwin and Mac OS X, and also provide for multi-processor support (ack to Carl and Adam).


Busy busy. Went orienteering the other day for the first time ever, event organised by the Saxons Orienteering Club, quite a lot of fun! (though times were depressingly bad!). Also managed to get the Sipura boxen at home and in the office working nicely, registering with Asterisk and whatnot. Still playing around with it, no sensible trunk call mechanisms setup yet. If PBX is the question, Asterisk would appear to be a good answer :-).


September, term starting in a couple of weeks -- better get planned for that soon! Got the LEGO train points working with the RS422 bus and neatly computer controlled (interface is crude but functional!). Went with three-wire-controlled H-bridge I found in Chuck's robotics notebook, which avoids any unintentional shorting out of the bridge if the I/O lines wiggle a bit. Turned out a bit larger than I expected on breadboard, maybe time to solder it up! Not got anywhere with the train yet though, busy doing other things for the FIRST LEGO League (Kent) competition, also writing papers. Tinkered a bit on NOCC, really need to cure the occam-pi parser a bit (by providing the DFA with a more substantial backtracking mechanism), mainly because of occam-pi's allowance for declarations in slightly strange places (in the scope of a single ALT guard amongst others). Steadily working towards a multi-processor/multi-core release of KRoC, hopefully before Christmas!


Finished building the 16-character display device for the RS422 bus and installed it in the office window. Now people can see where I'm at (specifically "office hours" for students in term-time). Will take a photo of it sometime.. The display even seems to work happily on the end of a 10-meter length of CAT5 (most of these devices will work down to about 3.5v, though not ever had the wire long enough to get that much DC drop). Lose about 0.5v over 20 meters at home -- bit of "free" heating I suppose :-). Designed and started building a train-controller circuit, which is a complete hack in order to drive my RCX-enabled LEGO 9v train [missed out on some more track from eBay, grrr...]. This'll drive a bunch of "street lights" to illuminate the track (eye-candy), and time-switch the RS422 bus onto an RXQ1 433.92/433.33 MHz FM transceiver. A similar unit on the train (drawing power from the 9v AC track) will hopefully respond and do the right thing. The train driver is also timed, so it'll only go forwards or backwards in 1.5s chunks (avoiding disaster if it loses contact with the train controller). Interface between this and the RCX is another hack -- closed box with 4 LEDs from the AVR, and an LDR on the RCX's sensor input (should allow for 5 distinguishable levels with very little error), but not written the NQC program yet (trivial). Final parts of the puzzle are sensing where the train is on the track (probably going for LEDs and LDRs, the beam broken by a paddle attached to the train, or some lever nudged by train body as it goes past), and switching train points automatically. Built one of the little huts shown on FreeLUG, tested by hand and works fine, next up is driving it from the train controller. Also been working away on some conference papers, before the submission deadline!


Been marking resit exams, not particularly encouraging. Most alarming was the lack of assistance requested -- these people are failing, why don't they want our help? Came across a few comical answers, though probably not deliberately so. When asked "name one of the three components of an operating-system kernel", with the expected answers "low-level scheduler", "first-level interrupt handler" or "IPC mechanisms", someone managed to say "code". Well, yes...

After some code-staring, managed to get the Cirrus Logic GD5446 framebuffer driver working in RMoX, mostly. Still only supports that single chipset, but at least it gets access to the video RAM in PCI-land. Slapped the existing framebuffer console onto the front of it, producing this. Next step is a decent font rendering engine! And after that a mouse driver probably. Just to be complex, the PCs PS/2 mouse port pops out as an auxillary interface on the keyboard controller (though not entirely unexpected).


This blog is partly in response to an email query I received, and partly because I don't think I've said it online yet (although other people probably have). Talking about occam-pi specifically:

What is the need for a relationship between programming languages and process calculi?

Just to set the scene, programming languages (occam-pi, Java, C, ...) are human representations of tasks that we want a computer to perform. The programs created using programming languages do all sorts of things, from ensuring that an electronic toaster ejects the toast after a certain amount of time, to piloting unmanned probes on their journey into space (and less desirable things like making sure missiles hit the right target). Familar to most will be programs such as Microsoft Office or the Firefox web-browser.

Process calculi are mathematical representations of abstract machines, that take some input and transform it into output. Unlike simpler mathematics, process calculi typically represent systems of interacting concurrent components -- lots of individual, simpler, machines working together. Wikipedia has a good overview of process calculi, though it is a bit (inescapably) mathematical. The behaviours of process calculi can be particularly complex, for which mathematics becomes a tool to help us understand them.

There is some natural relationship between process calculi and programming languages in the sense that we can write some programs in both. For instance, sorting a list of numbers is something which we can do in both. In fact, theory states that any computation expressible in a process calculus is also expressible in a programming language and vice versa, though for many cases, the transformation will result in something which is too huge to manage or reason about sensibly. Such investigations are typically in the domain of theoretical computer science and mathematics. It is also reasonable to assume that many programmers would have little or no idea of what a process calculus is, or what they can be used for -- their interest is primarily in writing programs to perform particular tasks.

Digressing a bit on computer programming, computers are very general-purpose machines indeed. For instance, there is little reason to doubt that given sufficient hardware, a computer could perform the same tasks as a human brain (essentially being alive). However, we lack sufficient understanding on how to approach programming such things. After all, life is just the result of a biological computer executing its DNA program -- we just have a limited understanding about how that all works; we still can't "design" a new life form from scratch -- e.g. giant winged creatures to comsume airborne pollutants.

So we have programming languages and process calculi, mostly separate. One of the major differences is in expressive flexibility: programming languages are generally designed to allow the programmer a lot of flexibility, or different ways of accomplishing the same task, often in the interests of performance. The down-side is that while the increased expressiveness simplifies programming, it means that we can end up expressing things which don't make logical sense -- "bugs" to most. Unfortunately, discovering and removing such errors is a procedure requiring time, effort and human involvement ("testing"). As time goes on, existing bugs are removed, but upgrades in functionality and fixes to existing bugs may introduce new bugs of their own, so the cycle continues. Generally speaking, the longer a piece of software has been around, the more bug-free it will be, and conversely, people expect new software to contain more bugs than older software.

Such problems affect the majority of mainstream programming langauges, including C, C++ and Java. Other, less mainstream languages, such as Haskell, Prolog and occam have less expressive flexibility, and consequently, programs written in these languages typically have fewer bugs. Haskell is a functional language which, along with other functional languages, have a strong mathematical base (not a process calculi per se, but similar in mathematical purpose). This makes it relatively easy to generate formal proofs of program correctness, as we can guarantee that the action of anything programmed in the language has a well understood behaviour. The same cannot be said of most imperative languages, particularly in the presence of concurrency. Unfortunately, it is not immediately obvious how to go about writing something like Microsoft's Word in a language such as Haskell, nor would most programmers want to.

The occam programming language, and its modern derivative occam-pi seeks a middle-ground, leveraging concurrency as a tool to simplify systems design and implementation, not complicate it. Whole software systems are essentially collections of hundreds, thousands or even millions of individual "mini-programs", or processes, interacting with each other. The CSP process calculus can be used to describe, and therefore mathematically reason about, the interactions of occam-pi processes. This guarantees that the way in which we plumb these processes together is "safe". Individual processes are programmed in an imperative style, so are subject to some bugs (e.g. the incorrect implementation of a sequential sorting algorithm), but at most we will be debugging an individual process -- not an entire software system. And neither does the programmer need to worry about errors arising from badly handled concurrency: the occam-pi compiler enforces strict rules about parallel usage and variable aliasing. On the negative side, enforcing such things requires some restriction in expressive flexibility. However, this is arguably balanced by the fact that we only need to deal with single processes one at a time -- much easier for the programmer, who then doesn't need to know the entire system to understand a single component. As a further advantage, highly concurrent occam-pi programs are readily distributed over large numbers of processors for performance, which is the way the hardware world seems to be heading (multi-processor, multi-core, massively multi-core, supercomputers, ...).

So back to the original question: what is the need for a relationship between programming languages and process calculi? Looking at the above, there is indeed a need, particularly in the light of increasing hardware concurrency and a desire for faster, more efficient, software. My argument would be that if we want to build large software systems which we can understand and maintain, then programming languages based on process calculi are quite necessary. Concurrency is the key to this: it can be used as a design tool to simplify systems implementation (lots of small/trivial programs, interacting to get the job done); and process calculi can be used to mathematically understand and prove properties of concurrent software systems -- so we know the concurrency is right. Getting the balance right between expressive functionality in a language and provability of program correctness is not easy, particularly if we want people to adopt such languages for the betterment of computer software generally. In occam-pi, we strive to get this balance about right.

For further rantings on language deficiencies and concurrency failures using threads-and-locks, see entries for 11th October 2005 and 12th October 2005. As a final point, one can build a CSP-ish model of multithreaded C/Java programs, but it would probably result in a proof stating that the program does do what we intended, but as one possibility out of millions of things which we didn't intend for it to do. I.e., we can prove that it does do the right thing, but can't prove that it won't do the wrong thing. And that last point ultimately dooms many languages, if we want some hope of guaranteeing program correctness.


Bashed away on the Triton a bit more, came out with TrancePlay1.mp3. Not entirely happy about the ending, but the timing is more or less there.


Various hacking, paper writing and admin things in progress. Also got a pile of resit exams to mark now :-(. Fiddled around a bit more with the GD5446 framebuffer driver for RMoX, but still no luck. Ought to see if the Cirrus framebuffer driver in Linux works in qemu (as that's the rough basis for the occam-pi implementation). Had a bit of fun the other night with some lambda-calculus, defining a fairly basic Turing machine. Probably not very elegant, but good fun nonetheless. Got hold of a Sipura SPA-2000 VOIP adapter thingy, to play around with VOIP at some point. Need two SPA-3000s to be properly useful though (since these have an FXO connection for the phone network). Once those are setup, it should be simple (with Asterisk) to forward calls between home and the office, make office calls from home and vice versa. Quality of service might be an issue, particularly over broadband (we get about 3100/488 down/up), but there are some smart people here who know about making that work right.


Into August..! Finally fixed the problems with the RS422 bus 16-character display device -- turns out it was something in the generic RS422 protocol code (C code, that is). Just about ready to burn the AVR and try it out properly :-). Tried to write a Cirrus Logic GD5446 framebuffer driver for RMoX, which didn't quite work as expected, but did at least do something.


Spent most of the weekend playing around with RMoX, writing a framebuffer console for VGA mode X, so far so good :-). Even manages to restore text mode correctly when it shuts down! Not tried it on the real embedded hardware yet, not sure how the LCD screen will react to being prodded like that (probably fuzzily). Plenty of good VGA programming information on the FreeVGA site. Temporarily gave up on the VESA framebuffer driver -- having looked at a couple of freely available implementations (Linux, NetBSD and Xorg), it seems that the hardware really does want us to do a nice 16-bit real-mode int 0x10 to set the video mode and prod the hardware in other ways. The other route is to go chipset specific (Qemu emulates a PCI Cirrus Logic GD5446, our embedded hardware has an AMD Geode). Also writing some papers, couple of weeks before the resit exams need to be marked..!


Been hacking around with PHP and SQL a bit more, turning a bunch of similar looking files into something nice and generic (well, not so generic anymore, but the lax type system in PHP certainly helps :-)). Finally got around to watching Enterprise season 3, good stuff :-).


Interested in doing a PhD in the field of computer-science, involving occam-pi and complex systems modelling? See this page for details. These studentships are part of the EPSRC funded CoSMoS project (with support from Microsoft, who are funding one of the PhDs).


Back from a fun conference at CPA-2007, where we (Carl and myself) presented some recent RMoX work (paper can be downloaded from this page), which subsequently won best-paper award :-). Keynote speaches from Tony Hoare and David May, so lots of interesting things to talk about! After Adam had presented his occade work, chatted to someone about writing a platform game, and thought back to playing Flashback on Josh's Amiga 500 many years ago -- remembered for the fluidity of its character animations. Planning on sitting down to write a graphical dining-philosophers at some point soon, a step on the way to a nice platform game :-). PGCHE examined and passed, so yay about that :-). Currently having a small play around with Tutka, to see if it can drive the Triton rack nicely. Bought a bunch of new ROMs for this, so poking around with the multitude of new sounds (and there's a lot!).


All immediate deadlines dealt with \o/. Taking some time "off" (in a sense, still researching and administrative hacking!) -- 'off' meaning irregular meals and distorted sleep patterns ;-). Prodded NOCC around a bit (timers and ALTs), plus generated some more documentation (wiki). Thought about adding passphrase support to the job control software (should just be a case of porting UWG's 'crypto' gadget back again. Triton currently having a rest -- had to send back the ROMs and RAM it came with (as they weren't actually supposed to be part of the item), ordered a few new ROMs and RAM to replace. On extraction of the original RAM, had a rumamge around my old SIMM collection for compatible memory -- stuffed in 3 32MB (at least I think) double-sided 72-pin SIMMs (60ns or 70ns unknown), and the Triton seems to recognise them, but thoroughly untested. Probably need to experiment with the sampling feature to exercise that. Currently writing some software (PHP, blergh!) to aid administration with this year's FIRST Lego League which we're going to hold at the end of November (on both the Canterbury and Medway campuses). Maybe 'campuses' should be 'campi'..? Being reintroduced to the fun times of SQL, at least PostgreSQL is a pretty decent database back-end, with a highly functional administrative tool, pgAdmin. Things here stopped for a while when the VPN routing box's root-disk crashed and burned about two weeks ago -- just a handful of bad sectors it seems, but which unfortunately gobbled up the /etc/ and /root/ directories, as well as some bits of /var/. Spent many hours looking at anonymous inode contents.. Now got a RAID-1 (mirror) disk pair going, should anything like that happen again (wonky disk wasn't _that_ old!). Got held up having to re-flash the BIOS to cope with an 80 GB disk (fun..), followed by a semi-automatic debian 'Etch' install (onto a RAID device).


Someone stop the world, I want to get off! Mostly been marking exams, deathly boring and potentially insanity inducing. Also been hurridly getting my PGCHE submission into shape, before the University starts breaking down the office door. Final year projects mostly done — some good research-based projects this year :-). Not touched the Triton for a few weeks, it's resting.. Still idly looking for additional ROMs for it; having played with Josh's some time ago, definitely want to get hold of the "trance attack" ROM. Missed the orchestral collection ROM on ebay, but it went for more than I was prepared to part with, so not too grumpy about that! Still looking for a sensible tracker interface for MIDI, best bet might be a windoze based thing — blergh! Recently installed Visual Studio 8 on Windows to play with BT's web21c SDK, in the queue for "things after May".


All marking done (minus final-year projects). Had another poke around with the Triton and multitrack, came up with TritonPlay2.mp3.


Spent a couple of hours playing around with the Triton, came up with TritonPlay1.mp3.


Almost the end of April, and still not really got into PGCHE mode yet.. (but it's next in the earliest-deadline-first scheduling queue). No more NOCC since last blog, apart from a slight fix to a silly parser error; the recursive DFAs needed a moment or two to settle in my mind.. Got one research funding proposal (for on-going and new developments of occam-pi) submitted to the ERC (European Research Council). Turns out they had around 9,000 proposals for their "starting independent research grants" call, of which they expect to fund 200-250 (about a 2% hit-rate..!). Wait and see now.. Finished off the marking for the operating systems (CO527) module, phew. Still got a stack of advanced concurrency scripts to mark, plus a pile of final-year projects. Mostly finished writing a paper for CPA-2007, bending the CR deadline a bit though.. Also got hold of a nice Tascam 8-track digital multitrack recorder, just about getting used to it. But still not found exactly the sort of tracker/MIDI software I want. KMidiTracker is probably the best I've found so far, but it has the occasional habit of locking up.. (not sure whether that's a fault of it or something underneath — the whole PC froze the other day when poking around with MIDI stuff).

Minor Earth tremor in Kent yesterday, which was a bit of excitement. Was downstairs transplanting bits of machines and setting up a new RAID boxen when it happened; only noticable thing was a slightly top-heavy stack of shelving which wobbled from side to side (at about 1 Hz). Worst place to be was Folkstone, where some folk lost bits of their houses.


Middle of April already.. Steadily switching into PGCHE mode, amongst NOCC hackery and research proposal and paper writing. Got hold of a Korg Triton Rack and spent a bit of time poking around with it. Much fun :-). Definitely much more potential for music than soundtracker, but I do kinda like the traditional tracker interface. Now poking around in Linux for MIDI tools, found this useful page, and had a play around with some.


Into April and the Easter holiday. Went up to Bristol for a couple of days, saw a bit of Stargate SG-1 season 10, looks pretty good on the whole! (though I partly agree with Grum's comments, on that they maybe should have stopped after season 8 — good sci-fi giggle nonetheless). Did some more work on NOCC, mostly in the compiler infrastructure department. Might be time for a fresh release before too long! Also got around to setting up the RMoX wiki, so yay on that front :-). NOCC development currently counting for some RMoX dev-time. Started looking again at putting multi-processor support into KRoC — defeated last time by some slight bugs in gcc's stack allocation handling. Did some primitive benchmarking on POSIX's pthread_getspecific() call. Comes in at around 12ns (cached best-case) on my 2.4 GHz P4 (non-fancy, non-HT), so using it on rescheduling in the run-time shouldn't be too expensive :-) [only affects certain code-paths, not every kernel entry]. Did a little more housekeeping on various webpages (but not updated quite yet..), but got around to putting the job-control daemon software (homepage) on freshmeat.


Almost the end of term! Been a busy term, but not quite over yet. Module evaluation things next.. Been reviewing papers for CPA 2007, some interesting/exciting things going on by the looks of it :-). Spent a bit of time working on NOCC, now parses the first bit of the CG-tests infrastructure successfully! Doesn't do much with it yet, though. Need to work out code-generation for array-slices next, and then the rest..


The US patent office do it again: US-7028023 describes a linked list, with extra bits for doing (novel and new) things like a doubly linked list (slashdot article). Doesn't every CS course on the planet count as prior-art? I guess the next step (patent application for them) is a tree structure which has additional pointers for storing different (sub-)tree structures. Oh, that's not a new or novel idea either.. Sad times indeed.


Into the second half of March; lots of work and lots of training, not so much climbing.. Got the RMoX paper written for CPA-2007, but still got a small stack of papers to review (past deadline now, sorry Alistair..). Looks like there will be some interesting and exciting things for this year's conference :-). Mostly finished setting coursework for the various modules this term, but still got marking. And still another couple of lectures to write (these are the fun ones now!). Been managing to put some time into NOCC development recently, looking good still. Transferred much of the static documentation into the sys-group Wiki (NOCC), but not added much to it yet. Mostly fixed PLACED PORT arrays now, which is nice. Currently restricting port addressing to be multiples of the sub-type size, not sure whether that makes complete sense on all architectures.. Might have a play with static barriers next, with the compiler figuring out for itself which sub-processes should be enrolled on a barrier.


Ping, March. Still writing lectures, setting and marking coursework. At least much of it is a one-time large overhead.. Also hacking out a paper on the RMoX USB device-driver infrastructure (mostly Carl's work) for CPA-2007. Extended-deadline++ in a couple of hours..


Tick, another weekend goes by. Almost entirely spent writing lectures slides, again.. Got the first batch of operating-systems coursework out of the way, next lot submitted this Tuesday. Also need to set the third part of this stuff for Tuesday (next on the TODO list). Followed by marking of the advanced concurrency coursework. Set some more coursework for this too -- a fairly hacky (but much fun!) Java transputer virtual machine (which reads in Intel hex-format transputer bytecode files). Uses JCSP to do the inter-JTVM wiring, although the supplied version is in single-transputer-mode [I've been writing the bytecode files by hand... minus checksum calculation]. Also the first CS assessment I'm aware of (at Kent) which has a qustion starting "Reverse engineer ..." ;-).

Found an hour during the week to poke the RS422 16-character display device. It seems to be receiving something at least now, and I even got a response out of it once, but something isn't entirely happy! Didn't drag out the oscilloscope yet though. Wrote a cheap shell script for building images for the Arduino board (they tend to call them 'sketches'); less Makefile editing..


Operating-systems coursework submitted, now marking it.. This is supposed to be a blog, not a rant ... but suffice to say I'm midly scared by the disparity in our 2nd year students' programming ability. Compared with a few years ago, there's also a higher incidence of questions of the form "what's a 'command-line'?", which is also a bit worrying. Spent most of today (yesterday) hacking out a program to help with marking, seems to hold water :-). Next dollop of courseworks for advanced concurrency incoming Thursday, and still got Friday's lecture to write.. NotEnoughTimeException.

Spent some time in the lab over the weekend and progressed the 16-character display device. Now got a free-standing ATmega8 on the breadboard, which drives it correctly. Hooked it up to the RS422 bus, but nothing obvious happening there yet! The test device on the bus responds correctly though, which is good; probably trying to use a blown-up MAX487 or something.. Next step is to drop the oscilloscope on it and compare bit-patterns with the test device, which is receiving stuff correctly. Finally cracked the problem of burning bootloaders for the Arduino NG board using their parallel port programmer hack and UISP; turns out I needed to set the fuse bits to something other than the factory default..


Almost another all-nighter.. Quick scribble and bed. Almost done with exam questions now, switching over to writing lecture slides for the advanced concurrency module. Deadline looming for the operating-system coursework (demonstrated by a rapid increase in the number of anonymous questions and email queries). Another thing to draw graphs of when I get a moment or two.. :-). In the odd slack hour here and there, been building a 16-character scrolly display device for the office. Much along the same lines as my existing RS422 hardware, but using an Arduino NG board (with an Atmel ATmega8). This now works, and have successfully assigned the blank board here at home with a LUN and extracted the device ID, etc. This uses DLR2416 4-character display devices. Gave up (temporarily) getting the 12-character AT90S8515 device to work -- program went in ok, but doing broken things. Don't think it's misassembled, but need to disassemble the binary and compare with my sources.. This new 16-char one is written in C.


Almost the end of January. Still writing lecture slides and exam questions, pushing free-time out of the way a bit :-(. Just spent a couple of hours doing battle with WebCT, and now beginning to lose patience [incidently, their web front-page fails to mention what the product actually is..]. Never liked it much anyway due to its blatent failure to work right on my desktop. In principle it's a fairly straightforward and useful thing: teaching/learning environment accessed via a web-browser ("e-learning"), [wonder how long that'll take to reduce to "elearning" ..]. What totally kills it is an over-engineered front-end, attempting to run Java applets for no particularly good reason and things like that. Works pretty soundly with Internet Exploder and Windows XP; no great suprise there, although it is incredibly unresponsive (maybe my 2.4 GHz P4-HT isn't modern enough for it). Anyway, an older version of WebCT had this useful feature where one could import questions, although the format was incredibly grotty (but made pleasant with a bit of XML and XSLT). Similar functionality appears to be missing in the new version of WebCT, although after asking some people and grinding through some web-sites, turns out that it can import stuff -- provided you stick it neatly into a (semi-proprietary format) ZIP-file. But it doesn't appear to support the old question format -- well, that's unclear, the documentation is not technically helpful, and neither was the error message it gave me. Digging deeper, it turns out that it should be able to import questions from a format defined by IMS. Getting hold of said specs (or rather examples of questions with which I can tweak the XSLT) is another hurdle, requiring registration and some semi-personal details to be fed to IMS. The switchboard can have those calls. Anyway, now the zipfile is downloaded, and zipinfo hints it might have what I'm looking for in it, so off to do that, or bed. Giving a talk to school pupils in the morning.. I'm sure that to most teachers/lecturers/etc. WebCT is fine; to the computer-scientist, I'm not so sure. Bottom line, moodle.


Into term, and a lot of teaching. Off to the Medway campus later, assuming I can find my way through Medway; a lot of roundabouts there. Many hours spent writing lectures and exam questions, still going, becoming numb. Also nearly time to set some coursework. Started teaching the advanced concurrency module, based around the occam-pi language; so far so good :-). More work, less waffle. Read up a bit on DCC, looking for ways to make my lego train more intelligent; home-brew is possible, but would result in a somewhat messy train I think!


Steadily approaching the start of term, lots of time spent planning lectures and things like that. Still got to write a bunch of them however. Attempting to fix some of the content of the operating-systems module; students said there was just too much last year, and I'm inclined to agree. Though the module content hasn't changed much (operating-systems seem to evolve slower than other software), it's still fairly low-level, while other modules are heading higher-level. Picked up the LEGO Star-Wars II for the XBox, looks like a fun game :-). Also got Need For Speed Most Wanted, looks a bit better than Underground 2. On hacking, tidied up some of the front-end handling in NOCC and got all (I think) of the occam-pi (so far) reductions and grammars into a language-definition file; similar for MCSP and the RCX BASIC parser too (though these are substantially less developed).


Woo, 2007. Happy new year all! :-). Had originally planned to descend on a random party in Canterbury, but nothing came up, so had a quiet one at home! Quite a few people did similar it seems, not completely suprising given the weather. More NOCC hacking undertaken, mostly tidying up the front-end of the compiler a bit (putting more stuff in the language definition file(s) and less stuff in the C code). Still a bit more to go. On the hardware front, still no joy with getting the 12-char-display device working right.. Did build another RS232/RS422 bridge, so should be able to prod it from the PC (and maybe add some internal debugging code, still got loads of flash left..). Just need to solder up a relevant serial cable for it. Speaking of which, promised someone I'd make them a serial cable for some strange hardware, so ought to do that sometime.. Also got 15 days to write exam questions, so ought to get on with that too, boo :-(. Looks like it's going to be another term of just-in-time lecture slides as well.. Some of the compiler work is currently counting towards RMoX development, funded by EPSRC; Carl's been busy working on the PCI core, which is now mostly there! USB support next, since the PC/104+ dev-kit we've ordered has some of this on it. Still waiting for that hardware...


Back from the doing the Christmas thing, much fun and merriment. Got some more Futurama DVDs, plus picked up season 2 of the Galactica series; still making my way through these. Been spending some time working on NOCC (new occam-pi compiler), though it's possible we'll choose a different route for a new production compiler -- still not completely made my mind up about this.. I like C and I understand it, my Scheme is not as solid (though it's a fairly "accessible" language). Seems likely I'll end up implementing some basic functional language inside the compiler at some point, reinventing the wheel a bit, but building wheels is fun :-). In the compiler itself, got basic PORT handling working and some support for EXTERNAL declarations (though these are slightly different from external declarations supported by occ21 as the memory requirements now include an 'adjustment' and the workspace size includes parameters). Also putting in some support for reading language definitions from text files (as far as these work sensibly). Mental note: don't go to sleep with bread in the bread-machine, it goes soggy.

Spent a bit of time producing a WT flyer to wave at students in lectures; it's good for you :-). If I had the time, would combine this with an assembly demo.. Something along the same lines might be a route into an OpenGL OpenGL programming experiment (got the book and the hardware now); still need to import Damian's OpenGL bindings from the Transterpreter into KRoC via SDL. Pondered a bit about a UWG binding for OpenGL too, though it doesn't appear obvious how these things can be embedded into other X11 windows. Also pondering about getting the Caller ID unit working again -- ordering some CMX603 chips which can produce the bitstream containing the CID and other (call-waiting) data. Exiting caller-ID unit doesn't get the signal when the ADSL modem is connected -- not sure why this is, possibly noise from the PCI ADSL modem intefering. At some point I'll get around to checking the attenuation of 10+ MHz signals by the ADSL microfilter (and hopefully figuring out what's actually busted here)..

On the hardware side, got a RS422 device with 3 SLR2016 (4-char LED display w/ integrated logic) built. Plan is to stick it on the office door somehow, more interesting than a post-it note! Damn thing doesn't quite work right yet though.. For some silly reason it looks like the SRAM in the AT90S8515 is getting trampled on. Finished building a programmer for the Arduino board, which appears to work correctly. Had to patch AVRDUDE to get it to program raw EEPROM files right, ardude-5.2-fred1.patch.


Trying to take a day or two 'off' -- also need to go do some Christmas shopping, real soon. Wired up the SLR2016 display board, but it complete failed to work right for some reason ;-). Oscilloscope shows some slightly unexpected behaviour from the program; added some debugging LEDs, more tomorrow (today!). Found an hour or two to fiddle around on a new tune, Journey's End (no imaginative name came to mind yet). Also getting around to watching the end of the Firefly series, pretty good, shame they canned it..


Been fiddling around with some of the hardware stuff, using the Arduino boards I've got. This is basically an Atmel ATmega8 AVR (8-bit RISC microprocessor) with a FT232R USB serial UART interface. The AVR comes with a bit of bootloader logic (from the Arduino folk), making it pretty simple to use the AVRDUDE programmer. Also first experience of C programming on an AVR device -- not too bad, but I think I prefer assembler generally (for these small 8-bit devices at least). Got most of the old programmer code implemented in C and talking to a revised 'sermond' (the old hacky one which got re-written..). That'll at least provide something for programming other AVR devices (in assembler); just enough pins on the ATmega8 to manage programming other ATmega8's, without resorting to a collection of latches.. Next trick is to get an AT90S8515 (or its new incarnation, the ATmega8515) driving a bunch of SLR2016 LED displays (and stick it on the office door or somesuch). After that, some hardware to control the LEGO train (image/png) around the office.. :-).


Into December now, but still feels like Autumn, just a bit more wet. I think we broke our planet a bit :-(. Shame that we lack nearby inhabitable planets and some means to get there.. Some thinkgeek and amazon stuff arrived, together with a PS/2-USB keyboard converter from dabs. Now back to using my trusty old IBM MF-II, though the Sun one had the appeal of extra keys and a very light action. Fixed some of the text wrapping issues on the UWGIcon gadget (UWG). Released new versions of rapp (0.2.0) and rappd (0.2.0) (webpage), to go with new releases of UWG (0.2.0) and ubuildinit (0.2.0). The RAPP client now appears to handle multiple sessions on the server quite happily, and hasn't blown up too horribly yet. Here's a pretty screenshot of it in action. Also re-engineered the other person gadgets for UWG: UWGPaul, UWGSteve and UWGKarim. Still don't have a photo of Karim -- are you out there mate? Updated the subversion copy of UWGBuilder to work with the new UWG, but haven't made a fresh release yet -- still wanting to put some more functionality in first..

Currently recovering from a busy weekend, mostly a WingTsun (EWTO website - European WingTsun Organisation, IWTA website - International WingTsun Association) seminar, plus the UKC mountaineering club Christmas meal on Saturday night (aborted about 10:30pm due to 7am alarm the following day); think I ate something bad at some point, insides not excessively happy. But, and after several years of training (and on my birthday), received my WingTsun 1st Technician from the hands of Grandmaster Keith Kernspecht :-).


Nearly the end of November already.. Definitely getting a bit colder now (== more heating). Just finished a fairly intense hacking session on RAPP, including a pretty new explorer thing (image) -- well, nearly pretty. The UWGIcon gadget needs a bit more work, like wrapping text and transparency, but functional for now. Also hacked out a "UWGMVLayout" gadget for allowing the user to drag gadgets around; icons on a panel in this case. That currently does outline dragging, simpler for the time being :-). Various fixes to the RAPP server too, both client and server should now be able to handle multiple sessions without falling apart too horribly. Minor problem spotted with initial output from the rapp control module, one block of data overtaking another.. (easy fix though!). Restored "UWGFred" and "UWGDave" gadgets, previously in WG.

Finally got new lab machine up and running, with a Gainward Geforce Bliss 7950GT, albeit the 256MB version, but that's still plenty :-). Apparently it'll drive 2560 x 1600 onto a monitor, shame I don't have anything capable of that. 1600x1200 on one monitor and 1400x1050 on the other will do for now. Also can do GL stuff on both heads at the same time, bonus! Only thing left now is to get an adapter to connect my nice IBM MF-II keyboard, with a PS2 plug, into the new Dell, with only USB sockets. Could always transplant a keyboard controller, but that sounds like hastle and keyboard death, so nope. Currently using a 120-ish key Sun keyboard; no right control key...


Back from another fun weekend with the mountaineering club in the lake district; managed to drive the minibus without any accidents \o/. Didn't get any climbing in over the weekend -- far too wet and nasty! Good walks on both days, Saturday got a bit insane, wind taking out peoples legs from under them, somersaulted through the air, etc. Few more weeks until the final trip this term. Monday night went climbing at Herne Bay high school (now our regular haunt on Monday nights I think, still waiting for the sports centre's wall to be "fixed"), fantastic night's climbing by all accounts; Dave and myself seemed to be doing route after route (with me falling off more of them!). Some good naturals-only routes done too. Managed to get a serious hacking session in Tuesday, probably about 12 hours worth over the afternoon, evening and early hours. Fixed a bug with the passphrase mechanism in UWG's UWGCrypto gadget (now working happily), and got the RAPP client + server doing basic user authentication (based on signed message digests using public/private key pairs). Takes a little while to collect the required entrophy for the random generator when generating keys, so might put a progress bar or something in this (assuming libgcrypt, from the GnuPG software, supports this -- I guess it does, it seems to be pretty flexible, though its use of S-expressions makes me want to bang my head on the desk a bit!). General auth code is nice and fast however :-), but I'm not attempting to encrypt traffic itself (ssh and https do that job well enough). Bit more on this tonight, after writing up some CO523 lecture notes; had to spend some time re-learning some of this stuff (though that was, sadly, fun!). It's maybe a shame that it can be hard convincing students that logic/maths is useful (and fundamental to CS).. Proving things about Java is a long way from the logic learnt; Haskell's a bit nearer, but still some distance. And we don't teach type-theory or lambda-calculus much currently (despite these being quite fascinating, certainly the untyped lambda calculus).


Monday evening. Hello September \o/. Long weekend -- Saturday spent at a TG WT seminar, much fun, much learnt, and in case there was ever any confusion, Master Andrew is indeed 'master' :-). Sunday spent mostly hacking RAPP things, server got a whole raft of updates, client not so many. New config file handling amongst others, seem to be moving over to XML style config files -- not too hard to parse and pretty flexible (as much as 'resolve_config()' allows anyhow). Starting to put cryptographic support into the RAPP client, using UWG's 'UWGCrypto' gadget. Monday night (tonight), climbing at Herne Bay, managed my first proper indoor lead, yay, and then did another which was harder and fell off. Mental note (for chopping MP3 files): a 100 minutes does not an hour make. But interesting selection nontheless. Recently got that new 'Slither' film on DVD, good laugh generally, bit turgid in parts. Also got the [weak] trilogy of 'the fast and the furious', '2 fast 2 furious' and 'fast and the furious: tokyo drift' -- definitely good viewing for anyone into silly car stuff! Finally, thanks to Jim Moores who got me Steven Wolfram's "A New Kind of Science" (book) -- a fantastic journey of insight and intrigue. Speaking of fantasic journeys, set new high scores on 'Pro Pinball: Fantastic Journey' (modest) and almost a new high score on 'Pro Pinball: Timeshock!' [XBox], a whopping 2.2 billion there (trying to beat 2.3).


Back from a fun weekend in the Peak District with the mountaineering club. Fairly wet walk on Saturday, climbing on the Sunday. Spent the week mostly working on various things, not much coding got done. Started refactoring the RAPP server-side code, into something a bit easier to cope with. Some small protocol changes in progress. Also started filling in supported gadget properties in UWG's gadget-definitions XML file.

Now Halloween, woo, no trick-or-treaters visited; just as well, only really got breakfast-bars at the moment! Having a night off mostly, silly Halloween kung-fu stuff tomorrow. Old UPS's battery may finally have died, so got a new (and a bit bigger) APC UPS (one of the smart-UPS jobbies). Currently running apcupsd to drive it (well, just monitor at the moment); pondering how to integrate with openupsd. Might end up having it suck on the apcupsd status file to start with..


Almost the end of October already :-O. Settled down with final-year projects now, minus one RAPP group. On that score, started refactoring the server code over the weekend, looking a bit better now -- less of a complex mess anyway. Also fiddled around UWG a little while ago, added a 'UWGIcon' gadget, intended for desktop style things. And finally fixed the FreeType2 font integration, more or less -- things at least get rendered half sensibly now! Not sure my fg-blend-to-bg algorithm is ideal, quick, nor sensible, but it seems to do the job.. At least it generalised text drawing in UWG :-). And there appears to be a freely available LCARS font from, yay! Got thinking about a new round of LCARS style gadget and automatic (content based) layout of things [which is how the stuff we see in Star-Trek appears to work]. Managed to find a few hours over the weeks and finished off a new tune, Final Step 2 (7:11, MP3). Apart from those things, lots of admin and research-related goings on. Ran out of log-book, again. Not much progress on research-hacks, apart from RAPP, but things queueing up there. Thinking about progress for the new occam-pi compiler. Although functional paradigms may be better for general tree transformations and validations, something still attracts me to using C to implement it (probably from having mostly programmed in C..). It's also explicit -- unless the abstraction is clean, I'm against having languages hide things (suffered by Java, C++; not by occam, Prolog).


Into October already.. Spent some admin time sorting out final-year projects (seem to have collected quite a few this year). Two groups doing things with RAPP which should prove interesting. Fiddled around with UWG and the rapp client + server so that they build on Solaris -- and seem to work ok! Fixed a few bugs along the way. Phill pointed me at an interesting article on an Intel 80-core future (slashdot article). On the subject of user-interfaces, came across an article on the future of GUIs. Currently digesting an MSc dissertation, paused for a creativity break and updated some music (final step 2 (pre3)); close to completion I think..


A weekend of mostly hacking :-). Did some more work on UWG's UWGTiledArena gadget, result is still a bit lumpy, but heading in the right direction. Also went through all the UWG gadgets to generalise font-handling code (to support using FreeType2 in the not too distant future). Started re-thinking how the `LCARS' gadgets might look/work, after running across Some other small changes to UWG and RAPP so that they build on solaris -- seems to work, RAPP client successfully talked to the Linux server and did stuff :-). In an idle moment on Thursday (while waiting for a large pile of debian updates to install) put together a graph showing the pi-cluster status. Soundtracker got broken briefly, but resolved thanks to a better-than-what-I-had-installed version in Debian; churned out a updated tune, Final Step 2 (pre2). Also been poking around with NOCC over the weekend; now uses the new multiway synchronisation instructions to support MCSP, a CSP-like language. Some of this stuff made its way into a presentation given at CPA-2006.


Back from CPA-2006, a thoroughly enjoyable and informative conference. Mostly been poking around with NOCC and UWG, with almost-a-tile-gadget taking shape (trying to recreate dune-2 style games again). More bugs added to the KRoC to-do list...


Into September already. Almost ready for the CPA 2006 conference (starting this weekend). Term starts in a couple of weeks, mostly the same deal as last year (majority of the teaching in 2007). Should give me some time this year to finish some long outstanding things.. Still trying to recruit an RA for my EPSRC project; undoubtedly looking for someone who wants the job, rather than the money (which isn't a huge amount sadly). Lots of time put into UWG and RAPP recently. Picked up the domain, with the intention of putting something public facing there at some point (another domain for those silly people at the 'domain registry of america' to try and take off me; my registrar is quite capable of reminding me to renew, thanks!). Reminds me about contacting the post-office to stop all the crap that falls through the letterbox too, most of which ends up unread, de-penned and in the recycling bucket.


Spent a weekend of hackery on RAPP, UWG, UWGBuilder, with a raft of new releases (freshmeat-ed), and slightly unrelated, NOCC. Got most parallel combinations of multiway synchronisations synching right now, next up, alternation -- run-time is in place, so shouldn't be too hard. Left it last night (a.k.a. very early this morning) with the compiler generating something that looked reasonable. Now time to see if it works! Also time to put some ingredients in the bread machine. Also linked in the job control daemon page -- it appears to have been working mostly fine on our cluster for a couple of months now :-). Came across this BBC news article; unbelievable the extent to which beaurocracy has maimed common-sense.. though that's nothing new.


Did some exam marking for the CO527 (OS + arch) module. Thankfully at least a few students did better this time around :-). Came across an interesting article on dark matter, also fixed the BBC news links in my rawdog config; they seem to keep moving them around.. At long last mostly tidied up the UWG autoconf stuff, maybe not perfect, but better than what it was. Debian control transferred to Dave to rebuild the packages. Might finally get a release of UWGBuilder out this weekend! Still got a few things that need sorting in it, but it's mostly happy. And another release of RAPP (client+server) queued (also with fixed autoconf stuff).


Back from the ICECCS-2006 conference, hosted by Stanford University. Despite all the hoo-hah regarding airport security in the UK, the traveling wasn't too bad. Though I still hate long-haul flights -- maybe I should get a little laptop for hacking-on-the-go.. Recently had a little play with Python, generating a new version of the RAPP multi-client chat application. Didn't get much sleep on the plane, so might get over the jet-lag fairly quickly.. still feels a bit like midday to me (though it's really the evening now). Saw "mission impossible 3" on the plane -- quite good I thought! The pre-screen reviews from two American chaps were quite funny. And discovery-channel++, unfortuantely didn't get a chance to visit the discovery shop in Palo Alto.


More work on multi-way synchronisations, with real PARs this time. Getting quite complex in the compiler, but neatly contained within its own bit of code and parse-tree nodes. Compiler currently works out, based on alphabets, which processes in a PAR should be enrolled. Got held up by a slight problem with PAR space allocation, the usage data-structure ended up floated to the top of workspace, which is mostly fine, except that the run-time expects it to be at offset zero ... (hence 'successor workspace' ..). Safe to let it float provided that it has the real successor workspace is pointed at inside the usage structure (NOCC-specific ENDP), but maybe want to fix it at offset 0 anyway.. (easily done by having it use some low workspace). Spent a couple of hours over the weekend generating some fresh music (Odd Ditty - pre1), mostly under construction - bit faster than usual, plus some attempt to use those higher frequencies (most of my tune attempts lean towards the lower end of the spectrum, maybe it's my headphones..).


Looking for an RA position in Computer Science ? One 3-year post now advertising at the University of Kent (Canterbury campus) in the Department of Computer Science. The work relates to the RMoX operating-system, in an EPSRC funded project to develop a concurrent component "took-kit" and design tools for building embedded operating-systems using PC/104 modules. Feel free to contact me if you have questions/etc. relating to this post.


Mostly done with papers for CPA-2006, did promise Ruth a bit of hacking time on the CPA paper database, PHP book at the ready. Adam posted an interesting link to execution in the kingdom of nouns (aka Java rant). Put some time into getting the new multi-way synchronisation instructions together -- to support anything from interleaving (1 of m), through arbitrary numbers (n of m, or the Santa Claus problem), up to full-sync (m of m). The clever trick being to get the implementation right without losing control of complexity -- we allow processes to simultaneously offer multiple synchronisations, but only select one (the "ALT" in occam/occam-pi). The data-structure diagram for a fairly simple case already looks like a regular tube map.. It does, however, avoid run-time memory allocation (which was previously needed for per-process, per-barrier wait-queue structures). Now an evil piece of code in the new occam-pi compiler. Will carry on working on that thisevening, before moving onto a presentation for the upcoming ICECCS 2006 conference. Will hopefully get to see a bit of San Francisco while I'm out there. And happy birthday Dad :-).


August already.. Still grinding on with various things. Matt posted a link to this interesting article on programming (rather, on becoming a programmer). Interesting not least because Richard Bornat came to Kent and talked to us about it a while back. Some of the implications of this stuff, particularly for computer-science recruitment, are interesting.


Almost at the end of July, eep. Had a couple of days "off" (mostly hacking). Some more progress made on UWG, RAPP and UWGBuilder. Now spending time doing papers and edit-stuff for the CPA 2006 conference -- including some updates to the NOCC compiler (which also compiles CSP now, sort of). England seems to be suffering with the heat somewhat this year, especially Kent. Temperatures reaching 30 Celsius over the last couple of days, urk :-(. Computers don't really help the situation much.. In fun moments, made some musical dittys, organ thing (pre1) and one step ditty (pre1).


Into July, almost a week.. Did a summer-school "taster session" for the University today (yesterday), which went down mostly well I think :-). Tried out a concurrent-ish bubble-sorting algorithm on volunteers, good giggle and I think (hope) it got the point across about complexity -- certainly some intelligent comments from the audience. Didn't have time to go through my lambda-calculus slide, unfortunately.. Another unfortunately, spent until 8am Tuesday morning writing the slides, now got a slightly confused brain; keep thinking it's Friday tomorrow (today), but I'm pretty sure it's Thursday.. Sleep patterns also not very good due to the insane heat we've been experiencing down in the south of England recently. Tuesday was the hottest day of the year so far I think (32 degrees, ouch). Engineering opportunity for a massive slightly-transparent solar panel, floated in the air using balloons or similar, providing some shade and generating electricity to power air-con units below. Or find a bunch of nice tall buildings to stretch it between.. In spare moments, been doing more to UWGBuilder, that now has a home-page. Almost ready for a release, but just a couple of things I'd like to tidy-up first; still a fair way from completion, but getting there..


Mostly finished CPA 2006 paper, now onto reviewing some other papers. To this end, played around with NOCC some more (the compiler that implements the MCSP language, ish). As soon as the replicated-seq is finished, can start getting benchmark data out of it... A crude benchmark puts the new multi-way synchronisation instructions in the run-time at 392 nanoseconds for a complete synchronisation of 2 uncontended processes. Really want a bunch of benchmarks that cover numbers of processes and level of contention (overlap of processes) -- good excuse for a 3D surface plot if nothing else :-). That 392 is probably horribly over-estimated, as it includes 1/10th of writing 'report' down a pipe (hence the need for some counted sequence..). Also fiddled around with UWG some more, bits and pieces for gadget updates. UWGBuilder slowing heading towards something useful too -- can now type something in the property box and have the gadget updated. Only got string properties updating currently; colours would be useful (beyond the preferential ones in the config), colour selector thing... Once it can export XHPD files and other properties are dealt with, will probably make an initial release. Editing code and stuff like that will be the next nugget (bit more complicated in this version since the code goes in-line).


Mostly been working on UWG (0.1.5 released), now looking fairly fluffy :-). Also been working on the new incarnation of WGBuilder, a screenshot of which can be seen here. Several parts of the builder now work ok, but most is incomplete. Got the majority of UWG gadgets into the new-style gadget database. Next steps are to allow property updates from the properties box and export-to-xhpd -- that'll make it useful for generating RAPP interfaces if nothing else :-). Code isn't as complex as the previous version, but still expecting a good 50k lines. Next up is some more work on RAPP, will probably attempt to publish something on this in the not too distant future (and see how the reviewers respond to it!). Pondered some more on the new occam-pi compiler, which is now compiling CSP-ish programs happily, mostly. Still a fairly primitive language, so not terribly useful for anything practical at the moment (it was intended for playing, however). Paper for Communicating Process Architectures 2006 under construction ...


Did more work on the pi-cluster job-control system, now on its own web-page here. Software now running across the cluster and seems to be pretty much intact :-). Started working on a paper for CPA 2006, initial paper submission deadline tomorrow... Also been doing quite a bit of work on micro-WG (UWG), now have menus working sensibly. Started porting WGBuilder over to UWG, so far so good! Should actually be a bit simpler this time around, now that there are no C++ problems to get in the way :-). The general design of the system seems to be somewhere between object-oriented and aspect-oriented, but not quite either. "Solution oriented" might be appropriate..


Into June.. Been spending a lot of time recently writing a job-control thing for the pi-cluster. Currently looking pretty neat, though a bit more fiddly than expected. Currently has the ability to list, suspend, resume and renice processes in a cluster-type environment, with some fairly sensible mechanisms to identify jobs. Things which are currently lacking (and should be dealt with before a 1.0 release) include starting/killing jobs and fault-tolerance mechanisms -- some of the needed bits for making it fault-tolerant are in place, mainly done by having more than 1 central server and allowing hosts/users to fail-over into different ones when connections go stale. The user-end of it support interactive-mode (with libreadline) and a RAPP client mode, which is a bit experimental, but what's currently working can be seen here. Also does plain old command-line mode for use in scripts and things. In other things, been to some BBQs (now that it's mostly summer) and tinkered around in soundtracker some more.


Some more time goes by.. Released KRoC 1.4.1-pre4 the other day, but mostly only works on Linux. Crashes horribly on Suse and Fedora distributions. Recent subversion checkins to ccsp should (maybe) fix some of the problems. Created a new branch to play around with the broken stuff in.. Someone posted a link to an interesting page on cockroach controlled robots; something you don't see everyday. Palgrave Macmillan sent me this link to some research findings about what now motivates people now to go University. Think I'd mostly agree with what they found -- less academic more 'for a job' (aspiration). The dependance of students on 'spoon-feeding' is probably the most annoying thing, attributed mostly to the changes in pre-university teaching (to meet targets, rather than educate individuals, it seems). The almost laughable result at this end is when students don't submit coursework claiming "I didn't do the work because it was too hard" or "I didn't know how to get started". To which the general response is "did you think about asking for help?" (from peers, from the lecturers, from the newsgroups, from the anonymous questions thing), followed by glum looks from the student.. On more fun things, Adam posted some links about continuations in Java, why we might want them and some more (older), continuations in Mono (which seems to be heading towards CSP-style semantics, much like the stackless Python that inspired it), and some other related continuation links ( Apache Cocoon, conccurency in Scheme in JavaScript). The general idea of continuations appears to have come from the Scheme world. C's setjmp/longjmp provide something half-way to continuations, except that the whole stack state is not preserved, meaning that you can continue to something still live in the current stack, but not anything that has returned past its setjmp. Although if you end up doing that in C, and aren't implementing a micro-scheduler or similar, probably best to look for a language that does it more cleanly (or use a language that provides the sort of concurrency abstractions you want, like occam-pi). Got around (again) to ordering a new DVD drive for the Xbox; last replacement didn't last very long. The drive arrived today, now installed and working -- tested out by taking my shiny Audi TT for a spin in Need for Speed Underground 2 (official page).


A few more weeks float by.. In the process of exam marking at the moment, mostly boring, but needs to be done I suppose. Not actively taking part in the AUT action, largely because I'm not in the union, yet.. Totally agree with the point they're trying to make however. Reminds me of that song, "you won't get me I'm part of the union, ...". Apart from exams, mostly adminstration and research. Currently got the KRoC system in bits all over my virtual-desk(top)s. Attempting to re-work the way run-time kernel interfacing is done to speed things up a bit -- appears to be working too, until something segfaults horribly. Got the basic commstime down to 37ns on my 2.4 GHz P4 (non-HT), without inlining. With inlining things got faster, did see 18ns at one point, but fallen away from that again -- at the level where slightly different code-generation can have a significant impact (+/- 20%) on the reported times. Much of the fiddling around is to support multi-processor scheduling in the not too distant future, given that these flash dual-core P4s are beginning to appear on the desktop (and in servers). Also been fixing various bugs (as have other people, thanks!), so the next (1.4.1-pre4) release should be somewhat better; Adam found and fixed a particuarly unpleaseant memory-leak with the blocking syscalls mechanism -- mostly my failure to write some linked-list code properly (built a nice list, then threw it away..). The department finally got around to re-skinning its website; much more visually pleaseant, even if still lacking in usability a bit. Summer is definitely upon us, with the office temperature reaching 29.0 degrees on Friday.


Monday.. Spent the weekend doing some administrative things :-( and hacking :-). Fiddled around with RMoX's VGA driver so that it can now go into "mode X" (320x240, 8-bit indexed palette). Will probably need to use the generic (but run-time type-checked) MOBILE.CHAN mechanism to pass control channels back to the application. Currently just fills up the screen with various pixels. Played around with CIF-ifying a bit of RMoX (for wrapping chunks of Linux driver code mainly); almost works. Manages to start ok and print out some debugging stuff, then crashes from a wonky address; debugging required. Added Adam's start on a PCI driver (written in occam-pi). Also poked around with UWG a bit, would like to get the popup-menus and main-menu thing working before too long (these tend to be useful..). Also had a deeper look at Peri Hankey's Language Machine, which required building the D front-end for gcc (gdc). Built more easily than expected, but some uglies from not having it installed in the regular place. Wrote a hello-world program in D :-).


Back from the EuroSys-2006 conference, altogether excellent. Lots of interesting folk there, and some very interesting work. First journey on the Eurostar (train that goes through the concrete tunnel under the English channel), pretty efficient really! Only gripe was not being able to change my ticket for an earlier one on the way back, but not Eurostar's fault (ticket was booked via another agency). Ended up sitting around in Brussels train station for 2.5 hours, did have a book to read fortunately. Bought some postcards, but due to the insane queue in the Belgium post-office, couldn't get stamps. Seems that unlike the UK, regular shops over there do not sell stamps -- which would be really useful. There was a stamp machine, but out-of-order. Back in the UK now, sifting through accumulated email.


Tuesday.. Released a new version of KRoC (1.4.1-pre3), bit transient at the moment -- only i386/Linux will work right; i386/cygwin, PPC and Sparc busted for the time-being. However, it does now have Mario's "pony" network infrastructure in it (mostly free of memory-leaks we think). Also added some contributed software to the distribution. Read up on Google's thread caching malloc, as a potential replacement for KRoC's existing slab allocator. Not entirely unlike what I've got in-progress for the next iteration of the slab allocator, except that it's more intelligent with threads. Probably need to finish mine off and do some performance benchmarks before passing judgement on it :-). Started making my way through the "Sliders" series, forgot how good that was!


Another weekend goes by! Spent most of today sleeping, probably more than 12 hours in 24 :-). Fiddled about with the KRoC distribution some more, experimentally/provisionally put in Mario's "pony" package, which does the communication over networks thing (usefully, allows mobile channels to be moved around between network nodes; mobile processes later). Damian posted an interesting link to some highly parallel chippage (1024 8-bit units and a PPC), presented at the San Jose embedded systems conference. Also read up a bit on Intel's new "Core" microarchitecture, which appears to be pretty interesting. On graphics, someone pointed me at Linux's FBUI (frame-buffer user interface). Don't think it's quite ready to replace X11 yet, but some good points about software bloat and the need to get rid of it (this being one of the motivations for RAPP and friends).


More KRoC hackery, mostly tidying up the run-time calling convention. Commstime still looking pretty efficient, though it could probably go faster.. :-). Read up a bit on Intel's Virtualisation Technology, looks pretty interesting. Probably a good place to get RMoX started on modern PC platforms (once we've exhausted qemu!).

Picked up a fairly decent book on parallel programming, M. Ben-Ari's Principles of Concurrent and Distributed Programming; a few pages in is "The challenge in concurrent programming comes from the need to synchronize the execution of different processes and to enable them to communicate.". Some thoughts that ring entirely true with the communicating processes approach, built around Hoare's CSP, embodied in languages such as occam-pi and in APIs such as JCSP and CIF. Hopefully we can mature some of these technologies to a point where people actively want to use them, not resort to them because of the deficiencies of threads+locks. The book does talk about this type of concurrent programming quite extensively, but from one of the other language facets (of Promela).


More KRoC hacking over the weekend. Got commstime down to 34ns on my non-hyperthreaded 2.4 GHz P4, and down to 17ns on the hyperthreaded pi-cluster machines (3.2 GHz P4). Still a bit more tidying up to be done in the run-time/interface, but probably not going to make commstime any faster now. Multi-processor code slowly on the way, figured out (mostly), but more code required. New DVD player doing well so far, steadily progressing through some star-trek series :-). Also thinking about interesting parallel computing problems to solve on the cluster using occam-pi; something GRID-ish maybe.. Also read about some UK supercomputing on the BBC site.


Term over! Back to some research for a while (and finishing off some long overdue things). Four suggestions for final-year projects dispatched the other night, see if anyone takes them up this year :-). Some group projects organised around RAPP, also gave the web-page a bit of an update following a brainstorming with Dr. Dave.

Started looking seriously at multi-processor support for KRoC. It's been done before for various architectures, but the trick is to do it without blowing away efficiency. Also to support multiple architectures.. (Sparc/Solaris and Linux/PPC probably before others, since I've got access to multi-processor hardware for these). Looking at implementing something based on Vella et. al's batch scheduler (PDF), generally processor-cache friendly. The required support for locking processes to processors finally arrived in Linux, with 'sched_setaffinity' and friends :-). In other research things, Adam produced a system and page for occam-pi enhancement proposals, which has now absorbed the entries on my occam-pi compiler extensions page.


One more week of term left, all teaching done, time for module evaluation stuff. Been busy getting Mario's stuff working for KRoC, which is nearing completion now. Fixed a few outstanding bugs here and there too. Updated the XHPD documentation to include "newgadgets" and special commands (mostly used by RAPP things). Added some more gadgets to the list on the UWG page (got created a while back).


Got around to fixing some outstanding occ21 bugs in the KRoC distribution, put together KRoC 1.4.1-pre1. Someone posted this curious link, amusing reading, but sound like good arguments to me! Mostly gave up on the XBox's ability to play DVDs -- slightly injured disks upset it a bit too much. Ordered a new DVD player..


End of weekend (aka early Monday am). Been a while since I wrote anything down here.. Just about keeping up with writing lectures, probably takes the best part of a day to put an hour lecture together (from scratch). Hopefully next year will be a bit easier :-). Having to write a multiple-choice quiz thing at the moment; wasn't ever my favourite method of assessment, but after a bit more research into this it might not be so bad. Found some useful information (besides the usual pedagogic textbooks) on the web here, here (PDF), here and here. Undoubtedly there's a lot more out there too which I haven't seen (yet). The main trick appears to be in writing questions and answers that force students to learn. Writing knowledge-based questions is easy; writing those that require comprehension on the part of the student are harder.

Research conveyer-belt moving along, albeit slowly at the moment. Fiddled around with KRoC a bit, some people running into strange segfaults -- notably RedHat users, though I think the problem's more specific than that (e.g. version of libc or gcc). The existing run-time has gotten slightly bloaty, what with the variety of features that it now supports. Might be time to look at some kind of auto-generated run-time (which would certainly improve confidence in its correctness). Only need a few concurrency primitives at the very bottom; many others (including ALTs, barriers, ...) could be built on top. Few more weeks of teaching then I'll probably take a harder look at this.

Amongst other hacking, got RAPP (remote applications) working a bit more. Also added rapp and rappd as freshmeat projects. Picked up a few subscribers! Getting basic updates from the server-to-client and actions from client-to-server is mostly working (if a bit simple); currently playing around with dynamically creating and destroying bits of interfaces (e.g. USB information as devices come and go, or something like that). On the server side, the only supported "session engine" is the single-shot external one -- just executes some program which talks XML to the client at the other end (via rappd). The persistent session engine needs more work (first application to roll off that will be a multi-client chat jobby). My original motivation for RAPP was to separate application logic from GUI control (the two do not go well together in most cases; parallel languages work well, but they're a bit thin on the ground -- occam-pi bindings for RAPP under construction..). But it turns out that the separation at this point might be quite useful for other reasons; one of our undergrads on placement at Sun wrote some interesting stuff in his blog. The current RAPP client is UWG (micro window gadgets) based, which gives it the fluffy star-trek "lcars" gadgets amongst other things (e.g. file-system abstraction). On the file-system abstraction stuff, probably worth taking a look at the GnomeVFS library; certainly for "http://" and "ftp://" flavour URIs. Existing VFS layer provided by UWG will do for now however :-). Had a chat with Dave the other night about fun things to do with RAPP. Turns out that a UWG client might not be the endpoint -- could abstract inside UWG for drawing primitives, allowing UWG gadgets to be viewed on whatever. We were mainly thinking of VNC-type displays, but web-browsers would also do the job (with a bit of Javascript). Of course, the further you get away from the server, the more latent interaction becomes; but that's the accepted price for not having a real RAPP client I suppose ;-). More hacking to be done on that over the Easter break (now called the "spring vacation" by the University, who de-theologised the term/holiday names for some reason..).

Also played around with XSLT some more. In a discussion about whether certain things were possible, someone pointed me at a link to an XSLT Turing-machine, so yep, those things should be possible :-). Also found some ZX-Spectrum games that I should play sometime (ah, those were the days!). Played around in SoundTracker some more, churned out some fresh music (Oddments pre1), looking for something a bit more orchestral this time.


Another interesting week, started off neutral, finished at both extremes. Still writing lectures, but only another 8 or so to go! (project week coming up, which will be mostly lecture writing I think, and maybe some research too :-)). For some reason, ended up having a conversation with someone in the lab about the deficiencies of Java (not deficiencies of OO this time, but that's fun too). The two things that came to light are: 1. timers in Java can go off up to about 10ms before you expected, which breaks some algorithms that assume the clock will have past the timeout when it wakes up; 2. spurious wakeups, now documented in the 1.5.0 API (Object), but somehow not in the 1.4.2 API (Object). They claim it's not a bug, I'm not convinced ;-). More to the point, I suspect there's vast reams of Java code out there that could be (and probably have been) broken by this "feature". Someone posted an interesting link to guinness ice cream, which sounds kinda tasty. Whilst preparing lecture slides, ran into some interesting web-pages with pretty pictures of linux desktops and a history of windows. In other code, collected up a few more KRoC bug reports, to be looked at soon (mostly the compiler generating "internal inconsistency" errors). Got some more of the MCSP code in NOCC working right -- multiway syncs still looking safe :-). Also put some more time into UWG and RAPP, now have something close to working the way I want it to; bit more hacking required.


Well into February now.. still busy. Damn XBox just crashed again, and I was doing quite well on one of the LEGO Star-Wars levels (droid factory). Seem to be a couple of places in the game where it hangs. Still, better than a burning XBox. Someone posted a link to the register's public speaking advice, slightly untraditional approach.

The University have now migrated most users over to Sun's communication express mail-system (can still IMAPS so not totally bad). Shame the web front-end lacks support for (open) PGP/GPG. About time the world started taking this stuff more seriously..

Still writing lectures and exam questions, almost reached critical. Took a break to do some hacking -- started putting some "debugging trace" support into KRoC. The idea being that the run-time will report what's going on do some daemon, and debugging clients will connect to that. The daemon will deal with the fun stuff of turning addresses into meaningful names (basically tracking processes and channels as they come and go). Gave a talk to the systems research group on the new occam-pi compiler, slides available here. Time to do the washing up..


Another week floats by, mostly writing exam questions and lecture/seminar slides. At least I've now got a nice set of introductory slides for the new occam-pi compiler :-). Still need to write more lectures though.. and papers/journal-articles. Going to be a busy February too I think :-|. Missed the deadline for the ISMM-2006, gah, but will have a nice/solid paper for the following year. Fixed the subversion machine at last, new disks in; RAID1 configuration this week sometime.

General rant at TV stations with adverts for turning up the volume during adverts; most irritating.


Still missing the KRoC subversion repository -- machine had come back ok (ish), but one of the disks started failing. Got two replacement disks for it to run in RAID1, will probably shunt the root partition over to RAID too (on its own disk at the moment). Slightly slow process, but things should be back up and working sometime this coming week :-). Did some more hacking on nocc, mainly for handling CSP-like things -- generates code correctly for some things, breaks horribly for others (in debugging-mode at the moment). Implemented some of Peter's multiway-sync stuff in KRoC's run-time kernel, appears to work happily, bar missing locks and b0rked priority handling. In the preperation for some CO527 coursework, played around with SPIM a bit more (and a quick reminder of MIPS assembler). Replacement DVD drive for the XBox installed and working, yay :-). At last, managed to watch Batman Begins uninterrupted, and some others that didn't play right before (Torque, silly film, but good for post-pub). Also been working on KRoC's new memory allocator a bit -- getting closer, need to hurry up, do benchmarks and ready a paper for submission! Updated the anonymous question handling software a bit, yummy Perl script getting bigger.. Got pointed at a discussion of occam/occam-pi on the Lambda the Ultimate weblog (programming languages weblog). Nice to see some happy comments about occam-pi, although changing the name would probably help to remove the traditional, and completely wrong, view of occam (of a redundant language for the Transputer).


Finally released KRoC 1.4.0 (for Linux/i386, FreeBSD/i386 and Cygwin/i386). Experimental support for Linux/PPC, Solaris/Sparc and Linux/MIPS. Subversion updates may have to wait a while -- power glitch this morning took out the machine hosting the repository, will wander in tomorrow and fix that probably.. Time to work on papers for a bit now.


Another week almost over, busy busy. Did a bit of hacking on nocc, but the need to write lectures suddenly preempted it (along with various other bits). Fixed a slight bug with forked mobilespace in KRoC; just one more thing I'd like to get fixed then 1.4.0 _will_ appear! (actually got a couple more small tweaks to go in before release). Discovered an annoying issue with ASP.NET -- some sites appear not to return a 'Content-Type' header, but do manage other 'Content-' headers; instead just having it in a <meta> tag in the returned HTML. End result is it causes my apache2 proxy to record a content-type of 'text/plain'; resulting in a pretty screenful of HTML in the browser.. Don't think it's apache's fault though, I wouldn't expect it to go rummaging through potentially binary data looking for meta tags (unless there's a way to tell it to in such cases, that I've not found yet).


Term in progress; relevant courses start tomorrow (today really I suppose..). No lecturing this week though, offset by more later in the term. Ran into some fun Windows vs. Linux stuffs (eWeek article). Trying to demonstrate that windoze is just as good on old hardware as Linux. The parameter space is so large that you could probably create a benchmark to produce whatever result you like... Although I've got a shiny black PC case with window, was looking at some funkier transparent cases (froogle). Which reminds me, need a new CPU fan or cooler-wotsit (noise). Did some more work on the MCSP portion of nocc, can now parse fun things like "SYSTEM (rope,party) ::= (rope -> SKIP) [] (party -> CHAOS)". Sensible code-generation still a little way off.


Some more nocc hackery. Been playing around with compiling CSP-like programs (well, just parsing to start with..). Also pondering about using the compiler framework to compile a BASIC-like language into RCX byte-code for the LEGO Mindstorms RCX. Will see how this goes -- hopefully it will be more beginner-compatible than NQC (I always thought that was simple, until I tried to teach it to a bunch of 6th-formers). I started programming using BASIC, and so did many others of my generation (when things like the ZX Spectrum and Amiga were must-haves for geeky teenagers). Don't see why it shouldn't still be good for teaching basic programming -- sure, it's an ugly language and doesn't encourage good programming practice, but as a starting-point it'll do nicely. Also been preparing for term, which starts this coming week; plenty of fun lectures to write. Operating-systems, concurrency and introductory-computing this term :-).


More hacking on the new occam-pi compiler. Added support for verifying signed compiler output with a public key -- appears to work ok :-) (also incorporated information from the .xlo/.xlb into the hash, so attempting to subvert stuff that way won't work). Got built-in PROCs and FUNCTIONs working a bit more reliably (with parameters and stuff); built-in functions are still a bit hacky.. Put in some of the ALT parsing bits, needs a fairly non-trivial grammar to cope with leading declarations though. On functional programming, this interesting link was circulated on a departmental list. Saw that LEGO have presented their next-generation mindstorms stuff, looks like cool kit -- mainly for the CPU and programming, the sensors/motors/etc. look a bit chunky.. (wired article, original slashdot posting). Also read about some cool new lensing stuffs (i.e. bending light).


Woo, 2006! Happy new year planet :-). Got the new allocator for KRoC mostly working now -- just a few fine-tunings to be done. Won't get merged in until 1.4.1-pre1 however. Nobody's complained about KRoC 1.4.0-final2 yet, a few updates have gone into it and 1.4.0 proper will appear soon. Think the world will just have to live with nested mobiles not quite working properly at the moment.. Did some more work on nocc, now managing to sign a digest of the compiler's binary output using libgcrypt. A fairly nice library for cryptography stuff I think, although the use of Scheme-ish S-expressions make me twitch (these are probably quite efficient at storing arbitrary data structures though). Could do compiler transforms using these, that might keep some of the functional programmers happy :-). Phill pointed me at an interesting article on Sony's DRM (and why it is an utter nuisancenuisance). Sure, piracy is a problem, but there's got to be better (and more socially compatible) ways to deal with it..


Churned out KRoC 1.4.0-final2, which will become 1.4.0 proper unless anyone reports any significant problems. Now time for some NOCC hacking. Pondering some serial-ATA disks and controller for the PC, although more CPU, memory and better graphics would probably be a wiser approach.


Christmas mostly done, got some cool things :-). Down to some serious hacking on various projects now.. Been putting some hours into the new occam-pi compiler, which is now begining to look more like a compiler -- appears to successfully generate code for basic programs, and some parts tested with KRoC. Very recently churned out a KRoC 1.4.0-final release, which should build ok on at least Linux and FreeBSD. The cygwin build is in progress (will take a few hours on the aged windoze box..). Also contemplating a binary-only distribution for windoze (needs some alternatives for shell-scripts). Updated the code for SDLRaster to use CIF and report some useful things (in the KRoC distribution) -- should even be able to close windows now! Also working a new allocator for KRoC (dynamic memory allocator), should allow inlining of the MALLOC instruction at last :-). Randomly, came across a fairly emotional website about Microsoft's 'ajax' thing here.


December already.. Experimented a bit with making a Debian package. Not an entirely trivial process, but seems to have worked for bintohex-0.1.1. Looking to get the KRoC stuff packaged up for Debian at some point (though that's a bit more complex). Finally released KRoC 1.4.0-pre3, with a much better installation layout. Also pops up with a pretty (ish) menu for configuration ("./build --reconf" to force it). This will, at some point, contain options for the debugging/developer stuff (e.g. tracing process activity).

Got a random moment and had a play with aeolus which, MIDI'd to my ageing Yamaha PSR500 keyboard (some folk are really keen on this keyboard), produced some pretty convincing organ noises. Also provided an opportunity to get ALSA support and Jack going. Also had some fun getting G3D to compile and work (have some sources that want it). That prompted installation of the proper NVidia drivers for the card (20 quid jobby). Display is a little more crisp, 3D performance just about survivable (fluffy XScreenSaver demos suffer a bit).


Weekend away, back to work now (although took today pseudo-off with cough/cold). UCAS visits start Thursday, time to prepare this year's material I think! (for demonstrations to parent and students mostly). Came across an article about why Java is slow, made a lot of familiar sounding (and quite correct imo) arguments. Also an interesting Slashdot posting about where/why LEGO Mindstorms went wrong. Poked around a bit more with mobile processes, CIF and the application-link-layer; now got a mobile integrator serialising, being sent over a socket, plugged in at the other side and continuing happily :-). Fixed a couple of bugs along the way.


Poked around with the "application link layer" for KRoC a bit more, heading towards getting mobile processes through these -- but before that, some mobile-process code for CIF needed (under construction..). Had the FIRST LEGO League competition at the University today, executed successfully on the whole :-). Unfortunately campus had a power-cut as we were packing things up, seems to have upset one of my office boxen somewhat. At least the occam web-server (really an occam-pi web-server) is back up and running. Purchased a shiny new case for PC, with window, pretty lights and all that ;-), just needs a quieter CPU fan now..

Did some random hardware hacking the other day. Successfully duplicated another of the temperature sensors -- the self-calibration bits were a sensible inclusion. But now fast running out of Atmel AT90S2313s. Currently trying to get an AT90S8515 and ATMEGA32 working on the RS422 bus right. So far it seems the 8515 suffers a bit too much with data-error on its serial port, whereas the 2313s were ok.. (problems attributed to 9600 baud using 4 MHz crystals). Either new cystals or fiddling the current circuit with a variable wotsit to get the right frequency.


Another busy week.. Did get around to updating the RMoX website though (also added to the subversion repository, which isn't public, yet..). Got mobile processes working a bit better, can now suspend and resume in different (OS) processes correctly (going via the disk at the moment). On complex serialisation, only deals with flat dynamic mobile arrays at the moment (any number of dimensions though). Created some /etc/magic runes to show basic information about suspended processes (may be subject to change, but versioned). Also did some code for the network infrastructure, though it may get quite complicated.. Probably easier to get mobile processes travelling through the ALL (application link layer) first.. Currently adding some support to load code at run-time (not too dissimilar to the code used by the "dynamically loadable processes" stuff, which may end up being deprecated for mobile processes -- language vs. library). Also fixed a couple of minor bugs in KRoC.


Shelves finally arrived in the office; thank-you estates :-). Still sorting out the various piles of crap though -- even found my old undergraduate notes! Did a bit more prodding around with mobile process serialisation, real code is mostly fine, the awkward bit was the inline ASM that implements SUSPEND; but now have a fairly general mechanism to drop workspace-map and code-map indicators in code. Pretty output from a test program here. Most approaches to code serialisation I've seen do it at some byte-code level (Java, .net and others), which is fine, and easier, but not an approach I like particularly (way too much overhead).


Another week commences. Did a bit more PowerPC prodding on KRoC; now at the point where if segfaults in an ugly manner, making debugging a bit more awkward. Shouldn't take too much extra work to fix these though :-). We (concurrency research sub-group of the systems research group) resumed our weekly meetings today, most useful. Matt pointed out Microsoft Research's "Singularity" operating-system; not totally unlike some of the ideas in RMoX. Speaking of which, I should update the web-pages at some point (and move them up a level). Adam has now got basic TCP/IP shell access to RMoX working (via his TCP/IP stack and a simple telnet server). I prodded around with the "proc" file-system some more, but not committed the changes yet.. Could really use a set/hash-map type in occam-pi, makes dealing with dynamically stetchy things less of a pain. The sensible way is probably through a user-defined type that calls into C/assembler code to do the nasty (and efficiently). Does mean having some mechanism to overload the "SIZE" and array-sub operators in occam-pi, and maybe a replicated SEQ that can iterate over these things (and replicated PAR, ALT (for synchy things) and IF too ...). In the CRG meeting Damian mentioned about getting some work out of the various vector engines (typically SIMD) found in modern CPUs (e.g. i686, SparcV9, POWER5, and undoubtedly a whole lot more). May end up specials that call out to C/assembler using the foreign function interface stuff he did.

Most of the weekend spent prodding the workspace and code mapping in the compiler/translator/run-time. Now have a functional workspace-map and code-map for the compiler built-in "MPBARSYNC()" PROC, that gets called when some process does "SUSPEND". Slightly ugly because it blocks in the inline [transputer] assembler. Also updated the pretty colours when displaying workspace maps (colour indicates what type of entry it is..). Shouldn't be too long before a mobile process can be suspended, lobbed over the network, and re-plugged-in. More to the point, it shouldn't matter if the code is at a different position in the target, or even if the code resulted in a different translation. Even different targets aren't out of the question (though mobile processes are only tested on IA32 at the moment!). Endianness issues mean generating two copies of the ETC code when that needs to be shipped with the suspended process; not a massive overhead (in the future, probably a default little-endian and a binary diff for big-endian) -- or some mechanism in the output to allow the translator to select between big-endian and little-endian code (what the compiler generates isn't massively different).


November already.. noticed Sainsbury's christmas-enabled last week (overlapping with halloween a bit). Been doing lots of work on the PowerPC version of KRoC (just for Linux at the moment, but OSX shouldn't be too much of a problem -- mainly a different register-usage convention). Also thinking about a CELL port of KRoC, for when that hardware becomes widely available. The PPC port now does basic arithmetic OK (including overflow checking where relevant), and a reasonable amount of floating-point. Will bring the T9000 book home for the weekend and finish off the long-arithmetic translations (which seems to be breaking some things for sure). Put together an updated report (PDF) for the OpenPower Project people (kindly providing access to the Linux server I'm developing on).


Got the PPC version of KRoC to do some more basic things successfully. Probably need to adjust the translator a bit to make it more condition-code-register aware; somewhat more explicit on the PPC and Sparc than it is on Intel. Things fall apart while building the Inmos libraries now (unsuprisingly). Updated the VPN router box (PC) to Linux 2.6.12. Had some fun building the CIPE module for it, but found this handy patch, though it needed a little adjusting for the 2.6.12 I've got (debian-ized).


Another busy-ish week, nearing the end now. Planning on a week in Denmark in the not too distant future, largely for research :-). Put some time into the Sparc and PPC ports of KRoC. Sparc version can at least run hello-world and exit nicely. PPC version, just very recently, managed to produce "hello world!" correctly, followed by infinite screenful of crap. Think it was trying to print the application code, for some silly reason (various run-time messages popped out along the way). More prodding over the weekend probably too.. Also did some small bits of work on the application link layer (ALL) for KRoC (allows occam-pi programs running on different hosts to connect mobile channel-types to each other). Checked into the subversion repository now, which definitely seems to be paying off :-). Adam's been poking around with the IP stack in RMoX a bit; I tried to fiddle something, but broke the console process.. Did a spot of NOCC hacking too, slowly getting there with replicated PARs -- did add a constant propagation pass to it, at the moment so replicated-par can ensure it's count is constant (for memory sizing); need the relevant gubbage in the back-end now..


Moved some machines around, now got the desktop on UPS, "frog" downstairs being RAID1 disk, "teddy" dismantled and ready for the tip -- at least it had a good innings :-). Took all the hard-disks out first for "data protection" though ;) -- they'll go in the bin after having a nail or two banged through them, or dismantled and the platters used coasters. "Platter Frisbee" is always an option for old hard-disks, but should only be played with full-body armour ;-). Clay^W HDD pigeons..? Did some work on KRoC, mainly to support CLAIMs on whole dynamic-mobile-arrays of shared-mobile-channel-ends (these types are getting a bit of a mouthful now!). Released KRoC 1.4.0-pre2, changelog, etc. on the KRoC pre-releases page. Couple of updates went into the SDLRaster library too (and a reference manpage for it). Did a bit of work on NOCC, adding a constant-propagation pass and a compiler-only "CONST" node (separate from constants in language-specific nodes). Beginning to think again about the PowerPC port of KRoC, especially since some form of CELL processor will be on the shelves in a couple of months (hopefully!).


New machine all happy and dandy now. Graphics card worked on the second attempt, after blowing the dust out of the AGP socket.. After some fiddling around, also got the lab machine to use its dual-head NVidia card :-). Extra large desktop now, though it does behave slightly oddly with afterstep's window-paging mechanism. Found this helpful page containing the necessary sample configuration to get it working. Full marks to NVidia for producing an installation script that actually worked this time :-) -- previous versions of their installer had tended to fall apart on my Debian boxen. Fiddled around a bit more with NOCC, now almost a functional compiler (for smaller programs). Had a chat with one of my colleagues about the uglies of using C for it, and why I stayed away from C++; mainly because I ran into problems previously with delete-ing and object while in a flow of control that's going through it (and in many cases, that can't be decided at run-time, so you end up doing daft things like maintaining a queue of object references to be deleted later, when it's known that none of them will be involved -- disadvantage is that some correct typing must be recovered -- less of a problem if every object descends from some common ancestor). Or use a garbage-collector. Though I think garbage-collectors are in the large very useful things, particularly for languages that really need them (functional, declarative, scripting), I prefer explicit freeing if it makes sense in the language, which it does for C. C++ is a bit more borderline..


Extra memory installed in new PC; done a bit of hacking and still 645 megs unused :-). DIMM installed without any problems, although I now have a spare 512MB PC2100 DDR-266 184-pin ECC DIMM.. Have to reboot my lab boxen at some point anyway (well, kill the X server, so might as well reboot..). The 2.4 GHz P4 is massively faster than the previous 800 MHz P3, although this one isn't hyper-threaded. Commstime benchmark didn't report overly happy figures, but I think my build is polluted with extra cruft at the moment. Did some more library-usage support in NOCC -- looking much happier now :-). Not quite tested yet, but will see to that this-evening sometime. New AGP graphics card should arrive tomorrow or Wednesday, then no longer using frog as an xterm.. :-). Nor FVWM as a window-manager (sawfish support for viewports appears to have been removed/disabled in debian, hey ho..). Came across a fairly handy page about window-managers while looking around. Afterstep appears distinctly unhappy over a network..


After about 10 years, I have gotten myself a new PC :-) -- as in a PC belonging to me, rather than the university. Nice 2.4 GHz Pentium-4, freshly kitted out with 2x 80 GB disks, with RAID1 mirroring. Another 512 MB of memory for it should arrive early in the week. Only a few minor quirks during installation and conversion to RAID1 -- the main one being that when I copied / over to the MD device, /dev/ got missed out because "udev" is mounted on it. Result being that when booted with "root=/dev/md/1", the thing hung with "Unable to open initial console" (not suprising as it's "/dev" was quite empty..). Other nugget is that re-synching the disks is taking a long time -- I started it about 10 hours ago, still going. Problem is a slight lack of DMA (PIIX driver really wants to be in the kernel, not a module); will fix that tomorrow.. Then it's just a case of copying my home-dir and assorted crap off "frog" (current desktop) onto "tadpole" (new desktop), wiping "frog", installing spare 20 GB disk, more RAID/MD fun, moving stuff off "teddy" (previous desktop) onto "frog", and finally taking poor "teddy" to the tip :-(. Been a trusty machine, but not much room for a Pentium-133 with 64 MB ram these days..

Did some more work on libraries for NOCC. Almost at the point of being able to #USE a library successfully.


Just to follow up from the earlier waffling, the gist of the story is not that object-orientation is bad, or is somehow better or worse than concurrent process-oriented approaches. More that something breaks when we try and apply object-orientation in certain situations. Indeed, object-orientation and process-orientation might fit together in a sensible way.. The occam-pi compiler already supports protocol inheritance (and I'm inclined to leave it at that). I'm also inclined to think that the majority of problems (e.g. the petrol station example described) arise from trying to force a single thread-of-control through a design that would be better supported by a concurrent implementation (and incorporating those concurrency aspects naturally into the design -- e.g. pretty process-network pictures); how one deals with concurrency and threads of control in something like UML isn't entirely clear to me. And if you can't reason about these things in your design, prepare for problems and ultimately failure.. UML does, however, allow us to design linked dead data structures (or "class hierarchies") and without too much effort turn these into code; just don't use it with concurrency.

Slightly outside the OO realm, I got thinking about how code, data and control-flows interact. There are some interesting models of how these can work. For C, C++ and Java, programs tend to be single control-flow winding its way through functions/methods using a call/return mechanism (the linear stack keeping track of function calls back to the top -- "main()" -- or history of the control-flow). Threads just multiply this up -- you get lots of control-flows each with their own stack. This is actually fairly rigid in my opinion -- you can't go changing things on the stack to make the control-flow take a different route back (although you can do some interesting things if you force it -- big danger signs though ;-)).

Over on the other side of the playing field there's occam-pi. Here things like stacks aren't so interesting. The system is constructed of many concurrent (parallel) processes communicating through channels (think cardboard boxes connected with pipes, each box containing a person who sends and receives messages through the pipes connected to that particular box). Each process is, in effect, it's own thread of control -- but it can only run around inside that process, not suddenly jump elsewhere (one of the people in a box climbing out, moving to a different box and intefering with it). The problem of "two people in a box" will frequently arise in threaded C, C++ and Java programs (and we have to resort to locks to prevent more than one person being in a box at a time -- yuk!). Occam-pi has the advantage that creating and running parallel processes is cheap -- e.g. a system can happily contain 1,000,000 processes. Threads tend to fall apart after a couple of hundred.

In another corner of the control-flow playing field (it may be a multi-dimensional playing-field with more than 4 corners ;-)) are functional and declarative languages. These effectively detatch control-flow from the program logic, meaning we don't usually have to worry about it at all in these languages. Things get slightly ugly when interfacing these languages to others -- e.g. making system-calls for socket I/O -- since the language must somehow cater for their control-flow needs (can't go writing data to a socket before it's been opened).

Another corner houses more interesting languages such as the Polyphonic C# (now called C-omega). The logic of what goes on here with concurrency is, in my view, non-obvious. It is however quite interesting and able to express some concurrency problems quite easily. In the way that occam-pi is based on the CSP and the pi-calculus, C-omega is based on the Join-calculus. I've got parts of a model for turning Polyphonic C# code into occam-pi process networks, but it's not yet complete.. The fact it can be done is interesting in its own right (and I suspect without any significant loss in efficiency). Whether it goes the other way (turning occam-pi networks into Polyphonic C# code without knackering efficiency) is left as an exercise for the reader.. (I don't think it does, but I'm not an expert on the Polyphonic C# ;-)).


Spent a good few hours (probably too many!) on the library code for NOCC. Now produces some nice XML describing the contents of a library (as well as other useful information, such as what to automatically include when a source file #USEs the library). In effect, the compiler becomes the librarian as well, which I don't think is necessarily a bad thing (it's only the librarian for the "virtual transputer", so doesn't involve real code -- that goes down the normal route via ld to produce some ELF fileage). Beginning to fill out some of the other compiler parts. Next up is probably some sensible constant handling (a.k.a. constant propagation). Will probably need to add another parse to the compiler to do this -- not a problem, parses have proved relatively cheap thus far :-). The compiler should now parse something reasonably large, but not tried it yet.. At least it generates working code where it should. On the regular KRoC front, fixed a couple of bugs in the compiler -- related to mobile channels mostly. Also did some systems research-group admin, updating the conference database (now mostly a case of recycling old conferences and checking their details).

Had an interesting debate (of sorts) with Phill on the application of formal design -- more its relevance really. Conclusion: there's definately some issues in the real world stemming from busted systems design. There would seem to be two problems in systems design: deficiencies (things a specification/design is lacking which lead to badness), and defects (things that are just "wrong" in the specification/design). It also doesn't help that in most cases there's a fairly big leap from formal-specification to implementation -- some human usually interprets the specification and produces an implementation. And that human element introduces its own problems (natural programming error). There are also other problems introduced, which may be harder to fix: those caused by the specification/design not mapping cleanly onto the implementation, or failing to describe some artifact in the implementation that has consequence for the design. In my opinion, a good example is someone taking a UML diagram/specification/design of some system, then attempting to implement it in an object-oriented manner using a language such as Java. For systems other than the most basic, problems will emerge that were not thought of, less likely even to be considered, at the design stage. I'm of the view that object-orientation describes "dead" data very nicely -- and inheritance/overriding allow us to do useful and sensible things with operations on objects. But as soon as "live" data is introduced, problems start to emerge.. (I'm waffling a bit here, but never mind..).

Take the fairly common "petrol-station" example. One of the objects it usually ends up with is a "PetrolPump". For a "Car" (which will typically be an interface/abstract-class, demonstrating inheritance/polymorphism) to fill up, there must be some interaction with the pump. The obvious way to do this is to give the pump a "fillTank()" method, which is called from somewhere inside the implementation of a "Car". In its basic form, this means that the "PetrolPump" must be completely passive (i.e. dead) -- the Car initiates the interaction by calling its fillTank() method (and for now we'll assume that the pump will co-operate). In reality, even this simple interaction is not so simple -- the pump has to fill up the car somehow, and that affects some property within the Car. Two ways out in my view: give the Car a "fillUp()" method, that the PetrolPump can call -- which means we have to give the pump a reference to the car (probably through the "void fillTank (Car thecar)" method); or way-out two: let the pump return the petrol, e.g.: "int fillTank ()", and whatever was trying to fill up deals with it internally. The latter of these definitely sounds simpler (and is probably what I'd end up doing), but the former is more in keeping with the object-oriented nature of the system. Which route is taken has consequences both ways, and none of them are entirely satisfactory. Filling up my "Car" implementation is not going to be a problem either way, but what if I just want to squirt petrol over the forecourt ? The return-a-value approach allows this (it just says how much petrol came back); the call-a-method approach does too, but only if I involve a "ForeCourt" object that has a "fillUp()" method (meaning petrol dispensed over the forecourt). If the more object-oriented approach was taken, the system becomes quite rigid -- e.g. the "PetrolPump" can only give petrol to things that were designed to receive it (which may be no bad thing in a real scenario!). Another problem is encountered if we wanted to allow a limit on the amount of petrol that can fit in a tank. If a value is returned from fillTank(), we are effectively left with excess petrol, which needs to be given back to the pump somehow ("unusedPetrol()" method perhaps ?). Similar problem if a fillUp() method is called in the Car -- it would probably need to call an unusedPetrol() method too.

And that's only considering a fairly simple setup of such a system! Imagine if we had two "Car"s.. Most of the problems in the former paragraph arise because the object-oriented paradigm does not fit well in the way we're trying to use it -- particularly, to model interactions between a car and a petrol-pump. Concurrency is the real issue of interest here. Both the "Car" and the "PetrolPump" are live, independant, objects. Even though the PetrolPump may appear quite dead from the outset, it becomes very much alive when something starts interacting with it. Unfortunately (and to the expense of much software engineering) the design techniques used (e.g. UML) tend to break down when concurrency is introduced. Of course, people who know me will know I'm a strong supporter of the process-oriented approach (so I'm biased anyway ;-)), where all "objects", both dead and alive, and their interactions, are modelled and implemented as layered networks of active communicating processes. Sadly, implementing this behaviour in languages such as C, C++ and Java is not easy; the native mechanisms provided for concurrency are woefully inadequate. Rather, one must use concurrency mechanisms that allow a clean mapping of the design onto implementation: JCSP for Java, C++CSP for C++, and CIF for C. Ideally, one would use a more native language (that can apply relevant checks to the use of concurrency), such as occam-pi, but for the time being the world seems happier with Java.

For the petrol-station example, the action of filling up the car is no longer a "fillTank()" method call, but a higher-level concurrent interaction between two particular "Car" and "PetrolPump" processes. Interaction is still initiated by the Car, but both are quite alive -- the PetrolPump would be "actively" waiting (e.g. that is a programmed behaviour in the pump, not the completely passive and mostly uncontrollable public-method it was before). The difference is that the pump now has some level of control -- it could refuse service if it so desired. Also, we can model/implement the interaction in a more finely-grained way, and one that better reflects the intended design: car contacts pump, pump returns some mechanism to provide fuel (mobile-channel in occam-pi, reference to a channel in JCSP), car starts requesting fuel, pump provides it down the "pipe" channel, loop until tank full then stop requesting. Or we could go for something basic: car requests fuel, pump signals back indicating amount. In hindsight we can use some things discovered here to better the earlier (and in my view, fudamentally broken) object-oriented implementation: e.g. car requests single units of fuel repeatedly until full, which removes the problem of returning unused fuel (and the consequent potential problem experienced by a second car, which is the pump appearing to have no fuel, but only because the first car hasn't given back its excess yet -- but if that game is being played, concurrency is probably out of control, or heading that way).

Could rant on about deficiencies of threads + locks (in my opinion), but I think that's enough for tonight.. time for more coffee and some hacking.. :-). Some day I'll form these thoughts into something more coherent..


More NOCC hackery, but definitely heading in the right direction now I think :-). Hit 30 kloc the other night, maybe not a good thing..! Now generates slightly more sensible code for FUNCTIONs, still a bit incomplete (can't do function results yet, which is kinda crucial for occam-pi). Also put in some of the MOBILEs framework -- and this compiler should deal with nested mobiles much more effectively! Open-day went well, if midly fuzzy due to beer+pool consumed the night before ;). Started pondering about how to deal with libraries in NOCC, some code may appear before too long.. Part of tomorrow set aside for bug-fixes in the existing KRoC, couple of things that need sorting out.


Moved the RMoX subversion repository -- bit messy but went across eventually. Also added UWG and RAPP sources to the repository; new mailing-lists setup to catch the commit log messages for these. Finished off slides for the open day, mostly. Will be running some occam-pi stuff, the Assembly '04 DVD (assembly home-page), and maybe a LEGO robot (just follows lines, but much fun to watch!). More NOCC hacking (including documentation updates); put in some more of the framework for occam FUNCTIONs, also added a deferred target capability to the parser (used when constructing DFAs) -- could be a bit more clever with this, but I'll leave that to a project student or something :-).


October escaping..! Played around more with FLL scheduling and planning, yay for GNU Prolog. Although, the last time the constraint solving got too hard it took longer than making-a-coffee and got killed (unfortunately the version I'm using on my slightly battered Debian box segfaults when aborted). Spent a good many hours over the weekend/Monday preparing some slides for the University Open-Day (come along and see fun occam-pi things!). Wrote lots about the better-bar simulation, mostly pretty pictures :-). Found a bit of time for NOCC hackery, can now do cool things like "#OPTION "c-operators"" to use C operators instead of occam-pi ones.


Hello October! Fixed up a few things in KRoC and released KRoC 1.4.0-pre1; still got some outstanding bugs to deal with at some point.. (mostly related to nested mobiles, so be cautious when using these!). The two that are deemed to work sensibly are dynamic mobile arrays of dynamic mobile arrays, and dynamic mobile arrays of mobile channel-ends. Sticking mobile fields in mobile record structures may have undesirable effects (usually a segfault at run-time). Hacked around with NOCC some more, added Adam's suggested syntax for a "short if" (good for programmer compatibility). Also added some parser bits for IFs, ALTs and the like (structured processes). Hack-list for tonight is a bit more on these, plus some lexer updates (e.g. searching directories it's been configured to use).


Mostly finished playing around with the Prolog; hacked up a quick C program that takes the output from the Prolog program and produces a nice timetable using LaTeX's PSTricks package. Fixed a small bug in the existing occam compiler, well, half fixed, generates working code again but something's not quite right somewhere. Got a small list of bugs that need looking at -- some with nested mobiles might have to wait until the new compiler gets finished..


First week of term, all go here (although the lab seemed strangely deserted today). Been playing around with GNU Prolog to produce a schedule for the up-coming FIRST LEGO League day at Kent. Slowly recovering the mindset for constraint programming, and in this case it's a fairly complex (and very real) problem. Also did some NOCC programming. Currently got VAL constants half-implemented. Some mild unpleaseantness still to cure -- the constant on the RHS must go through the back-end stages. At the moment, the name-map phase dismatles the VAL abbreviation and turns it into a name requiring space (losing the RHS in the process). Made a note to remind the research group to come up with some seminar presentations :-). Got a couple in the pipeline, but need more -- we're all doing interesting research, but seem reluctant to talk about it! I'll be doing a NOCC one for sure once some slides get written (more of a "fun hacking" seminar than true research).


Still progressing through stargate (on series 3 now). More NOCC hacking too, thinking about how to deal with the pre-processor -- will probably still be internal, as that can produce better error messages. Started putting together some tunes into a virtual CD thing. Also caught up on some sleep :-).


Stargate seasons 2 and 3 arrived from Amazon, yay. Weekend and doing some hacking on NOCC; replicas of Jim's INITIAL declarations in progress, could have used some abbreviations first though. Churned out a mostly finished version of Overcurrents, had a little play around with some post-processing in Audacity, but didn't include them in the end. Will probably get the effects I want through Jack & co. (Azz had some good links). Pondered some more about object-orientation and its issues.


Back from the Communicating Process Architectures conference (CPA-2005), much fun, learning, fine food and beer had, much sleep lost. Managed to walk away with the best paper award (somehow!), largely for the work on CIF and its applications. Will do the business of putting papers (and probably the presentation) on-line at some point; got back to a pile of 90+ emails (1 spam) and I think the rest of this week is full. New students arrived this week, need to see tutees and things like that. Had a good listen to my Irakere CD on the way there/back -- thanks to Azz for driving to/from the airport. Also thanks to Maggy, Harold and Peter for organising another fabulous conference, and of course, the speakers, delegates and other organisers/administrators. Had some interesting experiences with raw meat whilst out there (which actually made very tasty food), don't think I'll ever brave Sushi though.


Finished off slides for CPA-2005, unpacked some more of the office and did some admin things. Post slides, more NOCC hackery. Added a new mapping parse for handling the new-ish RESULT back-end nodes (used in expression handling). Although the infrastructure is a bit of a mind-full, it should make handling things such as pre-evaluation and common sub-expression elimination much simpler. Simple test programs that do basic arithmetic on BYTEs and output to the screen appear to work properly :-). Anything beyond simple will break horribly at the moment, though.


More NOCC hacking, beginning to think about how to code-generate expressions sensibly now -- recently added a back-end "RESULT" node, introduced in the pre-map parse with indicators of how complex evaluation is (in terms of registers). The plan is to pretend that these are almost a type of function-call, that can take parameters in the register stack and/or workspace slots (preference for registers :-)). Currently writing slides for CPA, looking quite fluffy now.


Mostly installed in new office now, just about fitted everything in :-). Shelves will arrive soonish, limited access to shelf-stuff until then.. Got all machines back up and running (minus Indy, not enough power-points, yet) -- could really use one of those keyboard/monitor/mouse switch things.. Did some more NOCC hacking, changed the DFA stuff slightly to allow initial matches from other DFAs that don't push the DFA state; that's sorted out expression parsing for now, and simple things like "x := 2 + 3" parse properly, yay :-). Still lacking type-checking, parts of mapping, and code-generation for these. Also writing slides for CPA-2005, about a week away. Kudos to the postgrads who helped me move today, even learnt how to take the drawers out of the filing-cabinet. Amongst other things, fixed the serial numbering in's SOA records -- since the machine got wiped out, had been counting from 1 again. Unfortunately cached with a much higher serial-number in other authorative servers -- now fixed.


Weekend, and hacking. NOCC can now parse structured DATA TYPE declarations, but still need a mechanism for handling accesses via subscriptions. Azz had some thoughts about more natural (w.r.t. C-like languages) record-subscription syntaxes; will probably be a good test of changing the language grammar in the future.. Fiddled around with a new tune, Overcurrents, under construction but heading in the right direction :-). Half of office packed up, looks like some of the postgrads will be helping me move (following the "will work for food and beer" philosophy ;-)).


Carpet installed in target office, will have to pack up existing office and move shortly, bleh, all those machines! Got basic DATA TYPEs working in NOCC, kinda. Not structured types yet, though.. Prodded the anonymous questions software some more, now has a "pending questions" page, to see what questions are waiting for replies. Probably about time to buy the Perl Cookbook.


Processed a load of the inbox, back to under 100 messages, yay :-). Small hack to KRoC to make it use ":" as the path separator in environment vars instead of space or a semi-colon. Prompted by Christian, who pointed out that it causes a whole raft of problems on Windows systems where filenames have whitespace in them (which is more trouble than it's worth, imo, but heyho). If people want to attach descriptive comments to files, then they should use a file-system that supports such meta-data.. (such things must exist, surely!). Played around in soundtracker some more, bits of tunes in progress. Stargate series 1 on order from Amazon.


Another round of NOCC hackery, got RESCHEDULE() working as a built-in PROC. This compiler probably won't be any smaller than the existing one (in fact, probably larger), but should be less complex. Still need a sane way to edit DFA graphs for the language grammar though.. Weather still a bit warm, hurry up winter :). Setup anonymous question pages for CO527 and CO631, with some more updates to the scripts.


Ker-chunk, another month gone. EPSRC first-grant proposal submitted, many thanks to those who provided help/feedback/assistance. Spent a bit of time over the weekend hacking the new occam-pi compiler (NOCC). Now got PAR nodes kinda working -- some fairly straightforward parallel processes run ok :-). Some mild ugliness sorting out the STATICLINK, but hopefully it'll hold water..

Hacked around with the Anonymous Q+A software a bit more. Now generates a submission reference and signs the outgoing email with the question. Some procmail hackery catches these replies, checks for a valid signature, then builds the individual question and answer files. A tad crude, but should be good enough to speed up simple answers. Mutt, pine and NMH should do replies in a compatible way; very plain-text, very basic..


Hello August, bit sooner than I'd hoped however. Research and random hackery side-lined for a bit, working on EPSRC "first-grant" application and PGCHE portfolio. On a positive note, learning lots of interesting things about educational theory; how students learn, how best to approach different styles of student learning, etc. Picked up an interesting book on "the philosophy of education", which although probably irrelevant for PGCHE purposes gave me a healthy dose of philosophy :-).


Another week floats by.. Largely finished CPA paper(s) now, just as well, since the CR deadline won't stretch much further! Been reading some interesting things on educational theory, which I should probably have read a while back! A big wall-poster with essential elements of teaching and learning would be nice :-). Spent a bit more time with RAPP and UWG. Now have the beginnings of a RAPP application-server, to which clients can connect and get files/directories (actually starting applications is next..!). On the client-side, socket I/O back-ends into the UWG file-layer fairly nicely -- well, it works! Got the UWGXMLParser gadget working, though it doesn't make any attempt to undo &amp; type things.. The XHPD parser guts (shared between various bits of code) will now use either expat or UWG's own. On random things, made a nice beef madras today, yay for the slow-cooker!


updatedb running; everything else slows down so waffling here. Been PGCHE-ing quite a lot recently, need to kick up a gear this week though. CR deadline for CPA-2005 as well, arg. Also doing some random hackery on UWG and associated things. Mostly got a new file abstraction layer into it, which will allow vaguely cool things (e.g. specifying "" or "stream://stderr" as file-names inside UWG). Not done these two just yet (only "file://" and "builtin://"), and maybe it'd be better just to call out to "wget" (or other user-configurable downloader) -- that needs the "running programs" bit of WG to be transplanted into UWG. Need to fix something a bit broken in its select() loop first (UWGISockCli stopped getting data). Also changed the way the preferences file works (vaguely safe, went from "wg_prefs" to "uwg_prefs", new format looks vaguely like SNMP type data). Fluffy new "UWGSpecsFile" loads/saves such data into a "UWGStringTree", grottily built out of string-hashes, but quick.

As a random side thought, someone should just make Linux handle "http://" and "stream://" type file-open requests transparently, with an appropriate user-space wotsit chatting to a plug in the kernel. Probably grotty issues with user-ids, passwords, etc. though (if we want to be nice and secure). The "podfuk" stuff (aka user-vfs) wasn't far away, so it's possible someone may have already done it..

Devised a silly and cunning game with the UWGVGraph widget in its "box node" mode: given a random graph of box-nodes and edges, where the edges emerge from fixed places on the boxes, re-arrange the nodes on the screen such that no edge crosses another edge or a box; the only useful operation (apart from dragging nodes around) is rotating the edges on a node. This problem is probably NP-hard.. Starting point would not exactly be "random", it would be the randomisation (of placement and edge-rotation) of a random solution (which isn't completely easy to generate, but not impossible -- probably about as hard as testing a solution for goodness). One of those games where complexity increases exponentially (or more) with the linear addition of nodes and edges. After playing around the other night, 7 nodes and 20 edges is pretty damn hard (Dave gave up in the end, but is was probably a non-solvable one ;)). Once UWG is unbroken again, might try and wrap this up ;).


Took a break from work over the weekend and did some random hacking. Fiddled about with the new occam-pi compiler (NOCC) some more; now generating something that resembles Transputer-code. Also had to tweak tranx86 a bit to read textual ETC files, and to cope with the new PROC calling model. Added a "visual graph" component to UWG, the idea being that this provide two things I've been wanting for a while: a wotsit to lay out DFA and other arbitrary graph-type things (manual placement or force-directed layout); a visual occam-pi process-network editor thing.


Released KRoC/Linux 1.4.0-pre0. This one should hopefully for most people, also added "SDLRaster", an SDL equivalent of DXRaster (more or less). For some reason, DXRaster doesn't work on my Linux anymore (not entirely sure why yet..).


Still a bit clogged up, damn bug things.. Had a long round of pthreads bug-bashing for KRoC/Linux, CIF stuff now actually works again :-). Almost got the "application link layer" working (for getting occam-pi programs chatting over TCP/IP), not very advanced in the first instance, but should be enough to get things moving. Tidied up a few pthreads related run-time kernel bugs too, now goes through valgrind pretty successfully. Slowly heading towards a 1.4.0-pre0 release of KRoC..


Back from PDPTA 2005, good conference all in all; lots of interesting people. Even won $1.00 on the slot-machines in the Las Vegas Hilton :-). Didn't brave the card tables, maybe next time (and once I've learnt some of the rules!). Unfortunately picked up something slightly nasty in the plane.. recovery in progresss, yuck. Bit of an email backlog, to be dealt with once I can think straight again.


Machine mostly back together, woo :-). One paper submitted for CPA 2005, another in progress. Spent a fun day at Queen Mary the other day (although possibly a bit sleepy..), talking about potential fun occam-pi things. Currently writing slides for PDPTA 2005, should be a fun conference. Also did a bit of hacking to get our cluster nodes to chuck graphics over the network to something that can display them, looks promising! Ack to Adam Sampson who helped out a bit here; I may get the UWG client finished at some point, we'll see!


Slowly putting back together after disk failure. Not entirely unexpected though -- it had been running continuously for more than 1000 days! (++ for Linux reliability). Switched from sendmail to exim, gradually getting to grips with the way it works. Still think a nice occam mail-server needs to be written (but need the pretty graphical process-editor first), then mail routing should be a lot more obvious..! Getting a graphical tool working is kinda lined up for summer-hackery. After the Vegas conference at the end of the month it's PGCHE time, since I really need to get a move on with that. Then fun hacking and research proposal writing.


Finished marking exams, yay :-). Mild celebration with some hacking. Was thinking again about UWG and RAPP; added a bit of rationale to the RAPP page. Just need a bit of time now.. Fixed a small bug in KRoC (occ21), hopefully will get a new release out before too long. Currently fiddling around with the "application link layer", demonstrator for the occam-pi C interface, that'll allow basic client-server networking of mobile channel types.


Still marking exams.. (and examining final year projects). Then back to papers for CPA-2005, fun one on the C interface in progress. Also need to deal with some emails at some point, so if you're waiting for a reply, it'll appear soon :-).


PDPTA papers submitted and accepted :-). Working on a couple of papers for CPA 2005, slightly past the deadline.. and marking exams.. Did find a moment or two a week ago to fiddle around with nocc some more. Once exams and papers are out of the way I'll get back to it..


New monitor proving worthy. Been mostly working on papers for PDPTA 2005, which are now all done I think (hope)! Back to a bit of coding now I think.


Trusty old 17" Wyse x-term monitor finally died, screen went fuzzy briefly then some magic smoke escaped. Bought a shiny new 19" monitor tho, Iiyama one, "fixed" wasn't too crisp at 1600x1200, but works a treat at 1400x1050 :-). Marking the CO501 MOSS assessments, 143 people appeared to have chosen the "file copy" utility, urk.. More KRoC hacking, cured a couple of separate compilation problems. Putting together a very basic "application link layer" thing to allow KRoC programs to talk to each other over the network. Also a good test of the CIF stuff, since everything behind the application happens in C (easier for pointer-bashing, but completely unsafe ;-)). Also hacking out some of the new occam-pi compiler (nocc); currently fiddling around with the workspace/vectorspace/mobilespace allocator.. Matt Jadud gave us an interesting talk on a mini occam compiler he had hacked up in Scheme, definitely some ideas worth recycling for the new compiler there (which should work, given the audacious use of dynamics and pointer abuse in nocc).


Released a new version of KRoC/Linux (1.3.4-pre8), usual round of fixes/updates, including improved game-play in the bar demo, MOBILE BARRIERs, type-descriptions, user-specified channel-type operations, CIF updates and various other things. Didn't quite get around to doing some of the things previously planned for the weekend, oh well, this week..!


Added a ProcFork to the C interface in KRoC (CIF), along with various other occam-pi related bits and pieces. Putting together a bit of API documentation for this, so people have actually got some chance of using it ;). CIF commstime (sequential delta) is currently around 160 nano-seconds on my P3-800, and 98 nano-seconds on a P4-3200. Also added support for mobile-channel type-descriptions, allowing external code to "probe" the insides of a mobile channel-end (largely so that a generic ENCODE.CHANNEL and DECODE.CHANNEL are possible). Usual bug-fixes here and there, heading towards a 1.3.4-pre8 release slowly. Some improvements/fixes to mobile barriers.


More KRoC hackery. Got MOBILE.CHAN parameter passing half-done, should be quite useful for interfacing with external code, since the type-hash gets passed as a hidden parameter. Got Xbox, got GTA3 + vice-city, much fun :). Haven't found the dizzy compilation for the Xbox yet..


Put together KRoC 1.3.4-pre7 (should do Linux, FreeBSD and cygwin). Still going on MIPS and Sparc ports, but in progress. Added a few more bits and bobs to CIF, in particular there are now some example programs that communicate and parameter-pass mobile channel-types between C and occam. The mapping in C for occam-pi channel-types isn't entirely pleasant, but it works (including shared channel-end semaphore claim/release). Also put in the necessary bits and bobs for the extended rendezvous, but these are untested as yet. EPSRC mock panel later today, should be kinda fun :). One more week of term then 4 weeks of easter "holiday" (buffer space to soak up all the things that I didn't get round to doing yet..).


Writing papers and compiler hacking. Now got the (mostly) final cut of static barriers and mobile barriers in the compiler; to be released in 1.3.4-pre7 (soon, yes, soon). Also been poking around with the new compiler framework for occam-pi; so far so good. Time for some CIF prodding then bed.


Been busily hacking away at various things. DXRaster is now part of the latest KRoC (1.3.4-pre6), that also has some initial support for a native BARRIER type. Support for mobile barriers is in-progress, but should be ready for 1.3.4-pre7 (next week or before, depending on how things go). Churned out a new version of Winter Tale, close to completion, just needs some tidying up at the beginning and end.


Back to some hackery; fixing various compiler bugs and attempting to integrate DXRaster into the KRoC distribution. Churned out a bit of new music (Winter Tale) (under construction, but the "theme" is in place).


Hack, hack, hack; work, work, work; write, write, write; DVDs, beer and pool.


More KRoC and RMoX hackery. Got support for "CHAN ANY CHAN TYPE" into the compiler, along with some bug-fixes for things found by Azz. 1.3.4-pre4 reportedly works fine on the FreeBSD where earlier versions failed, yay :-).


Released KRoC/Linux 1.3.4-pre4, mostly small changes, but includes updates from automake 1.6 to 1.9 (and everything still appears to work on Linux, FreeBSD and cygwin :-)). Putting together updated RMoX pages, and hopefully some software to go along with it. Latest RMoX failed to boot on Peter's (Dell Inspiron) laptop, but I think that's down to a funny with the USB floppy that we were using -- installing and booting via Lilo/GRUB to be tried at some point.. Did boot and run happily on a regular Dell P4 machine, as well as a knackered old Pentium-100 lurking around my office somewhere. Fresh zImage available for download (the "bar game" is about the most useful thing, still, but fun!). DMA and floppy support will probably be next in line (DMA sort of done a bit), PCI support under construction.


Released KRoC/Linux 1.3.4-pre3, with various updates/fixes and new things. Also have a mostly functional RMoX, although it's yet to be tested on real hardware (just QEMU so far). Builds successfully on Linux, cygwin and FreeBSD 4.10.


More RMoX hacking. Looking fairly promising -- the occam-pi part of RMoX successfully starts and does stuff, although there may be some b0rkage in places. Currently the run-time occam kernel (hacked around bits of KRoC) is sitting on top of a stripped-down Linux kernel and running fairly happily :-). User-mode RMoX also breaks with some stuff, so still a few normal KRoC errors to be sorted out.


Hello 2005! More KRoC and RMoX hackery. Mostly sorted out a new version of the dynamic memory allocator, released on-the-side as fsupport 0.1. Currently putting this into KRoC, and should result in better behaved occam-pi programs w.r.t. memory usage. Allocator currently appears to function happily on Linux, Solaris, FreeBSD 4.10 and cygwin using anonymous memory-mapping, but not the best placement strategy (compile-time/environment-specified range or fail).


Ooh, new years' eve. Compiler hacking in progress; largely to track the "fixed" state of mobile variables (particularly channels and processes), and consequent support for language constructs that require it. For example, passing a CLAIMed shared channel-end as a parameter to a non-shared formal is fine, provided that the PROC in question does not "move" the channel-end. Still not quite got KRoC working on FreeBSD 5.x yet; more investigation required there. I think I might go hunting for CD or net-bootable FreeBSD and try a build in that.

NVidia GeForce2 card finally died, after a few months being slightly wonky. After a cold boot didn't get anything out of the card. Temporarily replaced with a slightly lesser ATI Rage 128 graphics card, but it's doing the job nicely.


Lots of KRoC hackery. Churned out a new pre-release, KRoC/Linux 1.3.4-pre2. This builds ok on my Linux (debian), cygwin and FreeBSD 4.10-STABLE. It should (hopefully!) build ok on other Linux and FreeBSD though (i386 only properly supported at the moment).


End of term happened, aided by beer and pool :-). Tidied up the anonymous questions+answers generator (now chucks out an RSS feed if desired), and updated the mini operating-system simulator (MOSS). MOSS now sort of works in BlueJ, but there are still issues -- particularly with how BlueJ interacts with the concurrent nature of MOSS (not an entirely happy co-existence, it seems). More KRoC/occam-pi related hacking in progress, but unlikely to have a new version (pre-release) this year (but only 12 days until next year :)).


Been mostly dealing with academic stuff, but with the odd bit of research/hacking here and there. Managed to write a new version of the anonymous question+answer generator, that now goes significantly faster (written in C) and generates some extra output. See the CO516 anon Q+A pages (UKC only) and example anon Q+A pages (general) for examples.

Few updates/fixes to KRoC here and there, but quite a few more to go before the next release. Currently sorting out the dynamic memory allocator used by KRoC, but also into something that I can use happily with other bits of code.

Fiddled around with MOSS to the point where it now sort of works with BlueJ. It's not a very satisfactory situation, but it mostly works -- operating-systems (at least the way I've done things in MOSS) aren't very object-orientated.


Just spent the whole weekend hacking, more or less. :-). Result is a new version of MOSS (the mini operating-system simulator). Now has some file-systems and the ability to load executables and "libraries" from it. Libraries is a weak term -- it's the left-over inner classes that didn't go in the executable (which is just the top-level class file). Perhaps tar-archive based executables that contain all their inner classes... The shebang script execution is not quite ready, but shouldn't be too long. Should have lots of scope for fairly interesting student programming assignments from this.


Various hacks in progress. oscript now correctly parses basic things and does the name scoping correctly :). Next are the type-checker, usage-checker, alias-checker and undefinedness checker.. Did some more work on MOSS too (not updated on the webpage yet, though). Host file-system coming along nicely -- then it'll be possibly to "run" things sensibly. Put an updated version of "Rainy Day" on the music page.


Mostly finished off `One Step Forever' and started putting together something more mellow, `Rainy Day'.

oScript hacking in progress.. Now got something that can parse basic programs (although no type-checking etc. yet).


Buried in email!


More hacking, more music (nearly there now!). Poking away at the occam-like scripting language (oscript), getting complicated..!


Woo, Novemeber already. Busy hacking with musical interludes.


Back an overall good weekend in the Peak District. Grimly, on the way up Friday night, we had one of those statistical crunches on the M1. Cars driving too close to each other, someone brakes a bit, the person behind who is too close over-compensates and brakes a bit harder. The result, of course, is a `wave' of over-breaking that travels backwards through the traffic until a large enough gap in the taffic occurs. This either happens naturally (good), or as the result of people getting out of the way of an accident they see further down the road (bad). The car in front of us stopped, and so did we, but the car behind didn't, the resulting collision sending us into the car in front. Thankfully (and rather selfishly) it wasn't my car or me driving, some mild whiplash only. Had a good time once we eventually got there, however. Car destroyed, but only two bottles of beer broken and some mild impact damage on the trays of lasagne brought to feed the hoards. Our clothes, sleeping-bags, etc. probably took up some of the impact force, rest by the last foot or so of the car, forward motion and the front crumpling a bit.


Well, September went by quickly! Had much fun and learning at the CPA-2004 conference, since then been writing papers and lecture slides. Back to hacking and other fun stuff once those (relatively important!) things are out of the way..


Busy with various real work (module specifications, papers and exams). Started porting KRoC/Linux to Solaris/Sparc -- going well so far :-). The run-time system seems pretty intact with pthreads on solaris (that looks like glue for LWPs), keyboard and screen working OK, as are basic integer and long-integer operations. Not enough to build any compiler libraries yet though; needs floating-point support.


Amazingly, KRoC-1.3.4-pre1 (not released yet) builds ok under cygwin! Quite a bit of hacking to get it working, but it looks stable. User-defined channels, C-interface and other examples/demos work ok. No dynamically loadable process support though. I'll probably release 1.3.4-pre1 towards the end of the month, various other bits are mid-hack.


Back from a small holiday (with the family) :-). Got KRoC sort of working under cygwin (on my windoze XP box). Things appear to be working, sort of. Not wholly convinced that un-buffered I/O works right, though -- installing cygwin's xterm to see if that suffers too. Most of the KRoC system now builds, still needing more, though. The `better-bar' demo built ok and sort of ran ok -- updates a bit slow via RDP/ADSL..! (and no working keyboard input, but I suspect that's a buffering issue). All being well, KRoC 1.3.4-pre1 will build on cygwin :-).


Did plenty more UWG hacking. Now got a working `UWGISockCli' (non-visual) gadget. Next is to try and get ubuildinit doing something useful with it.. Also been thinking about the ``nice resizing'' thing, hmm..


Finally released KRoC/Linux 1.3.3 (info on my kroc page), yay :-). Mobile processes are still experimental in this release (`-X7' to enable), but might work successfully. Also fairly experimental is the pthreads co-existance, but that also seems to be working for most things -- blocking sys-call call-in isn't very fast, will work on that at some point though.

Did a few more things to UWG, ubuildinit and RAPP. Currently getting basic support for updates and commands working in both. There's also that documentation thing ...

Churned out a new tune, aiming for a game/chip style, but not quite there yet.. (Pinball).


Put together what will hopefully be the final pre-release of KRoC/Linux. Will give it a few days for people to try out with their stuff. Added a whole lot of stuff for mobile processes -- got fairly complex things suspending and cloning now. Workspace mapping appears to be holding up! Also did some more man-pages.

Uploaded a new version of `One Step Between'. Still not quite happy with the 2nd half, but getting there. Needs some `smoothing' in parts. Also got around to writing the first revision of `ubuildinit' for micro-WG. Produces code for a fairly simple test application that compiles and runs happily! Also demonstrated that deleting gadgets works (after adding support for terminating the `mainloop'). Probably due for some significant refactoring (more of the package, than the code).


Fixed up some papers for CPA-2004. More grumbles about PDF.. Did some more work on mobile processes -- got a fairly complex, but small, system running, using mobile channel-types to link the mobile processes together. Looking quite promising!


Getting closer to the next KRoC release.. Fixed various mobile-process related problems, well, think I fixed them ;-). Got a fairly basic process (with internal parallelism and channels) suspending, cloning and resuming without breaking. After getting the POSIX threads support working, re-compiled Paul White's graphics library for KRoC (that uses GTK); and it worked! Bit lumpy due to inefficient code in the run-time system -- might fix that sometime, but it's not important yet.


Hello July. New KRoC/Linux (pre-release) sometime next week I think. If there aren't any reported problems with it I'll turn it into 1.3.3-final and start again at 1.3.4-pre1 :-). 1.4.0 will emerge once I'm largely happy with the various mobile and dynamic support. Plus we need to integrate some form of graphics.. DXRaster is sort of ready, but a widget set (like micro-WG) would be preferable.

Spent a couple of hours installing Linux on a ``spare'' machine in the office. Machine it's replacing is now running doze-XP :(, need a way of creating powerpoint stuff.. Now, if the lecture-theatre PCs had Linux installed on them ... :), but then I wouldn't be able to watch assembly demos projected onto a massive screen with extreme sound.


Well, pthreads into KRoC seems to be working so far! Bit messier than the plain `clone()' version, but at least should allow applications to link against libpthread without breaking horribly at run-time. Valgrind also seems to work with KRoC programs now, which is good -- already found one small bug in the socket library!

Got the indycam working :-). Turned out not to be a problem with the driver (thanks to Ladislav for the help), but a duff camera. Replacement camera works in the expected way -- slightly wonky with no brightness control, but ok apart from that.


More hacking away at process types in occam-pi. Got a basic CLONE working (of a SUSPENDed process) :-). Very basic so far, and not completely functional (something went badly wrong when I peppered the code with out.string calls), but making progress.. CPA-2004 paper largely finalised now -- come to the conference, it will be good! :-).

Currently attempting to hack pthreads support into KRoC. POSIX threads on Linux are somewhat more mature than they were 4 years ago, and should work properly now. Will see how that one goes ...! Attempted to get the VINO camera thing (indycam) working on my Indy -- might have worked, took a while to find a working application. camstream was looking hopeful, until it segfaulted. This might be a peculiarity of the packaged debian Linux/MIPS version, couldn't be bothered to compile from source. vgrabbj is what apparently works (Ladi's VINO site), but that wasn't packaged for debian Linux/MIPS. So compiled it from source. Sort of looked like it might have worked! Got a large black picture, though. Three reasons: it didn't work; it's dark in the office and there are known issues with indycam brightness; videodev had a refcount of 1 after unloading indycam-related modules and might be knackered somehow. Remotely rebooted the machine and it didn't come back, so more on that tomorrow.


Finally managed to build a real RMoX using the Flux OSKit. Booted, got a good way through the initialisation, then crashed. After some messing about, got bochs up and running. That crashed in the same way, which is good. Fiddling around in the sources hints at something strange going on -- maybe memory corruption from somewhere. More fiddling around required.


Long-hack on UWG (micro window gadgets). This is an attempt to `upgrade' WG to a C implementation. C++ just caused too many headaches, and had some issues with code bloat. The intention is to support all the same functionality, but in a cleaner shinier way (i.e. function-pointer soup). Got a window, panel and label running pretty happily so far, next are buttons and edit boxes (that need a working concept of `focus'). And then onto interfacing with occam, which shouldn't be a total nightmare anymore.. :-).


Fixed a fairly serious bug that escaped in 1.3.3-pre26, static mobilespace was completely b0rked. Fixed that now. User-mode RMoX appears to be running smoothly now :-), next is to try and build a free-standing version again, hopefully with less bugs!


Wrote a couple more manpages for KRoC, still need to do the socket/file/process libraries at some point. Summer definitely here now, temperature getting a bit mad.. Building your own air-conditioner doesn't seem entirely practical, guess I'll have to buy one..


Finished reviewing some papers for CPA-2004, despite a fairly low confidence in my assessment. Did some more work on the new occam adventure, that's no longer deadlocking when a socket-client disconnects, yay! Something to be said for proper termination. IRC interface in-progress, and was going well until the local IRC server decided the client had issues with `excess flood'. Should probably install a better ircd, or write the occam one. Game modifications turned up a fresh error for nested mobiles, gah. More fixes for 1.3.3-final. KRoC/Linux 1.3.3-pre26 is out there now. I'm hoping to not have anything post -pre30 before the final release, just a few more tweaks! Got around to semi-fixing the occam dependency generation problem, by writing mkoccdeps (to be included in the KRoC distribution). Should ease project management a bit.


The occam adventure was going well until I tried interacting with the trader, at which point it segfaulted. At least that's better than just silently failing. Tracked it down to slightly malfunctioned FORK (hidden) barrier handling. Hopefully will have that fixed shortly.. Installed Azz's rawdog (collects and HTML formats RSS feeds), very cool :-).


Finished with the exams, mostly, yay! At least it's only once a year (discounting resits). Back to some research :-). CPA 2004 coming soon. Got the new occam adventure working again, minor breakage in the compiler was causing some pretty wierd run-time behaviour. Eventually got a test program to segfault nicely. Should hopefully get a pre26 release done before too long, and I really should try and get it to the -final stage soon. Will have been worth the (~2 year) wait, though ;-).


PDPTA papers submitted and accepted :-). Working on a couple of papers for CPA 2005, slightly past the deadline.. and marking exams.. Did find a moment or two a week ago to fiddle around with nocc some more. Once exams and papers are out of the way I'll get back to it..


More compiler hacking. Mobile processes are sort of working now, which is cool. Replication and migration still have to be dealt with, though.. Released a 1.3.3-pre25 version of KRoC, heading closer towards a 1.3.3-final release, but I've been saying that for the last year or so now!

Finally finished marking the CO501 (operating-systems) coursework, which was to extend MOSS in some way. Actually quite good on the whole, with one or two excellent submissions. Derived a couple of 3rd year projects related to it too. Next year's version of the assignment should be quite interesting.. :-).

Got the RS422 bus up and running again. Turns out I hadn't cooked the serial ports on the PC after all, so opening it up and installing a trusty old ISA expansion card (2 IDE, 1 floppy, 2 serial, 1 parallel) wasn't necessary. Oh well, now got a machine with 4 serial ports, always good.. What had blown up was the RS422 transceiver. Probably went wonky after sucking on the miswired +/- 10v. Now for a temperature sensor.. (more analog switches required).


Been doing a lot of compiler hacking, `MOBILE PROC's are on the way ... :-). Got a whole load of other compiler bugs fixed too. Managed to fix the middle-C on the keyboard, yay.


Urgh. Spent this week being somewhat unwell. A good blend of ills; cough, sneezing, sinus pressure, headache and generally feeling quite crappy. Seem to be on the mend now, which is good. Still a bit coughy/sneezy, but brain back on-line, which is the important thing. Bought some `olbas oil' yesterday that probably helped.

Got quite a lot of marking done this week, but still more to go.. End of term now. On a slight less mundane note, added some more stuff to the hardware page.

Note: some of the children's programs on the telly at 7am are a bit mad. Waiting for Scooby-Do..


Mostly sleeping weekend. Seem to have caught some bug type thing, Sunday spent feeling slightly `detached' from eye/ear interface. Prodded around with the RS422 thing a bit more; some stuff on the hardware page. Lots of marking to do this week..


Spent the weekend mostly playing around with electronics things. Got the prototype AT90S2313 based board going, with the RS232/RS422 `adapter'. Communication with the UART over the RS422 bus appears to be working happily at 9600 baud :-). Also provided an opportunity to re-write the host interface software. Following some late-night discussions with Dave, devices have individual `serial-numbers' stored in the EEPROM. This is used with some device discovery protocol to locate devices that are then assigned `logical unit number's (LUNs). So far, so good..


Finally got around to releasing the next pre-release of KRoC/Linux. Something with RMoX still isn't quite right, though. Did some more MOSS hacking, file-system partially complete -- can make directories and list them. Still plenty of marking, although moving along with that stuff now.


Busily working on various things; mostly dealing with marking related stuff at the moment, and some research. The CO501 MOSS assignment has now been submitted; most people opted to do the ``mail-box implementation''. Started implementing some of the special stuff in the socket library, paused briefly to add some thread-safe memory allocation code. Need to have a poke around with the ``hyper-threading'' stuff at some point too, now that I've got a shiny Pentium-4 box.


Finished the really important stuff now; back to the plain old important stuff. 2 of 3 compulsary training courses complete. Been hacking away a bit on MOSS, actually getting quite cute now! In the process of adding some fairly primitive file-system handling. Public code can't be updated until all the students who are fiddling it for an assessment have submitted, though..!


Recently returned from an excellent weekend in north Wales, with the UKC Mountaineering Club. Was the annual dinner at the Golden Fleece in Tremadog, where much good food and beverage were consumed (i.e. we got stuffed and pissed). The evening's amusements included half-speaches, fine awards (particularly the NFI and Coffin awards), and a food-fight. Saturday was spent walking on the local beach followed by wander up the decent path on the crag behind Eric's barn to watch the climbers. Sunday we walked/scrambled up a small mountain -- icy on top with up to around 60 mph winds (i.e. walking sensibly was getting hard very severe in places). Walk back down was much calmer.


Well, back into the full-swing of term, and associated stuff. Less teaching, more research.. :-)

On a slightly unrelated point, arrrgh to the cretins who think using "macromedia-flash" buttons is a better idea than a simple, plain .png buttons, etc.. Decisions like that are clearly lacking in even the smallest nugget of technical reasoning (and common-sense, for that matter).


Monday, ought to consider some sleep soon.. Got protocol inheritance working to a decent level. It'll correctly sort out localised `diagonal' inheritance trees. It'll give up on anything much more complicated than that, though. Released KRoC/Linux 1.3.3-pre21 with this stuff in.


Woo, hello new year :-). Finally got around to doing protocol inheritance, that'll be a nugget for 1.3.3-pre21.. Got the `build update' stuff working again though, should make peoples lives easier once more. Back to work tomorrow.. (well, in a way, I suppose).


Christmas over, much fun had. Back to the real stuff now. Fixed a few more bugs in KRoC, still a few minor problems to sort out (mostly with the support for nested mobile types). Integrated Adam Sampson's occamnet IP stack into RMoX. Working well thus far in user-mode, can ping and do dns lookups. Should, in theory, work on real hardware too (yet to be tested, RS delivering more serial cables soon ;-)).

Think I'll go for a -pre20 release before a final one, but largely good enough now (pending afore-mentioned minor fixes and perhaps some extra stuffs that have been queuing for a while..)


At long last, fixed the bug preventing enhanced ALT enabling from working properly. Turns out it was a bug with the code generated for `RESCHEDULE()' ... Anyway, with that, and other minor things fixed, plus some updated documentation (occam compiler extensions), I've released KRoC/Linux 1.3.3-pre19, changelog entries, etc. on the KRoC page. I think this one is pretty close to being a final release, really..! enhanced ALT enabling and ALT pre-enabling are now enabled by default again, all the CG-tests pass as they should. RMoX also runs happily with these options now :-).


On fatal error, redo from -pre18.


Term over, back to some research :-) (and marking :-(). Released KRoC/Linux 1.3.3-pre18, with the FORK related bug fixed; at long last. I've not checked yet to see if this is the same as the FORK bug Neil found, maybe. Also mostly finished off Forever Music. Could still do with a spot of tidying-up and perhaps some drum variation, but heyho. Also put a newer version of Crystal Worlds (pre4) on the music page. This one's still incomplete..


Nearly the end of term! Had much fun preparing a poster type thing in XFig, well, fun might be a bit exaggerated. XFig is great, but our lazer-printers leave about a 4mm margin.. Bit of work with psresize and the guillotine cures all though.

Released KRoC/Linux 1.3.3-pre17. Wonder if it'll make it to pre20 before I finish fixing bugs...


After last night's mountaineering society christmas dinner, today was definitely a very hard severe hangover.


Weekend over. Did a reasonable amount of hacking, located a FORK related bug, on the fixage list. Put up Forever Music (pre1) on the music page.


Urk, buried under email. Amazingly, a good number of 2nd year CS students were unable to compile+run a Java program from a command-line. I blame BlueJ, for making life too easy.. On the subject of gripes, Dreamweaver should be burned and forgotten. Anyone who thinks that using ``macromedia flash'' buttons instead of the more trivial, and quite sufficient, ``image'' button, is clearly confused.

Had a good play with some Lego Mindstorms over the weekend. Taking the RCX route at the moment, with some simple programming in NQC (not quite C). Now got a couple of lego cars, one with drive/steer motors and one with left/right motors. Steering is a bit tricky with the old rack+pinion.. Might be quite fun, if the RCX (1.0) is up to it, to have IR control cars using a standard tv/video remote-control. Of course, depends whether the RCX interpreter code lets you get at the IR hardware at an appropriate level, failing that, whether the RCX interpreter can be hacked into submission.. ;-).


Woo, November already. Work and stuff progressing quite nicely now. Fixed one or two more bugs in KRoC/Linux, should be ready for 1.3.3-pre17 quite soon.. Still the odd thing with FORK to fix.


First week of term over, went pretty smoothly. Spent the weekend doing pretty much nothing, watched a load of DVDs and wrote a bit of code. Teaching starts proper this week, here we go... :-). Hopefully new office on Friday, space is about to become a problem in the current office; too many boxes ...


Eee yikes..! Things getting busy, term starts next week. Moving into new office next week that'll trigger the re-commencement of hacking :-). Not had a good coding session in too long.. Spent today in London at Royal Holloway's (university) building in Bedford Square, learning exciting things from Jim Woodcock. In particular, action systems, and their application in CSP proofs. Must give that a go sometime.. Off to Bath tomorrow for a mate's wedding, back Sunday for start of term on Monday.


Flying out to Amsterdam tomorrow morning for Communicating Process Architectures (CPA) 2003. Currently between offices at the University, hoping to be back to normal(ish) around the 16th.


Hello September! Long, but largely successful day. Got the macrovision remover circuit going properly -- currently watching Aliens :-). Just to re-iterate the reasoning: we use the video player as an RF encoder, cos the DVD only has SCART output and my telly only has RF in. The image is slightly grainy, but that can be fixed relatively easily -- another day. Bedtime, lots to do tomorrow..


Spent the weekend back with the family; a much welcomed rest. Neil found some more bugs in KRoC, which'll need sorting fairly soon -- quite unpleaseant ones at that too! Did some work on the slides for the conference, but spent most of the day poking around with the AT90S2313, the UART in particular. Should have a working `echo' unit at some point (that is, with timeouts, safeguards, etc.). Just straight into the PC via RS232 at the moment, next up is the RS232-RS422 bridge. Should work ok, assuming the PC drops RTS before a device attempts to respond (since the RS422 TX/!RX signal will be connected to the RTS/CTS signal).


Built another two temperature sensor gadgety things. Still need to build the external one.. bleh. Also need to take Dave's advice and make some AC power happen on the RS422 bus. The voltage drop is about .1v over the bus. Alternative would be to pump 12v down the wire and regulate at each node, but that'd probably get hot.. The system is currently off-line for recalibration.

Chased a few more bugs round inside the compiler. Stuck at BSUB/WSUB related problems. ARGH!...


More occam compiler hacking, and more DVD watching. Running out of DVDs now.. Slowly getting `MOBILE []MOBILE []BYTE' types working.. At least this will provide a good indicator of where changes need to go for future nested mobile support. Time to go and carry on watching some Bond movies. :-).


Shiny new wotex up and running :). Need a monitor/keyboard/mouse switch, think I'll build one rather than pay for one. The electronics are non-complex (bunch of analogue switches plus some Atmel AVRs and level converters -- the AVR(s) will need to pretend to be keyboards/mice). The software component doesn't need to be that complex. No hope of an OSD style functionality, but never mind ;). Thinking about it, it wouldn't be that hard to overlay stuff on the VGA signal (vsync/hsync and splat)..

Added bits to various tunes, put them on the music page. Still more to go on these tho..


Been coding lots, mostly on KRoC and RMoX. RMoX's serial driver is working and capable of supporting a (very basic) remote terminal (null-modem and miniterm ;)). Still no provision for things like signals, or even flow-control, etc. but on the way.. ;-). Some of the bugs fixed in KRoC were fairly critical, to appear in 1.3.3-pre17.

In the process of building wotex up again, with a shiny new hard-disk. The old hard-disk kinda wilted and died (with IO errors).


Normalising, slowly.. Done a sizable amount of coding in the past week or so, along with preparing papers for the CPA 2003 conference in September. Fixed a real nasty bug in the occam compiler, thanks gcc-3.3 :). Astonishingly, the CIF examples survive compilation with -O3. Not tried the run-time system yet tho.. Gives a better CIF commstime if nothing else.

Took 5 SGI Indy's apart and put back together 3 actually useful SGIs. Nearly going, but TFTP has mysteriously stopped working for the SGIs. The Java-Station (krupps) doesn't have these TFTP problems however..! It's possible that the `bootnode' machine exists for a reason. I might turn it on one of these days..


<happy> had my Ph.D. viva a couple of days ago and was passed :-). Just a touch of tinkering, then into the process of getting some copies bound nicely. Graduation will be in November, which is kinda nice, 'cos it'll be nice and cool, rather than hot and sticky (like it is as the moment...). Must build that external temperature sensor sometime...

Many, many thanks and much kudos to family, friends and colleagues who have endured me over the last 3-4 years, particularly the last few months.. I'm viewing this Ph.D. more as a check-point than either an end or beginning, which I think it is.. Stay tuned for more fun high-performance dynamic concurrency!

Right, time for some hacking! It's been a while...


Well, end of UKC term has happened, final year students got their degree classifications today; more happy than non-happy on the whole I think :). Currently frantically writing papers and thesis, the end is near(ish).

Finally got around to having my hair cut! It's short again now. Some people are having a hard time recognising me ;), which kinda makes life that little bit more interesting!

Added some stuff I want to my amazon wishlist, hey, well, you never know ;-).

Fixed the usual roundup of minor bugs in kroc, still a few left before pre16 gets released though. There's definitely something Not Right with the enhanced ALT stuff (and I bet people in the know reading this are thinking, ``we told you not to tamper with the ALT!'' ;)). It's a minor bug though, just with fairly unpleaseant consequences -- odd segfaults and deadlocks, with a small dose of run-queue corruption for added effect.


Ooh, May. And still writing, but getting closer.. Construction of the macrovision remover well in progress. Added some (remote) links to the links page. They really tried quite hard with macrovision. Close to working, but something is very much wrong with the timing. Yay for the oscilloscope, has made this whole thing, possible, really. But now I need to fix the RS422 comms for the stuff on the hardware page..


Monday, term starts. All marking done, yay :-). Back to thesis writing again, and maybe some papers for this years conferences; making the deadline(s) might be hard though.. :-(. Always next year; and journals..

Amongst spare moments, building a macrovision remover. Bit hackish, but putting an Atmel AVR to good use. My DVD player doesn't have RF out, so scart'd into the video. But the RF out of the video, when on the scart channel, has already been through an AGC thus macrovision protection really screws up the picture (as it is intended to). Got the basic idea from Fil's Macrovision FAQ. Scart out is left sane, so connecting it to the scart-capable TV works fine. But not for the other telly(s). :-(. Sorta working, but on-hold until the RS delivery guy has been.


Mid April ish. Easter soon. Still writing thesis, but getting there.. Added stop error-mode support to KRoC, works nicely. Attempting to look at some bugs sometime so a -pre16 can be released..


Uh, March, nearly end of! Lent term finished, into the easter break, or more work for staff/postgrads. Personally, I think I'd rather revise and sit exams ;-). Bit sore thismorning, perhaps related to the vast amounts of beer (lager, of the carlsburg export variety) consumed last night. Was fun however, usual lack of knowing how we got home though.. i think it was a taxi..

occam web-server off-line temporarily, due to uncertain power situation in the office where the box lives. Should be back sometime next week, assuming that there's going to be some electricity (screams quietly at the estates department). Really, shutting down all my lab machines doesn't bother me, much, really. No really.


February heading to an end, eep. Inbox down to something a little more sane now, <= 100, but still lots of things pending :(. Writing thesis mostly, fixing bugs here and there, and not much/any time left after that. Usual teaching/marking overhead ever constant! ``project week'' soon, yay, more bits of that week available :).


Slowly catching up with various things. Inbox down to ~175, much to process there still. And another week gone.. Wading steadily through the KRoC bug-list, plus usual thesis, more marking.


Marking marking, always marking. Inbox count now nearly 190, and lots and lots and lots to do. Job list is getting a little excessive. Hopefully after this marking is done some of the backlog will clear. Inbetween that and teaching, it's all thesis, and an occasional attempt to make music. Evenings out heavily restricted at present, unless it's a cheery beer with friends ;).

Biggish projects slowly creeping forward. A new pre-release of KRoC/Linux is on the way at some point, with some updated libraries and minor bug fixes. Sorry Azz, (some of) your bugs are still in the queue :(. Added an indentation fixer to the compiler's pre-processor stuff, curiously named ``#RELAX''.


Woohoo! 2003.. Still lots to do and not enough time to do it in. Bleh. Spending lots of time on the thesis. Managed to do some hacking too, always good. Inbox currently at 151 messages..


Woohoo! 25, well, 9 days ago anyway. Car insurance is now theoretically cheaper. Note the theoretically, I no longer have a car. On the other hand however, I managed a win in court over the leftovers from the last one (car). Conclusion, lorry drivers aren't infallible, especially in UK registered left-hand drive vehicles. In the wider picture, no human is infallible. Heyho, our hereditary genetics..

Managed to fix a small bug in xdmchoose, which is good. Currently spending most time on the thesis and on other significantly important things. Got a nice pile of marking for Christmas. What I always wanted, really. It produces money however..

Current inbox message count: 132. If you're wondering why you've had no reply yet, that's why. A while ago I had the inbox down to 30 messages. Hopefully again, too.


Another week gone (nearly), quite a lot done. Marking all done. Released KRoC/Linux 1.3.3-pre11 with the new stuff Mario needs, found another bug (not fixed yet..). WGCanvas gadget on the way, still a reasonable amount to do on this however. Tomorrow (today) afternoon is probably going to be a bit crammed, should sleep soon.. Next week isn't looking too terribly pleasant either, only one day wholly available for hacking by the looks of it. Hmm, more thesis.. more coffee..


Still all very much busy. Project week at least, which is nice. Only one small pile of marking to do.

Fiddled around some more with WG, released 0.9.4 of that. Merged CIF into the KRoC/Linux source tree, along with some updates, etc. and released KRoC/Linux 1.3.3-pre10. Still quite a few odd bugs in it, the ones I know about are in the BUGS file, but there are quite possibly others. Slowly ironing them out and heading towards a final 1.3.3 release. Keep saying that.. maybe someday I'll really get there..


Weekend spent mostly working, again. Oh well, the Christmas break is only 4 weeks away, can have a rest then. 1st and 2nd year project weeks this week, which means none of the usual stuff, so might actually get some movement made on the thesis. Had planned to do some yesterday (Sunday), but other things were higher on the list..

Distracted self for an hour or so and updated the occam-tutorial page a bit. Back to real stuff for a bit now, then sleep..


Grinding on with various things. Many things happening at once, scheduled by shortest-deadline-first. Almost given up trying to get GTK and occam to co-exist. Something just ain't happy. The thread-mode of GTK seems to imply posix threads (by the `gtk-config --libs gthread' output anyway), which aren't quite the same things as occam is really using. I recall some mention of stack nastyness within posix threads, which may be causing the problems I'm seeing (segfault massive, after memory corruption).

As an alternative, been playing around with WG and occam. Needed to fiddle WG just a little bit (to add some user-state to visual gadgets and a fuller single-shot event processor). Churned out version 0.9.2. The autoconf/automake stuff could be happier, but it works. Got WGWindow and WGButton to work from within occam. Pretty quick too, all nice and parallel outside WG. Pretty much got a functional demonstrator now, yay.


November already. Blimey, time flies when you're having fun... really.

Getting steadily closer to a 1.3.3 release of KRoC/Linux. Still one or two minor things need ironing out, and I should stop adding new stuff and concentrate on fixing old stuff really, but heyho. Currently trying to get dynamic-in-static mobile nesting working, proving to be real nasty, but nowhere in the compiler I've not been before.

Car business heading to a conclusion, at long last. Only taken 1 year, 2 months and 14 days so far. A few more weeks won't hurt.

Seems like I might have to think about that whole `job' thing, urrgh. Would be nice to get funding to go and do another undergrad degree, maybe maths, physics or chemistry..


Finally getting close to a real release of the new KRoC/Linux. All the CG tests are now working again, which is good :). Not had time to do much fun stuff lately, although got DXRaster working properly a little while ago. Been spending time working on that thesis thing.

Got the enhanced ALT enabling sequence implemented, which makes ALTing much faster :).


Hmmm.. what's in this directory then. Ah, on-line diary thing. Been a while.. CPA-2002 was excellent! :-). Lots of good presentations and lots of interesting stuff. Same again in a year or so!

I think the work on mobile channel-types is pretty much there now, still one or two minor things to tidy up, but largely there and working. RMoX is progressing slowly, nothing on its webpage yet though. Coming soon..

University term has started again, so free time is about to take another slashing. Managed to get the DXRaster stuff working last night, yay, bug caused by my confusion between bytes and words.. Suprised no-one else spotted it yet! Fixes to that will go out in the 1.3.3-pre4 release, probably long overdue now, but I'll get around to it. 1.3.3-pre3 seems largely happy, minus minor irritations and multi-dimensional dynamic array handling (where there are more than 2 dimensions, or 1 dimension and mobile-size-fields).


Grinding on with various things. Anonymous channel types pretty happy now, tidied up some other things with standard channel-types. Finally did the large FORK VAL param handling, not quite perfect yet (will copy things sometimes where it doesn't really need to copy). Put a 1.3.3-pre1 release on the kroc page. Passes most of the CG tests (blows up in cgtest17 RETYPES, GUY/ASM, Miscellaneous). I think it's an INLINE FUNCTION problem, on the list to fix.. It's a bit not-nice having a release which fails the compiler test-suite.. Must include that in the distribution sometime. Good for occam programming examples if nothing else.


End of august already, well, nearly.. Holiday was good and much needed, did family stuff, lots of time spent in the village pubs. Got the new occam web-server up and running with CGI/OGI support. One or two things still need a minor bit of attention, getting strange OGI behaviour sometimes on multiprocessor boxes -- not racing though, thankfully..

Did some more channel-type fixage in the compiler, pretty much there now with that stuff I think. Just sorting out the anonymous channel-types which provides support for `SHARED CHAN INT c:'. Should have that finished off soon. Really need to do some CERN time soon, long long overdue with that stuff.. argh.


August already.. CPA papers finished off, wehey. Going on holiday tomorrow. Lots of work to do when I get back..


Friday already. Cripes. Kent beer festival thisevening though, should be fun.


Weeks just ticking by at the moment, which is a bit sad. Papers for CPA-2002 pretty much all there now, yay. On the software front, the dynamic occam stuff is looking pretty happy. Woohoo. An experimental version of the occam web-server has gone live, in the usual place. I've not gotten around to implementing the CGI and OGI support yet, but that will appear soonish. The built-in statistics page is a little more detailed than before, plus this web-server has a page-cache and name-cache, which certainly speeds things up a bit! Still need to apply priority to the code, but that's trivial.

At last we have DSL! :-). This is a vast improvement over the dialup connection.


Still running on full throttle, although have spent quite some time on fun projects over the last few weeks.. Got the distributed temperature monitoring stuff working, yay! Hacky, but it works ;-). Only 2 devices (3 including master) on the RS422 bus at the moment. More bits from Maplin and RS should arrive today, enabling construction of a few more. ADSL modem and filters should also arrive today (Parcel-force tried yesterday it seems, but I was sleeping..), which'll mean a faster net connection, woohoo! Pictures of the RS422 stuff are on the hardware page.

Teddy got a processor upgrade, at long last! Seems to have cured the random kernel oopsing, although a bit more uptime will help me be convinced. Also replaced the 2 PSUs in teddy and disconnected 1 of the floppy drives. Looks like one of the PSUs' fans had stopped working, not exactly healthy. Opened it up, but easier to replace the whole unit rather than just the fan (whose leads were soldered directly into the PSU bits, no nice plugs..). The floppy drive had got so shagged somehow, having it plugged into the PSU caused the PSU to not power-up. Changing the 2nd supply was somewhat redundant from that point-of-view, but never mind, it probably needed a change. Swapped the old P166 (running at 180) for a P200-MMX (might be 233), however, running at 166 MHz (looks like the motherboard doesn't understand 200 MHz..!). Processor load has dropped significantly though :-).

On the occam front, lots of fun things. FORK is now working pretty well, just a few parameter issues to tidy up there. CHAN TYPEs also working nice and happily. All the examples in the paper actually work now, which is kinda good :). Just tidying up a few loose ends before finishing the FORK parameter stuff. Slowly putting stuff together for a new distribution. I think realistically the next one will be 1.3.3-pre0, there have been significant changes since 1.3.2-3..

Tidied up the UKC Mountaineering Society web-pages a bit, with some fresh information. Need pretty pictures though..! Can't put it on the SU server until the sports sabattical gets it together though. I've been trying for around 5 weeks now to get him to sign a form. He's been around, the form's been around -- 4 of them.. Problems combining those two however.. Not like it needs anything more than a signature either.. Dissapointing.


Busy, again. Compiler is still broken, but I've tracked one or two things down. Atmel AVR project going pretty well, I think. Big atmel can successfully send a command to the little atmel over the RS422 bus, but no responses are coming back yet. It ought to work, really.. A digital state analyser would be useful at this point, although I could probably build a simple one using one of the large atmels. ho hum.

Experiment with sainsbury's online shopping concludes today. Has been successful so far, just need the goods to arrive now. Ordering stuff ain't quite the same as going to the supermarket in person though. Dave suggested a doom/CS-style virtual supermarket where you go round with a trolley and collect things from shelves (fragging other shoppers too I suppose, baked-bean-tin launcher and carrot-uzi here we come! ;)).


Summer must be here, it's absolutely baking at the moment. Good job I got that temperature thing wired up :). Currently registering about 27.0 celcius downstairs in the `machine room' (1st ante-chamber between front room and kitchen, restricted space..). Just glad I live in the UK and not in California/Florida or somewhere silly like that, where things get much worse. Of course, Lancashire would be better in Kent in this regard (and for scenary too).

Got paper ready and sent off to reviewer types, still some bugs in it (oops). Now to make the software consistent, but as I left it the compiler was somewhat broken. I suspect I allocated something in `temp' workspace and attached it to the tree -- seems to have magically changed node type later on -- typical.. Oh well, something to process this week. Debugging compilers is a headache, I'm sure most people who have done it will testify to that.

Bits from Maplin and RS arrived, yay. No problem whatsoever in programming the AT90S8515's (8k flash), lovely chips. AT90S1200 is a bit of a different story though. Just doesn't want to program nicely. Well, repeated bit-banging at the flash made the program read out correctly, but the chip was largely unhappy on reset. Got a bit further with an AT90S2313, that ate 10 instructions quite happily then promptly refused to process any more. I'm programming the little chips via the big chip after utter failure attempting to use the parallel port (with either). Not sure what's wrong, but something clearly is. 2313 returns the right device code, 1200 returns a numpty code of 009001, which is right except the first byte, which should be 1E. Docs offer the possibility of locked chip reporting this, but I think something else is fundamentally wrong. Enough is working downstairs anyway to read the temperature and report it up the serial port to the (extremely hacky) program running on the SGI O2 (yay), ultimately appearing on a graph alongside electricity and gas usage. Perhaps not suprisingly, our gas usage is infrequent and intense -- showers most commonly, followed by washing up. Prime electricity bashers are the kettle (clocks in at ~2kW) and the oven (~2.5kW). Microwave is pretty tame (but it's only rated to 800W, and works at lower powers on a tacky on/off timer -- lame imo). The turntable rotation speed is constant, so presumably there are power levels where the food might get cooked mostly on one side. Anyway, piccy of the temperature reading fodder can be found here. As I always say with electronics: if in doubt, tape it up or blu-tac it down. There's clearly a lot of doubt here..

Got a bit further with fred20-2.xm (mp3) and stuffed a newer version on the music page. Ending is a touch abrupt, but I'm hoping to fix that at some point. It'll do for now. Overall, 80% happy with that tune.


Yikes, it's the last day of term already. Bye to all the people leaving for the summer, and bye + good-luck to the people graduating this year. The 3rd year CS exam results will be released in about 6.5 hours. Must wander along and see how people did.

Been writing away at a paper for the CPA-2002 conference, 15-18 September. They want a reviewable version on the 10th June, which is like 10 days away I guess.

Solicitor dude phoned up yesterday to say he'd be going on holiday and returning to a different department. So thanks Doullie. Will get a new person at some point, but it's nearly all over now anyway (court hearing to happen sometime in the next 3 months). Frankly, I'll be glad when it's settled, which ever way it goes. I'm supposed to be writing my PhD thesis sometime about nowish, additional stresses are not required.

Implementation of CHAN TYPEs in the compiler going very nicely indeed. Quite suprised that it all worked really!. Implemented the semi-transparent SHARED handling for them too, yay, at last, no more botchy claim.semaphore() to get at shared channels :-). FORK also worked, once, before I broke it again. Looking good though. Think the last release of KRoC/Linux was 1.3.2-3, my version is 1.3.2-4. Should get a new version into the world sometime before too long I hope. Suspect there'll be a few more post-releases before 1.3.3 appears.

Ordered more bits from maplin and RS, still need some more capacitors though. The gas-meter-reader is in a state where it can be soldered together. Might need some fresh cable though, it's not exactly near the computer whose parport it'll be wired into.. Would really rather do the whole gas thing using a RS422/485 bus, but I think it's gonna be a while until I get that all ready and stuff. Got a latch now, so building a parallel programmer shouldn't be too hard.


Only seems a little while ago since I last updated this, in fact it's been nearly a month. Yikes! Mainly research-related stuff happening at the moment, as well as some other things. The UPS arrived, yay, shiny Belkin F6C625-220V ordered from dabs. They appear to only provide a closed-source binary for Linux, which admitedly works without any problems, but it's still not open-source. Strace and the web proved to be extremely helpful in getting information to write a status-grabber app. Just status grabbing at the moment though (and the necessary bits+bobs to handle various power conditions, on the way).

More books arrive from amazon on Monday, yay! A MIPS book is in that order which should allow me to make some sensible headway on the KRoC/Linux/MIPS variant of KRoC/Linux. With some luck, all the blocking-system-call stuff, etc. should work nicely.


Ah, morning. Appear to have been up all night. Got the electricity monitoring thing working, yay. Idle consumption seems to be around 500 Watts, although that was measured with me downstairs doing stuff, not sleeping which would normally be considered `idle'. Have to wait and see I suppose. Could also have a pence-per-hour graph, since the cost of electricity changes at night. Should consider getting a UPS at some point, power outages cause lost time in the region of 30 minutes. Belkin appear to do a nice one for less than 100 quid. Tim (cs-sysadmin type) got his working without any greif I believe. Serial protocol is (hopefully) documented (or it'd be nice if they provide some appropiate source code). I've not reverse-engineered any serial protocols in a while, so it might be fun ;).

Back on the work side of things, something seems to be badly wrong in the MESH polling stuffs. Suspected fault in the event poll in some way. Emil was reporting things in the order of hundreds-of-thousands of events for less than a thousand packets sent. Why can't hardware engineers design nice interfaces ? Oh for the Para-PC and HS-links..

Released another version of KRoC/Linux (not on the official KRoC page yet, want to give it a bit of soak-time first). There were quite a lot of (mostly minor) changes, plus some bits of the directory layout changed. Multi-dimensional dynamic mobile arrays seem relatively happy. I suspect there are still problems, but more thorough CG-tests will find them. Mobile channels are next on the list I think, wrapped up in the CHAN TYPE syntax (allows multiple channels (not necessarily all the same direction) to be bunched up together and treated like a RECORD). Eager to get this underway/done, but need to polish my maths first, got a 2 hour revision seminar type thing tomorrow. Functions and set theory tomorrow I think. Fairly fundamental, related and not too brain-damaging (once it's clear what the various relations and their meanings are anyway..).


Bristol was fun. Nice place (in terms of the architecture). Seems a large amount of people I knew/know in Oxfordshire have moved there as well. Maybe I should move there for a bit some day.

Worked lots on the occam OS, fixing various bugs in tranx86/occ21/ccsp along the way. The dynamic mobile stuff is pretty much all there now I think (in terms of declarations and parameters). Abbreviations will break horribly I think, but there's not a lot of sense in abbreviating a dynamic mobile at the moment (to another dynamic mobile that is). It will be useful when MOBILE sub-types appear (as fields of a RECORD for example). Could really use some convenient way of resizing these things as well. All things to think about in the future tho, more urgent stuff.

Well, the end of the Easter break is finally here and most of the students come back today/tomorrow. Here's hoping the term will be mostly bad event free. Going back to the saga of the car, first round of court documents have been processed. Ideally this won't end up in a hearing, that's time away from more important things, but there is a reasonable amount of money involved, which I'd rather not see go down the drain. What a fucking mess that turned out to be..


Been putting multitudes of hours into research, but going the right way. Yay! The things on the `sort-out-now' list are getting stale. Bah. What comes first, life or thesis ?.. or is that a rhetorical question.

Got pretty much enough bits together now to build the gas-meter-reading thingie. The little dial (1/1000's of cubic meters of gas) has a shiny reflective `0', probably for the specific purpose of being able to watch it go round :-). Housing might be interesting, depends how much the intensity between reflective/non-reflective needs to be. A little IR-laser with a photodiode would probably be more appropiate, but I don't really want to use things like that when attached to a gas-mains appliance ;-).


Oki, internet back, with various time-limiting checks and a reduction in the chances of auto-dialup working. Made fetchmail/fetchnews run in the ip-up scripts, which should stop most problems. dnet seems to be suffering a bit at the moment, so I've turned that off temporarily.

On the KRoC front, multi-dimensional dynamic mobile arrays are in-progress. Got a bit messier than I'd envisaged, compiler is mid-surgery as it were.. Got round to adding dynamic mobiles support to the user-defined channels stuff. Works for the basic cases, yay!

Training up to Bristol for a few days tomorrow. It's my excuse for an easter-holiday anyway..


Yay, holiday is finally here. Just a few 1st-year Java scripts left to process, superflous and late submissions only. Been plodding on with various CERN and other work as well, people are beginning to get jumpy..

BT suspended our internet account. Dammit. Not having any internet is a bit annoying. After reading their terms and conditions more throughly, it seems we may have been slighly excessive. 16 hours/day is their limit. Need to fiddle the internet connection stuff a bit..

Re-factored some more of tranx86 and CCSP, should be nearly ready to start hacking in the MIPS/Linux target. Really need a handy SGI to generate example assembler for me though. Cross-compiler doesn't have glibc installed for it yet, restricts compiling stuff somewhat.. Going to work on own stuff for a bit, until the internet returns (if it returns..). Maybe broadband would be an idea, or freeserve.. Anyway, kroc/Linux 1.3.2-2 is out there now, and seems to be good. No reported problems so far :-).


Yikes. Just about managing to stay afloat with the inbox! End of term in < 2 weeks, then 3 weeks to get down to some serious work :-). Patched KRoC up a bit more, thanks to Kazuto Matsui for being patient with the various KRoC bugs.


Yay, put out 1.3.2. If there are any annoying bugs, I'll fix them in 1.3.2-1.. The route for upgrades is in there and fairly working :-).


Tidied up a few more things in KRoC for 1.3.2, added some man pages and tweaked some things in various minor ways. The undefined checker could use a tidy-up in its error reporting, some things come out more than once. Save that for 1.3.2-1 I think.. Did some more work on the new bar simulation, which can be seen here. Sprites no longer get stuck forever. Some get blatently confused and wander round in circles, but that's that. Still need to code up the de-tox chamber (where they go after too much beer) and plug in the pool-table. Jukebox could probably use some more songs, and an interface to something like xmms song-change plugin for amusement.

Uptime currently reporting 25 days, maybe time for a quick burst of windows to play some more with impulse-tracker. Ought to see how soundtracker-0.7 is coming along really. Also need to move desk around the room a bit, bah. That'll definitely mean un-plugging stuff and such like.


Been working far too hard.. But at least a new distribution is almost ready. Released 1.3.2-pre9 earlier, which is hopefully mostly there. Just test it on various machines, iron out niggles, then it's ready to go :-).

Spent hours fixing various dynamic-mobile things, at least they're pretty solid now. Still causes the parallel usage checker some niggles where it ought not to (maybe the usage checker always complained about such stuff..). Oh well, something else to look at. The job-queue seems to be growing faster than I'm servicing requests. Things will just have to wait. At least it's a priority-ordered queue ;-). CERN and others are beginning to get a bit curious about where there jobs are, better process those sometime. No teaching next week - CS2 project week and MSc-conv project-week, so that should offer lots of time to get things done.


Been plodding on with numerous things. Some PIC micro-controllers and Atmel AVRs arrived in the post, yay, along with various chip-sockets and other fun stuff. Forgot to order some resistor blocks and 5V regulators tho. Doh. PC power-supply gives out a nice steady supply, but I'd rather have a regulator just in case (power-supplies are classed as consumables round here..).

Fixed some priority problems in KRoC, looks like this will be enabled per default for the next release (which will be 1.3.2 proper I think). Still needs some more tidying up and such things though. Not convinced that all is as it should be though, need some harder priority tests :-). Coursework deadline must be approaching, my inbox has a higher arrival rate than normal.


Wasted some time tracking down own bug in the compiler, turned out to be making some broken assumption. All better now. CG-tests are in a working state, with priorities enabled that is :-). On the priority front, everything seems to be working happily. Will prioritise and test the web-server next to check that still works with priorities, ought to..

Peering back at the bugs and wibni lists, I think the immediate future is going to be testing + finalising priority handling, docs, parallel recursion and something else which I can't quite remember.


Been busy working on various things. First, some top-secret projects, ahem, and secondly adding priorities to occam. This was all going nicely until replicated PARs caused greif. At least I wrote the workspace map for that stuff down somewhere.

Fixed the mysterious update problem, was being caused by patch not setting the execute attribute on the new configure file. Added thing to the patch script to troll the source tree and set execute bits. Seems to have fixed it quite nicely :).


Back from a fun weekend away at the Bowles outdoor center, somewhere around Tonbridge. Really quite insightful. Time to get back to some real stuff. Need to get various kernel patches up to recent kernel versions.. Parallel recursion needs a bit of attention, well, quite a lot, along with N replicated PARs, which seem to be generating odd error messages (the result of a highly confused usage-checker). Will probably look at the SPoC dooberry, which used a more sophisticated algabraic usage-checker. Couldn't handle modulo the last time anyone looked, which isn't exactly helpful. It been a few years so hopefully someone fixed it :).


Did the user-defined channels thing. Implementing the blocking ALT was particularly tricky, but I'm reasonably convinced that it works and that the mechanism is race-condition free. A good bash on my multiprocessor later will test that theory out.

Generated the user-defined channels documentation, first instance, just less than 30 pages. Not bad for a weekend's work! Still needs tidying up, etc., but is mostly there now. Will proof-read later.

Got a new distribution out there, some seemingly strange problem with the udc/libsrc directory and handling updates on it. Strange, don't know what the problem is. Running autoconf/automake in there seems to fix it, as does always doing a "./build distclean" after upgrading to 1.3.2-pre2.. Wierd, maybe I'll discover the cause later.


Univeristy term has started again, arg. Means several hours a week less for fun stuff, plus getting up at regular times.. Aquired a prolog terminal session for the MSc conversion, should be interesting, prolog certainly was. Must write that free prolog thing at some point, and take a look at what GNU has to offer in the way of prolog.

On the occam front, user-defined channels working a treat. Not that complicated in implementation, but quite powerful. More work needs to be done on presenting a slightly cleaner interface to occam. Added work in the translator doesn't seem to have knackered commstime too much, costs ~>3 CPU cycles to do the bit masking stuff. Built it into the source tree properly, similar to the dynamic processes stuff. Have example programs for the simple channel and buffered channel things. Still no proper support for mobile types, and zero support for ALTing. The latter isn't impossible, but will require some careful thoughts about how blocking-system calls interact. Of course, things might change considerably, this is early stuff..


Been playing with KRoC stuffs. Auto-update things seems to be working pretty well, at least that'll make pushing out new distributions _much_ simpler. User still has to have wget and patch installed, but hey-ho. This method also makes it possible to change the directory structure in a distribution, which could be handy. Some of the components are really overdue for a patchlevel or minor-version change..

The university term starts again tomorrow, more holiday..


Happy new year, etc. Been busily grinding away at KRoC, a pre-prelease of 1.3.2 has appeared on the kroc page. Still needs a bit of work before I'll make it 1.3.2 proper. Would like to get recursion working properly, which means some mechanism of forward declarations, but that's not too hard. Dynamic-mobile returning functions are also on the way, still perfectly safe and alias free, they just can't take mobiles as arguments.

On the car front, I think it's gone. Bye bye car :~(. Now, some money for it would be good..


Sleeping pattern seems to have disintegrated temporarily.. This will probably resolve itself when I start going to bed at regular times, instead of 10am.. Up now for the rest of the day, will probably sleep after startrek.. (which will inevitably be during it, of course..).

Hacked basic support for extended rendezvous into the compiler. Will take a bit of work to get all input combinations supported. Copy of data is being done in the generated transputer code (rather than in the run-time kernel). Synchronisation field makes it a bit inconvenient for the inputter to store a pointer in the workspace. Could use the link field, but that's absorbed by deadlock-detection code, and I'd rather that worked since deadlock can creep in quite easily with this.

Still processing car... At least things seem to be happening. Other insurers have inspected it and declared it "beyond economical repair" :(. Oh well, probably for the best, it was rather mangled down one side.. Need to get rid of it now. Anyone in the Woking area want a knackered Escort ? On the positive side, it's had a new battery, starter-motor, wing-mirror, spark-plugs, brake pads and clutch assembly. Largely useful bits. I get the worrying feeling that if I want to see any money for the car, I'll have to take the other guy to court, which is something I could really rather do without just at the moment. Research is much more important..


December already.. Spent the last 24 hours or so in windoze, managed to start and (mostly) finish a nice tracker module, on the music page. Back in Linux now :).

Plenty of things happening with KRoC. Fixed some bugs here and there, renamed stuff in the course library to stop a name-collision when linking with convert.lib (REAL64TOSTRING and friends). Added channel-direction specifiers to actual parameters, still no --strict enforcement of this though. Still one or two more allowed places which currently generate errors to sort out, but then strict enforcement can go in.

Started poking with recursion in occam. Fairly simple in the compiler's front-end, but getting complicated in back-end. Basic self-recursive PROCs are working OK though. Discussed extended rendevouz with phw, so that'll probably go in sometime.


Woah, September is escaping, ieee. Seem to be pretty much installed in new-house now, yay. Spent some (lots of) hours putting together a diskless Linux box for downstairs. Had some fun getting it to boot using an EEPRO-100 (/S). Wasted hours trying to get the thing to net-boot successfully, called it tadpole. Wierd boot process: tadpole resets, Intel boot-agent DHCPs, DHCP server responds with some IPs and a path to the ``etherboot'' image (handily built using rom-o-matic). Tadpole TFTPs etherboot rom and boots it. This BOOTPs for the real-deal and gets the linux kernel image. Would have liked to use the DHCP or BOOTP server exclusively for both, but the process of needing two different boot-files makes this a bit hard. We went through many many tadpole reboots searching for a working configuration (even ended downloading a new flash image for the card and popping it in, having moved the card temporarily to another machine for this). There were some initial NFS root-fs hurdles (mainly not being able to set the kernel command-line), so a few hacks in init/main.c later, it mounted the root-fs. Only took a few hours to mangle it a root-fs from an existing debian, X, etc. all working on it now. Yay! I'll move it downstairs later.. Still awaiting for a TV-flavoured graphics card for it. If anyone knows a nice solution for getting it to work with a vague hint of simplicity, lemme know :). -- I've not tried ``netboot'' yet, maybe that'd help, who knows.

On the KRoC front, lots been happening there lots of work on channel direction specifiers, which seem to be working happily now. Added a ``-s | --strict'' kroc option to turn undefined warnings into errors. Some major discovery of TCOFF (transputer common object file format) in order to get tranx86 to process useful things appropiately. tranx86 will now check the top-level process signature for validity, yay. RESULT parameters and abbreviations are well on the way. RESULT parameters are done (they're simple). Abbreviations done, but possibly in a slightly incorrect manner, maybe refactor that later.. In the process of doing some stuff with dynamic mobiles, as there are still one or two incomplete things there. On the immediate queue are run-time PLACE-able PORTs (useful for vm based systems) and a sparc-sun-solaris version of the source distribution. In theory, this shouldn't be too hard..


Oh, appears to be halloween today. No trick-or-treaters yet though. Pizza ordered and awaiting delivery :-). Put KRoC/Linux 1.3.1 together on the KRoC page. More funky features and some bug-fixes.

Just recently moved house again, hopefully not moving again for a good while (it gets boring informing people of address changes).


Back from a pleasant trip to Switzerland. New KRoC/Linux release in the pipeline, with some fun new additions such as array constructors and channel direction specifiers for PROC formal parameters. Car stuff is still being processed.. gah.


Busy week.. Started with the CPA-2001 conference in Bristol, which was much fun. Involved quite a large amount of beer. Discovered that the flat I was hoping to move into had already been let by the landlord (not the agent apparently). Looks like more house-hunting this week coming.. On the car front, the other guy seems to think the collision was my fault. Huh. This weekend is being spent doing some work, and not worrying too much about a place to live and car, until Monday at least..


Slides for conference all done, I hope.. Presentations vaguely rehersed, but time's been a bit short lately.

Had a look at doing dynamic parallelism properly in occam, then remembered why I didn't go near that bit of code last time. Roughly 40 or so lines of transputer ASM to handle a ``PAR i = 0 FOR N'' type thing (mostly correct mapping of the workspace/vectorspace/mobilespace). Shouldn't be too hard to pull off tho..


Been working on slides for CPA-2001 presentation. Fixed consistency problems between old/new translators, turned out to be something peculiar with the benchmark program.

Need to talk to the car insurers at some point..


Been doing battle with the KRoC system in general, trying to get better results. Unwound tranx86 and CCSP 2 days due to futile changes. Discrepency in results put down to caching effects.. Generated some slides for CPA-2001. Need to put some together for a short talk on the occam web-server, with some blurb on the OGI stuff.


Been sorting stuff out mostly, like finding another place to live.. Done that now tho. Fixed some things for IMS, and I definitely don't care much for maple's incompatabilities with various libraries under Linux.. Gave it a set of known good libraries in the end.

Cured some more not-really-undefined problems with the occam compiler and did some more inlining in tranx86. What's there is pretty efficient now :).


Currently at home, having a minor holiday and break from work. All was going well until I left Canterbury...

Got the car back on the Monday, after having spent 600 UKP having it serviced MOT'd, new clutch, etc. All nice and shiny. Driving along the M25 south, west-bound, ugly weather but nothing to severe. Was driving alongside a lorry (me in middle lane, him in slow lane) when it decided to pull out without regard for me being there. Result was a mildly terrifying skid/swerve along the M25 (at about 17:00) into the hard-shoulder. Car a nasty mess, me OK.. BASTARD BASTARD BASTARD. Words can't quite express how annoyed I am about that, especially since I just got it back and it might be a write-off, which would suck deepy. Will speak to the insurers tomorrow and hopefully discover the fate of the car (either repairable or write-off..).

Just so you can avoid this guy (who can't see down the right-hand-side of his vehicle) it's a DAF SuperSpace XF cab X registration, with the name "rigger". Being a left-hand drive cab was the reasoning behind his not seeing me. If you see him, thank him for royally shafing my holiday. I've been mostly stuck at home (oxfordshire) without a car, and wasted time talking to the insurance company and filling out accident report forms.. He did seem a fairly nice guy tho, and I'm glad he stopped, exchanged details, etc.

The Fred Theory on Left-Hand-Drive Vehicles: There should be a legal requirement for left-hand-drive vehicles to have an extra mirror on the right of their vehicle in order to see the "blind spot", which is much larger than in right-hand-drive vehicles. I'm sure this would prevent a good number of accidents, and maybe lives. I'm glad I'm still alive basically. Had I stayed on the road, all the traffic behind me would have joined the mess...


Going away (home) for the week. Back by the 27th (Monday). Unlikely to have/want email until then, but the mobile will probably be kept to hand.


Been churning out demonstration applications for KRoC/Linux, as well as various bugfixes and stuff which should have been done already. Looking generally good on the whole (starfall on the occam page for example.

Go pick up a fixed car today :). Trying to sort out a few days "holiday". Well, time with family & friends back home anyway.


Spent the weekend generating a funky tracker module. Took many hours to do that, but I got faster towards the end. All those keystrokes... Used impulse tracker since that's the best one I've got at the moment (which functions sensibly under windoze). The Linux tracker (soundtracker) needs a bit more work to make it more useable. Maybe I'll hack it some time -- wouldn't it be nice if it had S3M and IT support..

Reduced the KRoC/Linux context switch to something that I'd consider fairly minimal -- 35ns on a P3/800 (around 28 clock cycles). That includes a periodic check of the sync flag (blocking syscall events, etc.). :).

Booked plane tickets and accommodation for this autumn's visit to CERN. Just for a fornight less a day, since it's term time at the Uni and all.


Got insurance renewed on the car (a rediculous 550 quid), and booked it in for a service and MOT. Previous MOT has now expired, so I'm staying at home this week.

Funky new Philips PVC690K (Vesta Pro Scan) webcam arrived. Looks like some IOCTL numbers changed between 2.4.6 and 2.4.7, thus I've been compiling applications for several hours today. Got camE going to take snapshots, and camstream to show the video stream. Both work pretty much OK.

Did some more inlining experiments with tranx86 and reduced the communication overhead (measured by commstime) to 45ns :-). That's a whole 22ns faster than the previous best. As a completely pointless bit of information, this now could (theoretically) communicate 701,280,000,000,000 times in 1 year.


Started looking (somewhat urgently) at getting the car sorted out. I'd rather not be car-less, especially considering the largely botched-timings of bus services. Get funky ticket machines at the bus-stops like in Geneva!

Realised that the WG/WGBuilder I put up the other night won't install quite as smoothly as before -- wg-0.9.1 will need remaning to wg-0.9 first.. dammit. Getting somewhere with this lot though. Partially fixed another bug in WG, although WGCMessageWin still needs more looking at (especially the resizing aspect of it..).

More work on occam/mobiles to get the software to the same state as the documentation -- mostly there, but it still lets some illegal occam through the type-checker (when it clearly should not type-check..).


Oki, another 4am.. Got the editor problem in WG/WGBuilder sorted out at long last. Will attempt to unplug the debugging messages and get another set of releases on the web. Been too long since this stuff last worked.. :) :) :)

Got a very nasty shock from autoconf earlier. Oki, there used to be a directory called `core/' which had all the important bits in. Now, the generated autoconf output (`./configure') contains the line:

    trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

The potential here for disaster is quite high, especially with my `core' directory.. Bye bye source code. Thankfully `wg_x_connection.c' was still loaded in one of my vi's, so disater averted, but I'd highly recommend that they change that line to one which doesn't rm -r core, but rm -f's it instead. `core' has been renamed to `wgcore' to avoid it.


Been really rather busy, although things are beginning to slow down a bit now. Papers for the CPA-2001 conference are finished (I hope). Got just less than 2 months to tidy the KRoC/Linux system for a nice new MOBILE-enabled release (a final release, that is, not another -pre), and generate some presentation fodder.

Managed to get some more software on the software page over the last couple of weeks (sorta side-lining for sanity 8-)). Started doing some more work on WG/WGBuilder. Fixed hint timeout over-eagerness and tidied up that bit generally. Removed the immproc stuff in favour of providing XConnection with the means to handle the execution and collection of child processes. This will ultimately fix the horrid bug in WGBuilder that caused it to seize up whenever a child process (eg, editor) finished..


Installed in new house. Room is quite small, but sufficient. Got teddy up and running on the new network, which is now doing the internet connection stuff. Tariq/Andrei's pppd options file seems to have cured previous ills. 8-port 10/100 hub on order to improve networking -- the 10 mbit hub (and the TV) will be going back to Dave soon.

Generated some thoughts on rapp. Want to get this stuff going sometime soon -- probably hacked in combination with WG and WGBuilder.

More paper hacking for CPA-2001. Did some web-server benchmarking stuff as this has crawled up the priority ladder (and is now overdue..).


Been frantically packing stuff into boxes and moving house, hence not vast amounts of responsiveness from me. All your email will be processed and answered soon!

Craftily managed to remove one of the boxes in the lab from the network -- did something zero-ish to something in /proc/sys/net/ipv4/. Ooops. Was trying to benchmark a web-server, but was suffering from syn-flood upsets (presumably). Better sort that -- anyone know the correct /proc/'age to turn this off temporarily ?

Churned out many more pages of paper-type things. Better get those finished, real soon. CR deadline ain't all that far away, and what's currently being processed (at the remote end) is far from ideal. Cleared up one or two more bugs in the process, which is always good.


Been busily working away at various stuff. occ21 hacks to get undefinedness information into the code-generator seems to be working correctly -- scope out could do with looking at as well. First drafts of various papers put into the conference submission process, need to tidy-up ASAP..

Hacked some web-server benchmarking stuff into a Linux state -- blocking system calls seem to have developed a (seg)fault under heavy load. Better fix that at some point.


Put WGBuilder on the WG/WGBuilder page (as a download). Took a while to GPL-ify it all, but provided an opportunity to scrape off some cruft (of which there was quite a lot). Fixed the build-number at 677, but that'll get incremented whenever I change something (not necessarily along with the version). Busily getting some papers sorted out, as there's a first-submission deadline on Monday. Arrgh.


Quite early in the morning (06:10), slept tho. Finally managed to get window-gadgets into a more net-suitable state. Think I got everything with the GPL (not LGPL yet). Both the libraries and the newtest app seem to be working OK still. Got the AVL algorithms into the XConnection parts, which appears to have speeded things up quite a lot -- searching is the most frequent operation. Buildinit will need some tidying up soonish, esp. to get the command-line into something more conventional (rather than the "-m mapping.wgm -s thing.hpd" business). I've put the new .tar.gz stuff on the window-gadgets page. Back to paper hackery for the day now..


Generated some more blurb on the occam-tutorial page. Spent some time playing with Impulse-Tracker in DOS. Burnt the first CD of RedHat 7.1, slept some, then fixed the undefinedness checks for nested PROCs in the occam compiler. Almost time for another release, just gotta add some form of `#PRAGMA DEFINED x' directive handling, remove lingering bugs, etc..


Hacked out some more stuff for the CPA-2001 paper; slowly getting there. Added some sample ripping stuff to s3minfo, which can be found on the software page. Tidied up some of the undefinedness checking stuff. CG-tests went through without breaking the compiler, but nested PROCs need handling differently (ie, check at the PINSTANCE node, rather than the PROCDEF node..). Still running on nocturnal-time, better try and remedy that at some point..


Fixed handling of WHILE loops -- was accidental stack corruption causing the problem. Parameters, abbreviations and VAL abbreviations get correctly checked for undefinedness. Need to somehow record the state of dynamic mobiles at various points in the code to avoid the check-and-free code. Can't hack the tree up too much however, maybe an UNDEFINED node type to sit the variable on if it's undefined at that point.. Made some changes to the house networking stuff; added more pretty table stuff (need to allocate phone bill at some point, and generate some nice graphs of day-by-day usage. Here is the output for a typical days internet usage.


Been implementing a variable usage checker for the compiler, which will catch the usage of undefined variables (hopefully). Looks like it's nearly there now, MOBILEs get correctly undefined after RHS on assign or output. Dynamic MOBILEs behave a bit differently, undefined until allocated or inputted. Having some mysterious problems with WHILE loops however; looks like the tree-walking code doesn't like being re-run on stuff..


Got dynamic mobiles implemented and working properly (phew). The free-lists appear to getting their blocks back again, which is good. Plenty of code still needs adding to the occam compiler, such as handling `DATA TYPE X IS MOBILE []Y:' type things properly. Need some good test applications for this stuff (and some benchmarking related stuff).


Got mobilespace allocation and initialisation working :-). All the test programs compile and run as before, which is a fairly good indication that it all works OK. Currently hacking a mobiles paper for CPA-2001. Paper for PDPTA 2001 appeared to get dispatched OK (with post-processing for content and incompeteness from Peter).


Got mobile-space pointer working in the occam compiler back-end, looks like it's getting passed around OK. Need to change the way it handles seperately compiled stuff (to get mobile-space usage included). Spent the weekend in sunny Swindon drinking beer+wine and watching "buffy the vampire slayer" (cool series) broken up with various random films.


Started (> half-way) conversion of .doc file back to .tex (antiword is a handy tool). Added some more optimisations to tranx86, as well as cured several lingering bugs (all minor). Got CPUID stuff working properly, and tranx86 now generates conditional moves (where it can). Should also properly detect and handle AMD and Cyrix chips as well (will need -u flag to detect, or force target class with -m486, -m586, -m686). RAE exam done, find out how well in a month or so... Busily adding mobile-space stuff to the occam-compiler back-end, which looks like it might actually work. Will have to suffer some initialisation cost on PROC/FUNCTION entry though (requires a check at the very least).


Generated first few pages of a paper for CPA 2001 (maybe). Added some more optimisations to tranx86, thought about some others, fixed some bugs. Got RAE exam tomorrow, huh, here's hoping I know enough.. QRV, QRV. It's about time a new version of KRoC/Linux appeared, hmm. Also need to get some issues with xdmchoose sorted out.


Got xraster up and running, which is cool. Added an optimisation in KRoC's tranx86 to make block coppies (as per MOVE instruction) a bit faster in constant cases. Started to examine occ21's workspace allocator, in an attempt to implement the mobile allocation scheme. Built newish kernel tree with bits of parport patches in an attempt to provide Tim with a new patch which includes the warp9 handling stuff. Various other experiments on different PCs show that these mysterious errors are largely cable and/or PC related.


Back in the UK. Fixed a small nugget in tranx86's register allocator, it was getting stuck in one particular arrangement of code.


Hmmm.. examination of the bytes coming back from the board indicate that something really wierd is happening. I'm pretty sure that it's not my bug. 3am and bedtime for me.


Multicast packet reception in MESH is now working correctly (as expected). Got the abstract-scheduler stuff tidied up and working with the MESH (user-level) scheduler and the pthreads (kernel-level) scheduler. Reference-software seems to be OK which is good news (although one would do well to bin the reference software and start again with something much simpler). Still having random errors with the parport -- interestingly, a byte seems to be appearing from nowhere in particular. Unsure whether it's the PC's parport, our hardware, or Jamie's FPGA code. Probably a problem at the PC end (or at least that's where I'm looking at the moment). Definitely some interesting stuff going on somewhere.. Test program indicates that it might be elsewhere however.


Put in machine-name-change request (seems unlikely that it'll get done before I leave CERN!), got broadcast packets correctly received in MESH, multicast packets on the way. Also had the unexpected side-effect of the odd core-dump on exit. Better fix that I guess, gdb (as usual with user-level thread schedulers) not much help... Suspected bug with rcubes needs fixing -- bugger. Mobiles paper in progress, tonight will be spent hacking it out. Busily responding to CO516 queries at Kent (apparently the exam is on Monday). Minor kernel hacks to use 32-bit FIFO writes in EPP, will probably go up with the next major set of changes, as it's not worth it just yet (only 8 or so lines). Improved our write()ing speed with the board from 600 k/s to 740 k/s, which is definitely some improvement. Reading is still piss-poor slow though (300 k/s).


Fixed nasty segfault in MESH, after spending a days work typing `stepi' into gdb. Integrated parport patches into 2.4.4-pre6 and sent in Tim's direction for inclusion. Another section on the mobiles paper (and the CR deadline is getting really close now, beginning to wonder if we'll make it in time). Meeting on state of the enet32-project thismorning went smoothly. Just one or two little bits need tidying in the userland stuff, and I really need to learn CVS now. Bastards.


Back on `normal-time'. Chucked out parport patches (after some changes), did some more stuff to rcubes, started work on MESH again. Managed to generate some up-to-date documentation as well, which is always handy.


Sleep badly needed now. Sent patches off to Tim/linux-parport. Pondering about the CERN restaurant 1 service: yesterday they had nice little buns but no cheese for brekky; thismorning they had cheese but no little buns. Conclusion is broken logistics. Got overtaken by a jogger on the way back to the office at 8am, fool. Added some more buffering to the middle-man software, in an attempt to maximise read/write sizes. Wondering how to tell parport about the fact that there's a nice w91294pic on the other end of the string. Hacked a bit more of the mobiles paper, CR deadline is only 8 days away, eek.


Slept some more, gave up on getting ECP FIFO/DMA reads to work. I'm obviously missing something. Added some more stuff to parport/ppdev to make EPP go faster, at the user's request. Better fix the middle-man software to manage the queues properly.


Approx 5:30am. 4 hours kip in the last 38, and my brain is starting to falter. Still fscking around with parport stuff, although starting to figure things out about it. Breakfast at 7am.. Put some more piccies up on the web-page. Think about clearing debugging out of parport and sending current patches up to Tim/Linus.


Uptime 26 hours. Necessary middle-man software seems to be working OK. ECP read timeouts aren't entirely pleasent, neither is the IEEE1284 spec.. 9am meeting, hard-severe. Sleep. Up again 4 hours later, breakfast at 8pm, hmm.. Investigations with the elegantly aging logic-analyser indicate it's the PC being slow. Read Winbond specs, deduce it's not that.


Got up circa 3pm (after a much needed 11-hour sleep), breakfast, lab. More parport prodding.. Data rate still limited to about 400 k/s, for some reason. Dream about doing something unpleasant to peer for not informing me about an "input buffer" earlier, requiring me to rewrite quite a large chunk of (non-trivial) code.


Recover from several days of alcohol and clubbing abuse in Geneva, as well as a chicken madras that was more in the vindaloo category. Full marks to Rajpoute for an excellent meal and decor tho. Start thinking about getting some work done, although I recall bits of saturday were spent in the lab working.


In Switzerland, weather is good, so we all buggered off skiing. My first attempt at this sliding around on snow business. Good fun by all accounts. Skis take a bit of getting used to however. Paid for 2 hours skiing instruction. Fortunately, the attendant must have been suffering from something (maybe permanently), since he deduced that (500 - 360) = 240 (frf).


Up early, visit lab to return marked scripts. Home, pack rucksack + other bits, jump on BR ^W Connex train towards gatwick.

Last modified: 2016-07-08 11:52:42.650855235 +0100 by Fred Barnes [ds] [plain]
Page generated: Fri Jul 08 11:52:42 2016
Valid XHTML 1.0! Valid CSS!