News for hackers. Stuff that matters.
Re:Why I’m Learning Perl 6 by aduitsis on Wednesday July 26, 2017 @06:53AM (#14855112)
Read the article, very informative. Pleasantly surprised to find out that it doesn't mention at all language traits like syntax, but focuses on the features of Perl6's underlying VM, specifically MoarVM.
Re:Why I’m Learning Perl 6 by agumonkey on Wednesday July 26, 2017 @07:08AM (#14855182)
Indeed, a GILless bytecode VM is worth a look.
Re:Why I’m Learning Perl 6 by rurban on Wednesday July 26, 2017 @07:25AM (#14855251)
GIL less yes, but not lockless. The previous perl6 VM, parrot, had lockless threads, scaling linearly per native core. MoarVM even needs to lock on hash or array accesses, which is certainly not state of the art.
Re:Why I’m Learning Perl 6 by oconnor663 on Wednesday July 26, 2017 @08:50AM (#14855734)
How did parrot write arrays from multiple threads without a lock somewhere in there?
Re:Why I’m Learning Perl 6 by rurban on Wednesday July 26, 2017 @12:29PM (#14857668)
You deferred updates to the owner via scheduler, with high prio, and continue. parrot threads are lock free but not wait free. The NQP compiler needed to know about threaded writes and schedule the update, with a semaphore, while the other threads continue.

What MoarVM got better was everything else. The GC, the calling convention, the OO (6model), the jit. I was on my way to fix all the parrot damage done from the previous decade, because this would have enabled all architectures and proper threading for perl6, but then perl6 decided to kill it and go with Moar. And spread a lot of lies on threads.

Re:Why I’m Learning Perl 6 by pierrebai on Wednesday July 26, 2017 @01:57PM (#14858481)
I fail to see how using a semaphore to schedule work in another thread is "lock-free."
Re:Why I’m Learning Perl 6 by rurban on Thursday July 27, 2017 @06:09AM (#14863939)
Because you wait but you don't lock. And the wait is not 100x of an instruction, normally it's the same time as for one single instruction. Writes are fast and atomic, because there's no lock. Only the writer needs to wait a bit, not any other thread.

Google for lock-free vs wait-free

Re:Why I’m Learning Perl 6 by bigleagueposter on Wednesday July 26, 2017 @11:28AM (#14857027)
The parrot threads didn't communicate with each other and you could wait until all of them finished. They provided a tiny subset of the functionality real threads offer but in a more efficient way.
Re:Why I’m Learning Perl 6 by petre on Thursday July 27, 2017 @02:28PM (#14868057)
Well, it should have mentioned Perl6 uses rational number math instead of floating point. I think this is a big advantage, since you can do more precise calculations using just the core language.