Live data from Hacker News

Larry Wall Unveils Perl 6.0.0

pigdog.org

181–190 of 336 posts

Re: Larry Wall Unveils Perl 6.0.0

#182
post #37

Earlier quoted context omitted.

Also: react { whenever } # Code runs when a condition is met. I can only think this must be a generic https://en.wikipedia.org/wiki/COMEFROM . It is sure going to create some viciously subtle bugs.

Cf http://www.jnthn.net/papers/2015-spw-concurrency.pdf

This is probably the most interesting link in this entire thread.

The "react" keyword is just a channel subscription, and inside it has a pattern matcher. Channels are first-class citizens, and you're encouraged to chain channels rather than falling into callback hell. It's like Go and Ruby had a child.

If anything piqued my interest in Perl 6, it was this.

Re: Larry Wall Unveils Perl 6.0.0

#183
post #24

Seems too little too late. Is Perl still relevant in 2015? What would you build in Perl today that you wouldn't build in another language instead? I used to be a big fan of Perl but it seems to have fallen behind the times, I doubt Perl 6 is enough to catch up.

Here's something that's normally not too fun to deal with in Python and Ruby: asynchronous operations. Perl 6 has promises, C#-style async/await, Go-style channels, and Reactive Extensions-style Supplies built in as first-class ways to deal with asynchrony, concurrency, and parallelism. It can also take advantage of as many threads as you'll give it. Since I deal with web services a lot, this is a huge boon for me. B…

I find asynchronous programming in Python (especially 3) tons of fun. Before 3, Tornado wasn't half bad either!

Re: Larry Wall Unveils Perl 6.0.0

#184

Earlier quoted context omitted.

And your tests will validate nothing was broken, right? You have thorough tests?

Not sure why this was downvoted. I'm currently still in Python2 and looking to upgrade to Python3. Having solid automated tests is vital for us to do it confidently.

Probably the snark

Re: Larry Wall Unveils Perl 6.0.0

#185

> One of the most impressive things Larry demonstrated was the sequence operator, and Perl 6's ability to intuit sequences. say 1, 2, 4 ... 2**32 > This correctly produced a nice tidy list of just 32 values -- rather than the 4,294,967,296 you might expect. Someone with more time than me needs to find an IQ test that is based around sequence questions like this and plug them all into Perl 6. So we can find out what P…

This would probably be useful.

http://oeis.org/

Re: Larry Wall Unveils Perl 6.0.0

#187
post #118
post #107

Earlier quoted context omitted.

This is cool but I still don't get how it is able to distinguish between linear, power, exponential, etc. sequences so easily. Would be incredibly interested in reading about the technology they're using for this and how complex it can get.

Linear and geometric sequences are auto-detected, for anything else you'll need to provide a function to compute the next element: 2, 4 ... * # linear 2, 4, 8 ... * # exponential 1, 1 ... * # constant 1, 1, * + * ... * # Fibonacci The last expression is equivalent to the more verbose variant 1, 1, -> $a, $b { $a + $b } ... * that makes use of an 'pointy block' (ie lambda function) instead of the Whatever-*.

This is so very Perl. I guess this is Perls answer to list comprehensions.

Re: Larry Wall Unveils Perl 6.0.0

#188

Earlier quoted context omitted.

Perltidy predates PBP by a long time. Perltidy is a bit of a huge mess, and it has its own parsing code and is nearly impossible to hack on. We really need a PPI-based re-implementation.

There was a very interesting submission to HN on why code formatting utilities aren't easy things to write, [0] called, The Hardest Program I've Ever Written [1] The code of Perl Tidy at least looks pretty good! [2]. Perhaps there's a reason why PPI isn't used, that I'm not famliar with, other than - as you say, it predates it. Perl::Critic uses PPI, yes? [0] https://news.ycombinator.com/item?id=10195091 [1] http://j…

Thanks for the links.

As the current de-facto maintainer of PPI, the answer is rather simple:

P::T predates PPI by almost two years: https://metacpan.org/source/SHANCOCK/Perl-Tidy-20021130/CHAN... https://metacpan.org/source/ADAMK/PPI-0.1/Changes

and:

For the longest time Perl was considered unparsable, primarily due to the two features of function parens being optional, and the argument-slurpiness of function calls being unknowable without introspecting the function reference that ends up being the final one, at runtime. In the most famous example this can lead to a / after a function call being considered either the division operator or the start of a regex; with both interpretations resulting in valid Perl code. It took a while for anyone to come up with a schema in which Perl could be parsed while also being round-trippable. It took PPI a while to get there and be stable, and meanwhile P::T had already become stable itself.

Re: Larry Wall Unveils Perl 6.0.0

#189
post #151

Earlier quoted context omitted.

That's very cute. Yeah, I was responding to a post that claimed it was trivial; that's cute but not trivial - although it does demonstrate that using 'alias' to rename isn't necessary, which is nice to know. I can absolutely see how I'd turn this into a full Class::Method::Modifiers re-implementation, so I'll totally stipulate to 'trivial if' :D

I'm not interested in being condescended to, so

Wut? I just complimented the code you posted, and changed my mind from "the unconstructive guy upthread said trivial, which it isn't, but steve's been kind enough to give me enough information to see it's trivial if I write a port of CMM, and said port is basically identical rather than requiring the crappy alias approach".

I've genuinely no idea why you think I was being condescending.

Re: Larry Wall Unveils Perl 6.0.0

#190
post #91

Earlier quoted context omitted.

What source would you recommend?

Here are the official words from Larry. There will be 2 beta releases and the major one in December. Larry goes by the handle TimToady http://imgur.com/1Vrpl2G

That source is nowhere near as informative.
Post reply on HN