Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)

by raiph (Friar)
on Jul 04, 2013 at 16:08 UTC ( #1042483=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)
in thread Capturing parenthesis and grouping square brackets

This is (I suspect) the intent of the perl6 take/gather "at some future point in time", but currently it take is simply a push to a hidden array and once all the values have been collected, the gather subroutine iterates over that array popping them off as it goes.

This is incorrect. The gather/take implementations in Niecza and Rakudo are lazy and have always been.

It could also be done using green (user space) threading; or continuations; or go-style goroutines. And if you believe the P6 specs, it intends to support all of those and more.

But, when (to my knowledge) there has been no (ZERO) attempt to provide and flavour of multitasking in any of the p6-ish interpreters, it doesn't look likely. YOU cannot add this stuff successfully as an after thought; you have to architect it in from the ground up or you end up with iThreads or similar.

The general framework for P6's concurrency and parallel processing capabilities was designed many years ago. The design wisely abstracts across backends with varying concurrency primitives (CLR, JVM, Parrot, and other VMs). Implementations have then followed this design.

Pugs was written in Haskell so had Haskell's capabilities underneath from day 1.

Rakudo was born with usable continuations and coroutines underneath it on day 1 of its existence (because "Parrot is based on continuations"). The threads story is more complex; interested parties would best research for themselves.

"gather/take has controlled the design of Niecza from day 1". Niecza has continuations, coroutines, and threads.


Comment on Re^4: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042483]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-08-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls