10 ms·
Why I still love Perl
- moreentropy 14y agoSo what exactly is her point?
- Legion 14y agoThat's a fair question. The title is "Why I (still) Love Perl", but the post doesn't really seem to get around to explaining that. It's not really a "Why you should use Perl instead of X" either. It seems more like, "Perl's Not Dead, It's Just Schizophrenic Now". It attacks the idea of "Perl is Dead" with a description of the rather confusing state of "modern Perl". It doesn't exactly make the ecosystem sound all that enticing, not here in 2013 when there are so many other viable options.
- hp50g 14y agoI think most users probably don't particularly care about the hot air and ecosystem thing on the Internet - they're too busy using it to get stuff done. These are the guys who if you Google their email address, it will show one or two posts to usenet between 1995 and 2013 and nothing else. No Twitter account, no Facebook profile, no prolific profile on Reddit or HN. Just silent work and go home.
- isxek 14y agoPlease don't take this the wrong way, but there's nothing wrong with being like that, right? It's not so much that there's nothing good to say - I just don't want to add to the clutter that already exists out in the web. Or maybe that's the wrong way to look at it.
- hp50g 14y agoNope nothing wrong with it at all :) I respect your way of working.
- VLM 14y ago"the ecosystem". Somehow the article avoided mentioning the utter dominance of CPAN. When CPAN dies, perl dies. Is CPAN still my best hope for "easy interface to something really weird but very important"? Oh it is? Well then Perl it will be. I find it extremely hard to justify on the job writing and debugging something that "just works" off a 30 second install from CPAN. Note this criteria doesn't matter much for boring CRUD webapp number 246264. There are somewhat more optimized solutions for that very small subset of problems.
- tete 14y agoWell, in my opinion the article says Perl (5) isn't Rakudo (Perl 6) and therfor one should have a look at the thirteen years of Perl 6 development, but the Perl 5.x series, when wanting to learn about Perl? I think the "Why I love Perl" part is pointed out by the community and that Perl 5 basically spawned Perl 6, which is a different programming language. I pretty much agree that Perl 5's popularity is really low, despite lots of great minds and exciting approaches. I switched to Node.js, CoffeeScript, Go, etc., but it is like everything I do could have been better or equally done in Perl and the tools were more mature. It's the same with all the new concepts and always makes me think about the MVC hype, when the concept of MVC was first named in the 70ies. It's a bit like with Smalltalk. It took like 30 years until people ralizing how good it is and reinventing it. Same with "Do things the Unix way", pipes, KISS, NoSQL, distributed systems, all the stuff that the EC2 made popular. In that sense Computer Science is a really slowly developing science. At least it appears like that, maybe others are similar. I don't know. And what is happening right now for example is making Javascript C, while the developers of C are stepping towards dynamic languages (Go). Also functional progrogramming laguages reappear, first Haskell, now Clojure reapear, cause it is cool for async stuff. LISP has been around for ages and Scheme is really beautiful and neither of them was ever slow or anything. Just look at Racket. It's pretty powerful, amazing to learn, performs at least okay and its IDE is pretty nice and cross-platform. It's amazing for doing the same stuff as Node.js and Scheme is one of the easiest languages to implement. But back to Perl. It has a lot of problems. Nobody ever talks about how awesome CPAN and CPAN-Testers is (you don't even need to set up Travis CI). Nobody ever talks about it as functional programming language, even though there is a great book about. Another problem is that it is way more optimized for getting actual problems done and doesn't really perform too well, when you show your average snippet that looks mostly the same in every programming language out there. The last flaw is that Perl is probably the hardest programming language to learn, because there are so many bad books out there. There are books like Modern Perl, that even are free, but also many really bad ones. And a lot don't tell you about use strict; use warnings; use diagnostics; right away, even when they are what every beginner wants.
- zorlem 14y agoThat's why I find community initiatives like the Perl Tutorial Hub (http://perl-tutorial.org/ http://perl-tutorial.org/) very valuable, especially for people just starting with the language. They even have a page dedicated to sifting through tutorials and guides, and assessing their usefulness for learning Modern Perl - http://perl-tutorial.org/learn/ http://perl-tutorial.org/learn/
- mlinksva 14y agoIIUC, the point is that Rakudo nee Perl 6 is a whole different community and language and all should move forward accordingly: "I sincerely hope to see Perl 7 released quite soon. No fuss, no bother, no long list of “blocking features”. Just BAM! ship the next version of Perl (5) as Perl 7. And I sincerely hope the greatest success for Rakudo. I don’t even care if it takes another 13 years to release, it’ll be worth the wait."
- jamespitts 14y agoThat perl5 should just go to 7 instead of waiting for 6. I remember a guy at a circa-2001 perlmongers meeting sullenly asking a visiting perl contributor "when is 6 coming". The memory really influenced me. People really need a sense of momentum in order to feel confident in a community... same goes for a job and a lot of other things in life.
- asimjalis 14y agoPerl still leads the pack on indeed.com. And I keep getting requests for Perl training. It is always interesting to see the disconnect between what is popular with programmers, and what is actually popular in the industry.
- hp50g 14y agoThat's always the case outside of startup culture, which is why despite being a Unix/Linux guy, I end up in Visual C++ quite often and deal with all sorts of esoteric languages and tools. It's quite a bit more fun that sitting in front of say Python or Ruby only all day.
- zorbo 14y agoInteresting. When I do some searches on the Dutch version of Indeed.com, I get very different results: Perl (421 hits), PHP (2397 hits), Python (493 hits), Java (3173 hits). The top of the Perl listings seem to be for system administrators, and are not a required skill. Contrasting that to PHP, where the top are all specifically asking for PHP. I personally haven't spotted Perl in the wild as a serious programming language for a long time. Again, it seems Perl is mostly popular with system administrators without much programming experience. But that might very well be just my little corner of the world, which happens to be a hosting company.
- adrianhoward 14y agoOh it's definitely still out there. Still used a lot in the finance sector in places. A bunch of companies have a stack of perl infrastructure that "just works" and want to keep it that way. Still folk starting new projects with it (Duck Duck Go, Bunchmail, etc.). As many as PHP, Ruby, Python, etc. - maybe not. But new projects are still rolling out.
- mercurial 14y agoBooking.com (Amsterdam) runs on Perl.
- snaky 14y agoThat's how it always was with Perl community, and I like that mature and calm attitude. "What's all that hype about? Ah, someone just reinvented yet another wheel [1]. Oh, kids these days, so loud, aren't they." The Perl community is not so vocal, that's it and that's just pragmatic. Why yelling about nice tech you done? It works, it solves your problem, it's uploaded to CPAN, it's not a silver bullet, and that's OK. Look at some Perl project like Cheater [2] - that's best tool for generation of test DB data available. Simple and extendable. And there's no hype about it. While I cannot even imagine an amount of hype if it were produced by Ruby guys (especially a couple of years ago) or NodeJS crowd. [1] The bleeding edge in BigData'2013 - pipelening! So wonderful! Oh, wait a minute.. Is that Schwartzian transform we use from 1994? [2] https://github.com/agentzh/cheater https://github.com/agentzh/cheater
- arc_of_descent 14y agoI've been trying to learn Perl 6 for a long time now. The PDF book is great but nothing beats a paperback style novel you can read anywhere. I got hooked onto Perl (long time back!) after reading the Programming Perl book (Camel book). IMO Perl 6 seriously needs a book release. No e-book, PDF, etc. just a old style paperback!
- PommeDeTerre 14y agoPerl 6 needs a production-grade implementation before it needs a paper book release.
- papaf 14y agoLast year I needed to do a small project to run on a web server with only Apache available. Rather than go to the pain of requesting some new web stack installed I wrote a single CGI script in perl 5 - just as I used to many years ago. I did it the old-school way with no fancy framework, just CGI.pm. I made fun of myself to my collegues saying it was great to live in the 90s again. But actually, after a few hours coding it became clear that we haven't progressed very far. It was a single script and it just worked. It was also much more fun than persuading a web framework to do what I wanted because I was actually programming and not configuring.
- jrabone 14y agoIt's a similar experience in Java-land when you throw out the frameworks and all the servlet container bullshit and just start up an embedded Jetty. It's easy, lightweight, fast, you can do anything you want without crapping out mountains of XML configuration, or layer upon layer upon layer of introspecting, byte-code engineering, dynamic code-rewriting-where-the-hell-did-THIS-code-come-from annotations. You have control, in the place where it matters - the source code. You can write end-to-end tests that developers will actually run, because they don't need to spin up JBoss for 5 minutes before they're ready to go. Frameworks have got a lot to answer for; it's very rare that a large project actually gets to use the flexibility that a modern framework provides. Who the hell actually swaps out their ORM or their database for a different one in a production system? Sure, the lead architect was sold on the idea that they wouldn't be tied to a particular implementation, but when the shit hits the fan the business will deem it "too risky - find another solution". Thus we advance to the third level of professional software development, the Sarcophagus model - wherein it's simply too risky to actually CHANGE any part of a (now-legacy) production system, but we CAN build a sarcophagus around the toxic core such that no more careers need be sacrificed to trying to maintain it. I have some great examples of this, but professionalism forbids me from relating them. Perhaps when I finally decide that keeping sheep on a remote island is preferable to being a software "engineer", I'll start writing about them.
- kahawe 14y agoMore often than not, I am wondering just how much complexity one could spare themselves from if they would just use tomcat and postgres/mysql/some-nosql instead of a full-blown oracle-enterprise DB and a serious-business "application server" - both of which said applications are using maybe 10% the features of and basically never any of the really cool features that make them so expensive in licensing.
- nikcub 14y agoPerl is like records on vinyl. There are a small group of people who swear it sounds better, but as a commercial artist you definitely wouldn't release anything new on it.
- joel_perl_prog 14y agohttps://github.com/joeldalley/Soma https://github.com/joeldalley/Soma I just spent a couple weekends putting that together. It's just a little toy, but it does exactly what I want, the way that I want it to. I have to say I really enjoyed writing it. Specifically, writing it in Perl. Writing Perl never feels like work to me. Can't say why, exactly. But I do know if I'd used PHP or Python instead, the pleasure of writing this app (as opposed to anticipating its completion) wouldn't have been there--I would have just persevered through it, in order to reach the final result. Totally different experience.
- bane 14y agoWriting Perl never feels like work to me. I 100% agree. It feels like having a fun conversation with an old friend. The kind of old friend you can not see for months, then pick up your last conversation again without any problem. I think this really has to do with the language design being guided by linguistics principals than academic language design ideas. With very little work, it's possible to write decently maintainable Perl as well.
- adrianhoward 14y agoLike Duck Duck Go, Bunchmail, Booking.com, etc. etc.
- eliasmacpherson 14y agohttp://www.digitalmusicnews.com/permalink/2013/20130103vinyl http://www.digitalmusicnews.com/permalink/2013/20130103vinyl Vinyl sales are consistently up year on year since 2006, so you'd be shooting yourself in the foot if you didn't release your new material on it.
- snaky 14y ago
- ceautery 14y agoIt's still difficult to beat perl in a production Unix environment to fix a hot issue, especially if you know your way around regular expressions. When I hear comments like "now you have two problems", or "it's harder to read than to write", or references to the P in LAMP being Python or PHP, I chuckle to myself. Here's an example of how I use perl, off the cuff, in day to day production life: http://cautery.blogspot.com/2010/09/concise-perl.html http://cautery.blogspot.com/2010/09/concise-perl.html
- daeken 14y ago> references to the P in LAMP being Python or PHP LAMP originated with 'PHP' as the 'P'. It's also by far the most common, for better or worse; 1.4M hits for 'linux apache mysql php' versus 50k for 'linux apache mysql perl' on Google.
- adrianhoward 14y agoLAMP originated with 'PHP' as the 'P' Source for that? I certainly recall it first being used as either "Perl" or "Perl | PHP".
- UNIXgod 14y agohttp://web.archive.org/web/20010304112803/http://www.onlamp.com/pub/a/onlamp/2001/01/25/lamp.html http://web.archive.org/web/20010304112803/http://www.onlamp.... diff that against this one: http://www.onlamp.com/pub/a/onlamp/2001/01/25/lamp.html http://www.onlamp.com/pub/a/onlamp/2001/01/25/lamp.html I love the obvious later edit: "Of course, there are plenty of excellent open source variants for any of the pieces of LAMP. Let the L stand for Linux, FreeBSD, NetBSD, OpenBSD, and Darwin/Mac OS X, all of which are open source operating systems and all but the latter have open source GUI layers. Let the M stand for MySQL and PostGreSQL. Let the P stand for PHP, Perl, Python, and Ruby."
- adrianhoward 14y agoAh yes. I've a vague recollection at the lack of Ruby at the time ;)
- freyfogle 14y agoAnyone looking to work in perl (no need to be an expert, we'll teach you) and see why it is often the best tool for the job, and in a start-up environment in London, we're hiring: http://www.lokku.com/jobs/perl-developer-2013.html http://www.lokku.com/jobs/perl-developer-2013.html
- cryofan 14y agoin europe, sure there are jobs for devs, but in america, the elite import asian neoslaves to do that.
- bane 14y agoI learned Perl about 15 years ago and, while I love the language, am finding myself stuck in Perl from those days. Any resources I can go to to get myself up to speed with modern Perl practices?
- adrianhoward 14y agoI learned Perl about 15 years ago and, while I love the language, am finding myself stuck in Perl from those days. Any resources I can go to to get myself up to speed with modern Perl practices? I'd recommend chromatic's Modern Perl (http://www.onyxneon.com/books/modern_perl/index.html http://www.onyxneon.com/books/modern_perl/index.html) and Curtis Poe's Beginning Perl (http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Perl.productCd-1118013840.html http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Perl.produc...) as good places to start.
- prakashk 14y ago> Curtis Poe's Beginning Perl The online (draft) version of Beginning Perl is available at http://ofps.oreilly.com/titles/9781118013847/ http://ofps.oreilly.com/titles/9781118013847/
- hypnotist 14y agowhile we are on topic of Perl... Can anyone recommend good modern Perl book ? I found really huge amount of Perl code in our Linux servers :)
- adrianhoward 14y agoSee https://news.ycombinator.com/item?id=5507537 https://news.ycombinator.com/item?id=5507537 ;)
- hypnotist 14y agoThanks a lot! Apparently Modern Perl book is available as a free download :)
- pkrumins 14y agoWant to become efficient at writing short Perl snippets that do one task well? Check out my book "Perl One-Liners Explained": http://www.catonmat.net/blog/perl-book/ http://www.catonmat.net/blog/perl-book/ You can read the first chapter here: http://www.catonmat.net/blog/introduction-to-perl-one-liners/ http://www.catonmat.net/blog/introduction-to-perl-one-liners...
- snaky 14y agoAnd http://hop.perl.plover.com/ http://hop.perl.plover.com/
- pasbesoin 14y agoPerl was my first love in the programming world. The first one that (or, "who") understood me. And s/he had some really nice friends. It was always fun, and interesting, hanging out.
- jamespitts 14y agoFantastic "hey, perl is not dead" article, and read it just as I was hunkering down to do some AWS automation with perl. What has always impressed me is the consistency and quality of the documentation of most CPAN modules. There's a huge group of people working at improving perl infrastructure and they don't get half the credit that they deserve! Some examples: http://search.cpan.org/dist/DBI/DBI.pm http://search.cpan.org/dist/DBI/DBI.pm http://search.cpan.org/~mlehmann/AnyEvent/lib/AnyEvent.pm http://search.cpan.org/~mlehmann/AnyEvent/lib/AnyEvent.pm http://search.cpan.org/~melo/Redis/lib/Redis.pm http://search.cpan.org/~melo/Redis/lib/Redis.pm http://search.cpan.org/~abw/Template-Toolkit/ http://search.cpan.org/~abw/Template-Toolkit/ http://search.cpan.org/~ether/Moose/ http://search.cpan.org/~ether/Moose/ It is just ridiculous. Searching around CPAN can become an odyssey.
- phaylon 14y agoJust wanted to ask if you know about MetaCPAN[1]? It has a nice list of modules people "upvoted"[2] :) [1] https://metacpan.org/ https://metacpan.org/ [2] https://metacpan.org/favorite/leaderboard https://metacpan.org/favorite/leaderboard
- jamespitts 14y agoYeah, metacpan is a killer interface to CPAN. But it really comes down to the efforts of the individual module maintainers to create all of that great documentation.
- swuecho 14y ago>consistency and quality of the documentation of most CPAN modules I agree with this. Is there any language that can compete with perl in documentation? For some big modules, they even have special tutorial for you.
- tomasien 14y agoLet's say I don't know any server side language. Why should I learn Perl when Php is ALWAYS loaded and configured on every single server, was literally built for MySQL, while Python and Ruby and hotter (and more intuitive) with better MVC frameworks and libraries behind them, why? I'm not being facetious, I really want to know the reason I would do that. I buy the "Perl is better than C" argument 100%, but how is it better than Php, Ruby, or Python ESPECIALLY for someone picking their first server side language?
- mst 14y agoYou might not be being facetious, but you have clearly already decided that python/ruby have better libraries for whatever definition of "better" you're using. Personally, I'd avoid PHP as a first language because it's, well, kind of an abomination of a language even if the community have done some awesome things with it. As for perl/python/ruby? I usually suggest to people that they should write at least some code in each of the three; you end up as a better programmer as a result and besides, it's fun :)
- tomasien 14y agoI have not at all made a decision, I'm seriously soliciting feedback while explaining the biases I have coming in.
- mst 14y agoThen my suggestion to experiment with all three stands. Things you might want to look at for Perl - Moose/Moo for OO, Mojolicious/Dancer/Catalyst for web frameworks, DBIx::Class/Rose::DB::Object for ORMs, App::cpanminus/App::perlbrew/local::lib for managing installations of Perl and modules, and http://metacpan.org/ http://metacpan.org/ for looking up libraries for everything else. Also, the free book "Modern Perl" to get a feel for the language in 2013 as opposed to the hundreds of horribly outdated .com-bubble era tutorials you'll find on google. You'd be best with somebody else's advice for python or ruby, most likely, so I shan't opine there.
- zoul 14y ago
- jamespitts 14y agoHere's some of the discussion about the "island hop" from perl5 to perl7: http://blogs.perl.org/users/ovid/2013/02/perl-7.html http://blogs.perl.org/users/ovid/2013/02/perl-7.html
- fingerprinter 14y agoMy first language was C. The first language I loved was Perl. Perl will always hold a special place in my heart and I will look back on it as the "good ole days", but I don't know if I'll ever program in it again.
- kbenson 14y agoI'm curious as to why? Do you think it's deficient compared to what you currently use to fulfill that niche, or do you have other reasons?
- zoul 14y agoFor me, I don’t feel comfortable working without a static type system. I love Perl (and initially mistyped that as “live” Perl, which is nice), but nothing beats the feeling of the compiler going through the code for me. Granted, I still have the test suite, but that’s much more work than just getting the types right.
- kbenson 14y agoI'll agree with that. There's numerous times I've wanted to be able to assume (correctly) that a scalar holds a certain value type. At the same time, it sometimes feels constraining to design within that limitation. I think optional typing is the future here, and Perl 6 has it, as well as a few other modern languages.
- nemothekid 14y agoI've never really had a problem with perl until I had to mange fairly large projects - including things like web frameworks or distributed modules. Perl works best as CPAN glue. CPAN is wizards handbook, and you just have to write maybe 100 lines of code to glue everything together. However when it came time to write a large project on a team of even 2 or 3 people, managing a Perl project seems to turn into manager a C project. The "Theres more than one way to do it" mantra really sucks for people who learned Perl in differently. 00's university perl doesn't mix well with 90's hacker perl. My huge problem with Perl is readability. Sometimes, across teams, there are just too many ways of doing some simple thing and one is plain perl code to one person, is a 5-minute and stare at this line hack to another. Am I wrong? My experience is limited, but I would love to know why I haven't been able to get my Perl projects to "sync".
- kbenson 14y agoI'm wondering, did you utilize helpers such as Perl::Tidy and Perl::Critic? I imagine they may be able to help, possibly by standardizing the style enough (with Perl::Critic, which is configurable) that the problem is reduced to something you get with peer languages. To be clear, I don't know whether this is true, but I'm extremely interested in people results.
- qntm 14y agoThe "There's more than one way to do it" sucks for trying to teach Perl too. You can't just teach one way; you need to teach every way, so that students can understand what they're seeing in the wild. This makes it take three times as long to explain the basics of Perl, simply because there are, essentially, three times as many basics.
- chromatic 14y agoMy experience is different. I spent a lot of time in the beginning teaching the three or four important theoretical parts of Perl (lists, context, monomorphic operators, and coercion) and then explained how to use the documentation. That leaves only a couple of places where the difference between approaches is substantial enough that it needs explaining. Dereferencing syntax is one such wart. Choosing an object system used to be another place where opinions varied enough that it mattered, but now teaching Moose by default is obviously enough correct that it's a boring choice.
- zoul 14y agoNote that the suggestion to release the next version of Perl 5 as Perl 7 is a part of a wider discussion the Perl folks are having about branding: http://shadow.cat/blog/matt-s-trout/names-and-numbers/ http://shadow.cat/blog/matt-s-trout/names-and-numbers/ Plus many more posts by Matt, chromatic, David Golden, and Ovid.