What does HackerNews think of Haxl?
A Haskell library that simplifies access to remote data, such as databases or web-based services.
If I had to move to another language, I'd really want to find a "powered by the event loop / dataloader" framework, i.e. Vert.x for Java.
Also, per dataloader, a shameless plug for our ORM that has dataloader de-N+1-ing built natively into all object graph traversals:
That's a seriously toxic attitude to have.
People are using monads and other FP concepts daily to simplify "day to day dev work" (here's an example [0].) The fact that it's more or less mainstream to write off a concept because it sounds "academic" is worryingly anti-intellectual in a profession that is allegedly based in analytical thinking.
> Can anyone here give a concrete example of a real world problem that is more cleanly solved with these changes to the Promise spec?
There are some in the linked github thread (which had to be reposted repeatedly until people actually stopped and read them, btw.) It's about being able to write DRY code that abstracts over not only promises, but anything else that forms a monad, like arrays, optional values, and so on.
Besides the ones others have mentioned, Haxl is probably one of the bigger known industry uses of it. It is used at facebook as their spam filter:
https://github.com/facebook/Haxl
If you scroll to the bottom of that github page, you can find several papers and articles that go into detail about it.
The best example I can give you is the Haxl project at Facebook [0].
https://byorgey.wordpress.com/2012/01/05/parsing-context-sen...
But yeah.
ApplicativeDo might be useful. You would be able to see the static applicative structure as far as the next monadic bind, which lets you do interesting types of optimization, e.g. Haxl.
https://github.com/facebook/Haxl - A Haskell library that simplifies access to remote data, such as databases or web-based services.
https://github.com/koalaman/shellcheck - ShellCheck, a static analysis tool for shell scripts
https://github.com/simonmichael/hledger - The hledger command-line and web-based accounting tool, a Haskell rewrite of ledger.
https://github.com/facebook/flow - Adds static typing to JavaScript to improve developer productivity and code quality.
https://github.com/coq/coq - Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.
As a counterargument: Haxl at Facebook. https://github.com/facebook/Haxl
The convention isn't terrible, it's just a convention and takes a bit to get used to. The (x:y:xs) pattern is useful for when you could at best describe x and y as thing1 and thing2 and xs as theRestOfTheThings. Since the extra letters add no real clarity it's not a bad way to keep things concise. Once you get used to the pattern it's better because if you see (x:y:xs) you know that the things themselves are less important than their order out of an array.
https://github.com/facebook/Haxl https://www.youtube.com/watch?v=VVpmMfT8aYw http://getclump.io/
https://github.com/facebook/Haxl
My 2 cents: definitely _also_ learn OCaml down the line. But:
- my pet peeve with OCaml is the lack of a builtin type for Unicode strings (the only other language still commonly used with this shortcoming is PHP), and this could be an issue if you plan to write some web app code that needs to be internationalized
- OCaml is strict, Haskell is one of the very few languages that is non-strict: aside from the didactic purpose of exposing yoursefl to something different, that's a feature that can help reasoning about what your code is doing:
http://augustss.blogspot.co.uk/2011/05/more-points-for-lazy-...
(then again, there're obviously downsides to non-strictness, and you might decide down the line that you prefer to write strict code in production... but it's good to know the alternatives)