Live data from Hacker News

Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

news.ycombinator.com

151–160 of 163 posts

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#151
post #143

Earlier quoted context omitted.

Right, but the point is that you don't need to worry until you do. See the post I linked. I'm not saying nobody wants Perl to work like that... but I am saying I wouldn't use such a tool. It's not right for the problems I need to solve. I also think it's good if programming languages use algorithms with well-known behavior, rather than a mish-mash of heuristics. Heuristics are OK if there is nothing better known, but…

So I actually found an answer to your question re: backtracking: https://docs.perl6.org/language/faq#What%27s_the_difference_... ? Basically: Perl 6 tokens and rules imply :ratchet, which means no backtracking. You can use raw regexes if for some reason you do need backtracking, but otherwise it looks like a Perl 6 grammar is backtracking-free (and grammars in the real world hopefully use tokens/rules exclusively). S…

Unfortunately the regex/grammar engine is one of those components lacking deep optimisation. At the moment. Thats probably a much bigger factor than anything algorithmic.

With tokens another nice thing to note is there is longest token matching and the concept of "proto" tokens and regexes. This lets you have simple decision making between similarly defined tokens without backtracking. For example the grammar I have for biological sequences can simultaneously identify and parse DNA/RNA/Protein without back tracking. Even if a file has a mixture of data I can instantiate the correct subclasses on the fly whilst parsing! https://github.com/MattOates/BioInfo/blob/master/lib/BioInfo...

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#152
post #16
post #7

Earlier quoted context omitted.

IIRC there's a module for parsing and running Perl 5 in 6. Am I wrong or is it not practically useful?

I think you mean Inline::Perl5: https://github.com/niner/Inline-Perl5 . It doesn't parse Perl 5 and run it inside of Perl 6 though, it just runs the Perl 5 interpreter for you from a Perl 6 program and lets you marshall data between the interpreters. It's a legitimate technique.

There is the v5 project implementing Perl 5 targetting nqp to be compiled inline with a Perl 6 program. https://github.com/rakudo-p5/v5

The project has mostly stalled since Inline::Perl5 became so effective. v5 had the issue of being unable to easily support binary XS type modules. Which means it could never support CPAN, unlike Inline::Perl5. It was meant for people to be able to copy their high mental cost algo code into a new Perl 6 project without fuss.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#153
post #8

follow-up: for a non-Perl person, who is incredibly interested in getting started with Perl 6, are there any good resources (code examples, blog posts exploring language concepts unique to Perl 6) that anyone would recommend?

Check out the new comers section here https://perl6.org/resources/

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#154
post #2

I honestly haven't heard of anyone using Perl for anything new. Sure there is a lot of legacy Perl 5 being used and maintained, but Perl 6? For a new project? I've never even seen it on a short list.

ZipRecruiter, Booking.com, Duck Duck Go, and Craigslist are still building new things in Perl 5. It's out there still, you just have to hunt for it. Here's a site that lists Perl projects and companies: http://www.builtinperl.com

By the way, do the guys who maintain www.builtinperl.com happen to be here? I submitted a new entry for it but haven't heard back for weeks. Another email has been sent but also hasn't seen any response.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#155
post #29

Perhaps you should look at this two presentations first: https://media.ccc.de/v/31c3_-_6243_-_en_-_saal_1_-_201412292... https://media.ccc.de/v/32c3-7130-the_perl_jam_2

I painfully watched the entire first presentation a while back, and at least a small part of the second before quitting. They both came across like "look how many times I can use the F word in an hour -- aren't I super smart and cool? -- I'm SO David Hansson".

I'll pass -- if it was just a troll (both times?), well I can't stand trolls anyway.

I didn't find it at all entertaining or funny. Mostly it just sounded sanctimonious.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#156

Earlier quoted context omitted.

So I actually found an answer to your question re: backtracking: https://docs.perl6.org/language/faq#What%27s_the_difference_... ? Basically: Perl 6 tokens and rules imply :ratchet, which means no backtracking. You can use raw regexes if for some reason you do need backtracking, but otherwise it looks like a Perl 6 grammar is backtracking-free (and grammars in the real world hopefully use tokens/rules exclusively). S…

Unfortunately the regex/grammar engine is one of those components lacking deep optimisation. At the moment. Thats probably a much bigger factor than anything algorithmic. With tokens another nice thing to note is there is longest token matching and the concept of "proto" tokens and regexes. This lets you have simple decision making between similarly defined tokens without backtracking. For example the grammar I have…

I reckon the optimizations will come soon (at least that's what I gathered from reading the Perl 6 documentation's "Performance" section); now that Perl 6.c is out in the wild, there's less of a moving target, so the implementations can (and apparently are) starting to focus more on squeezing out more performance.

And yeah, proto regexes are pretty sweet, and they seem to be a natural fit for what you're doing. I'm always surprised by how popular Perl seems to be in biology / life sciences, and projects like BioInfo (and BioPerl, of course) are a great reminder as to why that happens to be.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#157
post #31

Earlier quoted context omitted.

Looks like that's about Perl 5, not 6. (I am not going to watch such long videos without more info up front.)

The problems in that video are P5 centric. P6 is very different as far as how under the hood works

P5 centric, and old P5 centric, and the videos aren't funny. He could have just said "Perl 5 sucks" and left the stage and the videos would have been of equivalent value (as in, they aren't worth anything).

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#158
post #157

Earlier quoted context omitted.

The problems in that video are P5 centric. P6 is very different as far as how under the hood works

P5 centric, and old P5 centric, and the videos aren't funny. He could have just said "Perl 5 sucks" and left the stage and the videos would have been of equivalent value (as in, they aren't worth anything).

Python sucks! Python must die! Don't use Python! GIL!

There I said the same as the presenter in the videos about his preferred language. In one line.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#159
post #157

Earlier quoted context omitted.

The problems in that video are P5 centric. P6 is very different as far as how under the hood works

P5 centric, and old P5 centric, and the videos aren't funny. He could have just said "Perl 5 sucks" and left the stage and the videos would have been of equivalent value (as in, they aren't worth anything).

[deleted]

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#160
I've used Perl as my primary programming language over 20 years and think that Perl 6 is a big improvement. I've been using 6 for new Perl software since 2012 (one 500 line program I run once a week and a few other 30 lines or less programs used one time) with good results---learning Perl 6 was hard for me---am looking forward to Perl 6 books. Thanks to all the people that made Perl 5 and 6 possible.
Post reply on HN