June 19, 2009
I had to learn a little about a software tool named DocBook. I was reading DocBook 5.0: The Definitive Guide, by Norman Walsh, when I came across an example that used this quote:
The universe that we observe has precisely the properties we should expect if there is, at bottom, no design, no purpose, no evil and no good, nothing but pitiless indifference.
The irony was striking. This book is available, for free, on-line. Presumably then, Norman Walsh is a caring, generous fellow who is willing to make his work freely available to others. That raises an obvious question: how is it that in this indifferent universe, a caring, concerned, generous benefactor such as Norman Walsh exists? That is to say, how does an indifferent universe give rise to beings who are not at all indifferent? Similarly, consider Dawkins himself. He strenuously promotes atheism. Doesn’t he believe it is true? Doesn’t he desire for everyone to see it’s truth? Doesn’t he care about the state of his fellow man? I expect he does all of these things, and is therefore also hardly indifferent, nor lacking some sense of the difference between good and evil.
I can only conclude Dawkins is quite wrong. From a universe that is indifferent and void of good or evil, we would expect to find only indifference, and no sense of right or wrong. Yet, we find quite the opposite, even in those who claim we live in a Universe of pitiless indifference.
January 31, 2008
In the last year, I have learned a proprietary programming language based on M (MUMPS), learned some M, experimented with ANTLR (a parser generator), studied up on compilers, and built a parser generator. It has been a lot of fun.
Take a look at A Recipe for Joy in Software Development to see what makes me tick as a developer. Think you have an adventure I’d really enjoy? Post a comment.
January 24, 2008
I wonder how many software developers have ever built a parser generator. I recently got to do just that.
My company has a proprietary language, I’ll call it MO, that compiles to M (MUMPS). I am part of a project that involves creating a new compiler for MO that will compile not only to M but also to Java. Pretty cool. This is not your typical business software application development. It is more computer-science-ish.
The current compiler is hand-written and single phase. It writes out M code as it reads in MO code. The new compiler will use a generated parser, which meant we needed a parser generator. However, a requirement is that the parser be written in MO itself. Of course, no existing parser generators generate a parser in MO, so we had to write our own.
The parser generator I built closely follows YACC (in terms of grammar specification and error handling). Like YACC, it generates LALR(1) parsers. Building it was great fun for me, and I really enjoyed cracking open Compilers: Principles, Techniques, and Tools by Aho et al (“The Dragon Book”).
The parser generator is written in MO itself. This was done somewhat arbitrarily. One (minor) advantage is that it lets you do everything in the MO environment. It also let me explore using new OO features in MO. I think it could be written just as well in Java. Maybe I’ll do that for comparison.