Confessions of a recovering Perl Hacker
opensource.com
opensource.com
"Cro is a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all Perl 6 has to offer. The high level APIs make the easy things easy, and the asynchronous pipeline concept at Cro's heart makes the hard things possible."
"Cro is currently in BETA. We're overall quite satisfied with most of the APIs, and don't plan major changes in this regard. Expect some bumps on the road - and if you run into any of them, please consider filing a bug report so we can make things better."
It wasn't released in its current state? In fact, quite a lot was improved in the past 2.5 years. Not sure where you're getting at.
Where Perl 6 has seen a lot of work, is general performance, and specifically in the part of concurrency.
Where the common idiom for grepping lines using a lazy iterator and showing the matching lines from a file in Perl 6 is:
.say for $filename.IO.lines.grep( { m/foo bar/ } );
You can spread this out over multiple CPU's by simply adding the word `hyper` to it. .say for $filename.IO.lines.hyper.grep( { m/foo bar/ } );
On most current hardware (4 x 2 hyperthreaded CPU's) this would cause this code to run 3x as fast, while keeping order. If you're not interested in order, you can use `race`: .say for $filename.IO.lines.race.grep( { m/foo bar/ } );
Which will make it go a little faster still because it won't need to remember the order of the batches of work.Jonathan Worthington explained this quite well in this blogpost: https://6guts.wordpress.com/2017/03/16/considering-hyperrace...
So, yes, at this time, that particular job is done 9x faster with Perl 5 than it is with Perl 6. If you don't need any specific features of Perl 6, I'd suggest you keep using Perl 5 for that. Whether this answer will continue to be correct in the future? Time will tell.
One could argue that Perl 6 is the first version of Perl that wasn't rushed out, BTW.
My guess is that the C/C++ was copying strings where MoarVM didn't.
https://brrt-to-the-future.blogspot.com/2018/07/perl-6-on-mo...
1. All problems in computer science can be solved with a layer of indirection.
2. Many layers of indirection make programs slow.
3. Perl 6 solves many computer science problems for you ;-)
Chef's first release was 2009; Puppet 2005, by which point many people had already moved to Python.
My experience is that Ruby was virtually unheard of in the English-speaking world until the rise of Rails (post-2005); at any point in time there are thousands of programming languages "out there" but only a handful have mainstream recognition; back in the 2000s Python was a known name in a way that Ruby just wasn't.
For me it was that I wanted to get away from Perl: the fact that Ruby is like Perl is, from that point of view, a bad thing. I wanted something that would be clean, something that wouldn't surprise me, something where I could dig into someone else's code or revisit mine and not be lost. Python was, for many years, that language.
I went the Python route instead. For me, my choice at the time was a purely pragmatic one based on ecosystem. Python simply had the stronger one at the time for most of the problem domains I was working in, and this continues to be true today.
Ruby is syntactically more elegant though -- it has a Japanese Zen-like quality. I really wanted to like it, but I knew it would mean living in a world where I had to reimplement, possibly badly, the stuff I needed to do the rest of my job.
I do think Python would've been an even worse choice at the time because distros were shipping ancient version of it for ages (e.g. 2.4) and nobody was really using that, whereas Perl modules have traditionally been shipped as distro packages in a rock-solid state forever.
Another possible factor is that the irregular syntax and noisy punctuation of Perl started bothering me, so if that's what you dislike, Python makes more sense precisely because Ruby is lexically a bit closer to Perl.
I think many mistakes were made during Perl 6 development, but ultimately, I decided that the problem was not the Perl team not delivering the language I wanted, but that I wanted Perl to be a language it never was, never was meant to be, and never will be. So nowadays, I'm pretty happy with Python, except when I write a literal one-liner in Perl.
Maybe because Ruby was a much closer fit: close enough to make it harder to break out of Perl approaches, different enough that that often had bad results.
But I think lmm’s sibling comment gets the bigger reason right.
Honestly part of the problem is there has been an explosion of language choices that can all be used to get the job done, so it becomes very subjective to the individual and business as to what tool(lang) they use to accomplish their goals. Who has time to deal with so many different languages and their ecosystem complexities. The issues with ruby caused me to at first completely skip ruby to the point of not even using ruby tools because it took less mind-overhead that way. The same with node. Python with a large ecosystem was a safer choice and easier to learn. With python I get the choice of ansible and salt, with ruby I get chef and puppet, and I personally prefer ansible.
I'm also the kind of crazy who lives in emacs and still writes bash scripts daily so... take it all with a grain of salt.
It was when I found an awesome tool I wanted to start updating myself (http://argus.tcp4me.com/) that I realized perl is just hard for me to read and logic about easily...(I abandoned that project)
I really need to give 6 (Rakudo or?) a try sometime. I think I'm just going to skip it and go straight to guile and go.
I remember how happy I was and how fast I was able to run and develop anything ( compared to Catalyst ). Still, being a very big fan of Perl, unfortunately have to state that having a Perl job would already be a step backwards in my career.
Perl served it's purpose when CGI scripting was considered normal web server, but nowadays golang, NodeJS + TypeScript are having way bigger community than Perl and they feel "modern" compared to even Perl6.
Golang certainly is quite efficient, probably close to C or C++. It also has lightweight threads which are great and terrible at the same time: you can take the thread-based concurrency model further without resource problems. And the CSP approach helps to make that somewhat safe. But at the end of the day any concurrency built on threads, even lightweight ones, is problematic.
It is a ridiculously low-level in terms of abstractions language though, just a tiny notch above C. Perl 6 is quite on the opposite end of that scale.
For me the most important differences are cultural however: Perl 6 is quite open and inclusive, both people and the language it self. TIMTOWTDI. I don't think I can or want to describe the Golang culture, but it certainly is quite different.
The good thing about Golang is that as a language it is so simple/primitive that you can easily try it out for yourself and get a comprehensive picture over a weekend.
Somehow I never graduated; I write scripts occasionally but Perl one-liners have been my favorite way to use Perl for like 20 years. For most of that time, I’ve been meaning to get more fluent with awk & sed, but whenever the need comes up to get something real done, I use the Perl I know.
Sounds like a lot of Perl codebases. Tight, elegant, beautiful, incorrect results.
The front cover came off my copy of Programming Perl, detached by long use. Having said that, these days I seem to write more Python, since that's what the young know.