Category Archives: misc

Back

After a few weeks in Mountain View I am now back in Denmark.

While I was in Mountain View I had a chance to hang out with Peter Ahé who told me about some of the interesting new developments in Java tools, especially in javac. I expect to write a few posts about that.

If your feed reader has experienced a small hiccup when reading this blog’s feed, that’s because the new version of blogger is now far enough along that I’ve been able to convert this blog to blogger beta. The most visible consequence of this is that posts can now be tagged with labels, the same way conversations can be tagged in gmail. Each label, for instance java, then gets its own index page. Not exactly a new idea but that doesn’t make it any less useful.

Recursion

..and the winner in the category stupidest animal name is: the south american bat anoura caudifer, known in english as the tailed tailless bat. Well done.

I guess it’s just a matter of time before someone discovers the tailless tailed tailless bat.

Work

And now, a public service announcement. After more than three months of glorious unemployment I have now relapsed into a job. Indeed, a job with the very company that powers this blog: google.

In other, related, news: I will be in Mountain View for the next few weeks.

That is all.

Offline

I’ve sent my laptop off to be repaired, the harddisk died (quietly — that’s not my mac in the picture). This means that I will be more or less offline for the next two to three weeks. I will probably check my mail occasionally but I can’t guarantee that I’ll do it every day.

No computer. For three weeks. The horror!

Also, I’ve just moved quenta.org from b-one to dreamhost which I’m sure will cause all sorts of problem. Of which I, offline as I am, will be blissfully ignorant. Yeah, things are going pretty well here.

Back

I’m back after a week of sailing in Sweden. Both the experience of sailing and the experience of going to Sweden depend a lot on the weather. This year, the weather was a bit less than optimal. Oh well, at least that gave me a chance to finally read some books I’ve had lying around. The stars’ tennis balls by Stephen Fry deservers honorable mention. Guaranteed to be read in one sitting it said on the cover. I promised myself to just read a chapter or two and save the rest for the trip home. Well, apparently book covers know me better than I do. So on the way home I just stared out the window.

Now that I’m back I plan to spend some time working on a project I started a few weeks ago. It’s a new implementation of a programming language that readers of this blog may be familiar with. I’ll write more about what my plans are when I know myself, right now I’m just typing in code.

Entertainment

Where does the wierdest wikipedia content go when it dies? Why, to BJAODN, bad jokes and other deleted nonsense.

From Coleoptera

The most musical of the Insecta, Coleoptera are known for their tight, 4-part harmonizing and catchy melodies.

From Malaga (province)

The Sun Coast (Costa del Sol) is a concrete monster that swallows, burns, and spits back millions of happy European tourists.

From Alternative rock

Alternative rock is the name given to one stone when you’re looking at another stone. The term was coined by photographer Edwin Blastocyst when looking at one stone and speaking about another, oddly enough.

    The quote from Edwin Blastocyst needs to be verified.

In other (old) news: They’re made out of meat is pure genious and now a film has been made based on the original short story.

Reputation

Clearly, the whole cartoon controversy has done a lot of damage to Denmark’s reputation in the muslim world. This clip from the Daily Show gives an indication of how other western countries have come to view Denmark. Towards the end Michael Mandelbaum says that the reason other countries don’t oppose the US more actively, however exasperated they may be, is that they need it to play the role it does, and no other country can play that role. Jon Stewart’s comment on that is:

And that, not forgetting that Denmark could be out there, could be watching us right now. Cause those people don’t give a [beep].

Scary.

Fortran

I found an article at dusty decks about the original Fortran I compiler. This is interesting because the designers of the fortran compiler were the first to solve a whole bunch of interesting problems. Being a parser geek, I think their solution to operator precedence parsing especially neat.

The goal of operator precedence parsing is to take an expression such as

2 * x + y / 8

and group it according to a set of precedence rules such as “* and / bind tighter than +“, in this case producing

((2 * x) + (y / 8))

Today this problem is well-understood and there is a bunch of algorithms for solving it; the algorithm used in tedir is shift/reduce expression parsing. The fortran guys, on the other hand, had to solve this problem from scratch.

The way they did it was to scan through the expression and expand it in various places with a sequence of parentheses. In the simple case for a language with only +, -, / and *, the algorithm would do the following:

  • Insert (( at the beginning of the expression and )) at the end
  • For each + and - insert ))+(( and ))-(( respectively.
  • For each * and / insert )*( and )/( respectively.

And that’s it! Once the expression has been expanded using these rules it will be correctly parenthesized. For instance

  1. 2*x+y/8
  2. ((2*x+y/8
  3. ((2)*(x+y/8
  4. ((2)*(x))+((y/8
  5. ((2)*(x))+((y)/(8
  6. ((2)*(x))+((y)/(8))

It might not be obvious that this works in all situations, and inserting unmatched parentheses should make any programmer feel queasy. But it does work (Knuth says so) and it generalizes nicely, you just have to insert additional parentheses. Of course, once you get above 5 levels of precedence you might want to investigate ways to optimize the algorithm to avoid inserting endless amounts of parentheses. And once you do that the algorithm starts looking a lot like more “modern” algorithms like shift/reduce parsing. Which was, coincidentally, invented just a few years later by Knuth who also wrote about this algorithm.

Moved

I’ve moved the blog to my own domain: quenta.org.

Figurines

Here’s a gift for the person who has everything: Hiëronymous Bosch action figures. When someone has an idea this good you don’t think “how did they come up with this” but “why hasn’t anyone thought of this before”.