3 ms·
I haven't looked at Perl in years, having long ago switched to Python/SciPy, but now I see that Perl 6 doesn't have GIL, something that Python has been unable t
by Stubb 7y ago
I haven't looked at Perl in years, having long ago switched to Python/SciPy, but now I see that Perl 6 doesn't have GIL, something that Python has been unable to shed. So now a language that nobody cares about anymore solves the #1 problem that I have with Python. We are truly blessed to have so many shitty implementations of dumb programming languages to choose from these days!
- Grinnz 7y agoI am a Perl user not Raku, and Perl had almost the opposite problem where its threads are concurrent but too badly designed to be useful. But from what I have seen, Raku is second to none in this capability.
- Stubb 7y agoBeing able to do a multi-threaded map() would be divine. In Python, you're creating/destroying a new process and using IPC to seed the state info and return the results for each element in the iterable arg. If the function in question runs quickly, it ends up being faster to do it single threaded.
- Grinnz 7y agoIt's not going to be efficiently threaded like in Raku, but this is also possible in Perl 5 with a few modules from CPAN. https://metacpan.org/pod/IO::Async::Function https://metacpan.org/pod/IO::Async::Function will maintain a preforked pool of processes (on Unix) or threads (on Windows), and return Futures, which can be used by fmap_concat from https://metacpan.org/pod/Future::Utils https://metacpan.org/pod/Future::Utils to make a very map-looking iteration. The experimental https://metacpan.org/pod/Future::AsyncAwait https://metacpan.org/pod/Future::AsyncAwait will make this even more natural in the future.
- Stubb 7y agoI'm continually astounded that threading involves jumping through so many hoops in 2019. If you want a language that provides a REPL and easy threading, your choices are few and far between.