Live data from Hacker News

Perl is 26 Today

modernperlbooks.com

31–40 of 194 posts

Re: Perl is 26 Today

#31
post #23
post #14

Earlier quoted context omitted.

I spend less time “working around language deficiencies, inadequate tooling and all the rest of it” in Perl than in, for example, Python.

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

In Python I miss a switch statement, anonymous functions longer than a single line, and an object system with the power of Moose. I don't think shared-by-default threading is a good idea, and Python's GIL makes it close to pointless.

I also miss a web framework like Django or Rails in Perl. I never liked Catalyst, but have not spent much time with it.

I cannot judge if the tooling is less obvious, but think the tools are better, especially in regard to testing. There is a virtualenv equivalent called local::lib, but I recommend the bundler equivalent called carton ;-)

Re: Perl is 26 Today

#32
post #11
post #7

Earlier quoted context omitted.

I moved from Perl to Python 3 years ago. Its true. Perl feels like a very powerful base language, moving to Python felt like you were taking a bit away (I know in reality you can probably achieve much the same things). Python on the other hand doesn't require you to implement your own basic functions (max, min , trim / strip ) as they are included already. Python stops me from shooting myself in the foot as often, by…

max and min are part of List::Util, a library that comes with Perl

Link for the lazy: https://metacpan.org/pod/List::Util

Or even better, just use List::AllUtils - https://metacpan.org/pod/List::AllUtils

Re: Perl is 26 Today

#33

Earlier quoted context omitted.

Might I ask, in a nutshell.. why not CGI?

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

I will look into these, thanks! I knew about FCGI, but didn't knew about PSGI. Much appreciated.

Re: Perl is 26 Today

#34
post #16

Good old perl. Complicated, funny, odd and very useful. I've been using it regularly for the last 6 years now.

That moment when you realise you're older than Perl, and many of the same adjectives apply to the both to you.

Re: Perl is 26 Today

#35

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

I wouldn't have had a job between 2003-2004 which was untangling Perl and rewriting it in C# :)

Re: Perl is 26 Today

#36

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

I first looked at perl last week and also shared your sentiment. At first when I saw perl I was aghast. The "ugly" $%@ syntax seemed pointless and unreadable. Then I decided to take a look at a non-beginner book, Intermediate Perl http://it-ebooks.info/book/879/ . I was surprised and excited 50 pages in because I realized that Perl had a wealth of tricks , and that that "ugly" $%@ syntax actually had some cool reperc…

Let me point out http://perl-tutorial.org because most books you'll find by simply googling are terribly outdated and teach, plainly put, how to write shitty perl. Modern Perl and Ovid's Beginning Perl (not the older Beginning Perl) are excellent books to learn from.

Also a note about the sigil: Get a decent syntax highlighting set up for your editor and you'll quickly realize how nice it is to have functions, variables and different variable types colored differently.

Re: Perl is 26 Today

#37

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

Old Unix sys admins made Perl special. Before Perl, they had to chain a bunch of sed, awk, grep, etc commands together or try to solve their problem in C. Both approaches were doable, but neither were ideal for the task. Perl was perfect for Unix scripting and sys admin tasks. From there, the rest is history.

Re: Perl is 26 Today

#38

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

If you're looking for learning and reading material on Perl, http://perl-tutorials.org is the only way to go, exactly because Perl is so old.

Re: Perl is 26 Today

#39
post #35

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

I wouldn't have had a job between 2003-2004 which was untangling Perl and rewriting it in C# :)

That'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". :)
Post reply on HN