Monthly Archives: May 2005


At the World Affairs Conference 2001, I sat in on a talk by a writer who said a few words about writer’s block. She said, “just write every day; it doesn’t have to be good, it just has to be something. Freewrites are invaluable.” At that point, I did a few musical freewrites, and indeed it was good. The freewrites weren’t great, but then I had ideas and inspiration to work on my larger songs (I believe I was working on Opus 1 at that point).

Recently, I’ve been writing a little every day, but it’s only been a few measures because I throw it out once I don’t like it. I decided to break that today. I started with a motif that isn’t that neat or pretty, and just went with it. So here’s a bad idea, poorly developed, but finished, in hopes that I will get inspiriation to make progress on the third movement of my piano concerto. Freewrite no. 18.

It’s all… gone

There is a poster on my wall at work that states:

    A computer lets you make more mistakes faster than any other
    invention in human history, with the possible exception of
    handguns and tequila.

I just experienced the former part of that. And it was with everybody’s files on luqui-misc. I just… deleted them. I said ‘rm -rf svn’ (because I had created a temp svn directory called something else). It gave me a bunch of permission denied messages, so without thinking, I modified it to ‘sudo rm -rf svn’. It worked, and then I looked at the permission denied messages, which included the words “misc”. And then I realized what I did. Ow. Really ow.

But I’ve been bitten by things like this before. So, fortunately, I had misc checked out on, count ’em, 5 machines. So it’s all restored (with the provision that you have to Add yourself as a committer again.) Unfortunately, I didn’t make any dump backups (stupid Luke), so all the revision history is gone. Darn. I hope nobody was counting on that.

So I’ll be starting backups again. At some point, we forget that backups are useful. And then something like this happens.


It seems that the only recording Zooey Deschanel (from Elf and more recently from Hitchhiker’s Guide to the Galaxy) has of anything is “Baby It’s Cold Outside”. She has a beautiful voice—very clean. I think she’d make a great jazz singer. Just saying…


I’ve had a plan for a while to record all my improvisations (and maybe even what I practice) on the piano into MIDI while I’m doing them and put them on luqui-misc. That’s not really practical with my current MIDI keyboard (a four-octave Roland controller). But I think I’m going out today and buying myself a digital piano, because I’m sick of not being able to play in the middle of the night when I’m awake.

In my excitement, I recorded an improvisation on my little Roland controller and posted it where I’m going to post everything else: here. You can listen, but don’t expect anything stunning. The improvisations that I try (like this one) never turn out very well. It’s those spur-of-the-moment types that are the great ones. Which is why I’m recording everything, so I can share it all with you, and keep it for my records.

Oh, the title of this post begins with “Everything you ever wanted to know…”.

Cardinal logarithmetic

I wanted to write this down before I went to bed, so I could think about it in the morning: 2^aleph-0 is aleph-1, so clearly the “logarithm” of aleph-1 is aleph-0. Does aleph-0 have a logarithm? A more precise way of phrasing that is: does there exist a set such that its power set is isomorphic to the natural numbers?

Gambling problem

I’ve thought of a gambling problem (read: probability problem) that I can’t seem to solve using the methods I know of. The problem is to find an optimal playing strategy for the following game:

Pay me $100. I give you one chip (worth $1). You can decide to keep your $1 and walk away (down $99) or flip a coin with me. If it comes up heads, then you have three chips. If it comes up tails, you walk away with nothing ($100 down). If you have three chips, then you can walk away with $3 ($97 down), or try for nine chips. And so on.

The thing that makes this game hard to analyze is its infinite expectation. Every time you go for the coin, your payback is greater than your odds. For instance (ignore the $100 for now): I have one chip. I can walk away with $1. Or I can flip and get 0 1/2 of the time, and 3 1/2 of the time, for an expectation of 1.5 chips. Clearly I should flip. The exact same reasoning happens at every stage of the game. You hit every time, and you end up losing it all, because the coin is going to come up tails eventually.

It has something to do with that $100 for one chip (Keep in mind that hat’s the only way you can play this game). Because without it, the game is pretty easy to analyze. Give me some money, and I’ll triple it with 1/2 probability, or take it all. To play that in real life, you just play with amounts of money such that if you lose, you can play again. Play with $10. Get $30. Play with $10 again. Lose it. Keep playing like that and you can get as rich as you want.

It’s over!

School’s been blown to pieces, etc. Yep, I have fourteen weeks of freedom from the tyranny of the University of Colorado1. I’ll do my best to keep my job off my back, even if it means getting paid less. I have two games and a miki to implement, and I have a concerto to finish!

Speaking of miki, I found this totally cool thing that I might use to implement the miki: XUL::Node. It creates a javascript client in your browser that connects to your server, and then you give it GUI commands from Perl on your server. Like remote X clients, but not horribly slow.

1Just to avert giving the wrong impression: CU’s a great school, but it’s school, so it’s despotic.


Way back when Glop was going to be called GLIC1, it was going to be an extension to C++ with closures and such. I started by trying to write a huge grammar for C++, which I would then extend with my own special rules.

I’ve just implemented a proof-of-concept framework for a very similar idea, which, instead of being thousands of lines of code, is 150. I think I’m going to turn it into a module. It is pcpp, the Perl C(++) Preprocessor. You can define macros in terms of context-free rules (Parse::RecDescent format) and associate metainformation with lexical scopes. You can even make the macro affect elsewhere in the program (for instance, to declare your variables for you at the beginning of the block). It’s very simple, and only knows about blocks (it does nothing at the statement level). Still, I think it’s good enough to do (almost) everything I want to do with it.

I’ll slap on a nice non-hash interface and make the parser handle a few more things, and I’ll have a neato module, which will probably end up getting used in games I write in C++.

1I now find myself amazed that I missed the super-cool name GLOC