Fay: a subset of Haskell that compiles to JavaScript
fay-lang.org
fay-lang.org
Does anyone know how hard it would be to integrate AngularJS with Fay as described? Sounds like it would be a great way to build large client-side applications entirely in Haskell (Fay).
Functional Programming in JavaScript using LiveScript and prelude.ls: http://livescript.net/blog/functional-programming-in-javascr...
I think many JavaScript programmers are looking for JavaScript (CoffeeScript) + functional programming rather than something purely functional as it allows them to use all that they've learned and mastered from JavaScript (often in an enhanced way) while using functional concepts as they learn them.
They aimed high but made too many concessions from a web-developer point of view.
Introducing Laziness, pureness and static typing into the JS world is a much bigger challenge. I'd love to see some of these efforts take off; especially Elm, which is even more ambitious, as it not only provides a safer alternative to JS, but also to the DOM model and HTML altogether.
The biggest problem i see these projects facing is the abstraction gap. As the abstraction over JS/DOM that they provide is much bigger than, say, CoffeeScript of LiveScript, when that abstraction breaks and you have to dig into the generated JS/DOM world, it's very painful. And this is a necessary pain every time things don't work as expected and you need to debug in the browser. I think that for these projects to be successful efforts like source maps are crucially important. But for projects as ambitious as Fay or Elm, i think we need even better debugging tools; some environment where we can debug entirely within the abstraction layer that these languages provide, and make the cases where you have to resort back to JS much more uncommon.
See for instance:
* https://github.com/clux/autonomy - prelude like thing
* https://github.com/clux/subset - basically Data.List
* https://github.com/clux/operators - currying helpers
* https://github.com/clux/interlude - a collection of the above 3
It has made my JavaScript development very enjoyable. JavaScript really doesn't suck have to suck. You can write very elegant code in it. It's just not as elegant as Haskell.
Elegance is never the primary concern of code. Readability is. And they are not the same thing. Even Perl can be made readable.
Also, that's not the point. There's already Roy and Elm for simpler compilation and decent semantics with interesting features. Fay lets you share code between server and client.
Personally, I quite like roy http://roy.brianmckenna.org/.
Anyway, if you really wanted to run Fay in the browser, you could probably get it to work using UHC (http://uu-computerscience.github.com/uhc-js/) pretty easily.
Quickly and reliably seeing your code in action is one of the more important things you do when coding, and anything that messes with that makes your life less fun, more painful and less productive.
How are these mutually exclusive? If you want a server that automatically runs the most recent (working) build of a piece of code, it's rather straightforward to implement.
That said, I haven't found it to have any serious impact on my development experience. There is no compile-debug-refresh cycle because I can evaluate forms against the browser REPL remotely. Compilation occurs server side and the JavaScript code is eval-ed on the client.
More details here: http://blog.fogus.me/tag/clj-compilation/
Adding complexity is the opposite of the software development goal. Too bad most people don't get this. Other than shipping your software on time and sometimes even above that goal, is reducing complexity. Too bad most people go the other way because it's "cool."
They shall pay the price.
I don't really see this extra complexity. You might almost as well dismiss all software development that isn't done in raw machine code. Plus, JS these days is blisteringly fast — if it helps, think of it as the web's assembly language.