News for hackers. Stuff that matters.
Re:Why I’m Learning Perl 6 by simias on Wednesday July 26, 2017 @10:55AM (#14856671)
That's kind of the problem when the author uses meaningless words like "WEB SCALE", we don't really know what it means exactly.

If it's about serving a great number of concurrent connections, I'm not sure why M:N is the only way to go.

Re:Why I’m Learning Perl 6 by btilly on Wednesday July 26, 2017 @04:50PM (#14860215)
Most languages give you one of two easy options. The first is to use green threads, which makes 100,000 new threads cheap, but now a single slow function call anywhere can block other threads. The second is to use OS threads, which keeps a slow function call in one thread from interrupting your responsiveness, but now makes 100,000 new threads expensive.

What M:N threading does, at least in theory, is allows you to create 100,000 threads cheaply AND keep a slow function call in one thread from blocking others. In a language with those features you can build it out of continuations (NOT coroutines) and real threads. But that requires building your own scheduler that can move a user thread to a different process at need. Which is non-trivial, and is unlikely to cooperate well with any third party libraries.

That said, whether M:N threading is a real optimization depends on a ton of things. A big one is the underlying performance of the scheduler and the language. Which is improving for Perl 6..but has a long way to go.

Whether optimizing at this level matters is another good question. Most companies shouldn't care. Those that should, should be cautious about deploying Perl 6 into a mature infrastructure.

So that's why people can think that M:N is important, and why you might legitimately disagree.

Re:Why I’m Learning Perl 6 by tomcam on Wednesday July 26, 2017 @08:04PM (#14861525)
Very useful explanation. Thank you.
Re:Why I’m Learning Perl 6 by dragonwriter on Wednesday July 26, 2017 @11:50AM (#14857240)
> That's kind of the problem when the author uses meaningless words like "WEB SCALE", we don't really know what it means exactly.

When the author (as is the case here with M:N threading) identifies the specific feature of interest, we do know exactly what it means, independently of whether they also reference something less precise.

> If it's about serving a great number of concurrent connections, I'm not sure why M:N is the only way to go.

If you want to posit an argument challenging the idea that M:N threading is an advantage, that's a different thing that disagreeing with the authors contention that choices are fairly limited if you want a language with language-level integration of M:N threading.

Re:Why I’m Learning Perl 6 by hashkb on Wednesday July 26, 2017 @11:13AM (#14856853)
Author demonstrates exactly what is meant with code exam in the article