From: Chad Perrin Date: 2006-08-11T04:44:43+09:00 Subject: Re: Language chatter On Wed, Aug 09, 2006 at 01:41:32PM +0900, M. Edward (Ed) Borasky wrote: > Chad Perrin wrote: > >perception that has grown from "we did it first" syndrome. I think it > >boils down to the fact of Greenspun's Tenth Rule: > > > > Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C > > or Fortran program contains an ad-hoc, informally-specified bug-ridden > > slow implementation of half of Common Lisp." > > > Well ... I think I disagree with this, having written some moderately > complicated FORTRAN programs and having read through many more. What > they all almost always contain, however, is a domain-specific language > that controls where they find their inputs, what processing the do on > them, where they put their outputs and in what formats, etc., on what we > used to call "control cards". Some of the parsers and DSLs of this > nature are quite complex and rich, but they are in no sense of the word > "Lisp". I'm not really sure how to address this in a manner that gets my understanding of Greenspun's Tenth Rule across (that's why it has taken me this long to reply). I guess, to solve the problem of figuring out what's going on with the complicated FORTRAN problems you indicate, you could hand them to a long-time Lisp programmer who also knows some FORTRAN and ask him or her to point out any Lisplike semantics you've implemented in the process of developing fully-contained domain specific languages as part of solving your problem, assuming there are any such examples of Greenspun's Tenth Rule in action. Perhaps there aren't. Maybe we should ask Greenspun. > > Curiously enough, if you read Chuck Moore's description of the evolution > of FORTH, you'll find something similar -- every sufficiently > complicated FORTRAN program contained a huge "case" statement which was > a "language interpreter". Not to be insulting, or anything, but perhaps Greenspun's Tenth Rule should have specified that these FORTRAN programs were "well-written". If you're implementing a nontrivial domain-specific language within a program entirely by way of case/switch statements, I shudder to contemplate the source code. Then again, I've never written a complex program in FORTRAN, nor bothered to figure out how I might do so -- perhaps that's the only way to do it. > > By the way, one of the classic "demonstrations of Artificial > Intelligence", ELIZA, was written not in Lisp but in a list-processing > language patterned on Lisp but implemented in (pregnant pause) FORTRAN. > But the SLIP interpreter, rather than being "sufficiently complicated" > was in fact "delightfully simple." I'm pretty sure Greenspun didn't mean to say that creating a (partial) Lisp implementation was itself complicated -- only that the problems that necessitate doing so are complicated. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Ben Franklin: "As we enjoy great Advantages from the Inventions of others we should be glad of an Opportunity to serve others by any Invention of ours, and this we should do freely and generously."