Larry Wall Unveils Perl 6.0.0
181–190 of 336 posts
Re: Larry Wall Unveils Perl 6.0.0
#182Earlier 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
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
#183Seems 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…
Re: Larry Wall Unveils Perl 6.0.0
#184Earlier 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.
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…
Re: Larry Wall Unveils Perl 6.0.0
#186Re: Larry Wall Unveils Perl 6.0.0
#187Earlier 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-*.
Re: Larry Wall Unveils Perl 6.0.0
#188Earlier 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…
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
#189Earlier 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
I've genuinely no idea why you think I was being condescending.