Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

321–330 of 573 posts

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

#321

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…

I loved Perl back in at the turn of the millennia. My first data science equivalent projects were in Perl.

To this day I can not find anything quicker to prototype in. Python is slow in comparison. Perl is great for quickly hacking something together for R&D purposes. Also, if you need to write something custom, Perl runs so much faster than Python and R.

I, like many people, stopped using Perl beyond a quick script in 2010. Not out of a lack of love. Perl was great. I wonder if your experience comes from being around the laggards, not so much Perl devs itself. When I was working in Perl no one around me was afraid of Javascript. Javascript and Perl are both C based. They aren't that different.

Your story is eye opening. It tells me what it would have been like if I had stuck around. I imagine working with the few who didn't want to learn new skills must have been more painful than you're letting on.

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

#322
post #226

Earlier quoted context omitted.

The Moose library is a pretty advanced OO library that was inspired by Common Lisp's CLOS & Smalltalk I think. Most Perl developers I know use a large amount of libraries as the language itself is lacking in many areas. A lot of people are fine with that, but I prefer kitchen-sink languages which are fairly opinionated.

At least one of the inspirations of Moose, was the object system of Perl 6 at the time (now Raku https://raku.org using the #rakulang tag on social media). To create a Point class that has an x and a y attribute, you'd write: class Point { has $.x; has $.y; } Object instantiation is then done with: Point.new(x => 42, y => 666);

Forgot about the inspiration from P6 (Raku). Thanks for mentioning Liz!

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

#323
post #236

Earlier quoted context omitted.

So it's the Osborne effect? Where you stop using Perl 5 because you're waiting for Perl 6 (announced in 2000, released never? As Raku? As a rolling release? The history appears confusing in Wikipedia.) https://en.wikipedia.org/wiki/Osborne_effect

Perl 6 had its first official release in December 2015. It has since been improved, mainly in performance and in async / event driven capabilities. It got renamed to Raku last year ( https://raku.org using the #rakulang tag on social media). You can check out the Rakudo Weekly News if you want to stay up-to-date: https://rakudoweekly.blog

What was the 2010 Rakudo Star release then? Is 2015 language spec stability?

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

#324

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…

A remarkably self-aware comment. Thank you for this.

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

#325

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…

You can describe "Perl 6" as the dead name of the Raku Programming Language (https://raku.org using the #rakulang tag on social media). :-)

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

#326
post #205

Earlier quoted context omitted.

Perl definitely has a lot of non-patterned arcana. For instance, $| This variable, if nonzero, will flush the output buffer after every write() or print() function. Normally, it is set to 0. In other languages, you do something like os.stdout.buffered(true) or sys.stdout = io::buffer(sys.stdout) or something like that where you're combining composable pieces: the standard std variable, a standard way of opening files…

$| is related to pipes. Much of the sigils are like this.

It suddenly makes sense and isn't so bad.

The $ is a sigil, so it appears before variables like $var, so it's just saying | it out. When typed at the beginning of a one liner it becomes quite obvious what you want. This is clearly not a feature for a large project, but a quick UNIX style one off awk-like script.

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

#327
post #141
post #100

Earlier quoted context omitted.

Lets see the code? Regex has always been a Perl selling point, and you're just benchmarking the Python Regex library (written in C) against Perl's regex library. That's not a fantastic basis for a comparison.

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…

Running a different test the slowest part of the python script is the startup time, otherwise they're identical:

    [admin@localhost ~]$ time ./test.py
    real 0m0.295s
    user 0m0.158s
    sys 0m0.138s

    [admin@localhost ~]$ time ./test.pl
    real 0m0.164s
    user 0m0.158s
    sys 0m0.006s

    #!/usr/bin/env perl
    use 5.16.3;

    open my $fh, ') {
    chomp;
    if (/\b\w{15}\b/) {}
    }
    close $fh;

    #!/usr/bin/env python

    import re
    regex = re.compile(r'\b\w{15}\b')

    with open('logs1.txt', 'r') as fh:
     for line in fh:
      if regex.search(line):
       continue

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

#328

Earlier quoted context omitted.

One can also: use IO::Handle; STDOUT->autoflush(1); STDERR->autoflush(1);

TMTOWTDI!

TIMTOWTDIBSCINABTE

(for those unfamiliar: https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to...)

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

#329

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…

As a 53-year-old Perl developer (my CPAN handle is MICHAEL, I'm that old), I freakin love Vue.

I haven't done paid work with Perl since the 90's. Now I'm glad I haven't. I use it for my private work because it does what I want it to do, but on the few occasions I've coded for pay since leaving the industry, I've used Python.

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

#330

Earlier quoted context omitted.

One can also: use IO::Handle; STDOUT->autoflush(1); STDERR->autoflush(1);

TMTOWTDI!

TIMTOWTDIBSCINABTE (pronounced "tim toady bicarbonate").

"There’s more than one way to do it, but sometimes consistency is not a bad thing either."

Post reply on HN