# Arizona Green Tea

I don’t know what it is. Coke doesn’t do it, Coffee doesn’t do it, regular hot green or black tea doesn’t do it. Arizona green tea inspires me to code like no other substance. If I am vegging in front of the TV and go to the fridge to grab one, hardly 5 minutes after drinking some of it I get bored by the TV, fire up my text editor, and hack for at least a few hours with intense focus.

What is the magic ingredient? I conjecture that it is memory; i.e. it used to be my fuel when I was a mad high school code monkey, so it brings back that state of mind. Or maybe they inject it with speed and ridalin.

# Captain Update

Here’s a quick update about what’s been going on in my life and in my head.

I’ve started a few brainstorming blog posts, but failed to get anywhere so I didn’t post them.

The first is the fall of taxonomy, explaining the copious problems with organizing a large volume of modules by hierarchical, taxonomic namespace, and a solution I have in mind involving a type of version control that doesn’t yet exist (a DVCS which blurs the distinction between separate projects).

The second is semantics of computational complexity, wherein I rant about the necessity of thinking operationally (after defining what it means to think operationally) to reason about computational complexity.  I hoped to make some headway toward a more local solution, a “computational complexity type system”, but didn’t really get anywhere meaningful.

The FRP as attribute grammar algorithm flopped, and my confidence has been lowered that my goal is actually achievable at all.  To be clear, my goal is an efficient, lazy implementation of the Fran semantics.  The kicker was the following snippet:

```kicker startEvent input someKey = pure 0 `until` do
k <- someKey
return \$ if k == 'a' then a else b
where
a = pure 0 `until` (integral input `snapshot_` startEvent)
b = pure 0 `until` (integral ((2*) <\$> input) `snapshot_` startEvent)
```

The main idea for the algorithm was that it took a list of times to compute the main result and propagated that list into lists of times to compute for its constituents. But in this example, we do not have the luxury of knowing what constituent we are talking about until after someKey, but the integral depends on values of input from before startKey, and not in any way that is transparent to the implementation. I’ve been roughly developing a principle of FRP which is something like “information locality” which is necessary for efficient implementations, and this example looks like it violates it. My next goal is to formalize this principle and show how the Fran semantics do not conform, thus giving some mathematical indication why implementations are so elusive. I hope this will guide me to the most flexible semantics which do obey the principle.

Meanwhile, I’m idly hacking on a text adventure CU GameDev is making in python. It has been such a long time since I did imperative programming, it’s hard to get back into. So hard, in fact, that I did not. My contribution was a purely functional parser combinator library in the style of ReadP, for dynamically building sentence parsers based on context. Python’s essential support for functional idioms is not bad, actually, it’s just the syntax which makes it kind of a pain.

I haven’t been doing much music lately. Of course I am still improvising daily, but I don’t have a band going at the moment (mostly because I have been unsure whether I’m leaving the country). On Friday there is a big jam session with about 9 musicians scheduled. That will be a challenge, but if done well by all parties involved, it could be really cool. Unfortunately my recording gear does not work with Vista, so there will be no high-quality recording (Nolan will use his portable room mic instead).

And I might have a date with Karen on Saturday. By which I mean we’re going out to dinner together. I have no idea whether she considers it a date. I’m attempting to let it go and not worry about what it’s called or what it implies in the future. I can’t help being unreasonably excited, however. And you know what Obama says: “the bubble sort would be the wrong way to go”.

# My computer hates me!

A few weeks ago I got a brand new Acer Aspire 6920. It was way shiny. I installed Ubuntu (my first try with Ubuntu; I was a gentoo guy previously) and Vista and spent two days getting everythng just right. I was especially happy getting XMonad working with GNOME, which took a bit of work.

But two weeks ago the video card (GeForce 9500M, fwiw) in my brand new laptop died. I was doing some incredibly intensive graphical computing involving a text terminal and vim, and click — the screen just goes blank. I blindly type “cd; mplayer music/2007-04-21_06.mp3” and music starts playing. So everything was working, I just couldn’t see.

I sent the computer in to get repaired. It arrived at Acer on Wednesday, they didn’t ship it back to me until Monday (I can’t seem to type Monday anymore; it always comes out Monad), and it arrived on Tuesday. I could have been more impressed by their timeliness. I started the computer to find Windows Vista Home Premium with loads of bloatware start up. Uh… okay, so they take four days to repair the computer, then they wipe the hard drive, nevermind about all my stuff or anything. Fortunately I’m a backupoholic.

It was way shiny. I installed Ubuntu and spent a few hours setting everything up a little bit less just right. It turns out getting XMonad working with GNOME was easier than I made it out to be the first time.

We’re having a jam session tomorrow, so I thought I would install Vista so I could record with Cakewalk. Vista has that nice partition manager so I don’t have to do any incantations like installing Vista first *then* Ubuntu or whatever other bullshit we linux users used to have to go through. I put in the Vista disk, get to the partition manager, click on the unallocated space and click *New*. The shown partition table immediately changes to one big full-drive partition. No, that’s not what I wanted. I push cancel and it brings me back to the welcome screen. Okay, that’s kind of annoying, so I go through the motions again and finally make it back to the partition manager. Imagine my dismay as I see the single full-drive partition table again!

And sure enough, when I reboot, grub cannot find my boot partition anymore so I can’t boot linux.

Okay. Vista, listen carefully: Fuck you. I push *New* and with no confirmation you wipe the MBR?! Isn’t linux the one with a reputation for programs which silently do cataclysmic things? And yet, all the partition managers in linux are very careful that you don’t mess anything up, and the one in windows—the OS with the reputation for far too many annoying confirmation dialogs—takes the same care of your MBR as does a retard with a chainsaw.

Sigh! (emphatically)

Anyway, with the help the Ubuntu live distro, a nice program called TestDisk, and about two hours, I was able to restore the lost table, no progress being made toward the ability to record tomorrow. Maybe I’ll just *gasp* not record. Isn’t that the recipe for a great session anyway?

So, Sir Computer, what do you have in store for me next week?

# The Luke Palmer, a new drink from Belgium

Natascha Heddendorp designed a special drink last Friday and named it after me! It will soon be on the menu of the bar at which we were drinking (so I’m told). The recipe, recalled as best as I can from memory, the Luke Palmer:

• Fresh Coffee
• Bailey’s Irish Cream
• Vodka
• Amaretto
• Milk
• Served cold but without ice (which is a challenge considering the coffee)

I don’t know the proportions. Less than 1/2 coffee, but not too little. It has a strong kick at the beginning, and then calms down and has a smooth aftertaste and aftertexture.

After having two glasses of this, thus piss-ass drunk, I went home and slept. The following day, I got up and got lost in downtown Antwerp, and I missed my flight back home. Therefore I conclude it is bad luck to drink a drink named after yourself.

I’m okay; I’m coming home on Monday.

# Fun with Flemish

I am having such a good time out here in Antwerp, I decided to stay another week. Actually this decision was not so much related to the city as to the project, but the city ain’t bad either.

Anygma moved me from the bed & breakfast I was staying at last week to an apartment they had rented for some of our art director’s students. The students haven’t arrived yet (I kind of want them to have, since it’s a bit lonely/boring). As I complained last time, I haven’t had a way to plug in my laptop, so my computer use has been constrained to work. Today I thought I would go into town and get a power converter.

Almost everybody here can speak English, but where’s the fun in that? I figure I will learn more Flemish if I don’t have something to fall back on. So as I was going into town I resolved not to talk to anybody in English. Navigating the tram system to get downtown was pretty easy—all the trains are numbered and color-coded.

Downtown was a huge, wide street with shops on either side and thousands of people walking around. It looked like a carnival. That illusion was amplified by waffle and ice cream stands on the street corners (I got a waffle covered with chocolate ice cream and fudge sauce—delicious!). However, other than the high density of people, it was all quite familiar. I found a large electronics store and grabbed the adapter, and went to stand in line to buy it. A woman who worked there babbled something in Flemish to me and pointed to another line. I knew she was saying that this one was about to close or something and I should wait in the other one.

It’s pretty interesting how much I can comprehend without understanding a word of Flemish. Communication is much more than words.

After I bought the converter, I got lost in town. I knew I was going to Groenplaats, so I asked a woman on the street, “Groenplaats?” and pointed my fingers back and forth, and she pointed me in the right direction. I walked a bit that way and didn’t find it, and that’s when my plan was foiled! I did the same thing to a guy tending a shop, and he gave me directions in Flemish. To the blank stare on my face he responded “do you speak English?”. I shook my head confusedly. “Well what do you speak normally?” Daft! He got me! In my embarrassment I responded “I speak English but I’m trying not to!” He gave me English directions… darn.

And now I am safely back at the apartment, using my computer (hooray!), able to call people with Skype (hooray!).

It’s still fun being out here. A bit tiring, but great fun. The Anygma project is amazingly cool, Conal Elliott has opened my eyes to a new approach to software design (well, maybe not totally new, but he pushed me into the pool that I was dipping my toes into). The rest of the team is smart, competent, and open-minded, and great fun to work with. The food is absolutely delicious, the strangers are kind and helpful, there are many beautiful women to look at. My adolescent reservations about moving out here are now shadowed by my excitement for this place.

# Apparently I do not want to be in Antwerp

Because VISA is not here! It was a bit distressing coming here with only 15€ in my pocket and finding out that people don’t take credit cards the way everybody does in the USA. Anyway, there was a bank that understood my card and could give me cash.

This is my first time out of the USA (barring Canada), so I’m enjoying observing the differences. Although there are some interesting points, it’s more similar than I expected.

• The outlets are those weird european ones, so I can’t plug in my computer (without ganking an adapter from a coworker). I was going to go to a store and buy one, but
• Stores close at or around 17:00! How am I supposed to satisfy my electronics craving after dinner?
• People write times in 24-hour format, there’s no AM/PM.
• There is a different meme at stoplights on foot. In the USA, each person or group of people presses the button. Here, it seems that people only press the button if there’s nobody already waiting. That is, they trust people to have already pushed it… which makes sense.
• I always like trying new weird food. This is made easier when one cannot read the menus.
• “Met” means “with” in Dutch. Other words have other meanings.
• A glass of water costs 1.50€ at restaurants. That could be related to the fact that tap water in this country is not what I would consider drinkable.

It’s actually not that hard to get around not being able to read anything. It’s fun being here.

# New Job

So I am now officially working for Anygma. It’s a very… interesting situation.

So far, the team has been great to work with. It’s always nice communicating with smart people who “get” software and don’t have any strange overarhicitectural fantasies. Well, I guess we have yet to find that out, but so far so good.

The project is really interesting, too! I wish I could talk more about it.

Typically I’m starting work around 1AM (which is 9AM in Belgium). Today was the first day I got a “decent work day” in, going until 8ish. The environment is nice; sitting here in my comfy chair or couch with a blanket and a kitty on my lap, discussing linguistic (as opposed to formal) aspects of programming languages!

I’m using FogBugz to track my time and tasks. It’s working well, nice and lightweight.

# Last Comic Standing

I have a love/hate relationship with stand-up comedy. Most comics are mediocre, with one or two jokes in a half hour set that make me roll on the floor, where the rest mostly bore me. The only counterexamples I can think of right now are Demetri Martin and the late Mitch Hedberg, who hit me with 80 or 90 percent of their material.

On the other hand, I can’t stand Chris Rock and those like him (George Carlin somewhat included in this category), who ostentatiously vomit political and ethical opinions which sound like they’re edgy but everyone agrees with. I didn’t go to a comedy show to hear a liberal sermon (I, too, agree with most of said opinions).

Anyway, where I’m going with this: I just watched Last Comic Standing on Hulu. I was thoroughly impressed: about 80% of the jokes made me laugh out loud (possibly to the extent of waking up my roommate). However, I completely disliked the presentation. It was presented like American Idol: they showed bad comics telling bad jokes and getting rejected by the judges, they showed the good comics boringly telling the camera about themselves (but two of them were quite hillarious in this process), they even did the “who will go on to the next round” needlessly long dramatic pauses with nary a single amusing moment.

I’m watching a comedy show, I don’t want to get to know the comics as people and cheer when they are selected and feel bad for them when they are rejected. It’s a comedy show, I want to laugh my ass off!

So: skip the two semi-final nomination segments, there is nothing good there. The rest has spatterings of pretty funny stuff, and the two live show segments are hillarious. And NBC, stop with the mindless filler!

# Isabelle you bitch!

I finally got Isabelle working. The installation instructions on the website make it seem simple. And it is. It’s just that many things can go wrong and they don’t account for them.

Here’s what I did: Got the source for polyml, built and installed it in /usr/local. Got the sources for Isabelle and Proof General (nothing prebuilt). Built Isabelle. But in Proof General’s makefile, it said:

```EMACS=\$(shell if [ -z "`which emacs`" ]; then echo xemacs; else echo emacs; fi)
```

I have both GNU Emacs and XEmacs installed, which means that EMACS got set to GNU Emacs. This was very confusing, since Isabelle started XEmacs anyway, but all the elc files were compiled by GNU Emacs.

I changed it to:

```EMACS=xemacs
```

And all was well. Whew.

Now I get to see what all this Isabelle hype is about.

# Music Gear Review

Over the past couple years, I have accumulated many thousands of dollars of musical equipment. I thought I would take some time to review the pros and cons of what I’ve purchased for future imitators :-). You can hear this gear in action in all the SNW recordings.

### Main keyboard: Nord Stage 76

I bought this refurbished on eBay for \$2,400. It’s the one I’m playing in the picture. This is my favorite piece of musical equipment ever, way better than those fancy \$6,000 KORG boards. I think this keyboard’s strongest point is its aptitude for improv settings: after spending some time getting familiar with the controls, I don’t have to spend any time getting just the sound I want, even if I never thought I’d want it beforehand. All the sound tweaks are physically there in front of me, not hidden in layers of touch-screen menus that take 30 seconds to get to. It sounds inefficient, but it’s exactly what is needed for improv.

There are 4 major sections: organ, piano, synth, effects. The organ and piano sections are top-notch, with excellent reproductions of B3 (with manual drawbar controls, which work great, but turn out to matter less than I thought they would) and a few types of electric piano (and the obligatory acoustic piano, which is a very nice patch). It doesn’t matter that there are only a few types though, because they really sound perfect, and tweaks to the sound can be done via onboard effects.

The synth section sucks, I essentially never ever use it. That’s okay in my situation because both of my other keyboards cover that area very nicely, but it’s something to keep in mind.

It has 12 effects in the effects section (plus a great amp sim that I have enabled almost all the time), but there is a weird situation about what effects can be active at the same time. There are three sections, and each effect is in only one of them. So you can only have 3 effects active at the same time, and not all combinations are possible. I thought this would be limiting, but in practice it works fine, and the interface is very streamlined once you learn it.

If this keyboard broke or was stolen, I wouldn’t hesitate to buy the exact same thing again. This is the perfect keyboard for improv.

### Upper keyboard: Nord Lead 3

So impressed by the Nord Stage, about six months later I bought another Clavia product, the Nord Lead 3 (now discontinued) on eBay for \$1,000. It’s a pretty cool instrument, but I do not rate it anywhere near as high as the Stage.

The idea is that it emulates old analog synthesizers. The keys have nice action (unweighted), and I of course love the hands-on control (I could never use a keyboard with menus!). But it just isn’t that versatile. The patches all sound too “old-school”, too “fat” (generally a positive adjective in the synth world, but sometimes I want a really skinny sound, and that’s very hard to get). Also the glide function is linear, meaning the pitch changes at a constant rate from the source key to the destination key, which is much less flexible than Reason’s exponential glide, where the rate depends on the distance from the source to the destination (so if I want a faster glide, I “help it along” by pressing a higher key). And I use glides a lot in my synth leads, so that flexibility is very important.

What I do like about it is the hands-on envelope controls. Most of the time I pick a lead patch at random and just start playing with it. The biggest thing that makes a lead patch inappropriate is the envelope: it starts too abruptly, or it has a really long release (so there’s a sloppy sustained effect, when I want it to be tight). But the envelope controls are right there so I can quickly fix those problems instead of clumsily cycling through patches until I find one I like (messing up the music in the meantime). I also like the chord glide a lot. It’s kind of a gimick, it really only sounds like one thing, but it’s a really unique sound.

### Right-hand keyboard: M-Audio Radium 61 + Reason 4

The oldest part of my rig is the keyboard on my right side, a crappy little M-Audio MIDI controller that I got for \$80 on eBay, and Reason as the software synthesis behind it (bought for \$300 new). The Radium 61 has okay action, but occasionally a key sticks which is pretty much unacceptable. I really should replace it. But it has some configurable controls on it, which are quite essential to what I do. But really, the important part of this keyboard is Reason.

Reason I rate almost as highly as the Nord Stage. If something happened (I don’t know what that would be, it’s software!) I would replace it immediately. It covers the Stage’s ass in the synth area, with the most amazing leads and pads I have ever had the pleasure of using. I had to spend some time configuring it for improv use, though. Here’s how:

I went through every patch and tried it out a little. If I liked it, I put it in a favorites group according to what it is (eg. “strings”, “pad”, “lead”, “choir”, …). Then I made a big rack and created one instrument for each favorites group, and selected the first one in that group. That way when I push the next and previous patch buttons it selects the next of my hand-picked patches in that group, rather than whatever is next on the list it was originally in. When play I move a lot between types, and less frequently between instruments in a type.

I also have four effects set up: reverb (with a similar patch setup), delay, distortion, and flanger. The parameters of the effects are mapped to the controls on the MIDI controller. That part came later, and was very important; once I did that I got a lot more power out of my right-hand keyboard. In retrospect I would do away with the flanger though, since I never use it. Oh, and I also have master volume mapped to one of the controls on the MIDI controller, because it’s impossible to predict the right volume ahead of time.

### Right-hand keyboard accessory: Mackie C4

There is one thing Reason is missing though: hands-on controls (especially the aforementioned envelope controls). Using the mouse sucks. That’s why I bought the Mackie C4 control surface, basically just a big board with a bunch of configurable dials on it. I got it for \$1,000 new. Not recommended.

The biggest problem with it is the way it’s mapped to Reason. Most of the dials available by mouse in Reason are mapped to the control surface, but they’re in different places for each virtual instrument! So if I want to change the attack on the lead I’m playing, I have to know whether the lead is “implemented” in the Subtractor, Maelstrom, or Thor. I don’t know that, I don’t want to have to think about that, I just want to change the attack! There are dynamic labels, so if my eyes were available during a jam session, which they typically are not, then I could hunt and figure it out. But essentially it completely fails at what I bought it for.

The main thing I use it for nowadays is for 6 buttons: next/prev type, next/prev patch, next/prev reverb patch. (The reverb has separate buttons since I’m often in the “scope” of another instrument when I want to tweak the reverb). A grand is a lot to pay for six buttons.

The only thing that’s keeping me from selling it is the fact that, if I were persistent, I could learn Reason’s control-mapping format and remap everything in a sane way. But the format is really complicated and undocumented, and I just haven’t had the energy to do it.

### Amp: Peavey KB/A something

Got it for \$150 on eBay. Does the job, could be better. It doesn’t have wheels! One of the three inputs broke, which was annoying but didn’t matter since I only use one input anyway. But I think it would be worthwhile to get a nicer amp.

### Audio Interface: E-MU 1616

I bought this used on eBay for \$160. This card has served me very well since my upgrade from the terrible M-Audio firewire card. I repeat, do not go near M-Audio for an audio interface! As for simple record/playback stuff the EMU has never been caused any issues whatsoever. It can be a tight fit when recording though, since I can really only get 6 inputs (the other 10 they advertise have to come from an external ADAT box, which can be pricey). I use 3 inputs for myself, so that gives me room for a single room mic on the drums, and a line in from two other musicians. That worked well for SNW because I never wanted to grow beyond 4 people, but for other situations I’d have to expand. Fortunately I could (presumably) just invest in an ADAT box and have tons of inputs without having to pick a new interface.

The SNW recordings here and here were made using the EMU, three inputs for myself, one for Evan (bass) and single room mic on drums. It’s pretty incredible how good the sound quality can be for such a simple setup, but it doesn’t quite match the earlier recordings Eric made with a much nicer interface and a whole drum mic setup.

### Summary

Those are the expensive parts of my rig, hopefully someone has stumbled upon this while trying to create something similar and I’ve helped out. There are a lot of bells and whistles: four sustain pedals, an expression pedal (for the Stage), and a tap tempo pedal (for Reason). I will say something about the tap tempo pedal: it was very hard to find one at all, here’s the one I got. It works great. The rest of the details are not that important.