4 ms·
No need for the snark. This isn't fanboyism, though I gladly admit that I'm fond of Haskell. I'm not just namedropping Haskell "just because". He claims those l
by IceDane 9y ago
No need for the snark. This isn't fanboyism, though I gladly admit that I'm fond of Haskell. I'm not just namedropping Haskell "just because". He claims those languages are the only one that have green threads. He's wrong. I corrected that.
- aaron-lebo 9y agoYou're right, that was overly snarky, but your post does come off as use Haskell -> magic. The concurrency stories for Erlang and Go are front and center, very well defined, and obvious. How do you get similar functionality in Haskell (specifically, what libraries do what you are talking about)?
- IceDane 9y agoThe library I was referring to is called servant[1]. It's a library for writing backends and clients in Haskell. I mentioned it because he said something about "webscale", but it doesn't have anything to do with concurrency. The go-to library for nice Haskell concurrency is probably async[2], which you can combine with stm[3] for very nice guarantees. If you're interested, there is a very nice, free book[4] on the subject. [1] https://haskell-servant.github.io/ https://haskell-servant.github.io/ [2] https://www.stackage.org/package/async https://www.stackage.org/package/async [3] https://www.stackage.org/package/stm https://www.stackage.org/package/stm [4] http://chimera.labs.oreilly.com/books/1230000000929/index.html http://chimera.labs.oreilly.com/books/1230000000929/index.ht...
- dungle6 9y agoI have no idea where this incredulity even comes from you tools, nor the claim from TFA which was patently absurd. Pretty much every fucking major language not listed has green threads if not built into the core (Python, Ruby) provided as a well known library (Java, C++). And any new language it's pretty much table stakes. The article claim is so ridiculous it's not even wrong and you go on to snark about a Haskell counterexample. What a complete asshole.
- szemet 9y ago"The concurrency stories for Erlang and Go are front and center, very well defined, and obvious." GHC Haskell basically have the same concurrency story (since ghc 7.0.1 - 16 November 2010 [1]): - You can start ten or even hundred thousands of threads - Inside them you can program like having synchronous I/O - And the runtime handles it efficiently (with epoll/kqueue/...) The difference is that haskell is less opinionated on the high level concurrency primitives, so you have many choices (sometimes with multiple different library implementations) like: locking, explicit async code, transactional memory, channels... https://hackage.haskell.org/packages/#cat:Concurrency https://hackage.haskell.org/packages/#cat:Concurrency [1] Release Notes: "On POSIX platforms, there is a new I/O manager based on epoll/kqueue/poll, which allows multithreaded I/O code to scale to a much larger number (100k+) of threads" https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_guide/release-7-0-1.html https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_gui...