Perl used to be huge. It was the language of system administration and CGI.
These days nobody writes anything in Perl, it's been nearly completely replaced by Python for most of the use cases where it was common. What happened? Does it really suck that hard?
It likely got forgotten. Due to its unnecessarily complicated syntax and semantics it's easy to forget the details once you don't use it on a daily base.
This applies to C++ as well. Friendly reminder to implement all or no constructors.
Nathan Parker
Having libraries, featuring one of the best libxml2 binding there is.
Jackson Gray
>user cases it's either 'use cases' or 'user stories', the nudev version
>It was the language of system administration and CGI. Well, that alone would explain it, wouldn't it, OP?
Thomas Sullivan
>libxml2 i probably can use that lib though bash and every single lib out there to
Christian King
True, but it's not like there's anything that Python can do that Perl can't and yet Python has taken off for use in so many other things. Are you saying that people ditched it because of this association alone?
James Baker
You probably could but why? Usually when a project calls for using XML or JSON I know I'm going to want a language where I can manipulate it easily. Bash just doesn't cut it there.
Asher Rogers
because its much easier? you could write 60 lines of python code to filter out a field from a convoluted json block that no one gives a shit and i will just chain 4 commands that will do the same with no hit on performance
Brody Peterson
You example is really odd. First of all, I really doubt it would take 60 lines of Python to filter some fields out of a block of JSON. I've written Python scripts that use JSON to do other things that aren't 60 lines long in total. Second, that's a very strange use case. Most of the time you'd want to read values from some JSON or write output in JSON. How would you use bash to write out a data structure in JSON?
Jason Barnes
>How would you use bash to write out a data structure in JSON? duno, probably a command out there that does it
Wyatt Davis
xmlstarlet is pretty good for XML in shell scripts. jq maybe for JSON.
Brayden Nguyen
yes it really does suck that hard
that said, it is still huge in biology
Jordan Williams
No, I'm saying that CGI for scripts is a technically bad and outdated idea - Perl devs even threw out their package for this iirc - and the turbosperg power of administration doesn't contribute to the longlivety of anything. >but it's not like there's anything that Python can do that Perl can't Only in a limited, technical sense.
Once you handle actual data structures and non-trivial requests where a small xmlstarlet replace query becomes a pain, bash and all its DSL tools becomes shit tier. I mean, if it's 30 lines of portable perl vs 200 lines of xslt mixed with xpath3 and some other tools with dubious unicode support and dubious error handling, I'd rather chop my balls in the latter case.
Michael Cox
mojolicious is pretty comfy senpai
Oliver Jenkins
I like perl and still use it. Honestly better than python.
Jason Cooper
>These days nobody writes anything in Perl WRONG WRONG WRONG WRONG
Eli Sanchez
Based perl monk
Jackson Nguyen
Practically speaking, perl scripting is non-existent. Perl is a dead language. Period.
Carson Davis
just use sed and awk you faggot
Luke Reed
cpanel still uses perl scripts
Sebastian Miller
Perl is a write only language, and within a week that goes for the original developer too.
Joshua Phillips
Wrong
Samuel Morris
>cpanel still uses perl scripts Literally was thinking of that, but it's because the author(s) chooses to use it. If it was written today, it would probably done with python. Perl is dead, like latin is a dead language.
Logan Allen
Nice facts and counter-argument.
Nolan Hall
>I mean, if it's 30 lines of portable perl vs 200 lines of xslt mixed with xpath3 and some other tools with dubious unicode support and dubious error handling, I'd rather chop my balls in the latter case.
XML is fucking garbage I don't know why people still use it
Oliver Martinez
>XML is fucking garbage I don't know why people still use it .NET fags, that's why. JSON is better and much more readable.
Ryder Myers
Nice passive aggressiveness, lady
Brandon Ramirez
kek go have your mid-life crisis somewhere else.
Liam Ramirez
Perl flunked the 5/6 transition. Badly. But for that, Python would be an afterthought.
Nathan Reed
>projection, the post Like clockwork
Jackson Morgan
Nope, I'm 26 and I've never written a line of perl. Tell me, how is perl not dead?
Dominic Young
>Please archive soon
Aiden Sanchez
Only brainlets think Perl is hard.
Noah Brooks
I've written a decent amount of Perl and I don't think it's overly difficult, but I despise trying to read Perl that other people have written. There are so many little syntactical quirks that different people pick up and use it can be a nightmare to decipher sometimes. It's very easy to write unmaintainable Perl, far more so than other languages.
William Butler
Everyone is using typescript now
Anthony Phillips
ScriptBasic have compilation scripts on perl (and *.h autogeneration)
Easton Brown
this desu
Angel Wright
I still use it
Jeremiah Long
CPAN has more stuff than python pip and npm (if you factor out shit like left-pad)
>see this thread >the same day look for a program to do a simple task >the first and possibly only result is in perl
Asher Collins
>left-pad >left-pad.io/ >On March 22nd 2016, a terrible tragedy befell the Node.JS community. A popular microframework for robust string expansion, `left-pad`, was removed from npmjs.com.
Asher Price
It makes things convoluted for managing a system, just use bash+sed+awk instead
Ryder Martinez
I don't know perl, but this applies to every language.
People pick a language based on its popularity. Period.
John White
These days people are mostly using it for rapid prototyping, some throwaway code which simply does its job and won't be actively supported aftrewards. And for the futher extension of the basic shell utils. You won't find that kind of code on github for the obvious reasons.
Ryan Anderson
Couple of weeks ago I wrote a basic UDP server in Perl for emulating some binary protocol. It took ~15 LOC and about half an hour of work (reading the specs mostly). I can't imagine any language suited for that kind of job better than Perl.
Christian Adams
>so many little syntactical quirks that different people pick up and use That was actually Larry Wall's intention, BTW. Coming from natural languages background, his idea was a language that lets you express shit in as many different ways as possible, depending on your fluency, vocabulary and personal style, just like English can be successfully used by a 3 year old, a university professor, and a ghetto roodypoo, even though they sound nothing alike, and might not understand one other very well.
It didn't turn out to work that great compared to Python's "there should be only one obvious way to express stuff", but it's a cool idea. Also: Perl golf is a lot of fun because of that.
Jeremiah Bennett
Assholes and amateurs abusing regex gave the language a bad rap. After that, it was only a matter of time until a replacement was forced.
>Python's "there should be only one obvious way to express stuff" Considering all the various holy wars: >tabs vs spaces >indentation styles >brackets and braces I understand the designers of Python went with a "fuck you, eat it" approach to syntax and style
Here's why Perl caught fire in the early days of the web: MySQL wasn't around and PostgreSQL was an academic toy. If you wanted to read/write data and didn't want to pay for one of Larry Ellison's yachts, you had to do it the Unix Way with plain text files. So Perl, still the greatest text munger ever invented, won out.
But now we have free databases and ORMs. Don't nobody have time for Perl.
Chase Gomez
>That was actually Larry Wall's intention, BTW. Coming from natural languages background, his idea was a language that lets you express shit in as many different ways as possible, depending on your fluency, vocabulary and personal style, just like English can be successfully used by a 3 year old, a university professor, and a ghetto roodypoo, even though they sound nothing alike, and might not understand one other very well. And this is why Larry Wall is so based.
Nolan Adams
The hate for Perl is great. It's universally the most despised language that nearly everyone loves to shit on, yes, even more so than Java.