News for hackers. Stuff that matters.
Re:Show HN: I'm writing a leanpub book about Common Lisp web... by pavelpanev2 on Tuesday March 26, 2013 @06:19PM (#5446434)
http://github.com/ober/thinatra

(get "/hello/:person1/:person2" "Hello #{person1} and #{person2}")

http://localhost:8021/hello/Jack/Jill "Hello Jack and Jill"

Much nicer imho than many of the ugly lisp ways. And all in Emacs Lisp.

Re:Show HN: I'm writing a leanpub book about Common Lisp web... by gcr on Tuesday March 26, 2013 @07:16PM (#5446686)
That's a great text templating engine, but how does it handle the structure of HTML? Though our lisp solutions might be uglier than that, they:

- Are guaranteed to automatically produce perfect, valid HTML (or XML in my case),

- Automatically escape user-supplied input

- Make it very easy to generate lots of repetitive elements, or conditional elements, like other template languages.

Maybe I'm misunderstanding the spirit of your post? It seems like thinatra excels at the "routing requests from varying URLs" part, which solves a slightly different problem than the code we posted (racket for example provides a default path of http://localhost:40986/servlets/standalone.rkt -- definitely not what you would want)