TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Low-level web programming in Racket and a wiki in 500 lines

135 pointsby ihodesalmost 10 years ago

7 comments

mkozlowsalmost 10 years ago
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.
评论 #9717983 未加载
评论 #9718764 未加载
评论 #9719260 未加载
nosefrogalmost 10 years ago
This is very useful. I&#x27;m in the middle of a Racket web project right now and I got hung up on parsing&#x2F;processing form data. The Racket docs are very thorough, but they can be confusing if you don&#x27;t know what you&#x27;re looking for.<p>If anyone here has experience with web stuff in Racket, I&#x27;ve set up a small skeleton for Racket web projects: <a href="https:&#x2F;&#x2F;github.com&#x2F;samertm&#x2F;web-project-bootstrap.rkt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samertm&#x2F;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&#x27;m not sure if Racket has any up-to-date ORMs?) and static file handlers. I&#x27;d love help or feedback!
评论 #9716921 未加载
评论 #9716662 未加载
baldfatalmost 10 years ago
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&#x27;t put a finger on it but Racket just makes sense to me.
评论 #9716825 未加载
评论 #9717856 未加载
networkedalmost 10 years ago
How fast is web-server&#x2F;servlet? Is it fit for production use?<p>Last time I checked (which was, admittedly, a long time ago) it served noticeably fewer &quot;hello, template world&quot; 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.
59nadiralmost 10 years ago
Isn&#x27;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:&#x2F;&#x2F;docs.racket-lang.org&#x2F;reference&#x2F;pairs.html?q=ormap#%28def._%28%28lib._racket%2Fprivate%2Fmap..rkt%29._ormap%29%29" rel="nofollow">http:&#x2F;&#x2F;docs.racket-lang.org&#x2F;reference&#x2F;pairs.html?q=ormap#%28...</a>
评论 #9729671 未加载
cneualmost 10 years ago
Very nice proof of concept. Just a word of warning: In practice you want to sanitize your input. The code in &quot;Serving static files&quot; allows to break out of document-root with &quot;..&quot;.
评论 #9719146 未加载
octatoanalmost 10 years ago
Hijacking: Can anyone tell me how to make a Scribble website have CSS like in HTDP?
评论 #9719281 未加载