Hacker News new | ask | show | jobs
by fiatjaf 3271 days ago
You've submitted this yesterday. I upvoted you and asked a question. I was ignored.
2 comments

Ah, my bad, I wasn't aware someone else submitted it, what was the question? Would be happy to talk about it.
The previous submission is here: https://news.ycombinator.com/item?id=14682295

The question was:

> Why do you wrote this instead of just using Elm? Is GHCJS fast enough? Does it produces builds small enough?

The choice of using Haskell was due primarily to 3 things.

1) Code reuse - The ability to share types on both client and server.

2) Hackage - by using Haskell you have access to 90% of Hackage on the frontend (this means nice lens and json libraries).

3) Types - Haskell's type system can express higher-kinded and poly-kinded types (something which Elm cannot afaik), this gives the user flexibility, expressivity and safety.

The code is quite performant, but for the fast stuff miso FFIs into hand-written js.

In regards to output size, the generated js can be very large. But, the generated code is in a state where it can use the closure compiler's ADVANCED optimizations. That combined with caching the rts.js and gzipping, you can probably get down to a few hundred kbs (which is large by a lot of people's standards), but workable

A different account submitted the story yesterday. This submission is by an account that shares a similar name with the Github repository.