Lisp is an antique language that's more modern than many formerly more popular languages, such as C++. I first learned to program in Fortran II (actually, FORGO) and IBM 1620 Assembler language back before terminals, screens, and on-line printers were common at universities, in 1964. I first encountered Lisp via the LISP 1.5 manual when I didn't even have access to a computer! I loved the mathematical basis for it and played with it on paper for a little while. In 1971 I went back to gradschool and was finally able to run Lisp programs; it was my favorite language. There seemed then to be basically two groups of users -- the mathematicians, those who appreciated the mathematical underpinning and felt it important to faithful to that vision, and the hackers, those who wanted to do neat things with the language and were perfectly willing to lose the mathematical grounding in order to make programming in the language easier. I, as you might guess, fall in the former group.
Then I learned C and thought -- "One of these days, I've got to write my own lisp interpreter in C!" A few years later, I actually did (close to "Portable Standard Lisp") -- not a great one, but I learned a lot about writing portable programs as I moved it from computer system to computer system and memory became cheaper and cheaper. One of the things I like about that program is it's written in such a way that I can edit one small header file and change the implementation of lisp addresses from offsets into an array to actual machine addresses without needing to modify any other files. When I first wrote it, the machines didn't have much memory and I specified how much memory (2K nodes, 4K nodes, ...) I wanted on the command line and used the indexed scheme Later when it was easy to have a program with lots of memory, I switched over to the pointer version.
As Lisp evolved -- it became Common Lisp -- my first take was "the hackers won". That's actually an overstatement -- some of the worst "clevernesses" were eliminated in favor of portability -- for instance, the hackers loved to make zero, the empty list, and the empty string all be equivalent. As it turned out, preserving the mathematical basis actually made it less machine dependent. Nowaday, it's actually required that treating NIL as a number be declared an error rather than a clever hack!
I used Harlequin's LispWorks on my job for awhile, and that was an amazing project, but there are some strange tensions between those who want dynamic software that's easy to update and those who want call processing to be as absolutely dammed fast as possible and the true believers didn't really buy the program until the managers had decided to cancel the project ... so I had to go back to C/C++.
Having been an emacs user for decades, the existence of Slime, an emacs add-on to make interacting with Lisp even easier, lured me back. Now I'm trying to become familiar with SBCL on my MacBookPro.
No comments:
Post a Comment