Live data from Hacker News

Perl is 26 Today

modernperlbooks.com

91–100 of 194 posts

Re: Perl is 26 Today

#91
post #13

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.

CGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us

There is a learning curve, but I am fond of mod_perl because you can do almost anything with it. It's also very fast.

http://perl.apache.org/docs/index.html

You can wrap your existing CGI scripts in it using

http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html

so the transition can be rather smooth

Re: Perl is 26 Today

#93

Earlier quoted context omitted.

Stevan Little, the author of Moose, is working on updating the Perl5 core to have a Moose-inspired Meta Object Protocol, called p5-mop. Video: https://www.youtube.com/watch?v=4YZNwO-uCVg Github: https://github.com/stevan/p5-mop-redux/ I'm personally interested to see how this develops. As to my own Perl story, I used it exclusively in my first (non-student) programming job, back in the summer of 2000. I built an e-co…

Ha ha, your nickname says it all. Back when I started programming in 2000 all my yahoo, MSN and skype (when it was released) accounts either had the word linux or perl in it. Then unfortunately I had to become more professional and started using my real name. :)

Wait... your mother named you arc_of_descent? ;-)

Re: Perl is 26 Today

#94
Yay 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! :)

Re: Perl is 26 Today

#95
post #92

Favorite Perl snippet (from Joseph Hall's EPP book) [$x => $y]->[$x Holy shit - just realized I first touched Perl 15 years ago!

What does that do?

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

Re: Perl is 26 Today

#96
post #92

Favorite Perl snippet (from Joseph Hall's EPP book) [$x => $y]->[$x Holy shit - just realized I first touched Perl 15 years ago!

What does that do?

It’s a highly cryptic way to find the maximum of the two. The first part creates an array (=> is just a syntactic sugar for a comma here) and the second part takes the 0th or 1st item from this array, <= being just regular numeric comparison.

Re: Perl is 26 Today

#97
Was 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?

Re: Perl is 26 Today

#98
post #75

Earlier quoted context omitted.

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

There is Dancer2 as well https://metacpan.org/pod/Dancer2

Dancer2 is also great for creating a web service, of sorts. Need something to send out JSON chunks with a URL front-end? Very simple to set up and get going. I've been translating some code I wrote for web pages into little engines for Dancer2 to run for other groups inside the company to extract information out for their own applications. It's perfect for that.

Re: Perl is 26 Today

#99
post #31

Earlier quoted context omitted.

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…

If you like Django/Rails I'd suggest you check out Perl's Mojolicious - very modern Perl web framework. There's also Dancer - both seem much easier to use & set up than Catalyst

Dancer or Mojolicious are more like Sinatra or Flask, not like Rails or Django

Re: Perl is 26 Today

#100
post #9

Earlier quoted context omitted.

That'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 res…

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

Actually 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.
Post reply on HN