I'm glad to see someone talking about using the lower-level web libraries in Racket. The high-level continuation-based ones are ridiculously unsuitable for actual web programming (they store full state on the server at all times, and the URL gives you full access to the session, among other issues), but the lower-level ones actually look pretty clean and modern. And yet all the documentation keeps talking about the continuation stuff, bizarrely.
This is very useful. I'm in the middle of a Racket web project right now and I got hung up on parsing/processing form data. The Racket docs are very thorough, but they can be confusing if you don't know what you're looking for.<p>If anyone here has experience with web stuff in Racket, I've set up a small skeleton for Racket web projects: <a href="https://github.com/samertm/web-project-bootstrap.rkt" rel="nofollow">https://github.com/samertm/web-project-bootstrap.rkt</a><p>Right now it contains skeletons for talking to sqlite, setting up a router and handlers, and manipulating the web server from the command line. I need to add an ORM (I'm not sure if Racket has any up-to-date ORMs?) and static file handlers. I'd love help or feedback!
Just being exposed to Racket last month I was extremely surprised at how well it clicked with me as opposed to Haskel which I tried to learn for a few months on my own and just tried out SML and it moved to Racket. Can't put a finger on it but Racket just makes sense to me.
How fast is web-server/servlet? Is it fit for production use?<p>Last time I checked (which was, admittedly, a long time ago) it served noticeably fewer "hello, template world" requests per second than Flask running on Python 2.7 while using more RAM. This was a pity to me because I thought Racket could otherwise be a very interesting language for web development.
Isn't your `any?` function actually `ormap`[0]?<p>You should be able to do the same thing with:<p><pre><code> (ormap password-matches? line)
</code></pre>
0 - <a href="http://docs.racket-lang.org/reference/pairs.html?q=ormap#%28def._%28%28lib._racket%2Fprivate%2Fmap..rkt%29._ormap%29%29" rel="nofollow">http://docs.racket-lang.org/reference/pairs.html?q=ormap#%28...</a>
Very nice proof of concept. Just a word of warning: In practice you want to sanitize your input. The code in "Serving static files" allows to break out of document-root with "..".