Languages

FP techniques in Lisp: Data sharing

Common Lisp has often been called a "multi-paradigm" language, in that it allows you to program in many different styles, sometimes simultaneously: imperative, object-oriented, functional, statically typed, etc. It depends on what style you want to adopt, how your code will look.

Recently I've been porting a C++ accounting system to Common Lisp. And after only six weeks, the port is nearly complete — a feat I credit to the power of the Lisp language and the facilities it offers I'd been forced to replicate in C++.

But as the port nears completion, I find myself questioning some of the design decisions. Did C++ force me down a path where Lisp can offer a better alternative? Read More...
|

CL HyperSpec Info pages in Emacs

I just discovered the following blog article by Bill Clementson, from way back in 2003. Luckily, the links still worked, so I was able to get Info pages today for the Common Lisp HyperSpec courtesy of the GCL project.

Once installed, I found I could not easily lookup documentation for, say, mapcar, because it’s actually on the page for mapc. But SLIME’s hyperspec.el contained the indexing info I needed to write a new module which fires up the Info system on the correct section for the symbol you want defined.

This new module is called cl-info.el and is available from my Lisp repository. It rebinds the standard Emacs key for function help (C-h f) to lookup help in the HyperSpec instead, if you’re in a lisp-mode buffer.

NOTE: A fellow Lisper pointed me to this blog entry which offers a much nicer way to get the HyperSpec in Info form. It’s a little more work, but the quality of the result is superior and it has an index! Also, it makes my cl-info.el unnecessary, by relying entirely on the Info system itself.

|

The groovy thing about Groovy

One of my favorite languages this year is Groovy, a scripting lanugage for the Java VM. It has a nice, clean syntax, in combination with some very powerful ideas, like it's brand of closures. It can be close enough to Java as to be nearly indistinguishable -- which is good, if you're selling it to Java programmers; and close enough to Python that it seems like a first cousin.... Read More...
|
© 2008 John Wiegley