Live data from Hacker News

Perl is 26 Today

modernperlbooks.com

111–120 of 194 posts

Re: Perl is 26 Today

#111
post #99

Earlier quoted context omitted.

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

Indeed. Perl does have Jifty and Gantry which do have out of the box support for the M part of MVC, but for whatever reasons they never became as popular as Django/Rails.

Re: Perl is 26 Today

#112
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# :)

Are there any new Perl jobs in 2014?

Is there growth in the actual number of Perl full-time positions or is it declining?

Companies obviously need Perl programmers to maintain and enhance existing systems, but we don't see or hear about any new start-ups using Perl as part of their stack.

Fwiw: I don't use Perl anymore but was a fan and love Moose and CPAN.

Re: Perl is 26 Today

#113

So when I went to Google I learned Python. I enjoyed the language and used it a lot, it has a solid support base and pretty much anything you wanted to do you could import a module to do it. When I went to Blekko they were a perl shop, which was a bit intimidating at first, but after programming in it for nearly 4 years now I find I can get from concept to first test faster in Perl than I could in Python. And I hadn'…

Could you explain what features or aspects made it quicker to get up and running with? I love Python and have never worked with a language that I felt let me get features out so quickly. Do you feel you've sacrificed readability as well? I've heard Perl is notorious for having a million ways to do everything, making reading it hard.

Re: Perl is 26 Today

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

I used to use Perl. Then I followed Yegge's advice of "I will only use Perl if there's no other option, and there's always another option." https://sites.google.com/site/steveyegge2/ancient-languages-... I'm not trying to dump on perl. I love C and C++ and those get dumped on all the time and I hate it. But anything I could do in Perl I instead do in Ruby. It's not as fast, but if fast matters I'm not supposed to use…

But anything I could do in Perl I instead do in Ruby. It's not as fast, but if fast matters I'm not supposed to use a scripting language.

Perl can actually be very fast; it depends on what you're doing and how you write it. A lot of developers don't realize that Perl isn't really a scripting language; it's a compiled language that has a compiler that's so fast it can be run every time you run the program. The compiler produces bytecode, and the bytecode runs on a virtual machine, just like Java and C#.

The key to writing fast Perl code is to use programming constructs that compile down to single bytecode operations, because those operations are implemented in the VM using well-tuned C code. For example, using grep and map with array variables is much faster than using a for loop and explicitly indexing through the array. With the former, the enumeration is handled in C code, while in the latter it's handled in Perl code.

Note: that's probably not 100% accurate, but it's the general idea. You can actually have perl output the bytecode it generates so you can take a look at it, and figure out places where changing how your code is structured will produce more efficient bytecode.

Re: Perl is 26 Today

#115
post #35

Earlier quoted context omitted.

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

Are there any new Perl jobs in 2014? Is there growth in the actual number of Perl full-time positions or is it declining? Companies obviously need Perl programmers to maintain and enhance existing systems, but we don't see or hear about any new start-ups using Perl as part of their stack. Fwiw: I don't use Perl anymore but was a fan and love Moose and CPAN.

I started in a new Perl position with my current employer in 2012. We just filled another new (mostly) Perl position a few months ago. I can't speak to the total numbers of positions available, but there is work out there for sure and it's not by any stretch strictly maintenance programming.

Re: Perl is 26 Today

#116
My favorite perl story: Had been working on parsing through huge flat text files with it, had over 40 lines going and just could not get it to work correctly. I took a step back, rethought what I was trying to do, and wrote a one liner awk that just worked.

Side note: I have noticed that in bioinformatics, perl is largely being replaced with python in tool usage.

Re: Perl is 26 Today

#117
post #113

So when I went to Google I learned Python. I enjoyed the language and used it a lot, it has a solid support base and pretty much anything you wanted to do you could import a module to do it. When I went to Blekko they were a perl shop, which was a bit intimidating at first, but after programming in it for nearly 4 years now I find I can get from concept to first test faster in Perl than I could in Python. And I hadn'…

Could you explain what features or aspects made it quicker to get up and running with? I love Python and have never worked with a language that I felt let me get features out so quickly. Do you feel you've sacrificed readability as well? I've heard Perl is notorious for having a million ways to do everything, making reading it hard.

I'm not the OP, but I've had a similar experience and agree with him about Perl.

For me...

* perl is a bit more intuitive, even though I've done about as much python as perl at this point.

* It's the best language for dealing with regular expressions in my view. You don't have to create a regex object and muck about with all of that.

* You can create lambdas/closures with fewer restrictions than Python (this is a big one)

* CPAN is pretty good. Python comes with a lot of libraries, so this isn't as much of an edge as it used to be.

* It is more widely available on other servers, even older ones, which is important for me because I'll sometimes have to do work on a machine without Python already installed. I can work with older perl and I've never been on a machine without it installed.

* The whitespace issue really is annoying to me. With braces you can move stuff in and out of conditionals, etc, easier than with Python, even with editor support.

As for readability, I try to write reasonably well, even if in a hurry. I know the language and its syntax. I understand the purpose and meaning of the sigils, so it doesn't look like noise to me anymore than reasonably written python. In Python, for instance, I've seen list comprehensions that are pretty frustrating to puzzle through. Perl with strict and warnings and written without a specific aim to be clever isn't hard to read.

Re: Perl is 26 Today

#118
post #35

Earlier quoted context omitted.

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

Are there any new Perl jobs in 2014? Is there growth in the actual number of Perl full-time positions or is it declining? Companies obviously need Perl programmers to maintain and enhance existing systems, but we don't see or hear about any new start-ups using Perl as part of their stack. Fwiw: I don't use Perl anymore but was a fan and love Moose and CPAN.

Are there any new Perl jobs in 2014?

Yes!

we don't see or hear about any new start-ups using Perl

The world is a lot bigger than just startups, but see:

http://www.builtinperl.com/

Re: Perl is 26 Today

#119
I love Perl, it's the only language (afaik) that let you do the same thing in a hundred different ways, and this provides infinite fun when you program since you can discover or think something new every single time. And that's why we have perl poetry, perl golf, and fantastic obfuscated codes. Happy 26!

   no less can I say;
   require strict, close attention
   while you ... write haiku

Re: Perl is 26 Today

#120
post #92

Earlier quoted context omitted.

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

- Why not just write ',' instead of '=>'? Is there an actual reason for this other syntax to exist and to be used?

- Why does the array have to be explicitly dereferenced? Isn't it obvious from context?

- Why count on the mapping from boolean to int being false = 0, true = 1? Pretty much everything other language that has such a mapping does false = 0, true != 0.

In one line, a vivid reminder of why I find perl so awful.

Post reply on HN