I hate perl6. I hate it because I tried to get involved in the project early on, and it led me down the Haskell rathole. I don't know what Haskell looks like today, but a decade or more ago it was the hardest language to pick up that I had ever experienced. It was as if I had a solid background in latin languages and I was trying to pick up Chinese based on a handful of tutorials written by a tourist on the back of a…
The Haskell introductory landscape has definitely changed. Learn You A Haskell for great good ( http://learnyouahaskell.com ) is an excellent introductory book to read to get started with Haskell. A drier but more in-depth read is http://book.realworldhaskell.org/ Also, when you hit monads again, the best advice I can give you to understanding them (99% of Haskell guides out there seem to be about monads) is to take…
Why I’m Learning Perl 6
321–330 of 380 posts
Re: Why I’m Learning Perl 6
#322Earlier quoted context omitted.
There is 2 out now and many in development. So really not that bad.
2? It's 5 now! https://www.apress.com/us/book/9781484228982 http://shop.oreilly.com/product/0636920065883.do https://deeptext.media/perl6-at-a-glance/ https://deeptext.media/migrating-to-perl6 https://www.amazon.com/Learning-program-Perl-Getting-program...
Re: Why I’m Learning Perl 6
#323Earlier quoted context omitted.
Perl6 is no longer implemented in Haskell on the backend. I think the old parrot VM was, but MoarVM is in C. On the bright side, a lot of cool FP concepts made it into P6 as a result of the original Haskell backend, so useful cross polination happened. Even better, you can do FP stuff in a much easier to understand way and you can also mix in OO when needed or relevant.
> Perl6 is no longer implemented in Haskell on the backend. I think the old parrot VM was Parrot was implemented in C, and to my recollection implemented various iterations of bytecode syntaxes, notably PBC (parrot byte code). Rakudo Perl 6 developers took the route of developing Perl 6 through an intermediary language NQP, which is a language aimed at making it easy to implement interpreted languages. Rakudo (the im…
Re: Why I’m Learning Perl 6
#324All I think about when I hear M:N thread multiplexing is "1992 is calling to have its stupid threads hacks back". M:N is what you do when you don't have real kernel thread support. You hacked N user space threads per process (N:1) but then 1990 rolled in and cheap SMP with M processors started to spread across the land, so you needed N:M to take a bit of advantage of that.
Re: Why I’m Learning Perl 6
#325Perl6 is indeed a very nice language that I've been watching for a few years. As soon as the performance beats Python and the stability is solid I'll probably switch over from Python...there's just a lot there.
I have seen examples where the naive Perl 6 implementation is faster than the equivalent C code. (The one I'm thinking of is probably owing to Spesh and the JIT, but I forget what it was about) Here's an example where a naive Perl 6 version is going to beat the pants off of the naive version in another language: Find the sum of all integers from 10 to 1000000 inclusive. In Perl 6: say [+] 10 .. 1000000 the [+] is a l…
Re: Why I’m Learning Perl 6
#326Earlier quoted context omitted.
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.
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 c…
Re: Why I’m Learning Perl 6
#327Earlier quoted context omitted.
Why are the awk guys to blame for Perl syntax?
> (It's sorta like sed, but not. It's sorta like awk, but not. etc.) Guilty as charged. Perl is happily ugly, and happily derivative. Usenet article (1992) -- Larry Wall
Re: Why I’m Learning Perl 6
#328Great quote on perl5... In #devops is turtle all way down but at bottom is perl script. - @devopsborat
I like how the original was agnostic, yet you interpreted as perl5 :-)
Re: Why I’m Learning Perl 6
#329> Concurrency is hard and if you want M:N thread multiplexing (i.e. WEB SCALE CODE, where application threads aren’t pinned to pthreads) your options today are precisely Erlang, Go, .NET, and Perl 6. Putting aside the "web scale" jokes ( http://www.mongodb-is-web-scale.com/ ), this statement is still absurd. Every major language, or at least the ones that matter for backend development, has support for thread multipl…
Re: Why I’m Learning Perl 6
#330Can anyone recommend a good book on Perl 6? Are there any (even bad ones)? Right now I feel the major reason that keeps me from investing time in Perl 6 - besides adoption by distros - is the lack of a good book, like the Lama and the Camel book for Perl 5. It's kind of frustrating after having waited so long.
This one is 'in progress' https://www.learningperl6.com/ Looking at the Perl 6 website, there are a few more coming along as well. https://perl6.org/resources/