Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

311–320 of 573 posts

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

#311
post #29

Earlier quoted context omitted.

I used to work for a company that used Perl as their primary language. The codebase was millions of lines long, modules (pm files) with like 1000 methods and 10,000 lines, a total mess and it had 0 unit tests too. Almost beyond salvageable. Left a bit of a sour taste. They're trying to migrate to AWS but AWS don't even natively support Perl in their libraries. There's a few third party libraries in CPAN but nothing a…

Your opinion on Perl is based on one code base you worked at on one job?

They mention aws library support as another major concern too.

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

#313
post #267
post #215

Earlier quoted context omitted.

it's likely a lot easier to do all that in the perl7 branch, so that backwards-incompatible changes can be made if needed.

It's not my understanding that the "Perl 7" idea suddenly gives license to be backwards incompatible. Instead, features that have been made available and gated in previous releases can be made default in a new major version.

yes, that's how they are starting off perl7, but the mere fact that it is given a different major version number gives them the social license to break stuff.

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

#314
post #130

Much as people complain about Perl, it is the language which I use when I want to have something which will run 10-20 years from now. I recently wrote a consistency checker for file archives (so that I know when bitrot sets in) in Perl, precisely because I want it to be usable for a long time ( https://github.com/jwr/ccheck ). Very happy to see a path forward for Perl 5.32.

Interesting, I've been moving away from Perl and Python and towards Rust precisely because I'm afraid of bitrot. Perl the language is stable as fuck and takes back-compat extremely seriously. The problem for me was the library ecosystem: Cpan makes it tedious to pin/vendor dependencies, and installs dependencies globally by default.

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

#315
post #48

Earlier quoted context omitted.

huh. I spent a couple years writing perl professionally, I guess that was around 2006, and I couldn't agree less. Its object system is so bizarre compared to any other language - it's like it doesn't really have an object system, it has parts of a system that you can try to assemble, but no matter what you do you end up with something weird. And on top of that, the sigils, refs, and `wantarray` systems means that fig…

Perl was my first encounter with regular expressions. To this day, no language I've used does it better and cleaner. This includes Python, Boost/C++, Java, JavaScript, LISP, Go and Rust.

I do recommend Haskell. (But do not go into regexes first!)

But even though it has a similar powerful set of operations for regular expressions, people mostly don't use it, because there are better ways to deal with text.

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

#316
post #217
post #166

Earlier quoted context omitted.

Ah, I am glad the name change happened. I got side tracked before it came to a conclusion. I'm guessing if it didn't happen then, it surely would have to be changed now because of this new version, which looks like far less of a fork in the road. I know some people aren't fans of Perl5, but it's what I learned and I wasn't all that excited to have to toss everything I knew (and my reference books) just because of a n…

Perl 6 has been renamed to Raku ( https://raku.org using the #rakulang tag on social media). You can run Perl inside of it if you want to, with the Inline::Perl5 module. Check out the Rakudo Weekly News https://rakudoweekly.blog if you want to stay up-to-date!

I'm surprised to see .pm6 extension still being used, at least on the rakudo documentation page. Do those contain Raku code, or Perl?

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

#317
post #210
post #141

Earlier quoted context omitted.

Perl 5: #!/usr/bin/env perl use 5.026; open my $fh, ' ) { chomp; say if /\b\w{15}\b/; } close $fh; Python 3.8 #!/usr/bin/env python import re with open('logs1.txt', 'r') as fh: for line in fh: if re.search(r'\b\w{15}\b', line): print(line, end='') Why isn't it a fair comparison? The startup time is generic and string parsing is a major feature of, say, web development. I didn't say Perl5 numerics match Python's but e…

It doesn't account for anywhere near the whole difference, but in a tight loop like that Python's going to be spending a good chunk of its time re-compiling the regex from the raw string literal every iteration. Hoist the regex definition out of the loop like so and it'll probably run about 30% faster: #!/usr/bin/env python3 import re with open('logs1.txt', 'r') as fh: regex = re.compile(r'\b\w{15}\b') for line in fh…

With pre-compiled regex the Python version comes down to 1.483s on my machine which is still considerably slower than Perl. I wrote versions of these using substring `index` instead of a regex and Perl was still the clear winner:

    time ./index.pl  0.258s
    time ./index.py  0.609s
If you factor-in that Python startup time is 0.279s slower than Perl the processing differential comes down to 0.072s.

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

#318

I was part of a team that wrote significant parts of Amazon's payment processing systems in Perl in the late 90s. I really loved the language. It's object system was so flexible and powerful. Once you understood how write idiomatic perl. It was a joy to use. I'm looking forward to trying out Perl 7.

This seems to be a common experience - people say it felt powerful and modern in the 90s, because it was . For those who started programming in the 00s and 10s it looks clunky and weird compared to the other options.

Perl pretty much felt clunky and weird as soon as I discovered Scheme in 1996 or so.

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

#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
    }

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

#320
post #68

Earlier quoted context omitted.

That doesn't add up because today's most popular languages - JS, Java, Python, PHP and Ruby - were also released in the 90s.

As far as i know Java and PHP became popular later in the 90s / early 2000s. Javascript was browser only until 2010, Ruby only became popular after Rails came out mid-2000s. There is a decade gap there.

"Server-side JavaScript" was a feature of Netscape web servers in 1996.
Post reply on HN