Live data from Hacker News

Larry Wall Unveils Perl 6.0.0

pigdog.org

201–210 of 336 posts

Re: Larry Wall Unveils Perl 6.0.0

#201
post #190

Earlier quoted context omitted.

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.

Its a snap of today's perl6 IRC log . http://irclog.perlgeek.de/perl6/2015-10-07#i_11330785

Re: Larry Wall Unveils Perl 6.0.0

#202
post #187
post #118

Earlier quoted context omitted.

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.

That's interesting, I always figured Python's list comprehensions where their answer to Perl's map and grep.

But in direct answer to your question, no, but it's part of the answer[1].

1: https://en.wikipedia.org/wiki/List_comprehension#Perl_6

Re: Larry Wall Unveils Perl 6.0.0

#203
post #82

Earlier quoted context omitted.

Try putting two spaces at the beginning of a line to stop HN from eating the asterisks. > say 1, 2, 4, 2**32

Thank you. I spent far too long trying to figure out what sequence would start "1, 2, 4" and then have 232 be the 32nd item.

Don't be ashamed. http://oeis.org/search?q=1%2C2%2C4%2C_%2C_%2C_%2C_%2C_%2C_%2... does not know it, either, it gives me http://oeis.org/A115346

That has 46 terms before hitting the right pattern.

It also gives http://oeis.org/A188668 which has only four terms before hitting 1, -2, 4, ..., -232.

I guess one could try and tweak either to get a matching sequence, but I don't see a trivial way to do it that is mathematically 'nice'.

It is easier to start with http://oeis.org/search?q=0%2C0%2C1%2C_%2C_%2C_%2C_%2C_%2C_%2..., though.

It gives me http://oeis.org/A242067 "Number of triangular numbers between n^2 and n^3 (excluding the bounds)."

So, this sequence 'must' be "n plus number of triangular numbers between n^2 and n^3 (excluding the bounds)."

Re: Larry Wall Unveils Perl 6.0.0

#204
post #4

I honestly did not expect to see the day Perl 6 gets finished. This must have been one of the most difficult - if not the most difficult - births in the history of programming languages. At work, I have been using Perl 5 increasingly often over the past two years, mainly because handling unicode in Python 2 is not a lot of fun (and I still haven't come around to learning Python 3), and I have rediscovered why I used…

You can build Perl6 and try it right now if you want, see my [early Perl 6](http://g14n.info/2015/03/early-perl6/) article for detailed building instructions.

Re: Larry Wall Unveils Perl 6.0.0

#205
post #187
post #118

Earlier quoted context omitted.

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.

gather/take is more the general Perl 6 take on list comprehensions.

Re: Larry Wall Unveils Perl 6.0.0

#206
post #204
post #4

I honestly did not expect to see the day Perl 6 gets finished. This must have been one of the most difficult - if not the most difficult - births in the history of programming languages. At work, I have been using Perl 5 increasingly often over the past two years, mainly because handling unicode in Python 2 is not a lot of fun (and I still haven't come around to learning Python 3), and I have rediscovered why I used…

You can build Perl6 and try it right now if you want, see my [early Perl 6]( http://g14n.info/2015/03/early-perl6/ ) article for detailed building instructions.

Or use rakudobrew. http://codeselfstudy.com/wiki/Perl_6

I don't know Perl, but I saw the presentation and was blown away. Installed it today, and definitely will try building something with it soon.

Re: Larry Wall Unveils Perl 6.0.0

#207

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.

But do you have tests for your tests? Assuming tests are written in Python2, gotta make sure they don't start testing the wrong things when you upgrade them...

Re: Larry Wall Unveils Perl 6.0.0

#208
post #140

Earlier quoted context omitted.

You can do this. I tried to draw up a quick gist, but I am late, and I've been writing too much Rust... The basic idea is this: module Mst def self.included(base) # define a method on base using define_method named :before, which takes an # argument and a block # in that method, you grab the method with that name, using .method() # you then define a new method, named method, which calls the block and # then calls the…

That's really cute. I hope, however, that you can understand from the POV of somebody who keeps being driven off ruby by ruby being too much work, that "you could make it less work by first porting all the perl5 libraries that make perl5 OO more pleasant" isn't really a convincing solution :)

For what it's worth, the `prepend` API in Ruby, which I advocated for back when I was working on Rails, works pretty nicely:

https://gist.github.com/wycats/0a354a96d00d47fa4e04

Re: Larry Wall Unveils Perl 6.0.0

#210
post #45

So, for someone who has never read or written Perl code, where should I start? Perl 5 or 6? I get that they're different languages, but I want to see what "Perl" is like.

Perl 5. Lots of good code out there to learn from, which will take a while for Perl 6 to be written.

And then you have a well documented mental migration path to Perl 6 since it tends to be explained in terms of deltas to Perl 5.

Post reply on HN