16 ms·
Perl 5.26.0 released
- tete 9y agoWow, I haven't looked at Perl in a while, but all sorts of numbers mentioned in the announcement really surprise me. Btw., as mentioned in announcement. The actual changes are here, if you missed that: https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/perldelta.pod https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/pe...
- sverhagen 9y agoYes, impressive community effort for a language that... Well... I have heard nothing good about in any "at the water cooler" conversation that I was ever in, over the past fifteen years or so. Except, of course, that Perl is awesome at regular expressions, an advantage that most languages must have caught up on, no? Not for nothing Perl shows up in most hated-lists all around town (top 10 at Stack Overflow).
- klodolph 9y agoPerl is still awesome at regular expressions compared to other languages. It has better Unicode regex support than almost any other language. If you need to do intricate Unicode regexes, then your main choices are Perl and libraries for other languages which port Perl features, not always well-supported.
- snarfy 9y agoUnicode regexes is a pretty small edge case. Is it because Perl is awesome, or because Unicode sucks?
- ethelward 9y ago> Unicode regexes is a pretty small edge case Except for any other language than english.
- jandrese 9y agoMost people who understand what a can of worms those systems are start leaking a little grey matter from their ears when someone mentions the phrase "Unicode Regex". I have mental images of driving a wildly overpowered monster truck with no brake lines over a minefield. And then I start to consider the implications of passing the /i flag in...
- xeeeeeeeeeeenu 9y agoYes, and that's the reason why it's important to choose a tool that gets Unicode correctly. Perl is an example of such a tool.
- jandrese 9y agoEven if the language handles it correctly the lowly programmer is playing with white hot fire. Unicode adds so many edge cases it's basically a serrated knife in the middle of your code. Will your regex match correctly in the case that the text shifts direction halfway through? Will the case insensitive search work in languages where case is ambiguous (where uc(lc(x)) != x)? Will you be able to match letters that are effectively identical but on different code points? Do you want to? Will it get confused by furigana? Unicode's goal of encoding every language in the world as is means it encompasses every bizarre thing people have ever done to a written language. It is almost impossible to actually do anything with a block of unicode codepoints except treat it like a big binary blob and hope that you never have to personally deal with the strings contained therein. Most everybody gets it wrong in one way or another.
- rurban 9y agoI wouldn't call it impressive. 2 months too late, too many bugs, horrible security, not much improvements, still doing more destruction than good. Compare it to the "non-community" professional effort https://github.com/perl11/cperl/releases/tag/cperl-5.26.0 https://github.com/perl11/cperl/releases/tag/cperl-5.26.0 http://perl11.org/cperl/perl5260cdelta.html http://perl11.org/cperl/perl5260cdelta.html regular expressions are much better with pcre2, which almost work (50% faster) with https://metacpan.org/pod/re::engine::PCRE2 https://metacpan.org/pod/re::engine::PCRE2
- peteretep 9y agoMmm, it'd be more honest to point out that "the effort" is your effort
- falsedan 9y agoReini, aren't you the sole dev working on cperl, the fork you set up because you disagreed with some of the patchs perl-porters accepted/rejected?
- rurban 9y agoA single +1 developer is better than -5 developers. cperl got 10x more done in 2 years than p5p in 15 years, and the 10x factor is ongoing. In a few years nobody will use perl5 anymore, everybody will use cperl instead. I didn't only disagree with some patches, I disagree with most of the feature decisions, management and bugfix handling. And esp. with their negative track record. perl5 deserves a properly managed project and the perl6 features, so I did it. At an important time, with :const, types and signatures upcoming. And perl5 should not be used in public services due to its lack of security (I am warning against it since 5.16), not talking about the feature mishandling. See the perl11 blog. Some numbers: In the last 2 years, p5p produced 12005 commits (2 releases), whilst I produced 6291 commits. That's >30%. The 2nd most prolific author did 3104 (unicode), the third 1689. And I squash commits into features and bugfixes and don't spread it out over 3-5 postfixes, because cperl works in branches, not posting directly to master. Of those 6291 commits you have nothing in perl5, but they continue to play stupid and take nothing. Features wise and security fixes it's more like 1000%, not 30%.
- liotier 9y ago> I have heard nothing good about in any "at the water cooler" conversation that I was ever in, over the past fifteen years or so. Whenever I think of something that has anything to do with batch data munging, there is usually half a dozen Perl modules that already do it. I have no opinion about Perl as a language but I like how rich the ecosystems is for that sort of project.
- sangnoir 9y ago> I have no opinion about Perl as a language but I like how rich the ecosystems is for that sort of project. CPAN was way ahead of the competition - it was elegant where other languages would require you to manually download dependencies archives and wrangle them like a barbarian.
- tete 9y agoThere is a feature I'd like to have in other languages. CPAN Testers. It's actually a really simple ideas. You randomly (or not) download packages and run their tests. The result will be uploaded. This is a really nice alternative to CI services and it makes sure that your stuff works in other environments than your standard Ubuntu LTS systems. It's pretty much crowd funded CI and I am pretty sure that a lot of people who don't have the most common system would love to run it. What's cool about this is that you see problems on both the platform and the library side, that one wouldn't expect. Something similar, also from ages ago, but an anecdote I like to tell is that I used to have access to a hppa64 (64 bit PA-RISC) system and while I didn't really have use for it I as a fun project installed OpenBSD on it and ran some test suites there. Despite OpenBSD/hppa64 15 years or so ago being an alpha release Rakudo (aka Perl 6) actually compiled and was able to run its test suite. In the end this found a bug in math.floor or something like this. The point is that something like that tends to have unexpected benefits for both sides. It's like when someone decides to compile a project using a less common C compiler. That pretty often leads to people finding bugs in the given software, because of errors or warnings emitted by that compiler. Similar things happen with different architectures, etc. So in the end cross platform software ends up way more reliable. Something that I think some projects focusing on only one OS or even just one or very few distros really miss out. Of course reducing your project to work on just one platform might safe you some time somewhere, but often it's a bit like saying not writing tests safes some time. And usually it's really little or no effort, which results in a lot more feedback and quality code contributions (people that port a lot of software tend to be pretty good programmers).
- sethammons 9y agoPerl's regex matching is faster than Go's, last I checked. At my work, we have a few large perl (and python) legacy codebases that are processing billions of messages a day. We are replacing them with far more performant Go. It is great to work with a senior Perl guy who can slam out solutions way faster than I can in any other language. However, for us, concurrency (and readability) is important. I like perl's AnyEvent better than python's Twisted, and python's Gevent better than both of those (in general). But these are nowhere near as awesome as Go's native concurrency primatives.
- cutler 9y agoGo's regex implementation is inferior to Perl's, feature-wise. For performance Go eschew's a certain amount of backtracking as far as I remember. If you want Perl regex compatibility in Go you have to add a PCRE lib.
- baldfat 9y ago> Perl is awesome at regular expressions I don't know why Perl 1 to Perl 4 had messed up Regular Expression. Perl 5 actually redeemed themselves and returned to the normal good old regular expressions. > Regexes in Perl are not he same as in Python, Ruby, or PHP, even if some of them call them "Perl 5 compatible Regular Expressions". https://perlmaven.com/introduction-to-regexes-in-perl https://perlmaven.com/introduction-to-regexes-in-perl I would say the older Perl messed with RegEx and I wish everyone else would get on board. I HATED!!!!! doing my awk regex and then jumping into Perl it wouldn't work.
- joosters 9y agoPerl 5 isn't a 'cool' language, because it isn't trying to rapidly change itself, instead it just works. I use it just about every day (by my own choice!) and it can be a fine language to develop in. The libraries available in CPAN contain support for pretty much any task you could think of. Most of the horror stories that you'll hear about perl are from people who have tried to fix/maintain code that was written badly, which is no different from any other language. You can write horrific or easily-readable code in any language. Perhaps perl has its reputation because it is often used as a quick kludge to do something that would be just too painful to do in shell script, and novice writers just cut & paste stuff from their searches online to get the job done?
- rootusrootus 9y agoAs a long time Perl programmer myself who has been doing Python for the last three years, I have to say that it is much easier to write unintelligible Perl code than Python. Not that you cannot write some gross things in Python if you try, but the language defaults towards readability and the community strongly encourages it. I recall a great talk a couple years ago at OSCON that Damian Conway gave about how you could essentially turn Perl into a custom language that exactly fit your needs. I walked out of there thinking "wow! That is incredibly awesome, and yet I would never consider it for a business environment." Perl is an appealing language for people who like languages. I count myself as one of those. But I cannot deny that Python makes so much more sense for teams of more than one person.
- pyre 9y agoThe one thing that I miss in Python is true anonymous functions. Perl has them. JavaScript has them. Ruby has them. Python just has lambda functions which can only evaluate an expression.
- btilly 9y agoMeh. In Python you can put a def inside of any scope you want and do anything that you want with it. The fact that it winds up with a name in that scope doesn't stop it from being anonymous everywhere else. At that point the difference is just syntax.
- rcthompson 9y agoPerl is still the only language I've seen that has a dedicated syntax for regular expressions. Every other language requires you to write your regexes as strings, which puts you squarely in backslash hell. (I'm sure there must be other languages with dedicated regex syntax, but I'm not aware of any.)
- ilkkao 9y agoJavascript is like Perl: /foo/i.test('foobar') is valid JS.
- cutler 9y agoRuby is a direct descendant of Perl and borrows its regex syntax.
- MadcapJake 9y agoRuby used Oniguruma (and now Onigmo) for RegEx https://github.com/k-takata/Onigmo https://github.com/k-takata/Onigmo
- cutler 9y agoAs far as I can make out these regex engines are very close to Perl5.
- dragonwriter 9y agoYes (well, for MRI at least; I'm not sure other implemebtations use the same regex engine) and it used a different regex engine before Oniguruma. But engines and syntax are unrelated; Ruby has a dedicated regex literal syntax which was directly inspired by Perl.
- Ardren 9y agoJavascript has regex literals /foo\sbar/i; Is the same as: new RegExp('foo\\sbar', 'i');
- 9y ago
- ivanhoe 9y agoHow many of those "water cooler" conversations you had with someone who actually knew and used perl for at least a few projects? Most of perl hate I hear is from people who've seen like 2 perl one-liners in life and got scared by $, @, and %'s in syntax...
- CoC_CRUSHER 9y agoI used to use perl regularly. It was installed a lot of places and was superior to the other common options. The tooling for things like python,.net langs, and C++ are decades ahead now. It's just less error prone to use those. Part of that is because of Perl's grammar; part of that is the culture of the language. Also, a lot of the CPAN modules have been orphaned for over a decade and npm/matt's script archive level quality on average.
- dragonwriter 9y ago> Except, of course, that Perl is awesome at regular expressions, an advantage that most languages must have caught up on, no? If you mean at "parsing text", for which regexes are a tool, I don't think many other languages have caught up with Perl, which had (with Perl 6) gone beyond regexes to grammars. But, even ignoring that, I think plenty of languages have regex engines less powerful than Perl's, and poorer ergonomics for using regexes in the language independent of regex engine quality so even on regexes as such Perl has an advantage.
- 0xFFC 9y agoGuys I am genuinely asking this and I have zero intent on bashing on Perl. What is the position of Perl industry right now? how much it can compete with Python. Where does it compete? is it on losing side ? P.S. I am student and I have no real perspective on what is going on in industry right now.
- C0d3r 9y agoCompanies who are already using a technology such as Perl usually already have both some senior people who only know that technology and/or have a big codebase on that, such that migrating the code would take considerable resources. Basically, sometimes it's not a choice.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- rglullis 9y agoThe only big company I know that uses Perl extensively is booking.com, and I think that has more to do with any technical merit from the language, and just that is what they started and it was working for them. To be honest, I think Perl still powers a whole lot of systems, and certainly is a powerful tool for someone who is a Unix sysadmin, but this kind of job is dying. And as a language, I think Perl has nothing on Python or even Ruby, or even PHP nowadays.
- thinkMOAR 9y agoWhy do you think unix sysadmin function is dying? Just curious.
- dagw 9y agoAs an ex-sysadmin I find that a lot of what I used to be responsible for is now outsourced to "the cloud" and most of my old tasks are being handled by other people as a secondary responsibility. Back when I started it wasn't uncommon for a 20-50 man company to have a dedicated sysadmin, whereas now I hardly ever see that.
- kluck 9y agoReading through the changes it becomes abvious how rich a language Perl is. Just look at all the edge cases and fine tunings that this long time of development and improvement has generated. Its impressive. Anyone starting their own little programming language should really consider how big a task that actually is. This is not to stop anyone or discourage them.
- zipppy 9y agoIsn't the point of that comment precisely to discourage someone who might otherwise think the task to be smaller than it is? It's okay to discourage if it helps people understand scope.
- ibn-alfatal 9y agoPerl always reminds me of this guy :) https://media.ccc.de/v/32c3-7130-the_perl_jam_2 https://media.ccc.de/v/32c3-7130-the_perl_jam_2
- kluck 9y agoI watched the video some time ago and what bothers me is that the author pretends to have hacked Perl while in fact he just found that some people are using a commonly used Perl module (DBI) the wrong way whereas the right way is well documented. A similar thing would be to blame PHP for allowing SQL injections through unescaped user input: I am sure it happens a lot, but who would blame PHP.
- randallsquared 9y agoUntil recently, blaming PHP was the popular approach. :)
- baldfat 9y agoWell, every time I meet someone and they say they use PHP for their living my inter monologue is "Don't be a jerk and don't bash PHP, its a fine choice." I usually have to make sure I don't talk with them long and move along. I am a jerk either way.
- noir_lord 9y agoShrugs, it pays the bills and has improved radically since 4 and even 5. It wouldn't be my first choice but there is plenty of reasonable paying work around.
- ibn-alfatal 9y agoActually, he breaks examples from the manual. I think his point was that programmers inherently write exploitable Perl code as they assume certain types are secure.
- edibleEnergy 9y agoI'm excited for the whitespace stripping heredoc operator, it's always a bummer having to put all heredocs all the way left.
- vgy7ujm 9y agoGreat work! Excited about the direction Perl 5 is going!
- HighPlainsDrftr 9y agoPerl is awesome. Its like writing a sentence or paragraph. I decide how I want to present each sentence or paragraph. Then I get to write it in Perl. Its a very easy language to learn. My first language was C back in 1994. I was in high school and encouraged to learn C before I learned Perl. I read my books. I kept on going after it. Then finally six years later I started learning Perl. Perl is a great language. I haven't touched Perl6 yet - I bet its even better. It might take me 20 years just to do a hello world in it and optimize it. Larry gave us a great place to start. Guido is awesome too. "I don't like big bloated snakes though" -- I heard this back in 1996 or so... We have been focusing on languages for 20k years or so. We have built computers for about 100 years - and invented languages to talk to them.