Live data from Hacker News

Dwindling CPAN Releases

perlancar.wordpress.com

121–130 of 180 posts

Re: Dwindling CPAN Releases

#121

Earlier quoted context omitted.

Pretty sure if perl5 had only had multi-dimensional arrays it would still rule the world.

Didn't perl always have multi-dimensional arrays? Just the syntax sugar for them is more recent.

Not quite, references were introduced in perl 5, in perl 4 and earlier had a different method that wasn't quite multi-dimensional arrays but tried to behave that way.

    $hash{1,2,3} = 10;
This actually ends up doing the following

    $hash{join($;, 1, 2, 3)} = 10;
It builds up a single key from the list using the special variable $; as a separator to the elements. With perl 5 you gained the ability to make references which allow you to actually make multiple dimensions and to do it on arrays, not just hashes.

    $array[1][2][3] = 10;
That also allows for more complicated data structures and much easier ways to iterate through the structures.

Re: Dwindling CPAN Releases

#122
post #63
post #37

Earlier quoted context omitted.

> 2) Is ubiquitous On which systems do you have Perl readily available but not Python?

Which one? Python 3.5.x or 3.7.x or something else? Version 3 should be version 3. Anything written in 3 ought to work on every Python 3. Not so in the Python world. And that makes it a mess to use (unless you Dockerize every script). Perl 5 is Perl 5 everywhere.

Perl 5.001 is really old (25 years or so), and lots has changed since then. v5.10 introduced a barrel-full of new features; other important features like the "use v5.10" syntax for supporting older scripts didn't land until much later (v5.16).

Where I work, a few of our legacy systems are still dependent on ~v5.10, which can be a real pain when trying to port code back to legacy. I agree that the Python versioning problem is perhaps more prominent, but Perl 5 doesn't really get a free pass here.

Re: Dwindling CPAN Releases

#124
post #93
post #64

Earlier quoted context omitted.

The most obnoxious parameter passing in existence? The magic variables everywhere? Perl code is an unreadable heap of spaghetti, I’d much rather be figuring out unallocated memory bugs in C then read Perl.

But why obnoxious? Do you know how old Perl is? Have you written shell scripts before? My point is, some of choices Larry and others made wouldn't necessarily be made today, but there's a history, a lineage, a reason for all of this. I actually like the magic variables, but as I said in my other comment, you need to learn it first. X language is an unreadable heap of spaghetti if the programmer writes X language in a…

Python only postdates Perl by 3 years.

Re: Dwindling CPAN Releases

#125

Perl is good for a competent coder who doesn't work as a developer, occasionally has a one-off coding task, and wants to incorporate a code excerpt from the web and immediately execute it (and then throw the code away). Languages with whitespace as syntax often fail the "immediately execute" requirement.

That seems like a stronger argument for Excel than for Perl.

Re: Dwindling CPAN Releases

#126
post #115

Earlier quoted context omitted.

"There should be one — and preferably only one — obvious way to do it." That is a python design principle https://en.wikipedia.org/wiki/Zen_of_Python Now there are multiple (sometimes very confusing) ways to import stuff in python, so I am not quite sure if this principle is being followed. https://realpython.com/absolute-vs-relative-python-imports/

"There should be one — and preferably only one — obvious way to do it.” In practice, perl came closer to achieving this than python.

Minus the dozens of cryptic special variables.

Re: Dwindling CPAN Releases

#128

Earlier quoted context omitted.

> 4) Is normal (semicolons, braces etc) What was your first programming language? Because what seems like normal to you mostly depends on you.

> What was your first programming language QBasic, then Visual Basic for real programs. Look across a bunch of common languages - Java, Perl, Python, Javascript, PHP, and of course C/C++/C#/ObjC, braces + semicolons. Even Bash and Go have braces.

Pascal, Forth, Postscript, Lisp.

There is no "normal" syntax. There is more to languages than those inspired by C.

Re: Dwindling CPAN Releases

#129
post #54
post #16

Earlier quoted context omitted.

Perl Nukem Forever?

Wait, what? Perl 6 is real, released and essentially stable. The ecosystem for the language is also evolving at a good pace.

It seems that the most advanced implementation doesn't yet have all the Perl 6 features in the spec..?

Re: Dwindling CPAN Releases

#130
post #124
post #93

Earlier quoted context omitted.

But why obnoxious? Do you know how old Perl is? Have you written shell scripts before? My point is, some of choices Larry and others made wouldn't necessarily be made today, but there's a history, a lineage, a reason for all of this. I actually like the magic variables, but as I said in my other comment, you need to learn it first. X language is an unreadable heap of spaghetti if the programmer writes X language in a…

Python only postdates Perl by 3 years.

Perl5 - which is what people refer to as "perl" - came out in 1994.

Python3, which is incompatable with python2, came out in 2008.

Post reply on HN