A Video Tutorial of SLIME
An anonymous reader writes "Ok, maybe I exaggerated a bit with the subject; however, you can check
it out for yourself and decide. Marco
Baringer has published a video (.mov available for
the bittorent impaired) showing off the Common Lisp IDE SLIME. It's a long
movie (almost an hour) and provides an in-depth description of many of
SLIMES's features which just aren't available (or even possible) in 'modern' IDEs/languages."
Can anyone point out any strong advantages Lisp has over more modern functional languages?
-1. (Aside: Lisp can be used for functional programming. It is NOT a purely functional (it does not strive to be side-effect free in everything) programming language like Haskell.)
0. (Aside: "More modern?" - lisp started a long time ago but has been evolving continuously. The latest Lisp standard is from the 1990s, not the newest standard, but hardly "old")
1. It's dynamically latently strongly typed with optional static typing (popular compilers do type inferencing). (let the flamewars begin). latent: values have types. dynamic: types are available and if necessary checked at run time (if necessary! compilers like CMUCL make use of type information at compile time for static typing!) Strong: type system can't be violated like in C.
2. It's got nice, uniform syntax. This is mostly just a preference thing, I HATE complicated syntax and just can't sympathise with people who like, say, Haskell or C++ syntax, but I know other people feel just the opposite. With languages with more complicated syntax, I have to mentally maintain an image of the real program tree, lisp just is the tree (context: other languages I find pleasant to read are APL (with the original charset so the meanings aren't obscured!) and Forth). The uniform syntax also makes the "symbolic macros" (NOT like C macros!) characteristic of advanced lisp code easy.
3. It's a beautiful meta-language. Meta-language? Lisp is mostly a language for writing domain-specific languages in. An idiomatic lisp program extends the language in the direction of the problem domain (a characteristic shared with Forth). It's a playground for new programming paradigms.
4. It's got one of the most powerful generic-function ("multimethod") object oriented programming systems around (CLOS), even more powerful with the de-facto standard meta-object programming system (MOP) that allows you to fuck around with the object system and make strange programming paradigms like "Cells" (auto-updating members of objects that work like spreadsheet cells).
CL is much "closer to the metal" than Haskell or even OCAML and it's designed to compile to efficient code. As a result it's not particularly "functional" (nowhere near as much as Scheme, for example). CMUCL compiled lisp should approximately match native-compiled OCAML in speed, and CL has an advantage in being a multiple-sourced standard.
Main advantages of CL
- Scalable ratio of easy:fast. Prototype lazily and tune iteratively.
- Macros facilitate "little languages" for task areas, making core algorithms terse and readable.
- Running apps can be hot-debugged, tested and recompiled in situ.
- Exception mechanism provides something I've seen nowhere else, namely the ability to catch an exception, repair the problem, and reverse the thow to resume where the code left off.
Main serious problems with CL
- Too many fiddly features makes writing a compiler hard
- Lack of a good standalone-binary compiler.
- Weakly standardized library mechanism makes cross-implementation libraries unnecessarily hard and hence rare. (NB: "common lisp controller" is a fix for this and standard in Debian.)
- No fixed standard for foreign function interface (or requirement that one even exist).
- No sockets or threading in the standard library.
Marco is the author of Uncommon Web, a continuation based lisp framework for web applications.
Last week he did a video for that, torrent here that was well received. It's still in the early stages, but combined with Lisp-on-Lines (in development) it's hopefully going to attract some mindshare.
Bill Clementson also discusses lisp webserver options in his (slighty dated - Oct-2004) blog entry
I started working with UCW/Slime/mod_lisp a couple of weeks ago, and I'm pleased to see better getting started videos, ala Ruby on Rails.
This is a very common wish, but there's a fallacy in the first sentence. The implied comparison is between language implementations (Ruby, Python) and a language specification (Common Lisp, Scheme) or a metalanguage idealisation (Lisp). There are plenty of implementations of Lisp and Scheme which have available for them all of the elements on the wishlist: but they are not standard across all implementations of a specification, or all instantiations of the metalanguage.
There is indeed a need for better distribution integration for the various Free lisps out there (of which there are many) for the newcomers not to feel so intimidated by the need to assemble their systems themselves: but the inherently misleading comparison between specification and implementation should not frame the discussion, because those who need the bits and pieces can assemble them.