views:

194

answers:

6

I can't find this on Google (so maybe it doesn't exist), but I basically'd like to install something on a web server such that I can run a site on Scheme, PHP is starting to annoy me, I want to get rid off it, what I want is:

  • Run Scheme sources towards UTF-8 output (duh)
  • Support for SXML, SXLT et cetera, I plan to compose the damned thing in SXML and -> to normal representation on at the end.
  • Ability to read other files from the server, write them, set permissions et cetera
  • Also some things to for instance determine the filesize of files, height of images, mime-types and all that mumbo-jumbo
  • (optionally) connect to a database, but for what I want to do storing the entire database in S-expressions itself is feasible enough

I don't need any fancy libraries and other things that come with it like CMS'es and what-not, except the support for SXML but I'm sure I can just find a lib for that anyway that I can load.

+1  A: 

Did you come across Fermion (http://vijaymathew.wordpress.com/2009/08/19/fermion-the-scheme-web-server/)?

pdbartlett
I didn't, but this seems to be an entire replacement to apache rather than just something I can install that for instance recognises files that end on .scm and runs them when they are requested and gives back the result that is written on their standard output port. As a simple, lightweight alternative to php.
Lajla
The new link to Fermion is http://spark.vmathew.in/tutorial/web-applications
Vijay Mathew
@Lajla: sorry - I mis-interpreted web server as hardware rather than software. Looks like you have some other alternatives now though :)
pdbartlett
+1  A: 

mod_lisp and FastCGI are the only two Apache modules I'm aware of that might work at this time. mod_lisp provides Scheme support because it's architecture is similar to FastCGI, where CGI like parameters are sent over a socket to a second process which remains running as the Scheme backend to the web server. Basically you use one or the other to send CGI like parameters across a socket to a running Scheme backend.

You can find some information about these solutions here. There was another FastCGI like effort called SCGI which demoed a simple SCGI receiver in Scheme called gambit. That code is probably not maintained anymore, but the scheme receiver might be useful.

Back in the Apache 2.0 days, there were more projects playing with scheme and clisp bindings. I don't believe that mod_scheme ever released anything, but if they did, odds are it is not compatible with the modern releases of Apache.

Edwin Buck
+1  A: 

If you're looking for a lispy language to develop web applications in, I'd recommend looking into Clojure. Clojure is a lisp variant that's fairly close to scheme; here is a list of some of the differences.

Clojure runs on the Java virtual machine and integrates well with Java libraries, and there's a great webapp framework available called Compojure.

ataylor
Hmm, I heard of Clojure but never really tried it as I thought it was mainly based on Common Lisp as it doesn't have tail call optimization.Reading about it now it seems interesting, it fixes some errors on Scheme, but sadly it also introduces some new one's to me. I could've sworn to read at some point that it was a Lisp-2 though, but it says here it's a Lisp-1.
Lajla
+1  A: 

Check out Chicken Scheme's Eggs Unlimited. I think what you want is a combination of the sxml- packages coupled with the fastcgi package.

Shaun
+2  A: 

Spark-Scheme has a full web server. If you don't need that, it also has a FastCGI interface so that you can serve Scheme scripts from a web servers like Apache, Lighttpd etc. Spark-Scheme also seem to meet your requirements for database support, UTF-8, file handling and SXML.

Vijay Mathew
This seems like the one for me.
Lajla
+1  A: 

PLT Scheme has a web application server here: http://docs.plt-scheme.org/web-server/index.html

grettke