Re:Larry Wall has approved renaming Perl 6 to Raku
by labster on Friday October 11, 2019 @06:56PM
(#21229206)
Does Python 3 have any operators that transform ordinary method calls into concurrent method calls? Perl 6/Raku does.
[ Parent
| on HN ]
Re:Larry Wall has approved renaming Perl 6 to Raku
by dragonwriter on Saturday October 12, 2019 @01:45AM
(#21230941)
More to the point, does Python 3 have operators that transform sequential operations into operations that are both concurrent and parallelizable, and, in the case of iteration, provide control of parallelism parameters and whether results are constrained to be in-order or not.
To which the answer is “not only does Python not have them, but with the GIL CPython couldn't do much with them even if the language had them.”
Re:Larry Wall has approved renaming Perl 6 to Raku
by weff_ on Friday October 11, 2019 @07:42PM
(#21229406)
Is that a bit like Go's `go` keyword?
edit: that is, as far as I can tell, after a quick Google, it's not too different from Python's Thread object.
Re:Larry Wall has approved renaming Perl 6 to Raku
by b2gills on Wednesday October 16, 2019 @12:20AM
(#21267007)
The `start` statement prefix operator is a bit like Go's `go` keyword.
(In that when I translate Go into Raku, I usually replace `go` with `start`.)
my Channel \input .= new;
my Channel \output .= new;
start for input -> \message { output.send(message) }
start for output -> \message { say message }
input.send(5);
But what he was really talking about is something more like the following. sub foo () {
sleep 10;
42
}
# ___
# V V
my $delayed-result = start foo();
say 'Hello World'; # Hello World
say $delayed-result.status; # Planned
say await $delayed-result; # 42
Re:Larry Wall has approved renaming Perl 6 to Raku
by pmezard on Saturday October 12, 2019 @01:00AM
(#21230788)
It is, python Threads are system threads.
Re:Larry Wall has approved renaming Perl 6 to Raku
by maksimum on Friday October 11, 2019 @10:17PM
(#21230174)
Yes, async/await. https://docs.python.org/3/library/asyncio-task.html#awaitabl...