Re: What are Perl 6's killer advantages over Perl 5?

2015-09-03 Thread Matija Papec


02.09.2015, 16:42, "Robert Strahl via perl6-users" :
>  I don't understand why some people feel so strongly that one-liners should 
> be strict. That would undermine what a one-liner is — a quick way to get 
> something done. I use perl5 one-liners very frequently for text processing, 
> especially when stringing / piping together shell code. When I need to re-use 
> the code, then I put it into a script and make it strict and bulletproof in 
> other ways. Declaring variables in the one-liner context makes no sense.

I agree, and these are all valid con arguments, but so far I did not have a 
opportunity to hear any arguments for opposite.



Re: What are Perl 6's killer advantages over Perl 5?

2015-08-31 Thread Marc Chantreux
On Fri, Aug 28, 2015 at 05:48:07PM +0200, Carl Mäsak wrote:
> Good news! I just pushed a change (with backing from other core
> developers) that makes -e strict by default! 

awesome! thank you Carl! 

-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
-- Abraham Lincoln


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-28 Thread Carl Mäsak
Moritz (), Tux ():
 I could continue with other Perl 5 deficiencies (no strict by default,

 Using strict *STILL* is not enabled by default for perl6
 one-liners either:

 $ perl6 -e'my Int $this = 1; $thıs++; say $this;'
 1
 $ perl6 -Mstrict -e'my Int $this = 1; $thıs++; say $this;'
 ===SORRY!=== Error while compiling -e
 Variable '$thıs' is not declared. Did you mean '$this'?
 at -e:1
 -- my Int $this = 1; ⏏$thıs++; say $this;

 That, IMHO, is a huge deficiency!

 lack of easy threading, too many globals, obscure regex syntax), but the
 individual problems aren't the point. My main point is that large parts
 of Perl 5 are still stuck in the past, with no good way forward.

Good news! I just pushed a change (with backing from other core
developers) that makes -e strict by default!

commit 5fb81fffa90f90515e663a21987cff484e8260b8
Author: Carl Masak cma...@gmail.com
Date:   Fri Aug 28 17:45:25 2015 +0200

strict is now on by default, even for -e

This should make (most of) p6u happy.

Enjoy! :)

// Carl


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-28 Thread yary
Oh dear... can we get non-strict for one liners with -E then? I admit it
isn't an issue for me at the moment, as I do my one liners in perl5
currently

Maybe I need to think functionally, so variable declaration isn't an issue
at all

-y

On Fri, Aug 28, 2015 at 11:48 AM, Carl Mäsak cma...@gmail.com wrote:

 Moritz (), Tux ():
  I could continue with other Perl 5 deficiencies (no strict by default,
 
  Using strict *STILL* is not enabled by default for perl6
  one-liners either:
 
  $ perl6 -e'my Int $this = 1; $thıs++; say $this;'
  1
  $ perl6 -Mstrict -e'my Int $this = 1; $thıs++; say $this;'
  ===SORRY!=== Error while compiling -e
  Variable '$thıs' is not declared. Did you mean '$this'?
  at -e:1
  -- my Int $this = 1; ⏏$thıs++; say $this;
 
  That, IMHO, is a huge deficiency!
 
  lack of easy threading, too many globals, obscure regex syntax), but the
  individual problems aren't the point. My main point is that large parts
  of Perl 5 are still stuck in the past, with no good way forward.

 Good news! I just pushed a change (with backing from other core
 developers) that makes -e strict by default!

 commit 5fb81fffa90f90515e663a21987cff484e8260b8
 Author: Carl Masak cma...@gmail.com
 Date:   Fri Aug 28 17:45:25 2015 +0200

 strict is now on by default, even for -e

 This should make (most of) p6u happy.

 Enjoy! :)

 // Carl



Re: What are Perl 6's killer advantages over Perl 5?

2015-08-27 Thread yary
On Thu, Aug 27, 2015 at 4:45 AM, Marc Chantreux kha...@phear.org wrote:
complete different usage but it would be nice to have a flag for use
strict both in perl5 and 6

/me nominates -W as a bigger -w .. oh wait, -W already exists as a
depreciated-in-my-view perl5 flag.

In that case, I also like -E as run a one-liner, as if it was loaded
from a file which would disable laxness in one-liners, for those who are
so inclined.

This discussion got me looking at http://design.perl6.org/S19.html which
may need an update, it says perl6 has no -M but Rakudo supports it; which
is correct?

Minor note, S19 links to S16-io which no longer exists. That link is in
the notes about there being no -0 switch due to a lack of specs in S16.

-y


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-27 Thread David H. Adler
On Thu, Aug 27, 2015 at 10:35:27AM -0400, yary wrote:
 On Thu, Aug 27, 2015 at 4:45 AM, Marc Chantreux kha...@phear.org wrote:
 complete different usage but it would be nice to have a flag for use
 strict both in perl5 and 6
 
 /me nominates -W as a bigger -w .. oh wait, -W already exists as a
 depreciated-in-my-view perl5 flag.
 
 In that case, I also like -E as run a one-liner, as if it was loaded
 from a file which would disable laxness in one-liners, for those who are
 so inclined.

This is actually what I've been thinking during this discussion. I'm not
really seeing a pressing need for strict in one-liners, but
phiosophically, I can understand why one might want to have strict on in
all cases. So, if we think this is something that actually needs
solving, this mechanism seems reasonable to me.

 This discussion got me looking at http://design.perl6.org/S19.html which
 may need an update, it says perl6 has no -M but Rakudo supports it; which
 is correct?

The 5to6.pod document in the doc directory says it does exist. I lean
towards feeling the docs should be more correct/reliable than the design
documents, as that's where people outside the p6 creation bubble will be
looking for info (not that, at the moment, they necessarily *are* more
correct/reliable - work in progress and all...).

All that said, there doesn't, at a quck glance, seem to be any
equivalent to Perl 5's perlrun document, which would detail the
command line flags. Maybe I'll take a shot at something like that in
the coming days.

dha

-- 
David H. Adler - d...@panix.com - http://www.panix.com/~dha/
Your point being... - Homer Simpson


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-27 Thread Marc Chantreux
On Wed, Aug 26, 2015 at 02:00:09PM -0400, Brandon Allbery wrote:
  It used to be, but that was not according to spec.  FROGGS++ implemented
  the lax mode, which is enabled by default in one-liners.  Perhaps TimToady
  wants to invoke rule #2 on this.
  Personally, I use an alias that has ‘-M strict’ in it.
 
 I was thinking -e vs. -E, like perl5

complete different usage but it would be nice to have a flag for use
strict both in perl5 and 6



-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
Don't believe everything you read on the Internet
-- Abraham Lincoln


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Brandon Allbery
On Wed, Aug 26, 2015 at 1:58 PM, Elizabeth Mattijsen l...@dijkmat.nl wrote:

 It used to be, but that was not according to spec.  FROGGS++ implemented
 the lax mode, which is enabled by default in one-liners.  Perhaps TimToady
 wants to invoke rule #2 on this.

 Personally, I use an alias that has ‘-M strict’ in it.


I was thinking -e vs. -E, like perl5.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Elizabeth Mattijsen
 On 26 Aug 2015, at 12:18, H.Merijn Brand h.m.br...@xs4all.nl wrote:
 
 On Wed, 26 Aug 2015 10:26:23 +0200, Moritz Lenz mor...@faui2k3.org
 wrote:
 
 I could continue with other Perl 5 deficiencies (no strict by default,
 
 Using strict *STILL* is not enabled by default for perl6
 one-liners either:

It used to be, but that was not according to spec.  FROGGS++ implemented the 
lax mode, which is enabled by default in one-liners.  Perhaps TimToady wants to 
invoke rule #2 on this.


Personally, I use an alias that has ‘-M strict’ in it.



Liz

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Moritz Lenz

Hi,

On 11.08.2015 14:12, Tom Browder wrote:

I have seen several lists of new Perl 6 features (versus Perl 5) but
they all seem to be lists that intermix features with varying degrees of
value to ordinary Perl 5 users.  If one wants to sell long-time Perl 5
users (already using the latest Perl 5, Moose, etc.) on the value of
Perl 6, what should be on the important feature list?


on a more meta level: Perl 6 has the ability to evolve, and lots of 
things that Perl 5 most likely will never have.


Just as an example: when I started to get involved with Perl around 2003 
or '04 or so, people seemed to be aware that subroutine signatures were 
a good thing to have. They probably were aware of that much longer. And 
yet it took until perl 5.20 in 2014 to get even the most basic 
subroutine signatures (and still marked as experimental).


Another one is the inability to reliably introspect strings for whether 
they are text or binary data, which means enormous care must be taken to 
not accidentally mix the two. Again, known for ages that it's a problem, 
afaict no practical solution in sight.


These are just two examples of things that people take for granted in a 
modern programming language, yet Perl 5 has real trouble with.


I could continue with other Perl 5 deficiencies (no strict by default, 
lack of easy threading, too many globals, obscure regex syntax), but the 
individual problems aren't the point. My main point is that large parts 
of Perl 5 are still stuck in the past, with no good way forward.


Cheers,
Moritz


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Tom Browder
On Wed, Aug 26, 2015 at 3:26 AM, Moritz Lenz mor...@faui2k3.org wrote:
 Hi,

 On 11.08.2015 14:12, Tom Browder wrote:

 I have seen several lists of new Perl 6 features (versus Perl 5) but
 they all seem to be lists that intermix features with varying degrees of
 value to ordinary Perl 5 users.  If one wants to sell long-time Perl 5
 users (already using the latest Perl 5, Moose, etc.) on the value of
 Perl 6, what should be on the important feature list?
...

[Moritz tells of  many good, new features...]

Thanks, Moritz!

Cheers,

-Tom


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Marc Chantreux
On Wed, Aug 26, 2015 at 12:18:46PM +0200, H.Merijn Brand wrote:
 $ perl6 -e'my Int $this = 1; $thıs++; say $this;'
 1
 $ perl6 -Mstrict -e'my Int $this = 1; $thıs++; say $this;'
 ===SORRY!=== Error while compiling -e
 Variable '$thıs' is not declared. Did you mean '$this'?
 at -e:1
 -- my Int $this = 1; ⏏$thıs++; say $this;

 That, IMHO, is a huge deficiency! 

so usefull in most cases of oneliners! i really hope this deficiency is
here to stay :) 

-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
Don't believe everything you read on the Internet
-- Abraham Lincoln


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread H.Merijn Brand
On Tue, 11 Aug 2015 21:41:21 -0400, David H. Adler d...@pobox.com
wrote:

  The reason for my request is to help with a better introduction in my
  modest draft tutorial on converting Perl 5 to Perl 6 code at the Perl
  Monastery.  I am comfortable with the example code I use there (which is
  not currently intended to showcase new features), but I am getting several
  comments on why one should even bother with Perl 6?  
 
 In talking to Perl 5 people about my Perl 5 to Perl 6 docuentation,
 trying to get some feedback on it from people who aren't already doing
 Perl 6, I get this question a lot. So, yes, some kind of document saying
 these are reasons Perl 6 is actually useful would be very helpful.
 
 dha

*THE* killer feature that will be seen by all beginning perl6
programmers is its awesome error messages. It is a shame that
-e runs no-strict, but as I understand it, that is still under
discussion.

$ perl6 -e'use v6; my Int $this = 1; $thıs++; say $this;'
===SORRY!=== Error while compiling -e
Variable '$thıs' is not declared. Did you mean '$this'?
at -e:1
-- use v6; my Int $this = 1; ⏏$thıs++; say $this;


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.21   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/


pgpvuEy_uwLST.pgp
Description: OpenPGP digital signature


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread Tom Browder
On Wed, Aug 12, 2015 at 2:00 AM, H.Merijn Brand h.m.br...@xs4all.nl wrote:
 On Tue, 11 Aug 2015 21:41:21 -0400, David H. Adler d...@pobox.com
...
 *THE* killer feature that will be seen by all beginning perl6
 programmers is its awesome error messages. It is a shame that
...

Thanks!

-Tom


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread Tom Browder
On Wed, Aug 12, 2015 at 4:02 AM, Kamil Kułaga teodoz...@gmail.com wrote:
 One thing that was not mentioned already is using Rat instead of
 standard floating point number. It prevents many silly mistakes
 especially when counting money.

Thanks, Kamil.

-Tom


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread Tom Browder
On Tue, Aug 11, 2015 at 6:41 PM, Andrew Kirkpatrick uberm...@gmail.com wrote:
 Built-in facilities for the language to parse, transform and extend
...

Thanks, Andrew.

-Tom


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread Kamil Kułaga
One thing that was not mentioned already is using Rat instead of
standard floating point number. It prevents many silly mistakes
especially when counting money.

On Tue, Aug 11, 2015 at 2:12 PM, Tom Browder tom.brow...@gmail.com wrote:
 I have seen several lists of new Perl 6 features (versus Perl 5) but they
 all seem to be lists that intermix features with varying degrees of value to
 ordinary Perl 5 users.  If one wants to sell long-time Perl 5 users
 (already using the latest Perl 5, Moose, etc.) on the value of Perl 6, what
 should be on the important feature list?

 For me, stronger typing, named subroutine arguments, better classes and
 namespaces, object methods, and eventually better concurrency and compiled
 program persistence are among goodies long awaited.

 Thanks.

 -Tom

 The reason for my request is to help with a better introduction in my modest
 draft tutorial on converting Perl 5 to Perl 6 code at the Perl Monastery.  I
 am comfortable with the example code I use there (which is not currently
 intended to showcase new features), but I am getting several comments on why
 one should even bother with Perl 6?



-- 
Pozdrawiam

Kamil Kułaga


Re: What are Perl 6's killer advantages over Perl 5?

2015-08-12 Thread Fagyal Csongor

Hi,

On Tue, Aug 11, 2015 at 07:12:00AM -0500, Tom Browder wrote:

I have seen several lists of new Perl 6 features (versus Perl 5) but they
all seem to be lists that intermix features with varying degrees of value
to ordinary Perl 5 users.  If one wants to sell long-time Perl 5 users
(already using the latest Perl 5, Moose, etc.) on the value of Perl 6, what
should be on the important feature list?

For me, stronger typing, named subroutine arguments, better classes and
namespaces, object methods, and eventually better concurrency and compiled
program persistence are among goodies long awaited.

Thanks.

-Tom

The reason for my request is to help with a better introduction in my
modest draft tutorial on converting Perl 5 to Perl 6 code at the Perl
Monastery.  I am comfortable with the example code I use there (which is
not currently intended to showcase new features), but I am getting several
comments on why one should even bother with Perl 6?

In talking to Perl 5 people about my Perl 5 to Perl 6 docuentation,
trying to get some feedback on it from people who aren't already doing
Perl 6, I get this question a lot. So, yes, some kind of document saying
these are reasons Perl 6 is actually useful would be very helpful.

Just make them look at Perl6 source code. E.g. on rosettacode. Someone 
who doesn't see how wonderful Perl6 is, is a lost soul anyway. :)


- Fagzal