Month of January, 2008

Misc / 2008-01-29

Tags:

The Human Bell LP and the new Stars of the Lid are both really good. Especially the Stars of the Lid.

Also there's no pleasure greater than revisiting something you never really understood and finding it suddenly blindingly obvious. That's the best feeling in the world.

Parsing permutations again / 2008-01-17

(This is the last of these, I promise.)

In my last post, I described a direct translation of Parsec's permutation parser combinators into Scala. I described one major problem with that approach: the need to provide a fully curried handler function. I suggested that a fix might be possible, and indeed it is. I've produced a new version of these combinators that does not require such a function.

Parsing permutations in Scala / 2008-01-16

A recent thread on the Scala list raises the question of parsing permutations using parser combinators. This is a situation where parser combinators offer a substantial improvement over EBNF. David Pollak proposes a solution, but it suffers from two problems:

  • we are only able to parse permutations where all elements have the same type.
  • the results are returned in input order, rather than declaration order, leaving us to figure out how to distinguish them.

Neither of these is disaster, but I hope it's possible to do better.

Log Lady as "Zen granny", etc. / 2008-01-08

Tags: ,

We got the new Twin Peaks set for Christmas, and so have been going through it at a totally inappropriate pace. The Buddhist themes in the series are both obvious and widely noted, but here's one that was new to me.

The new set includes the Log Lady intros to each episode, which are absolutely fantastic, and it occurs to me that not only is the Log Lady the source of some of the goofiest and best Zennisms in the series, but she actually exemplifies a very particular type.

Scala + Hibernate overview / 2008-01-07

I've gotten a couple of questions about Hibernate and Scala. My last posts weren't really intended as a "gentle introduction" or anything: my goal was to document a difficulty I had with a particular situation. So here's more of an overview.

folds in scala / 2008-01-07

Happy new year!

There's been several threads on the Scala list about syntax, and in particular a lot of hating on the /: and :\ methods as shorthands for foldLeft and foldRight. I understand the concerns about overuse of meaningless glyphs, but:

  • I think this concern is mostly misplaced in Scala, since operators translate straightforwardly into methods, so it's always obvious where to look for the definition;
  • and in any case I still like /: and :\ for folds.