Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

451–460 of 573 posts

Re: Perl 7 is going to be Perl 5.32, mostly

#451
post #407

Earlier quoted context omitted.

> perl has been the same since 2002 if you ignore perl 6 then you might as well ignore python 3. And even still, python 2 is dead. There are only a handful of languages as well maintained as Perl 5. https://en.wikipedia.org/wiki/Perl_5_version_history Perl maintains strict backwards compatibility. I can run code that was written decades ago. I really am curious what features you think Perl 5 lacks. > Another issue is…

I haven't seen that much hate for Perl on HN. I personally used it for quite a while and liked it a lot. But I think it's reasonable to consider it a legacy language these days, next to Fortran, Ada and TCL. Are these languages still used in some niches? Certainly, TCL is still big for scripting ASIC/FPGA design tools last I checked. Similarly Perl projects will still be used and maintained for a long time, it may we…

Tcl is (last I knew) still remarkably big on “the edges” of networks: f5/a10 devices (iRules scripting[0]), used to be (is it still?) used for Cisco iOS scripting[1], was used as the glue language for Tealeaf session/network capture[2] (when it was deployed as on-premises installation ), and control language for Argonne National Lab cluster control[3]...

[0] https://devcentral.f5.com/s/articles/irules-concepts-tcl-the...

[1] https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/co...

[2] https://help.goacoustic.com/hc/en-us/articles/360043736414-P...

[3] https://www.mcs.anl.gov/~wozniak/papers/Swift_Tcl_2015.pdf

Re: Perl 7 is going to be Perl 5.32, mostly

#452
post #291

I had hope there would be a merging (with some compatibility layers and wrapper binaries) allowing to use Raku the same way Perl 5 was used (should not have been _that_ hard, just adding familiar options and special variables)... Now I'm seeing this goes in a total different direction.

Perhaps. Meanwhile, the most recent release of the Inline::Perl5 module of Raku allows one to have code blocks written in Perl inside Raku code, and vice-versa. And of course be able to use any CPAN module from Raku: https://modules.raku.org/dist/Inline::Perl5:cpan:NINE

Nice! I didn't know. But it still does not bring back the classic usage in Perl 5 style, that made intensive use of runtime options as shorthands for looping on all lines of a file etc.

Re: Perl 7 is going to be Perl 5.32, mostly

#453
post #368
post #149

Earlier quoted context omitted.

IMDB was written in Perl, notoriously. Seeing that the layout has not changed in ages, I can only assume it's still Perl. I'd imagine a bigger rewrite effort would have led to a more slick iteration on the UI, and it seems the legacy HTML templates are still baked in.

Hmm ... don't conflate the presentation UI with the underlying language. I wrote my companies website (2 jobs ago) in Mojolicious (perl web framework), with a responsive UI, based in part upon bootstrap. Very modern (for the time) UI. All backed by a very fast implementation. IMDB seems plenty fast to me. UI isn't great, but that's more of a presentation layer design thing than a language thing.

I am not actually talking about the quality of the UI - I am just pointing out that the UI seems to have been the same for years now, and I would think a rewrite from Perl would have changed that. Yes, you can totally swap out the backend, but IMDB codebase is old. HTML and the sprinkled JS (if you look at page source) is probably baked in deep.

Re: Perl 7 is going to be Perl 5.32, mostly

#454

Earlier quoted context omitted.

Do you mean faster to write, or faster to run, or the combination of both?

Both. Perl is around 20x slower than C for common tasks, while Python is around 133x slower than C for common tasks like looping, depending on what you're doing of course. Perl is the ultimate mockup language in that you can crank out code very fast and get good bug free results. It lets you write in the way you think where other programming languages force you to write a specific way. Ofc you can get good at Python,…

I don't think your performance numbers are very accurate. I've done a bit of Perl and a lot of Python and they're fairly comparable in most cases. Python is lightning fast for a lot of scripting tasks and I generally use very few libraries for day to day tasks because the Python stdlib is so good.

Unless you're doing something really simple with Perl command line switches that operate over an entire file, I'd bet Perl and Python solutions will be in the neighborhood of the same number of loc even with all the magic in Perl as Python has a lot of modern conveniences. It's easy to build a complex datastructure in Python with nested dictionaries with sets/lists/other dictionaries... whatever. In Perl it's more complex.

Re: Perl 7 is going to be Perl 5.32, mostly

#455
post #319

I still use Perl every now and again for powerful one-liners and I'm really glad it's around. Here is a bash function I use which takes args and merges and deduplicates PATH-like expressions: merge-args () { perl -e 'print join ":", grep {!$h{$_}++} split ":", join ":", @ARGV' "$@" } And I use as follows: export PATH="$(merge-args "${SCRIPT_DIR}"/clang-tidy-ex /usr/local/opt/llvm/bin "${INSTALL_DIR}"/{,samples/}bin "…

A pure bash alternative for comparison. merge-args() { local res for i; do case ":${res}:" in *:"$i":*) ;; *) res=${res+$res:}$i esac done echo $res }

That is pretty neat, I did not know that 'for i' on it's own could iterate the args like that.

Re: Perl 7 is going to be Perl 5.32, mostly

#456

I've been a perl zealot since 2005. I didn't even know "python" existed until around 2008 when I found a script file with a ".py" file ending in a fresh ubuntu install. I started going to perl conferences sometime after 2010 when someone on irc informed be about them. I learned so much in those conferences, mainly about the alternatives to cgi and the modern OOP "framework" named "moose". I thought I was in heaven. I…

Try go, you might like it. I did.

Re: Perl 7 is going to be Perl 5.32, mostly

#457
post #128

Earlier quoted context omitted.

> How does one tell Python to pass the contents of said array as distinct parameters to the function, instead of as a lone array parameter? With an asterisk: method(*array)

Right, which I sorta kinda get why coming from C - a *something is the thing pointed to by that something. How is that more understandable than @ vs \@ without knowing the language? My guess is it isn't.

As someone who learned python first - the idea that `myfn(@xs)` would call `myfn(1,2,3)` is... unnerving. Implicitly splicing in arguments makes me wonder what other kind of syntactic oddities are going over my head in my code.

Re: Perl 7 is going to be Perl 5.32, mostly

#459
post #394

Earlier quoted context omitted.

> I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics. For example?

I mean, the combinations of $%@ are really astoundingly bad. $ alone has so many different meanings and operations depending on context. You won't find that sort of thing in any other language. Not even PHP which for some bizarre reason brought $ along for the ride. Here's a fun exercise, write a dictionary of arrays. Now write a dictionary of 2d arrays. In any other language, that's hardly a challenge to both read a…

> I mean, the combinations of $%@ are really astoundingly bad. $ alone has so many different meanings and operations depending on context. You won't find that sort of thing in any other language.

I kind of felt lost first getting started with Scala where I felt like there was symbol overload.

Re: Perl 7 is going to be Perl 5.32, mostly

#460
post #451
post #407

Earlier quoted context omitted.

I haven't seen that much hate for Perl on HN. I personally used it for quite a while and liked it a lot. But I think it's reasonable to consider it a legacy language these days, next to Fortran, Ada and TCL. Are these languages still used in some niches? Certainly, TCL is still big for scripting ASIC/FPGA design tools last I checked. Similarly Perl projects will still be used and maintained for a long time, it may we…

Tcl is (last I knew) still remarkably big on “the edges” of networks: f5/a10 devices (iRules scripting[0]), used to be (is it still?) used for Cisco iOS scripting[1], was used as the glue language for Tealeaf session/network capture[2] (when it was deployed as on-premises installation ), and control language for Argonne National Lab cluster control[3]... [0] https://devcentral.f5.com/s/articles/irules-concepts-tcl-th…

Also heavily used in banking and trading systems (Fidessa).
Post reply on HN