News for hackers. Stuff that matters.
Re:Real World Haskell by Ericson2314 on Friday November 06, 2020 @09:42AM (#25007886)
Ugh, why do we need to spread the world with highly dubious libraries like Esquilito and Servant...
Re:Real World Haskell by nimih on Friday November 06, 2020 @12:49PM (#25009543)
What makes those two libraries, in particular, "highly dubious"?
Re:Real World Haskell by Ericson2314 on Friday November 06, 2020 @03:15PM (#25010721)
- Persistent: tries to support way to many kinds of databases, ends up being lowest common demoninator dumb about all of them.

---- Just use PostgreSQL simple

- Esquilito, not comprehensive. I vaguely remember let through some bad SQL too

---- Use Beam

- Servant: the type level stuff is poorly executed nerd skateboarding. It either should be:

---- less type level and more simple-stupid

---- Use data kinds so the type level is less "un-kinded" and catch a lot of mistakes before they become horrible term-level errors.

Re:Real World Haskell by mrkeen on Friday November 06, 2020 @12:32PM (#25009364)
As a huge fan of Servant, have you got a replacement I should check out?
Re:Real World Haskell by Ericson2314 on Friday November 06, 2020 @03:20PM (#25010760)
No ...but

I use github.com/obsidiansystems/obelisk/ at work (I work at the place that makes it). It does it's own thing for user-visible routes (for frontend and backend because automatic prerendering). It does a different thing for requests and live queries all of which are over websockets for simplicity.

Our routes stuff should be pulled out as a generic dual parsing-prettyprinting library (it and https://hackage.haskell.org/package/tomland are the same basic ideal, just need to remove the concrete HTTP / TOML specifics to get to the commonality).

I once started throwing together like servant but using data kinds in https://github.com/ericson2314/matrix-client