5 ms·
I learned lisp a few years ago originally with Paul Graham's ansi common lisp and built a few products in various common lisp systems but after a while I really
by thecombjelly 13y ago
I learned lisp a few years ago originally with Paul Graham's ansi common lisp and built a few products in various common lisp systems but after a while I really fell in love with scheme. I tried out numerous scheme ecosystems and fell in love with chicken very quickly.
Since I found chicken scheme I have used it do everything I can. I have built numerous web applications using it and it always makes my happy inside; something I can't say for other ecosystems. It also works great for scripts and interfacing to system libraries.
And of course the community is amazing. Even when I was new to lisp and chicken my questions and patches were always taken seriously and responses are always kind and helpful.
As felix mentions chicken scheme is really fast. Even on websites with moderate load and very little performance profiling or caching my dynamic pages are very consistently generated in less than <20ms. If you go a bit further and give the compiler hints it gets even faster. And if it isn't fast enough yet you can embed C code straight in your lisp source files.
It is tough to beat a language and ecosystem that nearly never gets in the way, is easy for rapid prototyping, and gets great performance when you need it.
As mentioned, Henry Bakers "Cheney on the M.T.A"[1] is a great read. I have used it to implement a scheme system as well.
In summary: use chicken scheme if you want a nearly mature, production ready, rapid prototyping, statically or dynamically typed, fast, easy to use, and powerful language and ecosystem.
edit: Another really cool feature of chicken scheme is the ability to serialize continuations. It can be used to make an extremely powerful stateful web app that operates like arc and hacker news.[2] Since you can serialize the continuations you can write the state to a file and you won't lose the state when you restart the app or the server crashes.
[1] http://home.pipeline.com/~hbaker1/CheneyMTA.html http://home.pipeline.com/~hbaker1/CheneyMTA.html
[2] http://wiki.call-cc.org/eggref/4/suspension http://wiki.call-cc.org/eggref/4/suspension and http://www.paulgraham.com/arcchallenge.html http://www.paulgraham.com/arcchallenge.html
- MatthewPhillips 13y agoSo I've long wanted a good scheme for CLI programs. I've evaluated Chicken several times and passed over it every time.... but I can't remember why. Here's what I'm looking for: 1) Fast executables 2) No runtime requirement 3) Good ecosystem (for Scheme) 4) Good ffi (though I'd prefer a great ecosystem). That's basically all I want. I also kept going back to Gambit but it fails at #3 which Chicken seems not to. Is there a gotcha for Chicken that I'm not remembering? Like how Racket has a slow startup cost, Chicken doesn't seem to have that (from my testing). I think Gambit is probably still faster but not by much (I could be wrong here).
- thecombjelly 13y agoAs far as I know chicken meets all of those requirements quite well. Chicken starts up extremely fast even for very large applications as long as you compile it. The library ecosystem is obviously not as well developed as a major framework like rails or django but it is growing fast and covers most things you would need. A large benefit of it compiling to C and having great FFI support is that most libs don't have to be reimplemented in scheme but can just have a binding to an already mature lib. edit: And if it doesn't have what you need the community is great at helping you get on the right track adding a new lib and gladly accepts well done patches.
- pmelendez 13y agoThe only gotcha I could find is related with dependencies on Windows (MinGW or Cygwin) but other than that I found it very convenient and fun to use.
- hilti 13y agoMaybe You should newLISP (www.newlisp.org) give a try. I'm using it for my CLI programs (like Dropbox background syncing, web scraping). newLISP scripts can be linked to portable executables :-) See here: http://www.newlisp.org/downloads/newlisp_manual.html#linking http://www.newlisp.org/downloads/newlisp_manual.html#linking
- klibertp 13y agoThe only thing I heard about (I think, don't remember that well) newLISP was a statement that the language lacks lexical scoping because the author didn't know how to implement it. Is it true (I mean dynamic scoping)? If so, why was the choice to exclude lexical scoping made? Is it practical to write a bit larger apps/scripts in newLISP?
- hilti 13y agoDynamic scoping is true. But I've never encountered any problems in my large newLISP projects, because I'm working in small modules (newLISP calls it Context). Like a Scheme closure a newLISP context is a lexically closed space. See here for a short introduction to Contexts http://en.wikibooks.org/wiki/Introduction_to_newLISP/Contexts http://en.wikibooks.org/wiki/Introduction_to_newLISP/Context...
- terhechte 13y agoI've been playing around with the idea of learning a Lisp for a couple of weeks now (and dabbled with Clojure, SBCL, Chicken, Racket). But ultimately haven't had the time to really get into it. Is there something like a web framework for it? You should do a pull request for the web framework benchmark with Chicken Scheme to see how it compares against the others :)
- thecombjelly 13y ago> Is there something like a web framework for it? Yup. It is called 'awful'. :-) [0] It is still more bare bones compared to something like rails or django but we are continually improving it. It is very straightforward and easy to get started with, and it is already quite powerful. You can do most things in it as easy or sometimes even easier than in more popular frameworks. You do have less web-framework-specific libraries to work with though. edit: awful can also be done with SXML which prevents XSS attacks be default. [0] http://wiki.call-cc.org/eggref/4/awful http://wiki.call-cc.org/eggref/4/awful
- hilti 13y agoAs I stated already above: give newLISP (http://www.newlisp.org http://www.newlisp.org) a try, when You like "lisp-like" languages. There's already a web framework for it called Dragonfly (http://www.rundragonfly.com http://www.rundragonfly.com). I'm one of the developers of Dragonfly and using it for all my web applications.
- jkleiser 13y agoUnless you're stuck in Windows, I suggest you take a look at PicoLisp, a very rich and interesting development system. The Wiki is of course written in PicoLisp: http://picolisp.com/ http://picolisp.com/