Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

411–420 of 573 posts

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

#411
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.

You would like Crystal, it has similar regexes

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

#412

They last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.

It is alive and kicking in the bioinformatics community!

I still think Perl is a much better tool for what some bash and python scripts are doing. Maybe Perl7 will remove some stigma and allow for people to use the tool instead of it being instantly dismissed.

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

#413

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…

I wrote a lot of popular web apps in Perl, some that appeared in NY Times and Time mag. I quit around 2010 and went over to php which is easier. Wrote a great app and built a successful software biz around it. I think 2010 may have been when Perl 6 felt hopeless and there was no clear leadership or direction in the community.

Mod_perl was the sh*t back in the late 90s for super high performance web apps on Apache. Then Perl stalled and everything else didn’t.

Perl could have been where Python is today if they didn’t take 20 years to waffle about a release that was supposed to do everything and ended up doing nothing because everyone left.

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

#414
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 think shells did $ for vars first, then Perl added @ and % for arrays and hashes (and then $ was refs)

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

#415
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…

> Here's a fun exercise, write a dictionary of arrays.

Umm … ok:

my %dict = ( foo => [ 1, 2, 3 ], bar => [ 4, 5, 6 ], );

> Now write a dictionary of 2d arrays.

my %dict2d = ( foo => [ [1, 2, 3], [4, 5, 6] ], bar => [], );

It’s pretty much identical to JS. Not sure how that’s supposed to exemplify how hard it is to write Perl.

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

#417

Developers in their forties wrote Perl. Developers in their thirties replaced Perl. Developers in their twenties say “What’s Perl?”

I am not yet 30. My first job was all Perl.

I really hope this bumps Perl back into the niches where it excels. Because there are definitely areas where it is the sharpest and best tool for the job.

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

#418
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…

> 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. Have you even seen what Javascript is calling OOP? Or the weirdness around "this" keyword? They finally have a "class" keyword, but it's just syntax sugar on top of the weird prototype has…

OOP will rot your teeth.

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

#419
post #358
post #317

Earlier quoted context omitted.

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.

I'd be curious on your take of my code below, I have python and perl as dead even if you don't print and ignore pythons startup time.

Well, the two ifs you hedge to qualify Python's parity are pretty damning in themselves, no? Let's stop beating about the bush - if you want to perform a common text-processing job like parsing a log file Perl is hands down faster than Python.

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

#420

They last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.

I wrote a quick perl script earlier today to push crt.sh results for a bunch of domains into slack. Took about 30 minutes, far less time than messing about with why pip has broken on my desktop yet again: Traceback (most recent call last): File "/usr/local/bin/pip", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name,…

I understand no one wants to deal with unexpected issues, especially when you're trying to get something done. Why not use virtual environments? You keep packages out of your system's python, and if you run into issues like above you can just recreate it:

  b5n:~/venv_dir$ python3 -m venv im_a_venv
  b5n:~/venv_dir$ . im_a_venv/bin/activate
  (im_a_venv)b5n:~/venv_dir$ pip install requests
  (im_a_venv)b5n:~/venv_dir$ pip freeze > requirements.txt
  (im_a_venv)b5n:~/venv_dir$ deactivate

  b5n:~/venv_dir$ python3 -m venv another_venv
  b5n:~/venv_dir$ . another_venv/bin/activate
  (another_venv)b@b5n:~/venv_dir$ pip install -r requirements.txt
Post reply on HN