Live data from Hacker News

Perl is 25 years old today

perldoc.perl.org

61–70 of 131 posts

Re: Perl is 25 years old today

#61
post #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.

Counting the years from the time the languages entered the spotlight might be a better metric of age. Even though Python is only four years younger than Perl, it feels so much newer because it spent more time 'in the oven'.

I'd peg Python's coming of age around 2001, although I could be wrong about that. Ruby is even fresher out of the oven, not really reaching the limelight until 2006.

Re: Perl is 25 years old today

#62
post #25

Earlier quoted context omitted.

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?

Thanks. My approach is actually pretty minimal. Just a read-print-loop (-n, -p), a few local variables (equivalents of $_, $~, $. etc) and a shorthand import syntax to take away some of the verbosity. There are other projects, such as pyp[1], that are more ambitious, but put you through a learning process.

By all means, everybody should use what they are comfortable with. Ruby and Perl allow you to write extremely terse and awesome one-liners, the likes of which will never be possible in Python. But if the first solution that pops into your head is a Python one, why not use that?

[1] http://code.google.com/p/pyp/

Re: Perl is 25 years old today

#63
post #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.

Made me look up the timeline of when languages were released: http://en.wikipedia.org/wiki/Timeline_of_programming_languag...

Pascal is 42, C is 40. Lots of fun info on that page.

Re: Perl is 25 years old today

#64
post #41
post #29

Earlier quoted context omitted.

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

Wow, that's cool! Thanks for sharing that. Does Perl also have something similar to Python's "import pdb; pdb.set_trace()", which lets you drop into a debugger at a predefined location in your code? I've been finding that really helpful.

Knowing Perl, it probably is possible, and I just never learned about it.

Re: Perl is 25 years old today

#65
post #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.

Common Lisp is 28, which a year younger than C++ and not much older than Perl. So not a dinosaur language as some people think.

Lisp was invented 54 years ago. The Common Lisp standard is the capstone on an unusually long and fractured history of development. Fortunately many of those good ideas have trickled down over the decades, making mainstream languages steadily less terrible, and competing proprietary implementations are no longer commonplace.

Re: Perl is 25 years old today

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

A recent amusing counter-example:

http://stackoverflow.com/questions/4185665/guava-equivalent-...

Re: Perl is 25 years old today

#67
post #51

Earlier quoted context omitted.

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.

You claim to really not be aware that table is for a quite different language -- Perl 6? That point has been made many, many times. Edit: To the cultural question, there might be a point. I might add that I don't know Perl 6, but it seems like an insane amount of cool/fun toys (macro language like lisp with an Algol-like syntax?! If they can pull that off it is incredible.) That might say something about me and Perl…

I also think Perl 6 has some really cool and innovative ideas. Far from using it to smear Perl, I think it is more interesting than previous versions.

But you are in denial if you think that this chart isn't a reasonably representative cultural artifact of the Perl community and the Perl aesthetic. Perl 5 is not exactly poor in operators, and it is the same core community which produced both.

I don't think that Perl is bad. I am saying that Perl is very strongly what it is. And while some people won't like that aesthetic, I don't see why anyone should apologize for it.

Re: Perl is 25 years old today

#68
post #64
post #41

Earlier quoted context omitted.

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

Wow, that's cool! Thanks for sharing that. Does Perl also have something similar to Python's "import pdb; pdb.set_trace()", which lets you drop into a debugger at a predefined location in your code? I've been finding that really helpful. Knowing Perl, it probably is possible, and I just never learned about it.

... drop into a debugger at a predefined location in your code?

Add the line where you want the execution to stop:

    $DB::single = 1;
Then, run your program as:

    $ PERLDB_OPTS=NonStop perl -d program.pl
See: http://perldoc.perl.org/perldebug.html

Re: Perl is 25 years old today

#70
I believe most mainstream languages used for web development are quite old now. And today it is matter of personal taste to choose one over another one unless you are constrained by coding standards.

To me Perl is awesome :) Too bad I do PHP for a living, but I still enjoy it when doing something for myself. Like last time I learned about web framework Mojolicious ( http://mojocasts.com/ ) and built http://gotldr.com and http://hntldr.com leveraging Mojolicious and Redis - https://github.com/hippich/perl-tldrer . It took me few evenings, but I really enjoyed tinkering it.

Post reply on HN