Metacircular thoughts

May 14, 2007

What do you get in a commercial Common Lisp implementation?

Filed under: Lisp, Politics, Prolog, The Dark Side, Web development — metacircular @ 8:44 pm

Commercial Common Lisp implementations like LispWorks and Allegro Common Lisp cost thousands of dollars. What do you get in them which isn’t included in SBCL or something, which costs $0?

  • ACL has AllegroCache, a true object database which has ACID transactions and scales to billions of objects. It is used transparently and integrates seamlessly with CLOS, Common Lisp’s ridiculously powerful object system. Depending on the project, this alone could be worth thousands of dollars.
  • LW and ACL have fast embedded Prolog compilers which seamlessly integrates with everything else in the distribution, including AllegroCache. LW actually gives you a full-blown expert system IDE (which is LW’s distinguishing feature as it doesn’t have an object database). In the ’80s, the kind of expert system functionality LW provides costed thousands of 1980s dollars.
  • Good cross-platform support so that you don’t run into the kind of problems the reddits had when working between Mac OS X and FreeBSD.
  • Libraries for web programming: XML/SOAP/WSDL/yadda yadda parsers, HTML parsers, a Lispish web application server and HTTP server, and easy libraries for all major networking protocols bundled in.
  • Cross-platform GUI libraries which are good enough for prototyping “programmer interfaces”.
  • Database libraries: ODBC, MySQL, Postgresql, Oracle.
  • Excellent foreign function interfaces for C libraries.
  • ACL provides OLE/COM linkage and examples of things like creating a simple CLOS layer for working with Excel.
  • Linkage to Java and/or .NET (e.g., jLinker and full support for RDNZL), which, together with the C FFI, means you can easily use code written in all the most popular languages.
  • Native threading (I guess you don’t get this), Unicode, and other oft-neglected but essential stuff.
  • Abundant working examples and comprehensive, helpful documentation for all of this.
  • All these libraries are bundled in, they work, they’re efficient, and they are supported.

All Common Lisp distributions give you efficient implementations of CLOS, a metacircular multiple-dispatch multiple-inheritance object system with an amazing metaobject protocol, as well as mini-languages for pretty-printing and iteration. SBCL, LispWorks, and ACL all have optimizing native-code compilers that give you performance somewhere between C and Java. SLIME, LW, and ACL provide IDEs matched only by Squeak in power.

Clearly if you pay $3,000 or however much, you’re getting a helluva lot more than just an implementation of a spec from 1984.

March 30, 2007

What I’ve been up to

Filed under: Lisp, Web development — metacircular @ 1:00 am

I’ve been trying to make SQL and templates in web development not suck ass. I am going about this by creating a template language and a database tier generator where you declare templates and model information in Lisp and then a lot of PHP code is written to disk.

The database tier generator is fairly unremarkable at this point, but I’m kind of proud of the template language. The Lisp code on the left generates the PHP code on the right:

(#content
  .left.column
    (h2.welcome 'Welcome to our site!')
    (p print_information)
    (p more_information param1 (get username))
  .right.column (include sidebar))

<div id='content'>
  <div class='left column'>
    <h2 class='welcome'>Welcome to our site!</h2>
    <p>
      <?php print_information(); ?>
    </p>
    <p>
      <?php more_information($param1, $_GET['username']); ?>
    </p>
  </div>
  <div class="right column">
    <?php include 'sidebar.php'; ?>
  </div>
</div>

It’s inspired by Haml. This stuff should be dropping pretty soon, stay tuned.

Next Page »

Blog at WordPress.com.