How can I do web programming with Lisp or Scheme?

I usually write web apps in PHP, Ruby or Perl. I am starting the study of Scheme and I want to try some web project with this language. But I can't find what is the best environment for this.

I am looking for the following features:

  • A simple way of get the request parameters (something like: get-get #key, get-post #key, get-cookie #key).
  • Mysql access.
  • HTML Form generators, processing, validators, etc.
  • Helpers for filter user input data (something like htmlentities, escape variables for put in queries, etc).
  • FLOSS.
  • And GNU/Linux friendly.

So, thanks in advance to all replies.


Racket has everything that you need. See the Racket web server tutorial and then the documentation. The web server has been around for a while, and it has a lot of features. Probably the only thing that is not included is a mysql interface, but that exists as a package on PLaneT (Racket package distribution tool).

UPDATE: Racket now comes with DB support, works with several DBs including mysql.


You may want to have a look at Clojure:

Clojure is a dynamic programming language that targets the Java Virtual Machine. [...] Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.

Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.

Interop with Java is straightforward in Clojure, so you can re-use any existing Java libraries as you need. I'm sure there are plenty that are useful for web development.

clojure-contrib has an SQL API, and there is ClojureQL as well, which should cover your DB access needs.

There is a web framework for Clojure called Compojure under development. There may be others, too.

Clojure's source is available on github under the EPL. Getting it running on Linux is easy; I just clone the git repos and run ant.