upbeat.it

by Cesare Rocchi

Lisp could have been huge

by Cesare Rocchi

Lisp is the first programming language I learned. That’s why I liked programming since the beginning. Unlike some of my friends, my learning path looked downhill, at least at the beginning.

In Lisp you are “free”. Its syntax is easy to grasp. You can write your own interpreter if you like. Functions as first class citizens are now a given in many programming language. In Lisp they were there since the beginning. I once had the pleasure to use a Lisp machine. It was fun to modify the operative system right from the Lisp REPL.

I have grown up thinking that programming was building my own language. Nowadays we’d probably say building a DSL.

The development flow was straightforward. I’d open Emacs, connect to a remote machine running the Lisp interpreter and write code. No save-locally-and-then-upload, no branch-code-run-tests-deploy-to-staging-then-production. Just write code, in production. Screwed up? Just roll back to the previous definition of that function and you are done.

If it sounds like I am simplifying it’s because I was in a simple situation. I was the only developer working on that “intelligence” component.

One day the boss wanted to run a demo. He didn’t want to type commands in a shell, so we needed a UI. And there started our problems. We were working on Sun SPARCStations. The only UI “context” available was X11. The quickest hack was building a UI using Tcl/Tk. The UI sent and received messages to the Lisp application using a TCP socket.

Fun fact: tcl is still included in Mac OS X 10.11. Type tclsh in the terminal if you don’t believe me.

Since then, since that request that “ruined” my dream job, I wondered why Lisp doesn’t have a UI toolkit. There’s many reasons:

  • There are many Lisps. Here is a list, but I think it’s not exhaustive
  • There can be incompatibilities between different implementations. Code working on CMUCL might not work right away in CLISP for example, and vice versa. Not the perfect ground to build a UI kit.
  • There’s not even consistency in the way different implementations support OS threads
  • There are many dialects.
  • The community … is complicated.

I believe the last point is the crucial one. Lisp has been pretty famous for having an elitist community. There’s nobody inviting you to learn Lisp. Once you have proven that you have “seen the light” then you deserve help from the gurus. But you have to figure out the path to the light by yourself. And the gurus will always treat you like a rookie.

Many people in the CL community have long had an attitude of, “We do not need to make an effort to attract the next generation of programmers, or to make things easier for them. CL is so amazing that the best programmers will naturally seek it out and devote themselves to learning and using it.”

John Croisant source

Exactly. Nowadays, I’d probably look at the community before even checking the features of a programming language. Unless you are planning to be the “mystic developer” living in the woods, a vibrant and active community is as important as a good debugger or a well done documentation. And how would you know about a new programming language or frameworks nowadays? By stumbling upon a message sent out, almost in unison, by the members of vibrant community.

It’s a pity. Lisp could have been huge. Unfortunately, advanced features, flexibility and “freedom” are not enough. A welcoming community is also key. Think Twitter is full of rage? I’d take Twitter rage instead of the toxic critiques for which Erik Naggum was famous.

If you are planning to dive into the Lisp world this is a pretty comprehensive post about the Lisp ecosystem, slanted towards web applications.

Happy λ-calculus :)