Live data from Hacker News

Perl is 25 years old today

perldoc.perl.org

21–30 of 131 posts

Re: Perl is 25 years old today

#21
I've found over the past decade or so that when I write a "perl" program I'm really writing about five lines of glue code around multiple CPAN packages. Well maybe more than 5 lines for control flow, some business-logic error handling, etc.

When I write in another language I spend a long time looking for a library like the ten I'd find in CPAN, sometimes I find one but often enough not, then a long time complaining about how if I used perl I'd have access to the perfect CPAN module and therefore already be done with the whole project, then basically reimplement the CPAN module in the smaller inferior language, then finally write glue logic to link stuff together.

I never fail to be amazed when I see pages and pages of an inadequate homemade xml parser written in an inferior language or maybe a blizzard of regex, and then hearing bragging about how in Perl the elegant alternative language code would closely resemble line noise. No, in Perl, those pages and pages of buggy code would instead closely resemble one line: "use XML::Simple;" Repeat a zillion times over.

My "perl" programs / systems actually shrink in length over time rather than expanding, which is unusual in smaller languages.

Re: Perl is 25 years old today

#22
post #18
post #17

What can I say, it's time to die.

A karma 3 account. Where are the Perl-hating trolls coming from on HN? (I thought Guido said that it was time to stop trolling, so it isn't Python people now?)

Hate is an emotional response that humans have ... how can you tell if the comment was trolling or simply a visceral response?

I don't hate Perl (I first learned CGI programming with it), but I do think there are better ways to write maintainable, enterprise scale software. There are two main problems with Perl (as I see it): 1) The language is so permissive that it allows newbs to write bad code but still obtain results. Habits, both good and bad are learned! 2) Perl experts seem to delight in writing code that's "tricky" (for lack of a better word). It's like a contest to see who can wring the most out of one 80-character line of code and it leads to mid-to-low functioning Perl programmers being confused.

Re: Perl is 25 years old today

#23

Here's Perl 1.0, published by Larry on comp.unix.sources 25 years ago ("Revision 1.0 87/12/18 13:07:40 root"). https://groups.google.com/group/comp.sources.unix/browse_frm... Perl Kit, Version 1.0 Copyright (c) 1987, Larry Wall You may copy the perl kit in whole or in part as long as you don't try to make money off it, or pretend that you wrote it.

Slightly self-promotion, but you can get a variety of old perl sources at http://www.etla.org/retroperl/ (collected by someone non-me, I can't remember who though) I had thought someone had done a perl 1 release that built on modern systems, but on a quick hunt I can't find it.

The perl source repository quite many historic releases also, and the first few commit messages also contain the accompanying release notes.

See for example https://github.com/mirrors/perl/commit/8d063cd8450e59ea1c611... for the perl 1.0 annoucement (click on the [...] link to get the full commit message).

Re: Perl is 25 years old today

#25

Before i switched to Python as my general purpose language, i used to be a bit of a Perl fanatic. I've still to come across a language that lets you get your ideas down as quickly. It's full of fantastic time savers, e.g. the for( ) construct and the format output functionality cover a bunch of common use cases in minimal keystrokes (let me pipe in some data, analyse it, then spit it out in a clean report). It can hu…

I'm in a similar boat. I've largely switched to Python as my scripting language (except for one-liners), but I'll still defend Perl against those who dismiss it out of hand. After using it an Amazon, I've seen firsthand how productive one can be with the language; and, if you're careful (following, e.g., the guidelines in "Perl Best Practices" by Conway) it's very possible to write maintainable code as well.

I hear you on the one-liners issue. Python is unhelpful when it gets to that - there are no -n, -p, -l switches or special variables like there are in Perl and Ruby.

It's a shame really, since all the building blocks needed to implement a useful mode for writing one-liners are there. In fact, I have a work in progress module that tries to address this issue: https://github.com/gvalkov/python-oneliner

Re: Perl is 25 years old today

#26

Before i switched to Python as my general purpose language, i used to be a bit of a Perl fanatic. I've still to come across a language that lets you get your ideas down as quickly. It's full of fantastic time savers, e.g. the for( ) construct and the format output functionality cover a bunch of common use cases in minimal keystrokes (let me pipe in some data, analyse it, then spit it out in a clean report). It can hu…

I'm actually the reverse. I went to perl from python. I usually use it for system scripting and what I like about it is that it replaces bash nicely without removing the power of specialized syntax. I find it much easier to type open("program -args |") than to construct a subprocess object in python and manually extract lines from its output. On the other hand, python is pretty handy for larger programs, more than a few screens of dense perl syntax starts getting hard on the eyes.

Re: Perl is 25 years old today

#27
post #22
post #18

Earlier quoted context omitted.

A karma 3 account. Where are the Perl-hating trolls coming from on HN? (I thought Guido said that it was time to stop trolling, so it isn't Python people now?)

Hate is an emotional response that humans have ... how can you tell if the comment was trolling or simply a visceral response? I don't hate Perl (I first learned CGI programming with it), but I do think there are better ways to write maintainable, enterprise scale software. There are two main problems with Perl (as I see it): 1) The language is so permissive that it allows newbs to write bad code but still obtain res…

>> The language is so permissive that it allows newbs to write bad code but still obtain results

I can't see any relevance for a professional choice if newbies can shoot bigger holes in their foot with a certain tool.

That is a natural result of a powerful tool.

>> Perl experts seem to delight

Anecdotal. Ten years old description of half humorous use (and exercises). Also very different from best practices even then -- and especially different from how many/most work today.

Let me also note: If Perl wasn't better in many ways, you trolls would make serious arguments instead of "experts seem to delight"... [Or as you wrote above "Twenty-five years already? Now it can retire with full benefits."]

But I'll bite a little. Perl has the best OO system of all the scripting languages (Moose). The CPAN is the gold standard for scripting languages (and probably everything else). The testing culture is afaik second to none. The same goes for Unicode support. And so on.

Re: Perl is 25 years old today

#28
Work stuff is mostly Ruby, Python and PHP. Entertainment is Clojure (mmmmm.... Lispy goodness) and Haskell ATM.

But for my own stuff I still reach for Perl. Best testing infrastructure on the planet and that, in combination with CPAN, lets me get shit done.

Re: Perl is 25 years old today

#29
post #21

I've found over the past decade or so that when I write a "perl" program I'm really writing about five lines of glue code around multiple CPAN packages. Well maybe more than 5 lines for control flow, some business-logic error handling, etc. When I write in another language I spend a long time looking for a library like the ten I'd find in CPAN, sometimes I find one but often enough not, then a long time complaining a…

CPAN might be centralized, but Java libraries are far superior. This is not a pissing contest, but a fact. The java runtime makes everything else look amateurish and unprepared. Debugging, profiling, introspection and distribution, all built into the platform. Attach to any running process and analyze away. Perl is good when it works, but when it doesn't, it's cryptic stack traces and `exit -1`, nothing meaningful.

Re: Perl is 25 years old today

#30
post #29
post #21

I've found over the past decade or so that when I write a "perl" program I'm really writing about five lines of glue code around multiple CPAN packages. Well maybe more than 5 lines for control flow, some business-logic error handling, etc. When I write in another language I spend a long time looking for a library like the ten I'd find in CPAN, sometimes I find one but often enough not, then a long time complaining a…

CPAN might be centralized, but Java libraries are far superior. This is not a pissing contest, but a fact. The java runtime makes everything else look amateurish and unprepared. Debugging, profiling, introspection and distribution, all built into the platform. Attach to any running process and analyze away. Perl is good when it works, but when it doesn't, it's cryptic stack traces and `exit -1`, nothing meaningful.

Half the point of CPAN is "installability", it is trivial to d/l and install lots of modules. There is also CPAN Testing which drastically helps portability. Can Java really compete with a Perl module that has a long list of dependencies (50+ is a pain but will work) and some code tying it together...? [That was the example in the GP post.]

With all due respect to the Java runtime (if not its memory use :-( ), it is part of a totally different ecosystem compared to the usual suspects of the scripting languages.

(And I'd argue that it is always easier to debug a scripting language than C/C++/Java, except maybe just for long running server processes.)

Post reply on HN