Hacker News new | ask | show | jobs
by mark_l_watson 2227 days ago
I would like to see wider adoption of Racket. I spent six weeks earlier this year evaluating and comparing Racket, LispWorks Common Lisp, and Swift for an application [1] I am working on. I ended up not choosing Racket, but it was a very close decision.

As a modern Lisp, Racket really has it all: vibrant user and dev community, portable GUI support, easy to make standalone applications, and great libraries.

[1] http://knowledgegraphnavigator.com/

1 comments

Can you share, what was the deciding factor against Racket?
Not OP but for me, I wanted to write http server applications and I was put off by having to specify the http response status messages and timestamps. I'm wondering why something slightly higher level isn't built into the standard lib.
You don’t have to specify those things yourself unless you want to manually construct a response struct. There are helpers like response/xexpr and response/output that construct responses for you.

This article might help: https://defn.io/2020/02/12/racket-web-server-guide/

But if I wanted to say return a 404 I don't want to have to specify "Not Found" along with it every time.
As of a couple releases ago, the message gets set according to the status code so this code would behave as expected:

    (response/xexpr #:code 404 '(h1 "Not Found"))
These days, response status messages are automatically inferred: https://docs.racket-lang.org/web-server/http.html?q=response...
Thanks! I’m gonna give racket another spin now.