18 ms·
Perl is 26 Today
- Surio 13y agoI am a Perl user and I do like it very much (warts and all). This article reminded me of another self-deprecatory Perl article: http://ebb.org/bkuhn/blog/2012/12/18/perl-cobol.html http://ebb.org/bkuhn/blog/2012/12/18/perl-cobol.html And yes, as the article says, Here's to 26 more! :-)
- lmm 13y agoThat's an interesting article but seems to be missing the actual why of it. He still likes perl because... culture? Some people are still writing software in perl or cobol, sure - and some of that is good software that solves real problems. But the reason we think of the average programmer in one of these obsolete languages as "some sort of second-class technology citizen" is that, well, they are. Compared to the rest of us they spend more time working around language deficiencies, inadequate tooling and all the rest of it, and less time making interesting things. Right now I'm a huge Scala fan. I've had that experience of feeling that I never want to program in any other language again (and every other language I've gone to, even those I used to like, feels clumsy and tedious by comparison). But I hope that in 25 years' time I'll have moved on to something even better. Language design isn't done, and languages are getting better all the time.
- mxey 13y agoI spend less time “working around language deficiencies, inadequate tooling and all the rest of it” in Perl than in, for example, Python.
- lmm 13y agoInteresting. What does Python make harder? In Perl I find myself missing list comprehensions, shared-by-default threading, a well-integrated object system, and a comprehensive, integrated, popular web framework. (Also a standard way of doing event-driven programming, but that's a fair criticism of Python too). And while I'm sure the tooling functionality is there, everything just seems less obvious and standard (e.g. where's the virtualenv equivalent?)
- berntb 13y agoYou really prefer Python threading to anything?! You haven't found any of the major Perl web frameworks? You haven't seen Moose for OO? perlbrew? (Don't get me started on list comprehension, extra stuff to learn because Python lack real maps with real lambdas.) And so on... Do you always have opinions on stuff you have no clue about?! Start with getting the Modern Perl book and read it (free pdf). Ask (/search) on Perlmonks.
- lmm 13y ago> You really prefer Python threading to anything?! Sure. When I just want "run this task in the background, I don't particularly care about throughput but don't block entirely". There's a niche where a proper task queue is too heavy and shared variables are a perfectly adequate communication mechanism. > Don't get me started on list comprehension, extra stuff to learn because Python lack real maps with real lambdas. They're a nicer abstraction for many purposes. Look at their Haskell origin, or Scala for/yield.
- berntb 13y agoFor stuff so trivial that even the GIL is no problem, most any utility should work... (You don't seem to know that Perls are usually not compiled with threading support?) It just isn't interesting to talk about. I argued that list comprehension's use cases are generally solved better with "real" lambdas + map (==> less to learn). To note that most every feature have some use case they are extra good for is not relevant. But again -- why do you discuss subjects you obviously don't know? Ask instead.
- kbenson 13y agoYou don't seem to know that Perls are usually not compiled with threading support? I've heard this a few times now, and find it interesting. I guess people that compile their own do it without threading support, but I would guess the majority of Perl interpreters out there were bundled from some third party (usually the distro), and those almost always have threading enabled. Also, that's a good thing. I've made quite heavy use of threads over the years and find Perl's abstraction of OS threads is actually quite nice to use, as long as you play to their strengths. I.e. pre-create your threads, and thread them like pthreads with easier IPC. If you want "green" threads, use any of the numerous packages that provide it.
- virtualsue 13y agoI run into many Scala fans amongst Java developers. It's the current shiny thing in that technology area. Good old Java (of a similar age to Perl) is usually what they're making their living doing...
- lmm 13y agoSucks to be them; I'm fortunate enough to do Scala professionally. I think "shiny" is unnecessarily dismissive; the productivity and safety advantages are real enough.
- stevan_little 13y agoActually Perl 5 is older then Java by about a year (yes, Perl had OO support before Java even left the lab). But Perl itself is much older then Java, by several years.
- amerika_blog 13y agoThe Perl culture is very much "Wild West" meets the race to space. It's a language for people who are comfortable enough around theory that they don't need syntax to force them to use it. At the same time, it's highly evolutionary -- it supports the fastest, dirtiest, hackinest method of getting to the goal -- and thus has prototyping built in to production. I often write Perl scripts twice. The first is a tape-up job to "git 'er done" and the second is a more elegant and architected approached. This method matches the configuration of most jobs. The client doesn't (fully) know what they want. Last-minute, world-bending exceptions arise. Well-intentioned schemes gang aft agley. With this prototyping-production, I'm able to get something up and working, and can fix it later if the client has foresight. Theory is great. I am the first to defend theory. But if it doesn't correspond to application, there's another word for it: arbitrary. (You may note the difference between two predominant value systems illustrated in that sentence.)
- berntb 13y agoI had similar experience when I started Perl. I was used to take a problem of a certain size, sit down and think for a while. Then code C for maybe 3 to 10 days. When I did a similar problem in Perl, the time to think for a problem of that size was longer than the time to throw a solution at the wall! You could design using code, then refactor/rewrite if it got too bad. Best of all: So much more fun.
- cafard 13y agoI guess I would need to know who "the rest of us" and the "interesting things" are.
- liveoneggs 13y agowow. You're an unbelievable ass and, obviously, immature/inexperienced to boot.
- eCa 13y ago> Language design isn't done, and languages are getting better all the time. That is actually what Perl is doing. With its loose original design it can evolve amazingly, and in ways that couldn't be foreseen.
- AlexanderDhoore 13y agoI'm a relatively new programmer. Been programming for around 4 years. I tried Perl, but felt like the world had moved on, so I never really committed to it. With PHP, Python, Ruby and Javascript... space seems tight for another scripting language. Languages like Lua have something special. What's special about Perl? Edit: I don't want to be hateful. The more the merrier obviously.
- phpnode 13y agoI'm not a perl coder, but the library support does seem pretty fantastic - http://www.cpan.org/ http://www.cpan.org/
- untothebreach 13y agoI would say "pretty fantastic" is an understatement...CPAN is the gold standard of library support
- danellis 13y agoMaybe, for the modules that build and actually have useful documentation. That seemed to me to be depressingly uncommon.
- chromatic 13y agoSee CPAN Testers: http://www.cpantesters.org/ http://www.cpantesters.org/
- SwellJoe 13y agoWhat platform are you on? I can't remember the last time I tried to install a module on a modern Linux distribution and had problems with it. Docs might be weaker than I'd like in some cases, mostly because of not enough examples (the curse of most documentation, IMHO). I don't develop on Windows or Mac, since I work on server-side software, so I might just be blissfully ignorant of a serious problem.
- virtualsue 13y agoMany happy returns of the day. Good old Perl. I'd be happy to use other languages, but I tend to get plenty of offers to continue using this one. :-)
- rikacomet 13y agoI recently turned into a Perl user. Though I must say, documentation about Perl with CGI, and pre-made scripts are a let down. I browsed many O-Reilly books on Perl, CGI is one of the least explanative topics. Some modules have very obscure explanation on CPAN, I don't mean any offense. If not for Perl Monks, my enthusiasm might have been lost midway.
- mxey 13y agoCGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us http://mojolicio.us
- rikacomet 13y agoMight I ask, in a nutshell.. why not CGI?
- untothebreach 13y ago(classic) CGI requires a full application start-up every time a request comes in, and so is very slow. If you have to use CGI, use FCGI (fast cgi) to solve that problem. However, in recent years PSGI has started to become the standand in the community. As far as I know, it is modeled after Python's WSGI. All of the "major" perl web frameworks support it, the three big ones I can think of are Mojolicious[1], Dancer[2], and Catalyst[3]. 1: https://metacpan.org/pod/Mojolicious https://metacpan.org/pod/Mojolicious 2: https://metacpan.org/pod/Dancer https://metacpan.org/pod/Dancer 3: https://metacpan.org/pod/catalyst https://metacpan.org/pod/catalyst
- rikacomet 13y agoI will look into these, thanks! I knew about FCGI, but didn't knew about PSGI. Much appreciated.
- untothebreach 13y agoI probably should have included this link too: the PSGI spec itself (https://metacpan.org/pod/release/MIYAGAWA/PSGI-1.102/PSGI.pod https://metacpan.org/pod/release/MIYAGAWA/PSGI-1.102/PSGI.po...)
- swansw 13y agoFor those wondering about startups using Perl for a large part of their codebase, DuckDuckGo is certainly one. There maybe others too but mostly it's for server side scripting.
- freyfogle 13y agoHere's a new site that features start-ups using perl http://www.builtinperl.com http://www.builtinperl.com
- toadi 13y agoBeen programming perl for over 8 years. Moved on like most of the perl developers to ruby :)
- arjn 13y agoGood old perl. Complicated, funny, odd and very useful. I've been using it regularly for the last 6 years now.
- nly 13y agoThat moment when you realise you're older than Perl, and many of the same adjectives apply to the both to you.
- MichaelMoser123 13y agoYes! Many thanks to Larry Wall for having invented a tool that stands the test of time; I am wishing him well, I read he had health related problems in recent years;
- onion2k 13y agoI used to be a Perl developer a very long time ago. Writing CGI based web apps was fun, and felt much 'tighter' than today's world of PHP, Ruby, JS, etc. That said though, I don't miss it. :) Perhaps my favourite memory of the Perl scene was the announcement of Parrot - an April Fools joke that detailed a project to built a bridge between Perl and Python - that then got built. Brilliant.
- athenot 13y agoTwo main aspects of Perl that have always drawn me time and time again back to it are (1) the get-it-done mentality (there's more than one way to do it, and what really matters is completing the job) and (2) the huge repository of modules that is CPAN. Evaluating other environments along those lines yielded interesting frustrations. In my opinion, the real contender is node.js, thanks to its minimalist approach on many things, and NPM. Note: I'll admit that Node forces you to be as async as possible, but it's for a good cause so I can turn a blind eye on it. :)
- arc_of_descent 13y agoBeen using Perl for almost 10 years now. I've used Perl for almost everything. Web development using CGI::Application, developing my own web framework, console apps (using the ncurses library), POE (Perl Object Environment), Web socket stuff and more. My main job currently involves maintaining and developing a huge code base in Perl including three websites (soon to expand to much more). Perl just works. I thoroughly enjoy coding in it. I've not spent too much time optimizing and testing code though. mod_perl is pretty fast in itself (using Apache). That being said Perl certainly lacks the in-built features which would make meta programming a quick and easy job. Yes, I still have to start using Moose. Perhaps in 2014! Happy 26th Birthday Perl! Without you, I wouldn't have a job!
- csmuk 13y agoI wouldn't have had a job between 2003-2004 which was untangling Perl and rewriting it in C# :)
- arc_of_descent 13y agoThat's cool. :) But I'm sure the correct statement would be untangling messy code written in "your non-favorite language" and rewriting it in "your favorite language or management's choice based on buzzwords". :)
- csmuk 13y agoNeither are my favourite language :) And it was turning a procedural mess into an OO mess.
- yapcguy 13y agoAre there any new Perl jobs in 2014? Is there growth in the actual number of Perl full-time positions or is it declining? Companies obviously need Perl programmers to maintain and enhance existing systems, but we don't see or hear about any new start-ups using Perl as part of their stack. Fwiw: I don't use Perl anymore but was a fan and love Moose and CPAN.
- amerika_blog 13y agoStill the best all-purpose language. Trend languages like Ruby and Haskell are flashes in the pan.
- dons 13y agoNot sure I want to do BlackScholes and MC or solving SAT problems or data structures in perl.. But text processing , hell yeah. perl -pei ftw! The legacy is perl REs
- codygman 13y agoHaskell is a trend language? It is only 3 years younger than perl! https://en.wikipedia.org/wiki/Haskell_(programming_language) https://en.wikipedia.org/wiki/Haskell_(programming_language) "Appeared in 1990; 23 years ago"
- taude 13y agoFavorite Perl story (despite it being the first language I used to program the web back in college). I once had to work on a an ASP (MSFT Active Server Pages circa 2001?) website that was written with ActivePerl [1]. Their technologist chose it, then left the company, and they had a hard time finding someone to work on it. Also, the Programming Perl book was my first O'Reily book that I read/used, checkout out from campus library. Ahh...memories. [1] http://www.activestate.com/activeperl http://www.activestate.com/activeperl
- tootie 13y agoI think that Learning Perl and Programming Perl were the books that put O'Reilly on the map. Lerning Perl was the best intro to programming book of it's generation for sure.
- amerika_blog 13y agoPerl is the ultimate hacker's language. It was for the 90s and 00s what Microsoft BASIC was to the 1980s. However, I think it's also coming back. Most of the "inefficiencies" it got tagged with were relics of the server model at the time, like CGI. Now many are seeing that mastery of a general-purpose language is better than knowledge of specialized methods in a specialized language. The first is flexible; the latter is not.
- untothebreach 13y agoI also think that things like Modern Perl[1] are helping to move the community away from the "line-noise" style of Perl that it was (in)famous for back in the day. 1: http://modernperlbooks.com http://modernperlbooks.com
- amerika_blog 13y agoI agree and think that much of that line-noise style was prompted by the wild west nature of the web at the time, more than Perl itself.
- dotandimet 13y agoSo apparently Perl shares a birthday with Alfred Bester. I'm a bit disappointed that while this submission - history and nostalgia - hung on to the front page, the link to MJD's far meatier post about building a big software system in Perl fell off fast - perhaps it was the sexy title he chose: (Moonpig: a billing system that doesn't suck)[http://blog.plover.com/2013/12/17/ http://blog.plover.com/2013/12/17/]
- majidazimi 13y agohahaha. Perl is 2 years older than me.
- ChuckMcM 13y agoYou don't even want to know how old FORTRAN is :-)
- cliveholloway 13y agoFavorite Perl snippet (from Joseph Hall's EPP book) [$x => $y]->[$x <= $y] Holy shit - just realized I first touched Perl 15 years ago!
- BCM43 13y agoWhat does that do?
- arc_of_descent 13y agoIt prints the greater variable between $x and $y. [$x => $y] creates an array reference. => is just a fancy syntax for a comma. So its actually [$x, $y]. [$x => $y]-> dereferences the array ref. $x <= $y is a boolean expression which return 0 or 1. Accordingly the array index is chosen. Sorry if I'm unable to explain properly! Here's a script. #!/usr/bin/perl use strict; use warnings; my $x = 8; my $y = 9; print [ $x => $y ]->[ $x <= $y ];
- geophile 13y ago- Why not just write ',' instead of '=>'? Is there an actual reason for this other syntax to exist and to be used? - Why does the array have to be explicitly dereferenced? Isn't it obvious from context? - Why count on the mapping from boolean to int being false = 0, true = 1? Pretty much everything other language that has such a mapping does false = 0, true != 0. In one line, a vivid reminder of why I find perl so awful.
- chromatic 13y agoWhy count on the mapping from boolean to int being false = 0, true = 1? Pretty much everything other language that has such a mapping does false = 0, true != 0. I can't wrap my mind around this complaint. "Why should you count on Perl treating booleans the way Perl treats booleans? Other languages don't treat booleans the way Perl treats booleans, so obviously you shouldn't rely on Perl treating booleans the way Perl treats booleans." It's almost as if there were some democratic notion of boolean semantics where every language you know gets one vote.
- agentultra 13y agoYay Perl! It was my first exposure to dynamic programming languages (unless you consider BASIC one). I started out on BASIC on an Amiga 500 then C on my first DOS 386 computer (I just wanted to learn to make games). I came across Perl in my final year of high-school when at a co-op placement with a local web development shop. The school taught Pascal and a little-known language called, Turing. Scalars were super-cool by that point. It's amazing to see how far things have come and that Perl continues to get better despite the downward trend in its popularity in recent years. Here's to another 26! :)
- AugieDB 13y agoWas introduced to Perl in a programming languages course in college in 1996/1997. Brought it to my first job, where it gained fame there for being the language that took a 12 hour process and ran it in less than a minute. (They had originally been trying to parse a huge log file with Visual Basic, I believe it was. Perl was made for, well, extraction and reporting...) Been programming in it full time ever since. Thanks, Larry Wall, Randall Schwartz, Brian Foy, Nat Torkington, Tom Christiansen, Damian Conway, etc. etc. Count me in as another person introduced to O'Reilly via "Programming Perl." Was "Perl Best Practices" the first such "Best Practices" book?
- pasbesoin 13y agoAdding a bit of praise for "Programming Perl". (As well as for some of the other books by the fine people you've listed.) "Programming Perl" is not just (very) informative, it is also engagingly, even entertainingly informative. (Proof of this is left as an exercise for the reader... ;-)
- Mithaldu 13y agoSadly, Programming Perl is a bad book for a newbie to read nowadays. http://perl-tutorial.org http://perl-tutorial.org explains why and suggests newer alternatives. :)
- pasbesoin 13y agoWell, perhaps one can treat my comment as good part fondness/nostalgia. Although, I clicked through the pop-up link, to find a fairly brief and limited set of points in a short, single critique of the 4th edition. I don't know... It's been a while, but I still remember "Programming Perl" as providing not just the what but a good dose of "why" and context. A lot of people who "don't like Perl" don't seem to understand that, where it's coming from, both philosophically and systematically (if that is a word and I can use it here). "Programming Perl" is not, in my opinion, a beginner text. Randal took care of that contemporaneously with "Learning Perl". But it was, and -- current shortcomings aside -- perhaps still is, a good post-beginner text. It also remains "timeless" for me, in that it was a good, engaging read. In my opinion, more texts should -- if clever enough to -- dialog with the reader rather than spewing at them. Anyway, I don't mean to put myself in the position of defending Larry et al.'s tomb in this post-post-modern world. I'm hardly qualified to begin such a task. But even if it's not currently the best reference, or even recommended as such, I think it may remain a decent example of how to write one.
- ChuckMcM 13y agoSo when I went to Google I learned Python. I enjoyed the language and used it a lot, it has a solid support base and pretty much anything you wanted to do you could import a module to do it. When I went to Blekko they were a perl shop, which was a bit intimidating at first, but after programming in it for nearly 4 years now I find I can get from concept to first test faster in Perl than I could in Python. And I hadn't realized how much the Python indentation stuff bugged me until I got back into a scripting language with braces. At the end of the day I find I prefer perl for quick things, and Python for multithreaded things.
- d23 13y agoCould you explain what features or aspects made it quicker to get up and running with? I love Python and have never worked with a language that I felt let me get features out so quickly. Do you feel you've sacrificed readability as well? I've heard Perl is notorious for having a million ways to do everything, making reading it hard.
- arghnoname 13y agoI'm not the OP, but I've had a similar experience and agree with him about Perl. For me... * perl is a bit more intuitive, even though I've done about as much python as perl at this point. * It's the best language for dealing with regular expressions in my view. You don't have to create a regex object and muck about with all of that. * You can create lambdas/closures with fewer restrictions than Python (this is a big one) * CPAN is pretty good. Python comes with a lot of libraries, so this isn't as much of an edge as it used to be. * It is more widely available on other servers, even older ones, which is important for me because I'll sometimes have to do work on a machine without Python already installed. I can work with older perl and I've never been on a machine without it installed. * The whitespace issue really is annoying to me. With braces you can move stuff in and out of conditionals, etc, easier than with Python, even with editor support. As for readability, I try to write reasonably well, even if in a hurry. I know the language and its syntax. I understand the purpose and meaning of the sigils, so it doesn't look like noise to me anymore than reasonably written python. In Python, for instance, I've seen list comprehensions that are pretty frustrating to puzzle through. Perl with strict and warnings and written without a specific aim to be clever isn't hard to read.
- arca_vorago 13y agoMy favorite perl story: Had been working on parsing through huge flat text files with it, had over 40 lines going and just could not get it to work correctly. I took a step back, rethought what I was trying to do, and wrote a one liner awk that just worked. Side note: I have noticed that in bioinformatics, perl is largely being replaced with python in tool usage.
- Mithaldu 13y ago> I have noticed that in bioinformatics, perl is largely being replaced with python in tool usage. Which has honestly little to do with the language and more with the fact that the bioinformatics-related Perl books are the worst programming teaching books i have ever seen. (Honestly, a lot of the flak on perl goes back to old and outdated books.)
- arca_vorago 13y agoI would also venture that much of the transitions are feedback loops. So person A makes a new shiny in python for no reasons relating to superiority of language for job x, but because person A is good with it. Well, if what he makes is good, people start using it. Then it breaks, and they have to fix it, or maybe get an idea to fork it. Suddenly, person A's software just encouraged 20 people to hop into python for no real concrete reason. On the bio side, bio-python is just much more intuitive imho, vs bio-perl.
- collyw 13y agoMaybe that explains why some (all actually) of the really bad code have seen has been from Bioinfomaticians. I have seen terrible code in both Perl and Python though.
- pera 13y agoI love Perl, it's the only language (afaik) that let you do the same thing in a hundred different ways, and this provides infinite fun when you program since you can discover or think something new every single time. And that's why we have perl poetry, perl golf, and fantastic obfuscated codes. Happy 26! no less can I say; require strict, close attention while you ... write haiku
- sanskritabelt 13y agoI haven't been a regular perl programmer for coming up on 10 years now (switched to python), but I still miss the easy regexes, and I'll pull it out when I have to do awk/sed like things.
- indubitably 13y agoAnd Perl 6 is 27.