Hacker News new | ask | show | jobs
by babyloneleven 2511 days ago
In some sense it's the contrary.. the typeclass hierarchy has a lot of idealism that won't fly in Haskell's comparatively pragmatic Prelude (DivisionRing? Really?)

They even backtracked their version of IO, that used row types to track effects - because it just wasn't worth it.

1 comments

Can you explain what you mean by "DivisionRing? Really?"?

I see this doc regarding the Eff rows IO change, which must have happened after I last used Purescript https://purescript-resources.readthedocs.io/en/latest/eff-to...

For me personally using something heavyweight and bolted-on like GHCJS for Purescript's typical JS-replacement use-case's seems to be a far worse option. Even if Haskell is more mature and refined as a language. Particularly the real world production examples of GHCJS-backed apps I've seen people post on /r/haskell have all been bloated, slow, non-web standard, and obviously designed by backend programmers not designers/web developers... so I may be biased. Although that stuff has as much to do with community as it does technology.

> Can you explain what you mean by "DivisionRing? Really?"?

My guess is that OP is saying that PureScript’s DivisionRing compared to Haskell’s Fractional is neither practical nor pragmatic.

> For me personally using something heavyweight and bolted-on like GHCJS […]

In my experience the majority of Haskellers agree that GHCJS is not the way to go wrt. web apps.

But I’m not convinced that inventing a new language that’s almost identical to Haskell is the right solution.

I see, thanks for the reply.

But you have to admit there is some utility in designing a language from the ground up to target browsers.

I’ve never understood the OCaml and Haskell people’s obsession with creating half baked JS generators that produce less than great web apps. And I completely get the backend guys desire for a proper language when they are forced by their companies to do web stuff. But that cross platform stuff has repeatedly been an unfulfilled pipe dream. Not only JS to mobile but systems/server languages to web.

I’ve been looking for a proper functional and typed replacement to JS for years and Purescript is the only one I’ve seen that is close to being as good as the Vue/React apps I get paid good money to develop for a living. https://lumi.com is a good example of a modern web app being built by the main PS creator.

I’m hoping one of you smart Haskell people solves this problem before I get old having to use JS.

> Purescript is the only one I’ve seen that is close to being as good as the Vue/React apps I get paid good money to develop for a living.

Purescript is a language, are you saying that the language itself allows for creating View/React apps without need of a framework? Or do you mean that there are native (in the ecosystem sense) Purescript UI frameworks that allow one to create View/React apps without depending directly on JS ecosystem to handle the UI?

Wonder how PS compares to OCaml/BuckleScript wrt to generated code size (the latter is absurdly tiny somehow, just incredibly efficient on that front).

Is bucklescript half-baked in your opinion? Why?
I think parent referred to Ocsigen, which produced a several Mb js payload for a hello world when i played around with it
Yes exactly, among others such as Miso.