14 ms·
Dwindling CPAN Releases
- gpvos 7y agoLooks like peak Perl was about 2012-2014. :(
- eikenberry 7y agoReally more around 1994, just before Perl 5 came out. Perl was a great sh/sed/awk replacement for a while..
- isostatic 7y agoWhat's better 25 years later for that sort of work?
- japanoise 7y agoYeah I learned Perl in 2013 or so and I almost exclusively use it as a better shell+sed for text munging, which is where it excels. In my experience Python is super bad at this compared to Perl or even shell
- ryl00 7y agoStill is, for many of us (I only picked it up in 2000).
- chihuazhang 7y agoSdfsfds
- peteretep 7y agoWhich is ironic, because even the most ardent Perlies among us were wringing our hands about its inevitable decline well before then.
- barrkel 7y agoThe rate of increase must have been declining (i.e. rate of rate of increase negative) in order for it to have peaked. This was probably detectable.
- benj111 7y ago"and rate of rate of increase negative" Are you a politician? Because that's a very round about way of putting it. :P If the rate of increase is negative, there is an actual absolute decline. Is that want you were meaning to say?
- antisemiotic 7y ago"rate of rate of increase" = "second derivative", I presume. Negative second derivative doesn't necessarily mean a decline, it can be just growth slowing down.
- deleted 7y ago[deleted]
- barrkel 7y agoI said rate of rate of increase. The second derivative is negative at a local maximum. https://en.wikipedia.org/wiki/Derivative_test#Second_derivative_test_(single_variable) https://en.wikipedia.org/wiki/Derivative_test#Second_derivat...
- lifthrasiir 7y ago
- iamnotacrook 7y agoI used Perl for a bit but switched to Python because I was finding it harder to work out what some code I'd written a year or so ago did than to write it again, a problem I don't have with Python.
- fmajid 7y agoI switched in 1995, never looked back. Perl can’t die soon enough.
- isostatic 7y agoI used python for a bit but switched to Perl because it 1) Works 2) Is ubiquitous 3) Is stable 4) Is normal (semicolons, braces etc)
- unmole 7y ago> 2) Is ubiquitous On which systems do you have Perl readily available but not Python?
- gsich 7y agolegacy stuff
- isostatic 7y agoWhich version of python? Perl documentation online applys to versions of perl that are installed. Python stuff is all bleeding edge - you'll research why something isn't working and after 30 minutes find it's expecting python 3.7. The whole concept of "virtualenv" gives me an impression of fragility I don't get with perl.
- deleted 7y ago[deleted]
- jsymolon 7y agoWanted to use Python 3 for some processing but the Sysadmin said that only Python 2 was available for that distributions version and "didn't want to frankenstein the box"
- l33tman 7y agoLong ago I used to joke that perl is write-only... was that harsh or realistic? (I still believe it - too clever constructions which feel smart at the time you come up with them :)
- wastholm 7y agoPerl aims to be an enabler, and is therefore not particularly opinionated ("there is more than one way to do it"). This includes making little to no effort to make it hard to write difficult-to-read code. Personally, I don't tend to have a hard time reading code I myself wrote, even long after the fact. But I will concede that Perl code _can be_ hard to read if the author has been too clever.
- isostatic 7y ago"too clever constructions which feel smart at the time you come up with them" That's the coder, not the language. Which is more obvious what's happening. print ''.join('%(pre)s%(num)s %(bot)s on the wall, %(nul)s %(bot)s,\n%(tak)s\n' % (lambda c,b: {'pre':['','%s %s on the wall.\n\n' % (c,b)][abs(cmp(c,'Ninety-nine'))], 'num':c, 'nul':c.lower(), 'bot':b, 'tak':['Go to the store and buy some more... Ninety-nine %s.' % b,'Take one down, pass it around,'][abs(cmp(x,0))] })((lambda x,o: [(['Twenty','Thirty','Forty','Fifty', 'Sixty','Seventy','Eighty','Ninety'][x/10-2]+'-'+o.lower()).replace('-no more',''), o][int(x<20)])(x, ['No more','One','Two', 'Three','Four','Five','Six','Seven','Eight', 'Nine','Ten','Eleven','Twelve','Thirteen','Fourteen', 'Fifteen','Sixteen','Seventeen','Eighteen','Nineteen'][[x,x%10][int(x>=20)]]),'bottle%s of beer' % ['','s'][abs(cmp(x,1))]) for x in xrange(99,-1,-1)) Or my $firstline = 1; my @tens = qw/Ninety Eighty Seventy Sixty Fifty Forty Thirty Twenty/; my @teens = qw/Nineteen Eighteen Seventeen Sixteen Fifteen Fourteen Thirteen Twelve Eleven Ten/; my @ones = qw/Nine Eight Seven Six Five Four Three Two One/; sub go { my $num = shift; my $bottles = "bottles"; if ($num eq "One") { $bottles = "bottle"; } if ($firstline == 0) { print "$num $bottles of beer on the wall.\n"; print "\n"; } $firstline = 0; print "$num $bottles of beer on the wall, ".lc($num)." $bottles of beer,\n"; print "Take one down, pass it around,\n"; if ($num eq "One") { print "No more bottles of beer on the wall.\n"; print "\n"; } } foreach my $ten (@tens) { foreach my $one (@ones) { go("$ten-".lc($one)); } go($ten); } foreach my $teen (@teens) { go($teen); } foreach my $one (@ones) { go($one); } print "No more bottles of beer on the wall, no more bottles of beer,\n"; print "Go to the store and buy some more... Ninety-nine bottles of beer.\n"; print "\n"; People can do clever things in either language, people can write clear code in either language.
- _rrnv 7y agoConsider this: Perl codebase is reaching perfection and no longer needs releases. After this, we get eternal Perl ;)
- mirceal 7y agoaka Perl 6
- gerad 7y agoPerl Nukem Forever?
- zeristor 7y ago”Don’t have time to Perl with myself”
- gmueckl 7y agoWait, what? Perl 6 is real, released and essentially stable. The ecosystem for the language is also evolving at a good pace.
- antisemiotic 7y ago>Perl 6 is real, released and essentially stable. So is Duke Nukem Forever.
- eiro 7y agowe waited for them since the very beginning of the millenium, i played with both and here is the difference: DNF is very desapointed and is not the revolution i expected. Perl6 is a game changer and push the idea of "scripting" way beyond i was imagining it (and i played with a lot of langages)
- gmueckl 7y agoPerl 6 is more than a scripting language. It clearly has elements of a very general high level language that can scale to large program sizes.
- tus88 7y agoIt's interesting. I started Perl in around 2005, and moved entirely to Python in 2014, exactly when it reached it's peak and started to decline. Seems I wasn't the only one.
- INTPenis 7y agoPretty much same story for me. I started dabbling in Python 2013 and the move was final in 2014 when I had started using Ansible full time. Before that I was a huge Perl fan. I even ran a localized version of perl.cctld in my country. With documentation in our local language.
- latchkey 7y agoNow I feel old, I started with Perl 4 around 1992-1993. There wasn't even a CGI query args parser library yet, you had to roll your own.
- blihp 7y agoNah, you're still a youngster. Got Perl 1 via Usenet in 1988 when there wasn't even a web yet.
- tus88 7y agoWhat kind of web server would even be calling Perl CGI scripts in 1992? I thought it was all bulletin boards back then. Personally I just got my first PC and was learning to play Commander Keen in 1992 ;-)
- latchkey 7y agoI started with perl in 1992, ncsa httpd came out in 1993, which was the first release of CGI. I ported EBBS/BBS to A/UX and ran one for a few years. https://en.wikipedia.org/wiki/NCSA_HTTPd https://en.wikipedia.org/wiki/NCSA_HTTPd https://github.com/virtadpt/eBBS https://github.com/virtadpt/eBBS (my name is in the credits)
- unpixer 7y agoMy first exposure to Perl pattern-matching was a magic regex for parsing CGI input handed down to me by a more experienced coder. "Don't ask how this works."
- FranOntanaya 7y agoI wish someone poked irssi devs to support other languages. I basically learned Perl just for it.
- Fnoord 7y agoI assume you already knew and don't wish to change client -which is fair enough- Weechat supports Python and Ruby in addition to Perl. I remember the time before Irssi, when even CLI clients regularly had remotely exploitable vulnerabilities in them (including the 1337 BitchX). Irssi was programmed with safety in mind. Either way, scripts increase attack surface. I'm not using IRC clients right now (I quit after realizing more than 50 windows open isn't productive), but I really love both Irssi and Weechat's interface (including default themes) and CLI. Did have to finegrain the configs but the same's true about nearly any application these days.
- sebcat 7y agoPerl is a prerequisite for Autoconf as well (not for the generated configure scripts though, thankfully). It would be nice to not have that dependency.
- vague_irssi 7y agoirssi has support for perl, python, js, tcl and lua(very alpha) https://irssi.org/modules/ https://irssi.org/modules/ None of those other modules are as featureful as the perl module and are looking for people who are interested in developing them further :)
- mattbillenstein 7y agoLarge Perl codebases are terrible - let it die.
- Arnt 7y agoBut the small perl codebases I have are great. I have a crontab that runs every five minutes: 30 lines that use one CPAN module, no bugs in years. The code has the kind of hackiness that's okay when it fits on one screen, and it fits on one screen precisely because of that hackiness.
- mattbillenstein 7y agoIt'd be better if it were in Python.
- mattbillenstein 7y agoI know, the truth is hard sometimes.
- lmm 7y agoIt's very hard to know which codebases will grow to be large - every codebase starts out small, and by the time you realise it's going to be big, rewriting into another language is expensive. Better to use a language that can scale to small codebases and large, that can accommodate hackiness and cleanness alike.
- Arnt 7y agoNicely put, but I notice that you avoid names and numbers. How expensive can it be to rewrite a hundred or a thousand lines, if a perl script keeps growing? And what are these languages (you use plural so I do too) that are optimal for every case?
- lmm 7y ago> How expensive can it be to rewrite a hundred or a thousand lines, if a perl script keeps growing? A hundred lines, or a thousand lines, is not so bad. But where do you draw your line in the sand that you're going to stick to? If you don't insist right at the start on coding to your maintainability standards, why would you make that change when your script went from 30 lines to 100, or 100 to 500 (no doubt always driven by an urgent functional need)? It's always easier to add one more change to the existing codebase; the only point where you'd rewrite is when the codebase becomes literally unmaintainable because no-one understands it, and at that point migrating it is extremely expensive. > And what are these languages (you use plural so I do too) that are optimal for every case? I'm not saying optimal (I doubt that's possible), I'm saying pick a language that's adequate for every case. I'm partial to Scala, which was explicitly designed as a "scalable language" that would work for large and small codebases; other ML-family languages (e.g. OCaml) are similar. In my book any language with the ML featureset is more than adequate for large codebases, and any language that has a REPL/interpreter and doesn't require Java-like explicit types is adequate for scripting tasks. (Side note: I've always found it odd that Perl didn't have a first-class REPL, since IME that's one of the biggest natural advantages of scripting languages). If you want to start from the scripting end, Python, Ruby or even TCL offer a level of consistency and least-surprise that let them scale to larger codebases than Perl, though I wouldn't really want to use any of them on a truly large codebase.
- nurettin 7y agoThis september 2012 release was kinda huge for me. It brought venv, generator expressions (event loops) a-la nodejs at the time, sped up a lot of things as well. It was a great release and a step in the right direction. Perl6 was still a myth at the time. I did not start using python3 until last year, but I was aware it was evolving quickly to one day become usable. https://docs.python.org/3/whatsnew/3.3.html https://docs.python.org/3/whatsnew/3.3.html
- nkozyra 7y agoPerl is the language I once understood when I used it everyday but now look at with utter confusion. It's definitely not a casual language. As a comparison, I peeked at some Delphi/pascal code I'd written and a book a few weeks back and it was still parseable by my brain years later.
- badsectoracula 7y agoI've been writing Pascal and Delphi for more than 25+ years and C and C++ for around 20 years and a bunch of other languages for at least a decade, yet even with the tons of additions that Free Pascal has added over the years i always find Pascal code way more readable than C or (especially) C++ code. It helps that the Free Pascal developers try to keep the syntax for new stuff "Pascal-ish".
- tootie 7y agoNo languages are casual. I wrote Perl for about 5 years and was super productive with, but haven't looked it for quite a while. Most energy these days goes into JavaScript/node and it devolves into gibberish really, really quickly. The community really dove into the punctuation-based syntax, preprocessors and meta languages head first and created a real Frankenstein. And they'll complain that Java or C# are too verbose and slow to work with.
- futureastronaut 7y ago> The community really dove into the punctuation-based syntax, preprocessors and meta languages head first and created a real Frankenstein. More is on the way. Github issue thumbs up-driven development means it's the new C++ kitchen sink.
- nkozyra 7y ago> No languages are casual. Not sure I agree with that. Languages which share widely used conventions and syntax can be picked back up much more quickly.
- leejo 7y agoI'm an author on CPAN who pushes one or two releases a month[1]. I'm actually surprised the number of uploads is still as high as it is, and a few thoughts struck me about the graph: 1) Most long time libraries have pretty much reached stability and the (still relatively high) backwards compatibility promise of perl5 means they don't have to be updated to support changes in the language, which still has releases every year. 2) The quality of uploads to CPAN is of the form of solving more complex problems or interfacing with core Unix/network/internet/lower level lib stuff stuff - you don't see so much of the leftpad type modules on CPAN. 3) It definitely feels like the number of authors has shrunk significantly, even though the graph suggests that has stayed relatively level. I suspect there's a long tail of active authors and most signups never actually upload anything 4) The biggest problem now is finding modules for newer APIs - I wrote some, including for more well known services such as GoCardless and Monzo 5) Holy crap, the graph covers almost 24 years of uploads. You will probably see the same pattern in Python, JS, Go, and so on if you come back in an equivalent number of years - the most common problems get solved first, and libraries uploaded for those. 6) The graph covers uploads to CPAN, I'd guess a far more important one would be downloads from CPAN as that will probably give you more information about the relative level of use of the language. [1] https://metacpan.org/author/LEEJO https://metacpan.org/author/LEEJO
- rurcliped 7y agoPerl is good for a competent coder who doesn't work as a developer, occasionally has a one-off coding task, and wants to incorporate a code excerpt from the web and immediately execute it (and then throw the code away). Languages with whitespace as syntax often fail the "immediately execute" requirement.
- TylerE 7y agoThat seems like a stronger argument for Excel than for Perl.
- ojosilva 7y agoI think Perl was fighting on too many fronts at the turn of the century: web, systems automation, data processing, science and a few more. Today these areas are better covered by other languages that have hefty internet buzz and corporate support behind. Perl also has no shiny features. It's just extremely dynamic and paradigm agnostic, great at shell interactions and natural at text processing (specially with regexes), good enough at binding C/C++ libraries, has package management built-in (CPAN) and an automated testing culture. Perl basically set the baseline for a lot of today's languages. Perl5 devs put a lot of focus on making Perl even more dynamic during the 2000s, relying on CPAN/community to fix language quirks and plug in novelties. It worked to some extent, Perl got to the point where it could be written like Haskell, Ruby... During that time it also got a powerful but optional class system (Moose) and reinvented itself as a web language (Mojolicious, Plack). Unfortunately it all came too late, most Perl5 devs moved to something else or maintained Perl5 code frozen in legacy mode. Fewer and fewer started new projects using Perl. For instance, nowadays I tend to pick a language/ecosystem pair based on these concerns first depending on what the job requires: - asynchronous event processing, specially network related -- I pick JavaScript/Node. - real parallel processing and highly performant systems, I'd use Go. - "we got a package for that" -- Python or JS at the forefront here. It depends on what package I'll need for the job, typically it's not going to be in CPAN. - great code reuse/portability -- to me JS wins here. And still the only single language for both server and browser. - compiled hard-packaged binaries: Go, but also Rust, Elixir, Nim, and others can fit the bill. - code style and paradigm -- a very personal choice, I think Typescript and ES2019 are both great here. Golang and others are also great if I feel like staying away away from OO. Perl would have a hard time competing in any of these fronts, but it still is one of the greatest for practical extraction and reporting, text or database wise and easily available or pre-installed on many servers out there new and old.
- cat199 7y ago> web, systems automation, data processing, science and a few more. doesn't this apply to python, although now there are additional competitors? > reinvented itself as a web language (Mojolicious, Plack). highly opinionated and potentially flame creating , but - perl was the original web language in the CGI era, PHP pretty much dethroned it due to simplicity of server integration, rails knocked them both out of 'leading edge', then the Node/SPA era arrived. mojolicious / plack are pretty much things to bring perl up to date w/r/t the 'rails' type
- eruci 7y agoThere is more than one way to look at it. I've been coding in Perl for 20 years, I'm a CPAN author [1] and I just published my third CPAN contribution yesterday. I've written over half a million Perl lines of currently in use enterprise cloud software[2] and I'll keep coding in Perl because I don't like the big snake dictatorship of "There should be one — and preferably only one — obvious way to do it." [1] https://metacpan.org/author/ERUCI https://metacpan.org/author/ERUCI [2] https://aws.amazon.com/marketplace/seller-profile?id=434e9862-6909-489d-8159-669bdb38f724 https://aws.amazon.com/marketplace/seller-profile?id=434e986...
- MichaelMoser123 7y ago"There should be one — and preferably only one — obvious way to do it." That is a python design principle https://en.wikipedia.org/wiki/Zen_of_Python https://en.wikipedia.org/wiki/Zen_of_Python Now there are multiple (sometimes very confusing) ways to import stuff in python, so I am not quite sure if this principle is being followed. https://realpython.com/absolute-vs-relative-python-imports/ https://realpython.com/absolute-vs-relative-python-imports/
- cure 7y agoThe other place where this principle is completely ignored is when it comes to Python packaging, which is a complete and utter disaster. There are many different ways to package Python, none of them are feature complete, and the result is an absolute maintenance nightmare for those of us who have to maintain tools that have Python dependencies. Perl got packaging right, there's one way to do it, and it just works!
- roryrjb 7y agoThere's so much negativity in this thread. I think that a big part of Perl's decline is exactly because of people's attitudes. I don't actually write any Perl now, but to me it's a beautiful language, I always enjoy working in it. You can abuse it in the wrong way like every other language. If I was to suggest using it in the day job there would be uproar probably. But just because I like Perl doesn't mean I want to write everything in it, use the best tool for the job and sometimes the best tool is Perl.
- freedomben 7y agoYes, thank you. Perl was an absolute earth-shaker back in it's day. Even still it's a fantastic language for string manipulation. Much of Ruby's beauty, expressability, and powerful string processing is thanks to inspiration from Perl. It's disappointing to see people crapping on such a venerable language.
- deleted 7y ago[deleted]
- cheeze 7y agoPrel is great and has an important role, even today. That being said, I'm a professional dev and we own a decent amount of perl. That codebase is by far the most difficult to work in out of anything we own. New hires have trouble with it (nobody learns perl these days). Lots of it is next to unreadable. I agree that like any other language, perl can be written well and can be written poorly. That being said, perl makes it _really_ easy to write something poorly, in contrast to something like python which is a bit more rigid and tries to have one right way to do things. I still use perl pretty extensively for little one liners, but at this point we are actively trying to get rid of as much perl that we own as possible. We find that rarely writing anything longer than 10 lines should be done in perl, if only from a readability and maintainability standpoint. I love perl. It was THE game changer for many many years. But perl is falling out of fashion quick. I'd have no problem working in the language with some very rigid guidelines and a bunch of experts. But the reality is that nobody is hiring perl experts, perl experts are becoming more and more scarce, and most new hires have a bit of experience with py or rb. I dont dislike perl, I'd just argue it's almost always the wrong thing tool for the job these days. In a previous life I worked at a large E commerce company. You've likely ordered from them. Pretty much everything ran on perl/perl Mason for over a decade. At that time perl was the cool new thing that everyone wanted to pick up. Now (or when I left a few years back), most of that code represented a liability if it needed to be changed. IMO this is just the cycle of a programming language. I remember reading Spolsky articles where he talks about VB6 like it's some shiny new amazing scripting language, akin to python 10 or so years ago. But alas, time moves on and so do most programmers.
- Audiophile65 7y agoNice post :)
- gkfasdfasdf 7y agoI still use perl for handy one liners on the command line. E.g. I had a 1 GB log file where I wanted to generate a histogram of the intervals between certain log messages. I used a perl one-liner to extract the timestamp via regex (regexs are perl's bread and butter), calculate the diff between the previous timestamp (easy because of auto string => double conversion), use the diff value as a key in a hash of counters (autovivification really handy here), then print the hash at the end with sorted keys using the Data::Dumper module. Took me all of 5 minutes to write. I don't write Perl often but I am thankful that it exists.
- markoman 7y agoI'm an occasional perler myself and I bet that others or myself would find that code you mention to be useful, at least for the black book of snippets. Would you mind pasting?
- gkfasdfasdf 7y agoHere is the command I used (added linebreaks for clarity): rg '<filter pattern>' <logfile> | \ perl -MData::Dumper -n -e ' m/\d{2}:\d{2}:([\d.]+)/; if ($last) { $diff = $1 - $last; print "$diff\n"; $hist{$diff} += 1; } $last = $1; END { $Data::Dumper::Sortkeys = true; print Dumper(\%hist); } '
- foobar_ 7y agoPerl went full lisp. Never go full lisp.
- hobojones 7y agoI work on a large, legacy codebase (the oldest modules date from the mid-nineties) that's slowly being rewritten from Perl into Python. A handful of developers have been involved with the project from the beginning. Looking at the long term contributors, readable or un-readable code seems to be more about the person than the language. Unsurprisingly, the person who produced the most unreadable, unmaintainable code is now doing the same in a new Python only project. I've always tried to look at programming in a similar manner as writing research papers, your ideas are no good if no one understands how they're put to paper. Explicitly stating your intentions is better than assuming the reader knows the subject matter. If something is clever, overly-compact or your reviewer expresses confusion, rewrite it or at least spend an extra line or two in explanation. At the language level, I miss Perl's handling of regexps and shell commands (which consist of large amounts of this codebase). Python requires a fair amount of overhead to handle both and always feels a little clunky. While I'm far more fluent in Python, I typically reach for Perl when needing to quickly handle log files, automate shell tasks, and prototype ideas. On the flip side, now that Python supports type hinting, function signatures are much more valuable, and overall I feel I can write far more robust tests in Python than Perl. Given that the direction of the project is to move from a collection of one-off scripts that just kept on growing to a tested, maintainable, modular codebase, Python is the better choice.
- alexpotato 7y ago> Looking at the long term contributors, readable or un-readable code seems to be more about the person than the language. Unsurprisingly, the person who produced the most unreadable, unmaintainable code is now doing the same in a new Python only project. I would totally agree. I learned Perl after first learning Basic(and Visual Basic) then Java. Coming from Java meant that I always tried to use clear variable names, good comments, broke my code into small and simple functions etc. I repeatedly had people say to me "Wow! I didn't know you could do that in Perl!" A lot of Perl's bad reputation came from sysadmins and other busy folks who either weren't familiar with good syntax or were in a hurry and basically were playing Perl Golf to get things done quickly. This is probably where the line "Perl is a write only language" came from. I will concede that Python and it's forced indenting leads to much easier to read code for beginners. That being said, trying to understand what's going on with advanced Pandas usage written by Numpy wizards is no walk in the park either. I also totally agree that the Perl one liner is still my go to even though I do everything else in Python these days.
- yellowapple 7y agoI actually used Perl last week to whip up two scripts (csv2insert and csv2update) to automate converting CSV files to MSSQL-specific SQL insert/update scripts (respectively). Microsoft's own CSV import tools suck, and it was pretty straightforward to use Text::CSV and print() a bunch of SQL lines. I'd need to do some more polishing before putting it up on GitHub or something (namely: sanitize incoming single-quotes in CSV cells, and possibly break the steps into subroutines), but I was yet again impressed by the ability to automate a bit of text data processing with less than an hour's work.
- nopacience 7y agoWhat about the download stats ?