I think it's better to flip the question around: I make my living writing single-page web apps in JavaScript. These days, everything I do, even on the server, is in JavaScript. What does Perl do a hundred times better than the latest in the JavaScript universe (ES6, Meteor, node.js, etc.)? If it doesn't, that right there is your answer.
You clearly work in the web industry =) perl does one thing hundred times better than (server-side) JavaScript: when you need to get data out of a server that you have no sudo privilege because your boss asked you to get stats on your trades ASAP. This happens shockingly frequently in finance, and perl (and actually, awk) was the only scripting language that I could safely assume was installed.
Why is perl losing its touch?
61–70 of 73 posts
Re: Why is perl losing its touch?
#62Earlier quoted context omitted.
No language handles regular expressions as easily as Perl. Perl's power has always been in its power to do text processing. That said, it's objects and pointers are a joke. At least Perl 5's are. As for Perl 6, I don't know. It couldn't hold my attention for 15 years.
"That said, it's objects and pointers are a joke. At least Perl 5's are." MOOOOOOOOOSE! http://moose.iinteractive.com/en/ I agree, nobody uses the native stuff. Its like claiming Perl DB support is a joke. Well, yeah, everyone uses the addon package.
Re: Why is perl losing its touch?
#63Death by a thousand cuts...PHP cut it off at the knees because it was trivialy easy to do web apps on a shared host; Perl hosting was far harder. Ruby came on the scene, and stepped in as a spiritual successor to Perl. Perl 6's infinite development cycle sapped the life out of the community. All of which led to fewer modules being added to, or updated on, CPAN. Fewer fresh modules drove more use to other languages th…
That's a compelling story. Lots of folk believe it, including, it seems, you. But have you checked your sources and data? For those interested in data and irony, watch about 2 minutes of either or both of these from last summer:
The slashdot story ("Always check your sources"): https://www.youtube.com/watch?v=hHy5h6ZRL6M#t=4m
CPAN data: https://www.youtube.com/watch?v=hHy5h6ZRL6M#t=7m
> Perl 6's infinite development cycle sapped the life out of the community.
Again, lots of folk believe this story. For another dollop of irony the leading current P6 attacker was once the leading P6 booster around 2010. When he was pro P6 he didn't accept suggestions that it was slower than dog slow. (It was.) Now he's anti P6 he doesn't appear to be accepting that it's been speeding up every month and is due for official launch within a year. (It is.)
P6 is now flying under the radar but stories like this are around if you look for them, like this from a day or two ago here on HN: https://news.ycombinator.com/item?id=9089259
Re: Why is perl losing its touch?
#64Death by a thousand cuts...PHP cut it off at the knees because it was trivialy easy to do web apps on a shared host; Perl hosting was far harder. Ruby came on the scene, and stepped in as a spiritual successor to Perl. Perl 6's infinite development cycle sapped the life out of the community. All of which led to fewer modules being added to, or updated on, CPAN. Fewer fresh modules drove more use to other languages th…
> All of which led to fewer modules being added to, or updated on, CPAN. That's a compelling story. Lots of folk believe it, including, it seems, you. But have you checked your sources and data? For those interested in data and irony, watch about 2 minutes of either or both of these from last summer: The slashdot story ("Always check your sources"): https://www.youtube.com/watch?v=hHy5h6ZRL6M#t=4m CPAN data: https://…
I've asked you multiple times in multiple places not to speak for me. Your assertions here are nonsense.
Please cease and desist.
Re: Why is perl losing its touch?
#65Earlier quoted context omitted.
No language handles regular expressions as easily as Perl. Perl's power has always been in its power to do text processing. That said, it's objects and pointers are a joke. At least Perl 5's are. As for Perl 6, I don't know. It couldn't hold my attention for 15 years.
How does Perls regex stand up against Python? I mean once Perl was the pearl of regex/text processing (The Common Lisp package that everybody uses for regexis pcre, Perl Compatible Regular Expressions) but that was a long time ago.
Aiui "The Future of Python Regexes" SO answer at http://stackoverflow.com/a/7066413/1077672 written by regex (and Perl) expert Tom Christiansen (and last updated by him in 2012) is still good info.
In brief, https://pypi.python.org/pypi/regex appears to be the path forward for Python. This engine is much closer to the power and Unicode compatibility of Perl 5's default regex engine.
= About Perl 5 regexes =
Aiui the default Perl 5 regex engine is significantly faster than the 're' regex feature included with Python 2. I don't know how it compares to the new 'regex' module.
Regexes in Perl have the advantage/disadvantage that they are syntactically integrated in to the language (a disadvantage if you don't like it being integrated).
Since Perl 5.10, a different regex engine can be plugged in and used without requiring any change in code that uses regexes (unless an engine uses a different syntax of course). (But it takes a lot of effort to package a regex engine up for use with Perl 5.)
A given regex engine can be extended using the overload module. Extending is relatively easy.
= About Perl 6 regexes =
A whole new ball game, two decades ahead of Perl 5 regexes.
http://en.wikipedia.org/wiki/Perl_6_rules
http://doc.perl6.org/language/grammars
https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
Generally matches Perl 5 regexes feature-for-feature but with a much cleaner syntax. More importantly, unifies regexes and grammars.
Currently way slower than Python or Perl 5 regexes. Supposedly will eventually (5 years? 10?) incorporate all the key optimizations in the Perl 5 engine and become faster than Perl 5 regexes.
Re: Why is perl losing its touch?
#66Perl and Python are similar, excellent programming languages, and I don't imagine Larry and Guido argue like children about it when they meet at conferences.
I'll just quote Bjarne Stroustrop: There are two kinds of programming languages. The one's people complain about, and the one's people do not use.
Re: Why is perl losing its touch?
#67Earlier quoted context omitted.
Python is often claimed not to have closures but that isn't really true, what it doesn't have is anonymous functions. It does have a lambda statement, but that is limited to a single statement. So what you end up writing is more akin to: def multiplier_maker(a): def temp(b): return b * a return temp That is because Python allows you to declare a function anyware, even inside other functions.
> what it doesn't have is anonymous functions If it's not anonymous it's not a closure though.
Re: Why is perl losing its touch?
#68Death by a thousand cuts...PHP cut it off at the knees because it was trivialy easy to do web apps on a shared host; Perl hosting was far harder. Ruby came on the scene, and stepped in as a spiritual successor to Perl. Perl 6's infinite development cycle sapped the life out of the community. All of which led to fewer modules being added to, or updated on, CPAN. Fewer fresh modules drove more use to other languages th…
> All of which led to fewer modules being added to, or updated on, CPAN. That's a compelling story. Lots of folk believe it, including, it seems, you. But have you checked your sources and data? For those interested in data and irony, watch about 2 minutes of either or both of these from last summer: The slashdot story ("Always check your sources"): https://www.youtube.com/watch?v=hHy5h6ZRL6M#t=4m CPAN data: https://…
Re: Why is perl losing its touch?
#69Earlier quoted context omitted.
How does Perls regex stand up against Python? I mean once Perl was the pearl of regex/text processing (The Common Lisp package that everybody uses for regexis pcre, Perl Compatible Regular Expressions) but that was a long time ago.
= About Python regexes = Aiui "The Future of Python Regexes" SO answer at http://stackoverflow.com/a/7066413/1077672 written by regex (and Perl) expert Tom Christiansen (and last updated by him in 2012) is still good info. In brief, https://pypi.python.org/pypi/regex appears to be the path forward for Python. This engine is much closer to the power and Unicode compatibility of Perl 5's default regex engine. = About P…
Perl 5.20 / 19Mb Apache log file / time: 1 sec
perl -wnl -E 'say $1 if /\b(\w{5})\b/' logs.txt
Perl 6 (MoarVM 2015.02) / 19Mb Apache log file / time: 88 secs
perl6 -n -e 'say $0 if m/(5>>)/' logs.txt
Given that efficient text & regex parsing is Perl's forte I don't see Perl 6 satisfying the basic requirements of Perl 5 hackers.