Live data from Hacker News

Half My Life with Perl

perladvent.org

81–90 of 139 posts

Re: Half My Life with Perl

#81

I’m 42, and learned Perl at 14. I’ve worked with some very large Perl systems, and love it. Yes, there’s bad Perl, but I’ve never really understood the hate for it. The testing ecosystem and culture and documentation culture are first rate. The tooling like Mojolicious, DBIx::Class, etc are super well done. These days I write TypeScript full-time, which I like, and there’s a lot I miss about Perl, while absolutely lo…

I can't cope with python because of the lack of 'use strict' - I continue to be sad that 'explicit is better than implicit' is supposed to be a rule of python except apparently not for variable declarations (also I want block based lexical scoping damnit).

With the addition of 'let' - which to my brain is just "how javascript decided to spell 'my'" - I'm actually really quite enjoying it.

(and the javascript proposal for 'match' is written expecting the proposal for 'do BLOCK' to happen, and 'do BLOCK' is going to make me a _very_ happy mst)

Re: Half My Life with Perl

#82
post #2

Perl is one of those power tools(as recommended in Let Over Lambda, together with vim and Lisp), if you learn it well enough to be good at it, and early enough in your career- You really have a mad productivity work horse. Its really one of those things which save tons of time and effort. A bit like O(1) hack of the productivity world. Perhaps at the core of this just how many what we called regular programming tasks…

You don't need to learn it now anymore.

LLM do Perl well enough, and since 90% of productivity with Perl is earned through small snippets or one-liners (anything bigger is better served with uv init --script), you can just ask the bit you want when you need it. You can even ask the AI to explain the hieroglyphs.

Same with bash, awk or powershell.

Re: Half My Life with Perl

#83

Any good reasons not to build web apps and API backends with Perl these days?

The ecosystem of PHP/Ruby/Python is miles ahead so if you need anything ranging from auth to validation, you will have to do 10 times the work. In fact, even modern JS frameworks with features that have no equivalent in Laravel/RoR/Django see their appeal diminished because those old school frameworks do the basic so well they are productivity cheat code for essentials. It's so easy to find people delighting in beaut…

The Mojolicious framework can do a lot of heavy lifting for you. It's not that hard to do interesting things while writing minimal code: https://www.mojolicious.org/

Re: Half My Life with Perl

#84
post #66

My first experience with Perl was back in 1999. I was fresh out of university working at a dot-com start-up web agency and was asked to take ownership of a project after the developer had left the company. It was pretty straightforward CGI project, with some functions that aligned one-to-one with the database tables. Quite clean code. I made the changes I needed to make easily enough for the first couple of bug fixes…

Python has import hooks, which you can use to do the same madness. I imagine many languages have some form of lazy loading to do roughly the same thing. I suppose it's more the culture of the language than the capabilities driving whether someone actually uses something weird like that.

Re: Half My Life with Perl

#85
post #2

Perl is one of those power tools(as recommended in Let Over Lambda, together with vim and Lisp), if you learn it well enough to be good at it, and early enough in your career- You really have a mad productivity work horse. Its really one of those things which save tons of time and effort. A bit like O(1) hack of the productivity world. Perhaps at the core of this just how many what we called regular programming tasks…

Keep Higher Order Perl for later. It's great but far too much for a 2nd book when getting started. The camel book Programming Perl is still a great start which adheres to the layered aspect. Don't read all of it, just a few parts as needed. I recommend to add Perl Cookbook early, to look things up as you go - it gives idiomatic-ish ideas of how you might do X in Perl. Perl comes with a mountain of very complete and useful man pages: you start with looking things up in the camel book, then transition to looking them up in the man pages.

Re: Half My Life with Perl

#86
post #35

I’m about to turn 40 and have been thinking if I should learn Perl or AWK or go with a “modern” solution for text wrangling on the command line. The general advice here seems to be “learn Perl while young”

Perl was 1 line vs. 100 lines in everything else, in text processing. Now it is 1 line vs. 2-3 lines that are clearer and have stricter semantics. It also has support for running oneliners straight from cli. You probably don’t want to learn it today, as it won’t make that big of a difference.

In my mind Perl was the Rust of the 90s. Perl evangelists were everywhere and wanted to rewrite everything in one line of Perl.

Re: Half My Life with Perl

#87

I’m about to turn 40 and have been thinking if I should learn Perl or AWK or go with a “modern” solution for text wrangling on the command line. The general advice here seems to be “learn Perl while young”

Awk is a tiny language that you could learn in an afternoon. The real trick is remembering how to use Awk when you need it.

Re: Half My Life with Perl

#89

I’m about to turn 40 and have been thinking if I should learn Perl or AWK or go with a “modern” solution for text wrangling on the command line. The general advice here seems to be “learn Perl while young”

The things you need from Awk you can also find in Perl and learn in an afternoon. Whether you need anything else from Perl is an independent question.

Re: Half My Life with Perl

#90
post #15

Earlier quoted context omitted.

Frankly nothing. Ruby is a strict improvement over Perl in almost every way. I cut my teeth on Perl and I still remember it fondly. But there is no reason to learn Perl (5) over Ruby. Maybe Perl 6 is a different story though.

I believe Perl got Unicode to a usable state long before Ruby. Ironic, given Ruby's origins.

[deleted]
Post reply on HN