Live data from Hacker News

Perl is 25 years old today

perldoc.perl.org

41–50 of 131 posts

Re: Perl is 25 years old today

#41
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.

> Attach to any running process and analyze away.

Interesting. It never occurred to me to want this. What sort of use case is this for? It seems Perl is capable of something similar:

    use Enbugger::OnError 'USR1';
Then 'kill -USR1 pid' and your process will jump into the debugger.

learn more here: https://metacpan.org/module/JJORE/Enbugger-2.013/lib/Enbugge...

Re: Perl is 25 years old today

#42
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?)

I am puzzled why your immediate response is to blame Python.

Re: Perl is 25 years old today

#43

I'll raise the glass: here's to Perl, for being the first language I could actually get shit done in. Unmaintainable? Who cared. Got shit done. Too many ways to do things? Who cared. Got shit done. I have this totally false feeling that BACK THEN* we wrote IRC bots and we were happy. And `perl -e '"A"x800'` was the destroyer of worlds. * - shit, I just realized I'm young.

I like that Perl tends to do what you wanted it to do, rather than what you told it to do. Bugs in other languages are often because of vice-versa.

Re: Perl is 25 years old today

#44
Perl is 25. Python is 21. Lua is 19. Ruby is 17.

Interesting how I consider Perl an 'old' language, and the others new languages. I guess it says more about how revolutionary Perl was at the time and how quickly it became widespread. The only other language I know of that went from 0 to everywhere in under 5 years was Javascript.

Re: Perl is 25 years old today

#45
post #27
post #22

Earlier quoted context omitted.

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…

I respect Perl and people who use it, but this is a telling cultural artifact: http://www.ozonehouse.com/mark/periodic/

I am not posting this to bag on Perl, but just to show its fingerprint. If you find that periodic table to be funny or cool then you are a lot more likely to be happy with Perl than if it makes you shudder.

Re: Perl is 25 years old today

#46
post #37
post #27

Earlier quoted context omitted.

>> 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…

"That is a natural result of a powerful tool." I never claimed that Perl wasn't powerful ... in fact I think I stated the opposite. Where I work, Perl is the lingua franca of the ops team and they certainly get things done. But the newbies don't shoot holes in their foot ... they blow it clear off and often don't survive. My comment above may be perceived as a bit trollish but I was also thinking about "thanking Perl…

Newbies writing code for things like (say) fiddling with directory trees should absolutely be writing unit tests, using VMs, etc. so that the worst outcome is that they waste time. Which isn't necessary if they devote some attention to properly learning the language.

Re: Perl is 25 years old today

#47
post #25

Earlier quoted context omitted.

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

This is an interesting idea, but if you need an extremely terse DSL which doesn't look anything like Python and has to be learned anew, why not just use Perl directly? Maybe for environments where you can't install Perl?

Re: Perl is 25 years old today

#49
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 modern perl5 production platform is mostly made up of modules built and maintained to intentionally make people -not- go 'wtf?' all the time.

Modern Perl and other recent books push people towards developing good habits.

The current generation of experts tend to either put our tricky in very well encapsulated CPAN modules, or comment the hell out of it, or both ... or if at all possible, stick it into a paste site somewhere for other people to go "whee!" at and do something sensible in the main codebase.

Your complaints about perl were absolutely valid a decade ago ... these days there's still some truth to them, but we've grown up a lot since then :)

Re: Perl is 25 years old today

#50
post #37
post #27

Earlier quoted context omitted.

>> 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…

"That is a natural result of a powerful tool." I never claimed that Perl wasn't powerful ... in fact I think I stated the opposite. Where I work, Perl is the lingua franca of the ops team and they certainly get things done. But the newbies don't shoot holes in their foot ... they blow it clear off and often don't survive. My comment above may be perceived as a bit trollish but I was also thinking about "thanking Perl…

>>My comment above may be perceived as a bit trollish

As I quoted, you also posted another obvious troll comment. So the shape of your ears and body odour are quite obvious through the screen...

>>My experience may be "anecdotal" to you

I just note the lack of modern references for your "non"-anecdotal claim.

I can give references to modern practices -- it is enough with the Best Practices book (it is seven years old...)

[As mst noted, the "Modern Perl" book is a very good reference.]

(Stopped reading after that.)

Post reply on HN