4 ms·
Haskell had a big influence on Perl6. Lazy evaluation is built in to the language just like Haskell. If you look at the bottom of the Perl6 website you'll see t
by Montezuma123 11y ago
Haskell had a big influence on Perl6. Lazy evaluation is built in to the language just like Haskell. If you look at the bottom of the Perl6 website you'll see the Fibonacci sequence using a lazy infinite list.
Fun fact, one of the original Perl6 implementations was done in Haskell (the parrot VM I think).
- ab5tract 11y agoParrot VM is a separate project from Perl 6. It originally started as a VM that could handle Perl 6, but then decided it wanted to focus on being a general VM for dynamic languages. This led to a rift between the two communities. Before all that happened, though, there was Pugs, which is the Perl-6-on-Haskell thingy that you are thinking of. A fair portion of the current Perl 6 test suite comes from the Pugs project, at least originally. And, IIUC, it was the success of Pugs that revived the Perl 6 efforts and led to the Rakudo project (Perl 6 implemented in Perl 6) which is what we still use today. So yeah, it is definitely the case that Haskell had a big influence on Perl 6 both from a language design and a more raw "inspiration" in the sense that it literally might not have happened without it -- the original wave of Perl 6 development had largely failed and there was some serious burnout happening. Pugs, Haskell, and Audrey Tang managed to put the ship back on course. A lot of history happens in 16 years, and I make no claim to know the truth of any of it. There are more than a few rants floating around out there that will give you a picture of what happened when, albeit from a ranty perspective. Hopefully one day it will all be collected in a more comprehensive historical document.
- Montezuma123 11y agoAh, yes you are correct. Thanks for pointing out some of the finer historical notes! I bet there are plenty of people here that would be impressed to know how much P6 has to do with Haskell. I think the general impression isn't one of lots of advanced ideas but Hey Perl finally got a decent object system which is kinda sad lol.
- cygx 11y ago> it was the success of Pugs that revived the Perl 6 efforts and led to the Rakudo project Note that depending on your point of view, Rakudo actually predates Pugs: It's just that Parrot and Perl6-on-Parrot used to be developed in a single repository, and it wasn't yet called 'Rakudo'. edit: However, NQP (the basis for the current Rakudo architecture) does indeed postdate Pugs (according to the ChangeLog, it first appeared in Parrot release 0.4.15 in 2007).
- chromatic 11y agoIt originally started as a VM that could handle Perl 6, but then decided it wanted to focus on being a general VM for dynamic languages. I think this is misleading; one of the original goals for Parrot was language interoperability, especially between Perl and P6.
- ab5tract 11y agoFair critique. I meant that in the sense that the original vision of Parrot was quite closely tied to delivering a VM which could handle P6. By logical extension, this would mean it could handle any given dynamic language. However, I am talking about the focus shift that made Perl 6 just one among many of "client languages" (for lack of a better word). This was a distinct moment, at least as far as I remember it.
- chromatic 11y agoBy logical extension, this would mean it could handle any given dynamic language. Not only by logical extension! One of Larry's primary goals was to "let any language use the CPAN", through Parrot. Running Perl and P6 on the same VM, in process, without embedding libperl.so was the plan as far back as I can remember. I am talking about the focus shift that made Perl 6 just one among many of "client languages" That's been a common, though unrealistic, criticism of Parrot for the past several years. Various contributors never had (or lost) interest in P6 but wanted to work on an multi-language VM. Expecting that all volunteers to a project have the same primary goal in mind is ridiculous and ignores decades of F/OSS contributions; it's easy to look at the Linux kernel and recognize that multiple competing business and personal interests can be shepherded into a technically useful result that meets a lot of those needs despite their competing interests. People implementing `invokedynamic` didn't somehow make Java a second-class citizen on the JVM, for example. You can certainly argue that we handled some of those competing interests poorly (I've argued this), but the "focus shift" argument rests on some questionable assumptions and ignores other, more important, concerns.
- ab5tract 11y ago