New Diet Plan

Got to work yesterday and I was starving. So by lunchtime I had eaten all the food I’d brought for the day. Still hungry. So, I went out with friends and ate a second lunch.

Weighed myself this morning and I’d lost half a pound. The conclusion is pretty obvious: If two lunches can take that much off my waistline, imagine what three can do!


So, the Bike

I’m a hippie at heart, and not ashamed to be one. I’m also a cheap bastard. People seem surprised sometimes that a fiscal conservative can be a social liberal, but to me that spells ‘rational’.

I formulated a simple plan: get a decent-but-not-too-expensive bike, emphasizing durability over performance. After all, a heavier bike means more calories burned. Ride that bike to the train station each day, where a company-sponsored shuttle will scoop me up and take me through the worst of the traffic. A few calories burned, about 10kg of greenhouse gas avoided (minus the 100+g I emit while pedaling), and lower blood pressure when I sit down at my desk. Before long the bike pays for itself.

Well, unless you get big eyes at the awesome family-owned bike store and spend far more than you planned. I bought a really nice bicycle that cost more than I have spent on all other bicycles over my entire life. But dang, it’s a treat to ride.

For the curious, I got a Giant Escape 0, and paid thirty of the smartest dollars of my life for a cushier seat. After all the accessories (on-bike pump, home pump with gauge, helmet, water bottle cage, water bottle, big-ass lock with extra cable, rack, bags that attach to the rack, and I’m sure there was more) I was looking at more than $1300. It’s going to take a while to pay that off in savings.

In my defense, I could have spent a lot more. My “really nice” is another person’s eye-roller. No suspension? No disk brakes? Pf.

Greatest fear: plunking down all that lovely lucre and having my knee veto the whole plan.

I bought the thing on a Saturday, and rode it home from the store. I took a test trip Sunday to the CalTrain station and back, to get an idea how much time I should budget in the morning to get where I need to go. Monday and Tuesday I was a bicycle commuter, logging a sweet 13 miles each day.

My legs were pretty tired after four straight days in the saddle, and when I got up the next morning I recognized that I could ride, but that I probably shouldn’t. I gave myself a rest day. This is an offshoot of the “don’t be stupid” part of the plan.

On that topic, that day while driving to work I saw a kid on a bike do something stupid and get bumped by a car. He wasn’t hurt, but his front wheel didn’t work anymore.

Repeating the note to self: don’t be stupid. Left turns at large intersections are the most important times to heed that mantra.

I’ll leave my discussion of fitness apps for another day. There are a lot of apps. But if you’re into the whole social media thing, we can hook up at

My knee has been quiet, but I try to remember to ice after each ride. I have an ice pack at work and more at home. I think the fact I forgot to ask for toe clips is actually good for my knee; the part that gets sore feels like it would be unhappy when I pulled up on the pedals. Unscientific, but if my knee is happy, I’m not changing a thing.

So now I’m three weeks in, almost 200 miles logged, butt and knee not complaining. I’ve driven to work four times, and ridden all the others. Ten more miles will go on the bike today, as I ride it over to Ye Olde Bike Shoppe for a free tune-up (and to buy some more accessories).

So far, so good.


Fun with names

My ride each morning and evening takes me through a sprawling cemetery. The other day I spotted a name on a headstone: Hai Du.

If I ever write a comedy with a wedding, Hai Du will be the pastor.


Esoteric Programming Languages

Most readers of this blog are probably familiar, at least by name, with some of the more common programming languages out there. This blog is brought to you courtesy of PHP, and then there are the seminal C and FORTRAN (after all these years, still king of the number-crunchers), the infamous COBOL, well-structured PASCAL, ground-breaking SmallTalk, Sun’s heavily-marketed Java and Microsoft’s counterploy C#, and newcomers like Ruby and Javascript.

There are a lot of computer languages. While there are some pretty striking differences between the above, they all have two things in common. They all involve controlling a computer by writing lines of code, and they were all invented to be useful.

There is another category of language that is not burdened by that second attribute. Useful? Pf. Not bound by the constraints of utility, the whole ‘lines of code’ thing often ceases to apply as well. These non-utile outliers fall under the general category of “esoteric language”, sometimes shortened (but not by me) to esolang.

While I have long been peripherally aware of this category of languages, in a small email discussion recently a friend of mine mentioned the language Brainfuck (sometimes written b****fuck to avoid offending people). Another member of the discussion linked to an amusing top-ten list of odd languages. I read the article and my brain started fizzing.

A programming language that is written as a musical score? Blocks of color that simultaneously convey quantity and program flow*? A program specifically designed to be as difficult as possible to write code in?

Some might ask, “why would anyone bother with such useless languages?” I don’t have an answer to that. I could go on about Befunge and the wire-cross theorem, or about Turing Completeness, but at the end of the day, I think it’s the same answer as one might give to the question “why does one bother writing poetry, when prose is so much clearer?”

Some of the languages are just for fun. INTERCAL (Compiler Language with No Pronounceable Acronym) set out with only one goal: to not be like any other language. For instance, since all coders have long been taught to avoid the GO TO command, INTERCAL instead uses COME FROM. And every now and then you have to say PLEASE. You don’t have to be a geek (but it helps) to enjoy this article about INTERCAL and Befunge (includes a Befunge program to generate Mandelbrot sets).

One can only read about esoteric languages for so long before one must scratch the itch and find a new way to write “Hello, World!” on a screen. I became intrigued by Befunge, a language that is not written as lines of code at all, but as a grid that a pointer moves around on, steered by >,<,^, and v characters. The program appealed to me for two key reasons: the characters the program cursor encounters can mean different things depending on which direction the cursor is moving at the time, and, even better, you can have the program alter itself by changing the characters in the playfield. So, here's my Hello, World! in Befunge:

         095*0     v          0*59    <      
This 'Hello World' program is written  in Befunge, a
  language invented expressly to be as difficult to compile
  as possible.
 In fact, with this code, control flow  goes straight through
 this block of text and uses the p in  'program' as an instruction.

v      g0*59       <                  1
     >                            "H",^
v    <
     >                            "e",^
v    <
                 > "0"+292*p >    "l",^
     > :6*9- :9`!|
>:2-!|           > $         ^
v    <
     > 7"0"+273*p                 "o",^
v    <
     >                            " ",^
v    <
     >                            "W",^
v    <
     >                            "r",^
v    <
       >                          "d",^
v      <

>:65+-        !|
v  "error!"$   <
>:#,_         v

   restore the code to the starting state:
              > "2"292*p  "4"273*p @

Of course, it was absolutely required that the code alter itself at least once, and occasionally have the same symbol mean different things. This program is based on a counter, and when the counter is 0, it outputs an ‘H’. When the counter is at 1, out comes an ‘e’. ‘l’ is a little more complicated; after it matches the 2, the program does a little algebra (6x-9) to come up with 3, with which it then overwrites the 2 in the code. That way, on the next loop, when the counter is 3, we get another ‘l’, and the same equation replaces the 3 with a 9, ready for the ‘l’ in ‘World’.

In the language, ! means ‘not’. At the very bottom, this code evaluates the ! as ‘not’, which causes the program to loop around and pass through “!” (with quotes), turning what had been a program instruction into the exclamation point at the end of “Hello, World!” A nice little exclamation point on my program, as well.

I have now gone back and added an error message should something go wrong, but of course you have to alter the code to make an error actually happen, things being deterministic and whatnot.

You can watch the program execute in Super Slow-Mo with this Javascript Befunge interpreter. It’s kind of fun to watch the Instruction Pointer zip around the Paste the above code into the top box, click ‘show’, then click ‘slow’ below. I recommend setting the time to 50ms rather than the default 500.

Wooo! Big fun! While this language is nearly useless for actually accomplishing anything, I like the way you can make your code physically resemble the problem you are solving. A coworker mentioned writing a tic-tac-toe program with Befunge, and I immediately thought of building a program that is a grid of nine segments and the program alters the paths through the grid as moves are made. It would be awesome.

If I went back to college and majored in computer science, I could get credit for writing it.

In my wanderings, there was one program that completely blew my mind. You remember Brainfuck? There are only eight commands in that language, which makes it relatively simple to write an interpreter. An interpreter is a program that reads the code and executes the instructions as it encounters them, translating them from the (allegedly) human-friendly programming language into machine-friendly instructions for that particular processor. (Compilers do all the translating at once, before the program is executed, while interpreters do it on the fly.)

So here, ladies and gentlemen, is a Brainfuck interpreter, written in another esoteric language, Piet:

(courtesy Danger Mouse — if I’m not mistaken, the inventor of Piet)

That picture right there? That’s a program, written in a Turing-complete language, that implements another Turing-complete language. (**)8-O (the sound you heard was my head exploding.)


* In Piet, you can write a program to calculate pi that is a circle.


Let Go, [team]!

In the U.S., fans in a stadium will often take up a chant follows a standard form. For my hapless favorite baseball team, it would go:

Let’s go, Pa- dres! – clap, clap, clap-clap-clap

Where the typesetting above indicates higher and lower pitch. In the case of the Padres, it works pretty well. The team name has the right number of syllables and a good hard consonant in the middle to kick the last syllable.

Last night I was watching a hockey game played in Minnesota. The name of the team is the Wild. Inevitably came the chant:

Let’s go, Wi- ld!

ld? The cheer finishes weakly. It’s still fun, and there are plenty of other teams with a similar problem, so at first I didn’t think much of it. But then I thought of the actual content of the cheer. “Let’s go, Bruins!” is a nice way to motivate your team, but in Minnesota they have a unique opportunity. The cheer says, “Let’s go wild!” That actually adds a new dimension. When they cheer, there should be a little wildness.

My humble proposals:

Let’s go WILD!

or, even better (or at least wilder):


warbling so the arena’s rafters shake with the sound of an attack by a horde of cartoon saracens.

Let’s go, Wild fans! Get wild!


Time Capsule

Before I left on the Homeless Tour, I put a bunch of stuff in a storage box. The assumption was that eventually I would have a home again, and I’d appreciate having stuff to get it started.

Ten years later, My Sweetie and I have unloaded that box into the photo studio, where now we must figure out what to do with an apartment starter when there’s no start needed.

Apparently, I anticipated needing lots of toys. Here’s a quick list of some of the items:

  • Volleyball net
  • 3 volleyballs (Indoor, outdoor, and spare, of course)
  • One golf shoe (the other was in my softball bag, which I’d pulled from storage previously, along with golf clubs).
  • various Velcro-based beach toys
  • Badminton set
  • Racquetball racquets and balls
  • Frisbees
  • Basketball
  • Ski boots
  • A set of (apparently) nice bocce balls.

I expect there’s more. The badminton set is pretty cheesy, a backyard-at-the-family-picnic sort of thing, while the volleyball net has been through a series of upgrades that rendered it pretty nice for a portable unit. I wonder if the sledge hammer is still in the bag.