News for hackers. Stuff that matters.
Re:Why I’m Learning Perl 6 by IceDane on Wednesday July 26, 2017 @07:35AM (#14855297)
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.
Re:Why I’m Learning Perl 6 by aaron-lebo on Wednesday July 26, 2017 @07:40AM (#14855315)
You'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)?

Re:Why I’m Learning Perl 6 by szemet on Wednesday July 26, 2017 @08:31AM (#14855613)
"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

[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_gui...

Re:Why I’m Learning Perl 6 by IceDane on Wednesday July 26, 2017 @07:46AM (#14855351)
The 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/ [2] https://www.stackage.org/package/async [3] https://www.stackage.org/package/stm [4] http://chimera.labs.oreilly.com/books/1230000000929/index.ht...

Re:Why I’m Learning Perl 6 by dungle6 on Wednesday July 26, 2017 @08:27AM (#14855590)
I 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.