Earlier quoted context omitted.
I like catalyst,s dispatcher. And some of the pain of installing catalyst in the early days resulted in huge improvements to the change toolchain.
I honestly think the Perl community's attachment to Catalyst contributed to Perl5's demise. Mojolicious was a much better bet for the future of Perl.
Perl 7 is going to be Perl 5.32, mostly
561–570 of 573 posts
Re: Perl 7 is going to be Perl 5.32, mostly
#562Earlier quoted context omitted.
Honestly that's more than most I think. I've written tens of thousands of lines of perl professionally and I generally share the same opinion.
Yeah, I've got a Perl codebase that's conservatively tens of thousands of lines, and it's honestly a struggle to write anything in it that isn't a big ball of mud. There's about 50 different ways to do anything in the language, the syntax is infuriatingly obtuse, and you can't rely on any documentation because it will recommend doing things that experts don't recommend doing. The system is from like 2013 and still go…
Re: Perl 7 is going to be Perl 5.32, mostly
#563Earlier quoted context omitted.
On my 4-core i7 Macbook Pro parsing a 20Mb log file with a regex takes 9.4 times longer with Raku than Perl5. That's unacceptable. Adding Moose to Perl5 reduces the differential to 7.1 which is still huge.
Do you have a gist of your code and a representative sample of the log file you're parsing?
for 'logs1.txt'.IO.lines -> $_ { .say if $_ ~~ />/; }Re: Perl 7 is going to be Perl 5.32, mostly
#564Earlier quoted context omitted.
> If you still write Perl code like it’s 1991 then maybe itcs not maintainable. This is probably one of the issues with Perl. You can still write Python code like it's 1991 and it will still be readable and maintainable.
no you cant, cuz 2.x python wont work in 3.x ;)
Re: Perl 7 is going to be Perl 5.32, mostly
#565Earlier quoted context omitted.
That certainly doesn't solve the problem of other people showboating their knowledge of obscure Perl sigils by using those ridiculous line-noise abbreviations in code you're trying to use and understand, so you have to look up each bit of obscure punctuation in its particular context in order to understand the code. If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to u…
Whatever happened to the neophyte raising him/herself up to level of the master? Programming seems to be the only profession in which the beginner is excused learning the language thoroughly and, worse, that he/she expects the language to be dumbed down to make it easier to learn. Can you imagine a budding musician complaining that musical notation should be made "easier for beginners"? If you want to grok Perl learn…
Yes, of course I can: https://en.wikipedia.org/wiki/Simplified_music_notation and from the linked website "is designed for learners in general".
> "worse, that he/she expects the language to be dumbed down to make it easier to learn."
And why should "simplify" have the connotation "dumbed down, for dumb people"? Everyone benefits from simpler things with fewer warts and fewer hazards.
Re: Perl 7 is going to be Perl 5.32, mostly
#566I've been a perl zealot since 2005. I didn't even know "python" existed until around 2008 when I found a script file with a ".py" file ending in a fresh ubuntu install. I started going to perl conferences sometime after 2010 when someone on irc informed be about them. I learned so much in those conferences, mainly about the alternatives to cgi and the modern OOP "framework" named "moose". I thought I was in heaven. I…
I feel you. I'm currently at a startup that, somewhat by accident, ended up writing their backend in PHP. Modern PHP is actually fine; it's largely avoided the issues perl has; adoption of the latest versions is quite high, and it's...fine. Not the best, not the worst, broadly comparable to other languages, and a far, far, far cry from what most people may think of when they hear "PHP". My last job used Node, the one…
I always avoided PHP but on one job I worked with it after the company was bought. So I had to maintain a billing script written in PHP to be called from the command line. It was running on a huge FreeBSD server that would fail booting oftentimes and in the script you had to change the start and end date each month manually. Of course there was no version control although I was told there was a second copy of that server in case this one failed completely. I wrote the guy (the then CTO) a few times emails with questions but he never responded. Eventually I ported the code to Go with unit tests. I get the point that there is PHP 7 with modern frameworks but those are useless without adopting modern coding and deployment practices.
Re: Perl 7 is going to be Perl 5.32, mostly
#567Earlier quoted context omitted.
A classic (hope I didn't get it wrong): print "[", +( join '', map { "-> $_" } @$_ ), "]" for @{$ref}
> print "[", +( join '', map { "-> $_" } @$_ ), "]" for @{$ref} Because computers are so slow, memory is so limited and disk space is so expensive the programmer absolutely had to write it in a single line in the most convoluted way possible? Yeah, that's definitely a language fault.
And this is a quick sample, there is much, much hairier stuff to be found in real code. "Knowing the language well" is seen as a virtue for many.
Re: Perl 7 is going to be Perl 5.32, mostly
#568Earlier quoted context omitted.
I'm not the original comment author, neither am I fluent in Perl. But I suspect they meant nested hashes and not a hash whose values are arrays of arrays. As you point out, the latter is trivial. To be clear, even a nested hash is all well as long as the depth and the keys are literals (as in your example). It is when keys are dynamic that things get unruly. And god forbid if the _depth_ of nesting is dynamic. All of…
%nested = (foo => { bar => { baz => "quux" } }); Access the leaf with $nested->{foo}{bar}{baz} If the keys are in variables, it becomes $nested->{$x}{$y}{$z} For dynamic depth, do you have a specific use case in mind? If I have a tree, I’m probably going to search it rather than using a hardcoded path.
Re: Perl 7 is going to be Perl 5.32, mostly
#569Earlier quoted context omitted.
Is there even a good alternative to Rails? As far as I know, it's still the best option there is for quickly building a MVP on the web if one isn't building a SPA.
Laravel[1] is pretty close, and PHP has some big advantages over Ruby for performance and deployment. If you had told me 5 years ago that I'd be recommending PHP as an alternative vs. RoR I wouldn't have believed you, but the PHP world has improved in ways that I wouldn't have thought possible. [1] https://laravel.com/
Re: Perl 7 is going to be Perl 5.32, mostly
#570Earlier quoted context omitted.
That certainly doesn't solve the problem of other people showboating their knowledge of obscure Perl sigils by using those ridiculous line-noise abbreviations in code you're trying to use and understand, so you have to look up each bit of obscure punctuation in its particular context in order to understand the code. If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to u…
If what you're saying is true, then why aren't similar criticisms raised against Ruby? Most of the same obscure variables are also present in Ruby. "If hard-to-read-and-remember syntax exists, people WILL use it" This statement doesn't appear to hold up under scrutiny.
>This statement doesn't appear to hold up under scrutiny.
What scrutiny? I don't see any scrutiny. You just said that, without scrutinizing.