What does HackerNews think of Haxl?

A Haskell library that simplifies access to remote data, such as databases or web-based services.

Language: Haskell

+1. The JS event loop auto-monad-izing Promises into Haxl [1]-esqe trees of implicitly-batched loads has been a big win for us building on JavaScript/TypeScript.

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:

https://joist-orm.io/docs/goals/avoiding-n-plus-1s

[1]: https://github.com/facebook/Haxl

You mean, Haxl? [1] But AFAIK only a few devs are involved for the development.

[1] https://github.com/facebook/Haxl

Facebook uses Haskell for [Haxl](https://github.com/facebook/Haxl), Standard Chartered has a their own Haskell [compiler](https://www.reddit.com/r/haskell/comments/6im268/standard_ch...) and a massive code base in Haskell. [Agda](https://github.com/agda/agda) and [Idris](https://github.com/idris-lang/Idris-dev) were mostly written in Haskell as well.
Can't really comment on that - most of the code I use is built on the awesome Haxl[0] so we never have to worry about those things. I'm curious what other people think though

[0] https://github.com/facebook/Haxl

Facebook built Haxl[0], a library in Haskell, precisely for this use case: batching, caching and paralyzing requests against external sources.

[0] https://github.com/facebook/Haxl

> But until it affects day to day dev work, there's a whole set of people that aren't going to give the slightest fuck.

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.

[0] https://github.com/facebook/Haxl

If you're puzzling at the connection between Facebook and Haskell, https://github.com/facebook/Haxl is the most obvious one.
Haskell has lots of large projects written in it.

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.

Then you haven't been paying much attention to Haskell which can be forgiven because it's still pretty niche compared to Python or JS.

The best example I can give you is the Haxl project at Facebook [0].

[0] https://github.com/facebook/Haxl

You can still do a lot with applicatives, like parsing context-free languages... and even parsing context-sensitive languages.

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://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo

https://github.com/facebook/Haxl

You can use something like dataloader[0] or haxl[1] to help with this issue.

[0]: https://github.com/facebook/dataloader

[1]: https://github.com/facebook/Haxl

Here are some:

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.

FaceBook has Simon Marlow working haskell though it seems he's mostly working on the library side of the things see[1].

1: https://github.com/facebook/Haxl

>> Haskell code is yet not written in large companies where there is a readability requirement

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.

Facebook is also creating tools with Haskell:

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)

You're more intelligent than that. Here you go, here's one recent large practical haskell project:

https://github.com/facebook/Haxl