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.
Larry Wall Unveils Perl 6.0.0
171–180 of 336 posts
Re: Larry Wall Unveils Perl 6.0.0
#172Earlier quoted context omitted.
I read it that way at first, and was going to comment on it, then I figured the point was smart match being able to distinguish, not being able to do your own test.
'eq' does the test you are asking for.
I believe the article was referencing this, and so while yes, anyone who knows how to use Perl will use the appropriate operator for the appropriate type of type operation, there are reasons to still want to distinguish what type of match is done by the smart match operator, '~~'.
Re: Larry Wall Unveils Perl 6.0.0
#173Earlier 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-*.
[x*2 | x
IIRC haskell list comprehensions can't do fib without naming the list so it can refer to itself. OTOH, these perl list comprehensions seems unable to express things that combine values from several lists, eg: [ x*y | x
Course, haskell also has a weak form of [x1,x2..xn] syntax for a linear sequence, as in [2,4..8]. That's always felt a bit of an unnecessary wart in haskell to me, although the simpler [x..y] and [x..] are very handy syntaxes.TBH, I almost never use list comprehensions either, preferring regular functions, and the list monad or applicative.
(*2) [1..10] -- linear
(2^) [1..10] -- exponential
repeat 1 -- constant
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) -- fibonacci obvs
(*) [2,4..8] [-1,0,1] -- same as [ x*y | x Re: Larry Wall Unveils Perl 6.0.0
#174Here 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
http://pmthium.com/2014/10/apw2014/
"What exactly is the “Great List Refactor” (GLR)? For several years Rakudo developers and users have identified a number of problems with the existing implementation of list types — most notably performance. But we’ve also observed the need for user-facing changes in the design, especially in generating and flattening lists. So the term GLR now encompasses all of the list-related changes that seem to want to be made."
Re: Larry Wall Unveils Perl 6.0.0
#175Earlier quoted context omitted.
Perl is awesome for writing big programs in. One of the things that people find frustrating about Perl is its expressiveness -- that is, there are many different ways of doing the same thing. The result is sometimes that you get 100 different people doing things 100 different ways. This is not so much a problem with the language as it is with programmers not learning to agree on a set of idioms that they will use for…
> Perl is awesome for writing big programs in. This isn't even remotely true. No static types, no thank you. Runtime errors due to misspelled methods? Missing hash keys? Hilarious. Boy, I hope this scalar isn't undefined!
Re: Larry Wall Unveils Perl 6.0.0
#176I love Perl [I have been to perl monger meetings and I had to look up how to 'unshift' in python today]. But Python3 is mostly just Python2 with a print function instead of a print keyword. It is occasionally non-trivial to port large existing code bases from Python2 to Python3, but it is practically always trivial for a Python2 programmer to write new code in Python3. I hope Perl 6 will get its own camel book!
Re: Larry Wall Unveils Perl 6.0.0
#177Seems 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.
I find that anything involving a lot of regular expressions is easier to write in Perl than in Python. Perl and JavaScript are the only two mainstream languages I know of where regular expressions are first-class citizens (compared to Python, where you need to do `re.compile(r'...')` and store that somewhere).
print "match" if something =~ /thing/i
Captures with $1 etc. are there as are named captures using the same syntax in the regex.
Re: Larry Wall Unveils Perl 6.0.0
#178Earlier 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
Please do not take this conversation as an affront and throw away what has so far come of it. It has shown you, and Ruby at large, an API that has been proven to be good and useful, and the Ruby community has come up with a way to implement it in a generalized way. I hope to someday be able to learn Ruby and use its OO with similar ease and pleasure as i can use the OO system in Perl 5. So please, do not throw this away. It is a valuable chance to do the same thing Perl has done so many times: Recognize something useful and make it your own.
Re: Larry Wall Unveils Perl 6.0.0
#179Earlier quoted context omitted.
Probably soon. Perl 5 has a Tidy'ing tool[0], as well as a Lint[1] tool. Both are based on rules created from (originally) Best Practices [2]. These rules of course can be modified to taste, so you can set your own rules/filters before checking in your changes to a repo (or, whatever) [0] https://metacpan.org/pod/distribution/Perl-Tidy/lib/Perl/Tid... [1] https://metacpan.org/pod/Perl::Critic [2] http://shop.oreilly.…
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.
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://journal.stuffwithstuff.com/2015/09/08/the-hardest-pro...
[2] https://metacpan.org/source/SHANCOCK/Perl-Tidy-20150815/lib/...
Re: Larry Wall Unveils Perl 6.0.0
#180I love Perl [I have been to perl monger meetings and I had to look up how to 'unshift' in python today]. But Python3 is mostly just Python2 with a print function instead of a print keyword. It is occasionally non-trivial to port large existing code bases from Python2 to Python3, but it is practically always trivial for a Python2 programmer to write new code in Python3. I hope Perl 6 will get its own camel book!
learning Python 3 is easier than reading any Perl...