Live data from Hacker News

A Perl toolchain for building micro-services at scale

engineering.semantics3.com

51–57 of 57 posts

Re: A Perl toolchain for building micro-services at scale

#51

Earlier quoted context omitted.

In much the same way that PHP has a reputation for being "bad", Perl has a reputation (ill-deservedly!) for being line-noise, or obsolete. I've continued to be productive by writing applications, microservices, and websites in Perl. Though these days it seems few people care to hear about the details as it isn't the flavour of the day. Mojolicious is cool, although I've usually stuck with Dancer instead (which is its…

I think the fastest way to convince yourself that Perl is obsolete is to try to hire for good Perl programmers. It's a fine language if you treat it well, but it's going the way of COBOL.

> I think the fastest way to convince yourself that Perl is obsolete is to try to hire for good Perl programmers.

Hire for good programmers, and they'll be good Perl programmers if they need to be.

Re: A Perl toolchain for building micro-services at scale

#53

Earlier quoted context omitted.

Can you expand on what you've run into with references in the Perl debugger?

print $ref REFERENCE$HASH Or something like that, it's been a while. I'm spoiled by the Javascript debuggers built into Chrome & Firefox, although I'm not sure about the Node.js debugger. Is there a shell (either graphical, or "Borland Turbo Debugger for DOS" style) for perl -d ? (even the "view locals" command in gdb for C presents data more quickly than the built in perl debugger)

Try 'x' instead of 'print':

ddiederi@lomin:~/t$ cat p1 #!/usr/bin/perl

my $a = 'hi'; $a = { hi => 'there' }; print "Done\n"; ddiederi@lomin:~/t$ perl -d p1

Loading DB routines from perl5db.pl version 1.49 Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(p1:3): my $a = 'hi';

  DB n
main::(p1:4): $a = { hi => 'there' };

  DB x $a
0 'hi'

  DB n
main::(p1:5): print "Done\n";

  DB x $a
0 HASH(0x29e6eb8)

   'hi' => 'there'

  DB n
Done

Debugged program terminated. Use q to quit or R to restart,

use o inhibit_exit to avoid stopping after program

termination,

h q, h R or h o to get additional info.

  DB exit
ddiederi@lomin:~/t$

Re: A Perl toolchain for building micro-services at scale

#54
post #34
post #23

Nice post! At my most recent job, we used perl daily for processing scripts and many other functions. After initially having similar thoughts about it being "obsolete" and a "dinosaur", I quickly realized how resilient and flexible the language is (I know the flexibility can come with some criticism). We investigated a lot of other options (go & python specifically) when building new projects, but found that perl was…

"After initially having similar thoughts about it being "obsolete" and a "dinosaur", I quickly realized how resilient and flexible the language is (I know the flexibility can come with some criticism)." Not obsolete - can affirm. All of the Oh By[1] back end is written in perl, circa 2016. We use apache + mod_perl and are very happy with this environment ... just like we were in 1998. [1] https://0x.co

Obsolete was the wrong word - Perl definitely still works (very well for certain things). Cool to see new applications being developed in it still!

Re: A Perl toolchain for building micro-services at scale

#55
post #50

Earlier quoted context omitted.

I think the fastest way to convince yourself that Perl is obsolete is to try to hire for good Perl programmers. It's a fine language if you treat it well, but it's going the way of COBOL.

I'm not really sure why you can't hire a Ruby or Python programmer, if they are open minded about it, and train them. There's not that much actually different, compared to some other languages. In fact, I think the only major things you would need to teach them that they couldn't easily find from the docs would be about how context works, and references (references to a lesser degree, just make sure they get how they…

> I'm not really sure why you can't hire a Ruby or Python programmer

Yeah, sure, hire a Ruby/Python programmer ... and try to trick them about the language they're going to be using by being vague about it in the job posting and initial conversations until they got really interested?

Been there, done that. It was a stopgap measure that sort of worked and it wasn't that much fun.

Re: A Perl toolchain for building micro-services at scale

#56
post #50

Earlier quoted context omitted.

I'm not really sure why you can't hire a Ruby or Python programmer, if they are open minded about it, and train them. There's not that much actually different, compared to some other languages. In fact, I think the only major things you would need to teach them that they couldn't easily find from the docs would be about how context works, and references (references to a lesser degree, just make sure they get how they…

> I'm not really sure why you can't hire a Ruby or Python programmer Yeah, sure, hire a Ruby/Python programmer ... and try to trick them about the language they're going to be using by being vague about it in the job posting and initial conversations until they got really interested? Been there, done that. It was a stopgap measure that sort of worked and it wasn't that much fun.

No, just advertise appropriately. Some people don't apply because they don't want to use the language, others don't apply because they expect you to require skill in that specific language. Something along the lines of "Knowledge of Perl or equivalent dynamic language strongly suggested."

Re: A Perl toolchain for building micro-services at scale

#57

Earlier quoted context omitted.

Why would this surprise you? Perl continues to improve and is battle tested. More Perl is written today than ever before (that said, much more software in general is written than ever before, and there is no doubt Perl's share has declined). Particularly if you're doing lots of text processing Perl remains a great choice.

Two great talks when it comes to the questionable greatness of Perl: https://media.ccc.de/v/31c3_-_6243_-_en_-_saal_1_-_201412292... https://media.ccc.de/v/32c3-7130-the_perl_jam_2

Better rebuttals to those talks: https://gist.github.com/preaction/978ce941f05769b064f4
Post reply on HN