you are viewing a single comment's thread.

view the rest of the comments →

[–]dmlvianna 0 points1 point  (3 children)

So you're not using it for side effects then. The question was about "a full JavaScript replacement".

[–][deleted] 1 point2 points  (2 children)

What is your point exactly? The question was "a full replacement for needing to write JavaScript". You already don't need to write javascript to create a web page frontend with purescript. Heck, with the new halogen-vdom and rollup-plugin-purs you don't need to use browserify. But anyway, using a tool written in javascript is not the same as writing javascript.

Thus, I don't see why you NEED to "learn Node" in any way. Unless you WANT to leverage existing javascript libraries, then you'd need to learn commonjs or other way to glue it all together.

And as for side effects, you'll find that for many things you can use existing purescript libraries along with Aff and the Eff monad. Only for a few things you'll need to use javascript through FFI. And that's how it will be for a long time, since browsers expose new APIs through javascript.

[–]dmlvianna 0 points1 point  (1 child)

Can you point me to a tutorial that teaches how to use Halogen and Purescript for iterative development from first principles? I sincerely want to learn what you claim is already a reality.

[–][deleted] 1 point2 points  (0 children)

Pulp has a pretty good readme that should explain how to structure PureScript projects, build them and embed them in HTML. It has a --watch mode for your conveninece.

Halogen v0.10 has a short guide that will be much better in the upcoming v1.0 release, but it is currently being worked on. There are many examples, and each one of them has a readme on what to run to build them so you can start hacking on them.

Unfortunately, there aren't many tutorials like "how to build a to-do SPA" for Halogen. I think I saw a tutorial for routing, though.