I’ve started poking around at connecting Radian to LLVM. The current backend translates the flowgraph to a linear intermediate code, then translates the LIC instructions to C source code, then passes that through gcc to get machine code. I’m not sure whether to leave the LIC pass in place, then convert to LLVM instead of C source code, or to emit LLVM IR from Radian’s data flow graph. The significant semantic difference is that LLVM IR includes type information, which is implicit in LIC.
While I think about this, I’m playing around with using Church encoding for booleans. Instead of including a “boolean” data type with two predefined values which represent true and false, then implementing a “branch” operation which chooses between two values based on a boolean value, true and false themselves become the implementation of the branching operation. It’s as though they were defined like this:
function true(thenclause, elseclause) = thenclause
function false(thenclause, elseclause) = elseclause
If you have a reference to one of these functions, you can use the function itself to perform the branch: you just call the boolean value, passing in the option you want to use for “true” and the option you want to use for “false”, and it returns the one that matches the boolean’s value.
This wouldn’t be appropriate in every language, but in a functional language like Radian the only thing you can do with a boolean value is to select which of two expressions you want to use. It makes sense to do away with the custom “branch” instruction and just use function invocation.
Comments Off on
I cleaned up my serger and re-threaded it the other day, then spent a couple of hours making up a long-sleeved T-shirt. The collar came out wrong, again, as it has each time I’ve tried to make a crew-neck with knit fabric. The fabric always stretches out and the collar ends up enormous and floppy. I don’t get it. I can make all kinds of other collars but the crew-neck eludes me. It was good serger practice, though. Re-threading the machine takes all of two minutes now, and I am starting to understand how the tension controls work.
Radian, of course, is my other big free time project. I have a simple Hello World running now, and that means it is probably time to abandon my temporary C-source-code backend and start using LLVM. I’ve finished as much of the front-end language support as I’ll need for now, and it’s probably time to shift my focus toward the runtime environment. I need to build an IO interface, a garbage collector, and the core function library; using C as an intermediate step is just a hindrance here.
Comments Off on
You can publish a Git repository on any old web server, without needing a special git daemon, using a command called ‘git-update-server-info’. This would be useful if you wanted to publish some code but lacked the ability to offer any old user an ssh login, perhaps because you are using a hosting service instead of running your own server. Here are a couple of how-to guides:
git-server for the poor: git-update-server-info, rsync, and remote repository
How to publish a Git repository
SourceForge FAQ for Git development
It is also possible to create a patch file with git which you can send via email. I am thinking about setting up an auto-build-verify system that checks a dedicated email inbox, downloads patch files, builds them on a temporary branch, runs a validation suite, and either pushes the changes up to another repository or sends back an email describing the errors that occurred.
We were working toward a system like that just before I left Real Software, using Buildbot. It was a big improvement over the ad-hoc practices we’d always used before, but it was still a reactive notifier rather than an active filter. You checked in code first, then the buildbot would run its tests to see whether you broke anything. It was much better than hearing about it from one’s irritated colleagues a day or two later, but still too fragile.
It was much harder to break the build at Microsoft, where no change could be committed until it included a new test suite and had been shown to pass every existing test. This was unfortunately a completely manual process and thus extremely time-consuming, but it did create an unusual degree of confidence in the checkins, when they finally did happen.
Grunt work is a waste of human time: that’s what robots are for. I want to send my code off to the build system whenever I think it’s ready, let it do the repetitive validation, and then either pass the code on to the development trunk or let me know what went wrong. If I screw up, I’ll have a chance to fix it before I waste anyone else’s time dealing with the problem, and I’ll know that code I pull from the trunk will always work as far as the test suite is concerned.
Comments Off on
Home pages for some interesting programming languages:
Python: python.org
Perl: perl.org (does not appear to be an official home page, but this is close)
Ruby: ruby-lang.org
Scala: scala-lang.org
Clojure: clojure.org
Factor: factorcode.org
Haskell: haskell.org
Erlang: erlang.org
OCaml: caml.inria.fr
Comments Off on
I finished the jacket on Saturday, in time to wear it out to Sara’s cocktail party. I just now had Ava snap a few photos of me wearing it so I could post one here, but for some reason I came out looking like I was in a really terrible mood, so I’ll have to get some more taken later. I’m fairly well contented with the results: it’s imperfect, of course, but I learned some things while making it that will undoubtedly serve me well in future projects, and I ended up with a garment that will easily accomplish its intended purpose.
Comments Off on New shelves: tidy sewing table
That cold pretty much wiped me out all last week. I’m feeling fine now.
I haven’t finished the jacket yet. The pockets came out perfectly, but I made some pretty significant mistakes when laying out the lining and had to get some more material. I also decided to tear out the old collar and make a new one, and to take advantage of the pocket construction to fit some extra material into the hip seams. This took a lot of extra time but the jacket looks a lot better and fits more comfortably, so I think it was worthwhile. The jacket started as a sort of casual experiment but has become something I could wear regularly.
My new job is going fine. The company’s in crunch mode and everything is a bit chaotic, but I’m working away and not letting myself get too stressed out. It’s nice working at home again.
I’ve been putting a lot of my free time into Radian lately. I’ve built a simple object system, with member dispatch, inheritance, instance variables, and parameterized constructors. There are no mutator methods yet (all methods are “const”, in C++ terms), but it should be enough to build a primitive console-IO module. I expect I will have a working “Hello world” by the end of the month.
I came down with a cold Friday night, so I’ve been taking it easy this weekend. I mostly stayed in bed yesterday, though I did rouse myself for a few hours to play the opening set upstairs at Jason Baker’s party. I kept the tempo in line with my energy level – about 75-80 bpm – which seemed to work well for the upstairs room’s “sprawl out and relax” appeal. I didn’t last long after the set was over, though, and crawled into bed shortly after midnight.
Today I’ve been casually poking along at my current sewing project, the black & tan jacket. I’ve fussed around with some scrap denim making welt pockets for practice, and after I’ve brewed another cup of tea I’ll see about applying the technique. Perhaps after that’s done I’ll work on the lining.
The jacket has some fit issues: it’s narrower around the hips than I’d intended, the shoulders are a little tight, and the collar didn’t come out the way I’d planned. It’s a little disappointing, I’ll admit, but the goal of this project was more to get myself back in the practice of sewing than to construct a specific garment, and I’ve certainly learned some things in the process. Perhaps I’ll work out some way to adjust the fit, too.
Comments Off on
The new jacket is coming along well. I have been making it up as I go rather than using a pattern, and though it looks somewhat more severe than I’d intended, it’s pretty much coming out according to plan: a hip-length, four-button jacket with a banded collar and a single vent, done in heavy canvas, black with tan details. It’ll be lined, and I’m planning a pair of welt pockets with flaps. I haven’t decided what to do with the cuffs yet – perhaps turned-back with contrasting fabric, perhaps a strap…
This Scientific American article suggests that depression is less a mental disorder than an adaptation for deep analytical thinking:
This analytical style of thought, of course, can be very productive. Each component is not as difficult, so the problem becomes more tractable. Indeed, when you are faced with a difficult problem, such as a math problem, feeling depressed is often a useful response that may help you analyze and solve it. For instance, in some of our research, we have found evidence that people who get more depressed while they are working on complex problems in an intelligence test tend to score higher on the test.
My bike came back from the playa with its chain loose enough and rear sprocket worn enough that it was no longer safe to ride. I parked it at the Rocket Factory and ordered a new chain and sprocket set. The parts finally arrived yesterday, so Adam and I met up over at the shop and spent a few hours working on the project. We didn’t finish – had trouble getting the rear sprocket off the hub – but once that’s done it should be no more than another two hours to finish up. I bought an O-ring chain this time, so perhaps it’ll last a bit longer than the last one did.
This evening I’m working on my first new piece of clothing since the jacket for MJ a year and a half ago. It’s a black and tan jacket, made of canvas with a light cotton lining. It’s nothing fancy but it feels good to be inspired to make clothes again.
Comments Off on
I have this cute little netbook, an Asus EEE 1000h, which came with a semi-crippled variant of Xandros Linux. It worked fine since I could always drop into the terminal, and I eventually got enough additional packages installed to make it useful, but in the course of trying to install a more normal desktop interface I managed to wreck it – nothing ever works right the first time in Linux-world.
Yesterday I finally got around to installing Ubuntu netbook edition. Wow! It’s smooth, consistent, and doesn’t condescend to its users the way Asus’ custom Linux did. It’s not trying to be Windows or Mac OS, either; it’s just a nice, well-built system that suits the hardware perfectly. Definitely satisfied – ex
Comments Off on
From the blog Psychology of Programming, these excerpts from a 1995 paper on object-oriented programming published in Human-Computer Interaction have some fascinating comments from cognitive psychology research as applied to programming language design:
In careful experiments, Gentner (1981; Gentner & France, 1988) showed that, when people are asked to repair a simple sentence with an anomalous subject-verb combination, they almost always change the verb and leave the noun as it is, independent of their relative positions. This suggests that people take the noun (i.e. the object) as the basic reference point. Models based on objects may be superior to models based on other primitives, such as behaviours.
I’m back. The cube project was a great success. We’d never built the whole thing before, but we’d prototyped enough of its components to be confident, and indeed the whole thing worked. It was solved for the first time on Tuesday night, and again every night thereafter – difficult enough to be a challenge, but achievable enough to be tantalizing.
I didn’t actually want to be out in the desert this time around, so I had a few rough days after the construction work was done, but with help from some friends I eventually had a good time. Seven years is enough, however: I am never again taking a tent to the playa. If I go back – and it seems likely that I will, however I may feel right now – I’ll bring something to live in that is windproof, dustproof, lightproof, and tall enough I can stand upright.
It was really satisfying to be involved in one of the biggest, most recognizable art projects on the playa. We got a lot of media coverage and our project was one of the regular stops on the mutant-vehicle tour circuit. People loved it and wanted to tell us how much they loved it.
At the same time, it was hard to know how to feel about it. This is the first time I have been part of a large team project that actually succeeded. When I’ve been part of successful projects, I’ve been able to take pride in what I’ve accomplished, and when I’ve been part of large team projects, they’ve been heaving corporate disasters where I had no control over the outcome. How do you take pride in your small part of an accomplishment someone else was primarily responsible for? I don’t want to take credit for work other people did, but it feels like false modesty to take no credit at all. I don’t know how to think about this.
Comments Off on
Project status updates:
– playa trike: got construction pretty far along only to discover a major design flaw in the steering geometry. Fixable, but clearly not happening in time for this year’s burn.
– DJ machine: lots of progress, nearly done, put aside til after the burn. All hardware mounted in the case, all power and MIDI routing finished, half the audio routing done. I need some longer 90-degree-connector patch cables.
– motorcycle: Found a brand-new lens cover at bikebandit.com and installed it in place of the patched-up one. Saddlebags arrived: need to invent some kind of mounting bracket for them.
– finally, at long last, finished tailoring Maja’s furry pink vest. Still need to attach and power the array of LEDs. The half a dozen mintyboost kits I ordered arrived; I’m going to skip the USB connector and set them up to produce 12V instead of 5V.
Comments Off on
Comments Off on IMG_1301.JPG
Comments Off on Pat & Tanya’s wedding
Comments Off on IMG_1266.JPG
I’m too busy doing stuff lately to spend much time writing about it.
Projects under way this week:
– groovik’s cube: helped finish up the sewing, minor fix to the dimmer board
– playa trike: bought tires & tubes, and a cool pair of black-and-white star pattern hand grips
– Tanya’s wedding dress: wedding is Saturday, sewing still under way! Helped cut some replacement ruffle strip material, sewed & trimmed the skirt and bodice
– DJ machine: applied last coat of polyurethane, cut holes and installed power & audio sockets, mounted handle
– motorcycle: cut & glued acrylic panels to repair broken taillight lens (smashed by some inconsiderate or inebriated person while parked on Broadway)
– art studio at Sunrise: more unpacking and setup
remaining this weekend: more work on the playa trike; Pat & Tanya’s wedding; initial round of cleaning, sorting, and repacking burning man bins; alterations to playa tent.
Nothing is ever finished; completion is a state of the imagination, which is unbounded. Things exist; things change; one can draw satisfaction from doing work to accomplish a change, but satisfaction drawn from completion, or arrival, is forever elusive.
Comments Off on Mount Whitney and the Alabama Hills
I’ve been roaring away on various projects this week, chief among them of course the groovik’s cube. I’ve made a couple of minor changes to the dimmer code, but mostly I’ve been helping sew fabric panels. We’re using white ripstop nylon squares for the projection screens, with long strips of black lycra to divide them. As with anything on this project, each individual piece may not be a big deal but when you have to cut, pin, and sew forty or fifty of them even something simple takes a long time. And this isn’t really simple: we are sewing heavy-duty velcro onto ripstop nylon and spandex! This could only be more annoying if we had somehow involved silk or faux-fur.
Also finished re-engineering my bed frame. It’s a simple platform bed; I picked up a headboard a while back which has been sitting between the bed frame and the wall, looking pretty but not actually attached to the bed at all. This is awkward, because the bed frame tends to slide away from the wall if you sit up and lean against the headboard, and because there’s a large gap which eats pillows. I finally decided to do something about this. The bed frame’s bolt pattern is not even close to compatible with the headboard, so I cut a 1×6 oak plank to match the frame’s width, finished it to match the headboard, drilled some holes and installed T-nuts, then bolted the whole thing together. Simple project, but satisfying, and now I can use the headboard as a back rest when reading in bed.
Today I am reorganizing my studio space – I picked up a third work table. This one will become my “dirty bench”, and the current (slightly smaller) table it replaces will move over by the window and become a music station, holding my keyboard and DJ rig.
Comments Off on music machine case with three finish coats
I happened to see a pair of carved teak panels at a garage sale, and mentioned them to Cat and Sam when I got home. Moments later, the three of us plus our houseguest Glenn were in my car heading back to the spot. A little browsing, a little haggling, and away we went. Of course there happened to be another sale around the corner – a spectacularly large one, clearing out fifty years’ worth of basement junk – and our little expedition ended up lasting a couple of hours.
I picked up another typewriter: a Royal, “Quiet De Luxe” model. I hadn’t realized I was in the market for another typewriter, but it’s a classic design and the machine is in excellent condition. I’m not sure of its age, but these were popular in the late forties, and that seems reasonable for a relic from Grandma’s basement.
Another find was a cute little Brownie Reflex 20, probably mid-sixties, a Kodak mass-market TLR. I’ve had an idea kicking around the back of my brain for a few years, and I think this might be a good testbed. I want to build a digital camera which uses a prism, multiple CCDs, and neutral density filters to simultaneously capture several renderings of the same image at different brightness levels. Storage is cheap – instead of carefully measuring light levels and trying to get the right aperture/shutter settings up front, why not just collect a lot of data for every exposure and fix it later in software? Well, it’s worth a try, anyway. Removing the film cassette leaves the Brownie completely empty; whenever I get around to this project, I’ll probably just cut down a spare film cassette and build the electronics in, then slide the whole assembly into the unmodified
Brownie case.
Last find: five bucks, a cute little kid’s bike with giant chopper-style handle bars, spray-painted red. Tires are flat and it’s missing a seat, but I got the sellers to throw in a banana seat and a spare wheel. If I have time before the burn, I’m going to turn this into my “inline tricycle” – it’ll be a super-laid-back cruiser bike with the seat resting on two independently-suspended rear wheels.
Comments Off on Garage sale
No backpacking for me. My foot isn’t broken, but it is sprained badly enough to get a chuckle out of the doctor when I mentioned that I was about to leave on a week-long hike in the Sierra.
Bummer.
Comments Off on
Travels have yet to begin. Forty minutes on the bike yesterday and I was dizzy, nauseous, and headachey, classic symptoms of heatstroke. Well, okay, I guess I’m not making it out of Seattle. I spent the afternoon sitting in a tub under a cold shower with a fan blowing, drinking beer and then mimosas, feeling decreasingly grouchy.
I think I’m going to skip the motorcycle trip and fly down tomorrow. I’m distinctly unenthused about the prospect of a week-long backpacking trip in this heat, though, and it’s increasingly tempting just to bag the whole trip and spend a week asleep in the basement.
Comments Off on