To choose a scheme/lisp?

This is a kind of open question or rant.

I’ve come to really like scheme/lisp like languages but my problem is to choose one. It is kind of the situation when linux started to grow back in the day when I did distrohoping evey week.

so, i really like chez scheme and find i lot inspiration listening to lectures by will byrd, but what is holding me back is the lack of libs, even a decent well maintained web server is missing. (Igrophyr is not maintained)

chicken scheme is nice, the whole ecosystem seems to be mature

racket is interesting, my only question is how much is chez scheme in it? or is it just a wrapper on top of chez scheme?

then we have picolisp. first when I saw it I thought they did everything right, webserver and db support. but then I saw the missing float thing, and that really keept me of.

and finally clojure. it seems to be the biggest of all but what annoys me is that is it on top of java. or maybe that is irrelevant.

what is your opinion?

1 Like

I’d recommend emacs lisp. It’s really good and everything under the sun has been written for it so there is no lack of libraries or examples.

You have to remember that it’s the runtime that’s important. The language is just an interface to the runtime. All those lisps you mentioned are pretty much the same. Emacs differentiates itself. It’s a very nice complement to clojure or whatever other lisp you choose.

i’ve been using emacs for a long time, and yes, emacs lisp seems pretty solid. but I always considered it to be a part emacs and nothing else. maybe that is wrong.

That’s a “feature”, not a bug – because it gives you immediate access to the vast Java ecosystem of libraries and tooling: things that have been battle-tested in production for years.

The only reason I’ve been able to adopt Clojure at work as our primary language is because it runs on the JVM – and we’ve been based on the JVM for about 20 years at this point.


yes, that is a good point. I guess I am drawn to the apperant elegancy of chezscheme, and it somehow annoys me when there is an error in clojure it spits out 20+ lines of error messages, all due to the underlying java lib.
But then again, the ecosystem of clojure is big.

1 Like

That’s going to depend on your tooling. It’s not the default behavior of the Clojure REPL:

user=> (defn compute [a b] (/ (* a b) (- a b)))
user=> (compute 42 42)
Execution error (ArithmeticException) at user/compute (REPL:1).
Divide by zero
user=> (String. 42)
Execution error (IllegalArgumentException) at user/eval139 (REPL:1).
No matching ctor found for class java.lang.String

The core team have worked hard to improve the error experience over the last few releases and to improve how failures are handled by core tooling. Unfortunately, some tooling out there still perpetuates the “20+ lines of error messages”…

1 Like

the 20+ lines error messages are more present when doing web development luminus.
how come there no lambda keyword in clojure? I konw the fn keyword but still…

I also chose Clojure because of the availability of Java libraries. In many cases, Clojure makes it very easy to use Java libraries.

Then, after I chose Clojure, I had to learn to get used to Clojure’s collection of primitives and its emphasis on functional programming throughout (except when you really need something imperative). This is different from what I was used to in Scheme and Common Lisp. And I came to love that aspect of it. Not just because it’s the Clojure way, but because the way that Clojure does it is so easy and useful and fun once you learn it.

I wrote a keylogger to capture statistics about how I was working within emacs a while back and kinda delved in for a bit. I also wrote a global key dispatch system for my personal workflow.

Emacs is great because it is constantly evolving. You can do systems programming if you want to. You can do react-style guis if you want to. It’s a completely different paradigm and really smart people buy into it.

I like chez. It’s beautifully designed. You would just use the ffi for things like web servers, just like any other well built scripting language.

I don’t like racket, because I disagree with its paradigm. I’d much rather have one language that does 1000 things rather than 1000 languages that do 1 thing each.

In the end though, if you want to get things done it is about usability and clojure is damn usable.

chez is definitely beatifully designed, but the lack of libs is a kind of dealbreaker. yes you can go the ffi route, but you already got a webserver in chicken and racket to name one example. and in clojure there is even more than one framework.

You’ve obviously made up your mind that your goto lisp needs a webserver. Have you tried Janet or Fennel?

Lisps aren’t sports team memorabilia or pokemon cards. You use it to do what you want to do. You evolve it yourself - ie if there isn’t a webserver, maybe it’s a good opportunity to write one. Or if you can’t, don’t hold that against the language.

I was thinking doing a webserver for chezscheme for sure.
I am not holding anything against any language, just stating facts that some of them lack libs, webserver being one of them.
And as some already have written above, libs are useful.
to each their own I guess.

Clojure is certainly not minimal, however, I think you’ll find that it’s neat, tidy and elegant in its own right. Indeed the names are different from traditional Lisp languages (lambda becomes fn, car becomes first and so on), so I think it can seem more different from other Lisp languages than it really is. Running on the JVM isn’t something I really think about usually - after all, almost all programming languages depend on a 50MB+ operating system, so another 100MB for the JVM is not typically a major concern for me.

If I really do need a language that is minimal (for embedded software, or for rapidly restarting microservices maybe), I would usually choose Fennel or maybe nbb. Instead of expecting a web server in these languages, I can just write CGI scripts for use with something well-supported like Nginx.

1 Like

I also enjoy building stuff with Lisp.

I scratch that itch by writing some packages in Emacs Lisp. I use Emacs as my main editor so this works out.

If you want to build web backends, Clojure and Common Lisp probably have the most mindshare (with Clojure being the more popular).

If you want to be employable, Clojure is probably the best option.

If you’re into language design, Racket is a strong option with good support and community.

If you want to build desktop programs, I’ve seen Common Lisp being used a lot in this.

Saying that, whatever you choose will also be usable for other purposes, so it’s not like you’ll be locked in.

1 Like

Chez is a great scheme implementation, but the community isn’t particularly large, so you’ll be swimming upstream in terms of libraries. That said, there’s a whole suite of web-related libraries linked here (server, framework, JSON, templating, database integration):

Many of these you would normally install with the third-party package manager for Chez, Raven. Sadly, the Raven website is down at the moment — as I said, small community!

There’s also Gerbil scheme, which offers:

Racket has a very nice, long-tested webserver that started off back when Racket was called “PLT Scheme”:

Common Lisp has very good tooling for the web, about which you can find a great deal with a web search. If you want to avoid the JVM but want a commercial grade Lisp webserver, it’s a fine choice.

Lastly, Clojure has the biggest community and largest use in industry. You will find the most used/tested libraries, largest collection of examples, &c, there. I think most people who believe they dislike the JVM actually dislike the Java programming language and culture around it (endless XML files, weird config options, &c). It’s probably worth actually trying Clojure before dismissing it on the basis of the JVM. You could even get started using Babashka, which is a Clojure interpreter that runs without the JVM:

1 Like

Thousands of programmers reinventing web servers and such like is not productive in any context.

1 Like

Scanning through Java stack traces, trying to interpolate the actual Clojure error drives me absolutely bonkers. It’s a real short coming that must scare off a lot of potential adopters.

1 Like

As I said above:

I said if there isn’t one, then figure out how to do it. And don’t point to me about it. How many project management tools are there right now? I’ve actually lost count.

I feel like this is such a straw man argument. Do you know of a single potential adopter that were actually scared off by stack traces?

Obviously, no. That’s not something that I would spend time canvasing about. I can only speak from my own experiences.

I have 25+ years of Java development and am very familiar with scanning stack traces. That said, I personally find it annoying and counterproductive to have that level of indirection between me and the error that I’ve made when programming in Clojure. I can only guess that someone who is not as familiar with Java might be really put off by the error messaging.

Btw, I love the Clojure language and would like to see more people adopt it. :slight_smile: