Home
Luke's Weblog - The myth of the non-portable Lisp program [entries|archive|friends|userinfo]
Luke Gorrie

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

The myth of the non-portable Lisp program [Apr. 29th, 2007|10:18 pm]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|, ]

my long answer to a short question..
Every Lisp program attempts to expand until it can run on all Lisp implementations. Those programs which cannot so expand are replaced by those which can.
I don't believe it's possible to write a non-portable Common Lisp program that's relevant to the free software community. You can try, but you will fail. Your program will either become portable or be replaced by one that is.

People have tried to write non-portable code. SLIME was announced as "a CMUCL-specific clone of ILISP" but was ported in no time at all. Ironically it has become one of the most portable Lisp programs around. And now I think that this was inevitable.

SLIME became portable because people with other Lisps wanted to use it. They ported it themselves, added new features, found bugs, made suggestions, wrote web pages, did lots of good stuff. This was an intensely fun period of thriving joyous hackery. How could we refuse to cooperate with all these hackers who would later become friends? If we'd seriously tried to reject non-CMUCL code then the other guys would have made a superior fork and had the fun all to themselves. Portability was inevitable.

But it's not all roses. We've invested a lot of time in adding features and fine details for our Lisp of choice that most of our friends won't ever appreciate. In some cases we've felt moved to port these features to other Lisps that we don't use, and I have mixed feelings about that. I spent a few weekends working on the SBCL backend out of sheer horror at the way so many people were experiencing SLIME. I wish instead that somehow we'd all experienced it in the same way automatically.

So I believe that the social reality is that important Common Lisp free software will always become portable, for better and for worse.

This begs a lot of questions: how can we exploit this fact of nature? is it a good thing or is it a bad thing? should we change it and if so then how? I don't have ready answers to all of them but they're very interesting to consider.

LinkReply

Comments:
[User Picture]From: [info]otfrom
2007-04-29 09:00 pm (UTC)

Different from Scheme (apparently)

(Link)

This is very different from the impression I get from the various scheme implementations out there and part of the reason I keep getting drawn back to common lisp. The community of common lispers does seem to port every FOSS tool out there to their favorite implementation, but scheme things seem to me to be tied to one implementation (with the exception of things like SRFIs and some others).
[User Picture]From: [info]leon03
2007-05-03 01:42 am (UTC)

Re: Different from Scheme (apparently)

(Link)

Indeed; though I don't know much about Common Lisp, I work quite a bit with Scheme. (My start in FP was through SML and Haskell) Cross-implementation portability is really quite bad: sticking strictly to R5RS can be tricky, and often as a practical matter you find you need to use implementation-specific features.

One common (though relatively easy) obstacle to portability is the lack of a standard module system. This is being remedied in R6RS, though there has been over a proposal that really was much too complicated. My understanding is that they resolved the problems by leaving the module system underspecified.

The other major obstacle, which can be much more work to overcome, is the lack of standard libraries, and many libraries are written using implementation-specific features.
From: (Anonymous)
2007-04-29 10:41 pm (UTC)

It's a good thing.

(Link)

I think what you describe is a good thing. To me the essence is this:

- You can start to write your own application or library in your preferred Common Lisp implementation. If it becomes something that people want to use, portability is relatively straightforward to achieve, in the sense that the time you need to invest is relatively low, even for large applications. I think this pattern can be seen in several examples.

- Especially, newbies who start to learn Common Lisp shouldn't worry too much about what Common Lisp implementation to choose and/or whether they have to think about portability from the start. It's actually very hard to paint oneself into a corner.

- A side effect is that a number of portability layers have become available in the past. They are not as mature as they could be, but there is a lot going on in that area. There is no concerted effort in that regard yet, so it's not as mature as it could be, but I also don't think that the time is right for that yet. My gut feeling is that this will become more of an issue in about one or two years - and it will happen in a grassroots approach, like almost everything that happened in the last couple of years.

Specifically, I think that Common Lisp is not dead - it's very much alive. ;)

Pascal Costanza
From: (Anonymous)
2007-04-30 09:27 am (UTC)

Portable implies no porting required

(Link)

For a newbie like me, the lack of standard libraries to do modern things like SQL, web serving on windows with CLISP or ECL is a major show stopper. ASDF doesn't work uniformly either. It's full of conditional code to handle the discrepancy between various implementation.
From: (Anonymous)
2007-05-02 04:28 pm (UTC)

cOUNtzERo?

(Link)

Is there a chance that I've reached the almighty cOUNtzERo after years and years of searching through the wilderness?! Best regards from "The Swedish Cream-drinker" (uMn) / Anders :)
[User Picture]From: [info]lukego
2007-05-13 09:30 am (UTC)

Re: cOUNtzERo?

(Link)

My God, indeed! And I've been consuming Arla Goodness myself for some time now :-)

We must meet for an appropriate beverage soon! I'm selling up and shipping out from Sweden at the moment so let's make it happen before september :-). Email me! luke@member.fsf.org