* You are viewing the archive for August, 2004

So, I’ve spent a considerable amount of time today reading various tutorials and descriptions about monads in Haskell. I think I’ve got it figured out. To summarize:

  • Monads are not magical things which somehow allow side effects without actually allowing side effects, which is how most Haskell literature seems to paint it. The I/O monad has side effects aplenty, and it doesn’t even pretend to do things like keeping around the state of the universe.
  • Monads are actually containers with a special way of operating on the contents. This allows the programmer to string together … Continue Reading

So, I released a first cut at a C-based JIT closure-creation library the other day. It needs some more fleshing out still, but I think it’s usable as it is now. I need to include the ability to put the arguments into a structure or array of some kind before I can start building Harmonium with it.

I discovered the Leo outlining editor a couple of days ago. It looks stunningly useful; from what I can tell, maintainable, readable code kind of just kind of falls into place while using it. You naturally create different views of … Continue Reading

I am constantly wishing for a loop control structure which allows me to use the same code at the beginning and end of the loop; ie, the initialization is the same as the iteration.

Does this have a name? I realize that it’s easy to create with macros, even in C, but giving it a simple, descriptive name is tougher.

I also hesitate to use such a homebrewed control structure in my C++ code at work, since other people looking at my code will probably get at least slightly confused. Curse this constant battle between elegance … Continue Reading