Re:Show HN: I'm writing a leanpub book about Common Lisp web...
by pavelludiq on Wednesday March 27, 2013 @11:34AM
(#5450003)
I have decided to investigate the possibility to include a sub-chapter to chapter 3 to discuss Caramel for people who like enlive(me included). I didn't already do so because caramel is brand new, and I haven't had the time to try it out beyond a few simple examples.
The choice to use s-expressions was made because It makes it easier to just type code in a repl and experiment, without having to worry about dealing with templates, and also because I wanted the first example to fit in a single file.
Re:Show HN: I'm writing a leanpub book about Common Lisp web...
by muraiki on Wednesday March 27, 2013 @12:19PM
(#5450297)
Oh, I was addressing the Racket example and the response to it, as opposed to your book; I'm not familiar with what you are doing in the book. I am still going to look into your book, as I have no CL experience, only Racket/Clojure. But adding a sub-chapter on Caramel would be really nice!
Re:Show HN: I'm writing a leanpub book about Common Lisp web...
by gcr on Thursday March 28, 2013 @11:21PM
(#5459078)
Enlive looks great!
If you prefer, Racket also includes a templating library that lets you compile arbitrary HTML from separate files right into your application:
http://docs.racket-lang.org/web-server/templates.html?q=in-t...
It's not as fancy as enlive though (for example, because it's not sensitive to the structure of XML, user input isn't escaped automatically, which is quite an awkward tradeoff)
https://github.com/swannodette/enlive-tutorial/