Live data from Hacker News

Why I’m Learning Perl 6

evanmiller.org

321–330 of 380 posts

Re: Why I’m Learning Perl 6

#321
post #65

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…

I am always curious why monad is important in functional language, isn't it accurate to say that monad is just a wrapper class?

Re: Why I’m Learning Perl 6

#322
post #261

Earlier 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...

No idea the other ones came out so fast :)

Re: Why I’m Learning Perl 6

#323

Earlier 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…

Thanks! I confused Parrot with Pugs. I wasn't watching it at that point, so all just a history lesson to me. I appreciate the correction!

Re: Why I’m Learning Perl 6

#324

All 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.

[deleted]

Re: Why I’m Learning Perl 6

#325

Perl6 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…

That is pretty awesome. When I'm talking about performance and stability, I'm just saying we're still seeing a lot of low hanging fruit being taken care of. For example, Liz is still beast-moding away each week at enhancing the performance of lists, sets, & bags by 100-1000x in some cases. At some point, nearly all of those kinds of fixes should be already fixed. At some point in the future, it'll start getting used over Python I think.

Re: Why I’m Learning Perl 6

#326
post #301
post #135

Earlier 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…

Very useful explanation. Thank you.

Re: Why I’m Learning Perl 6

#327

Earlier 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

I don't see the problem here... those are good tools and Perl have those tools power in the core language++ Good stuff if you ask me.

Re: Why I’m Learning Perl 6

#328
post #282

Great 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 :-)

I think it's common knowledge that perl6 is basically rare in deployment, whereas perl5 scripts are everywhere in legacy systems. Former CPAN author myself.

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…

Also see Kotlin's concurrency

Re: Why I’m Learning Perl 6

#330
post #18

Can 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/

... but nothing from Larry Wall. I don't get it. Perl 6 without a "Programming Perl 6" (O'Reilly or Pragmatic) will just delay adoption.
Post reply on HN