Re: Learn Perl 6

2016-09-28 Thread Francis (Grizzly) Smit
I did this too and it wasn't till the third page of results that I found 
FUD, Perl6 is looking more and more up :-)



On 29/09/16 14:22, Brock Wilcox wrote:

Good feedback.

I just did a similar search in a fresh (incognito) browser with 
similar, though not quite as bad, results. All the top things at least 
are active and have links to good stuff. I don't know what "SixFix" 
is, but I signed up :)



On Wed, Sep 28, 2016 at 8:56 PM, Sayth Renshaw > wrote:


Hi

I wanted to bring up something to the perl 6 community from
somewhat of an outsider however i have quitely installed several
rakudo releases over last few years.

Type "learn perl6" into google. Not sure you will like what you
see the first 2 results are acceptable perl 6 in x y and the
actual Perl 6 site.

Below this we find a currently offline perl6 site and a quora
question on why perl6 failed.

The perl6 site lacks impact and clarity to engage new users. Left
me wondering if from that page i could answer what are the big 3
benefits i would get from perl 6, why use it.

No info on the page that i could inline:perl to use perl5 modules
in 6 and no try in browser offer.

This is not a gripe, just putting it out there is this something
to be improved. Rsther than hackathon do a docsthon, promothon to
get some positive vibe out and provide clear direction.

Sayth



--

   .~. In my life God comes first
   /V\ but Linux is pretty high after that :-D
  /( )\Francis (Grizzly) Smit
  ^^-^^http://www.smit.id.au/
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C UL$ P+++ L+++$ E--- W+++
N w--- M-- V-- PE- PGP t+ 5-- X-- R- tv b DI(+) D-
G e++ h+ y? r% z---
--END GEEK CODE BLOCK--
http://www.geekcode.com/



Re: Learn Perl 6

2016-09-28 Thread Brock Wilcox
Good feedback.

I just did a similar search in a fresh (incognito) browser with similar,
though not quite as bad, results. All the top things at least are active
and have links to good stuff. I don't know what "SixFix" is, but I signed
up :)


On Wed, Sep 28, 2016 at 8:56 PM, Sayth Renshaw 
wrote:

> Hi
>
> I wanted to bring up something to the perl 6 community from somewhat of an
> outsider however i have quitely installed several rakudo releases over last
> few years.
>
> Type "learn perl6" into google. Not sure you will like what you see the
> first 2 results are acceptable perl 6 in x y and the actual Perl 6 site.
>
> Below this we find a currently offline perl6 site and a quora question on
> why perl6 failed.
>
> The perl6 site lacks impact and clarity to engage new users. Left me
> wondering if from that page i could answer what are the big 3 benefits i
> would get from perl 6, why use it.
>
> No info on the page that i could inline:perl to use perl5 modules in 6 and
> no try in browser offer.
>
> This is not a gripe, just putting it out there is this something to be
> improved. Rsther than hackathon do a docsthon, promothon to get some
> positive vibe out and provide clear direction.
>
> Sayth
>


Learn Perl 6

2016-09-28 Thread Sayth Renshaw
Hi

I wanted to bring up something to the perl 6 community from somewhat of an
outsider however i have quitely installed several rakudo releases over last
few years.

Type "learn perl6" into google. Not sure you will like what you see the
first 2 results are acceptable perl 6 in x y and the actual Perl 6 site.

Below this we find a currently offline perl6 site and a quora question on
why perl6 failed.

The perl6 site lacks impact and clarity to engage new users. Left me
wondering if from that page i could answer what are the big 3 benefits i
would get from perl 6, why use it.

No info on the page that i could inline:perl to use perl5 modules in 6 and
no try in browser offer.

This is not a gripe, just putting it out there is this something to be
improved. Rsther than hackathon do a docsthon, promothon to get some
positive vibe out and provide clear direction.

Sayth


[perl #129756] method CALL-ME comes out of nowhere

2016-09-28 Thread via RT
# New Ticket Created by  Wenzel Peppmeyer 
# Please include the string:  [perl #129756]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129756 >


S13-overloading/typecasting-long.t tests quite heavily for CALL-ME but 
that method comes out of nowhere (that nowhere is InvocationProtocol.nqp 
in this case). It seams to me there should be a `method CALL-ME {...}` in 
the role Callable to prevent confusion when a class does that role.

I have blindly doced this method in Callable.pod6 as it seamed to be the 
right place to place it. If that was wrong the following commit needs 
undoing.

https://github.com/perl6/doc/commit/f80d7e5a5948ad1d538213f2d34c96f329c303f3



Re: pull results out of a variable

2016-09-28 Thread Brandon Allbery
On Wed, Sep 28, 2016 at 5:15 PM, Nex6 via perl6-users 
wrote:

> my $results = run 'ping', '-c', '1',$line;
>
> where $line is the IP address, $results hold the result how can i pull the
> results out? it outputs like this:
>

Actually, it doesn't have them with that invocation; they went to stdout,
which is probably your terminal. In any case, $result is a Proc object
representing the thing you ran, and will get the exit status when ping
exits.

my $proc = run 'ping', '-c', '1', $line, :out;
my $result = $proc.out.lines;

This tells `run` to capture the output with the Proc object, and you can
retrieve it with the `out` method (which returns an IO::Handle) as above.

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


pull results out of a variable

2016-09-28 Thread Nex6 via perl6-users
Hi all,

just starting my journey down Perl6, figured best way to learn it is to write 
stuff so i am do some stuff I have done in other languages. as ideas
for what to write. first a ping sweep; 

problem is:

if i:

my $results = run 'ping', '-c', '1',$line;

where $line is the IP address, $results hold the result how can i pull the 
results out? it outputs like this:

PING 4.2.2.5 (4.2.2.5): 56 data bytes
64 bytes from 4.2.2.5: icmp_seq=0 ttl=53 time=2.147 ms

--- 4.2.2.5 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.147/2.147/2.147/0.000 ms


Thanks in advance

-Nex6





[perl #127967] [JVM] Test in S06-advanced/wrap.t dies with "control operator crossed continuation barrier"

2016-09-28 Thread Christian Bartolomaeus via RT
I made a PR for my suggested change and with NQP commit 9da2705b1b the test 
passes on JVM.

I'm closing this ticket as 'resolved'.


[perl #128579] [JVM] ver and auth meta methods not present on packages

2016-09-28 Thread Christian Bartolomaeus via RT
With rakudo commit 5435f32949 the tests are passing again. I'm closing this 
ticket again.


[perl #64766] [JVM] Possibly inconsistent behaviour in mixing-in of 'handles'

2016-09-28 Thread Christian Bartolomaeus via RT
With rakudo commit 5435f32949 the test passes again on JVM. I'm closing this 
ticket.


[perl #129375] [JVM] wrong exception type thrown: "Applying traits to submethods retains submethod semantics"

2016-09-28 Thread Christian Bartolomaeus via RT
With commit rakudo 5435f32949 the test passes again. I'm closing this ticket.


[perl #129753] [BUG] Smartmatching Promise against an Enum hangs

2016-09-28 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #129753]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129753 >


Filing for records. Fixed by jnthn++ in 
https://github.com/rakudo/rakudo/commit/2673ca85c1835469d2c41047a656ae340e84a96b

Smartmatching a Promise against an Enum hangs:

m: my $p = Promise.new; my $v = $p.vow; say $p ~~ Planned
rakudo-moar 5f9103: OUTPUT«(timeout)»

Digging further, it leads to doing a `==` on a Promise hanging.

Which is due to it attempting to coerce itself to a Numeric over and over again.

IRC Conversation: http://irclog.perlgeek.de/perl6/2016-09-28#i_13303005


[perl #129430] where-clause on capture does not work

2016-09-28 Thread jn...@jnthn.net via RT
On Wed Sep 28 03:23:35 2016, gfldex wrote:
> sub f( |c where { c } ) {}; f 42
> 
> # OUTPUT«===SORRY!=== Error while compiling ␤Variable '&c' is not
> declared␤at :1␤--> sub f( |c where { ⏏c } ) {}; f 42␤»
> 
> # expected to work analog to
> 
> sub f( *@a where { @a } ) {}; f 42

The declaration was happening a little too late. Fixed and added a test in 
S12-subset/subtypes.t.

/jnthn



Re: Best way to get a PCRE6 on the JVM?

2016-09-28 Thread Patrick R. Michaud
A simpler approach might be to build an NQP that runs on the JVM, and
find a way to call into it.  (The Perl 6 regular expression engine is
written in NQP.)

Pm

On Wed, Sep 28, 2016 at 09:21:50AM -0400, Will Coleda wrote:
> To start with, there isn't a PCRE6.
> 
> If you want, more generically, to be able to use Perl 6 Regular
> Expressions in Java, you can build a rakudo that runs (with reduced
> functionality) on the JVM.
> 
> I'm not sure there's a way at this point to call into the Perl 6 code
> from arbitrary Java code, however.
> 
> On Wed, Sep 28, 2016 at 6:10 AM, Toolforger  wrote:
> > Hi all,
> >
> > title says it all: I have a use case for a Perl6 PCRE on the JVM.
> >
> > Sorry for wasting your time if such a thing already exists; if no, I'd like
> > to discuss strategies how to best do that.
> >
> > Thanks in advance!
> > Jo
> 
> 
> 
> -- 
> Will "Coke" Coleda


[perl #129344] [BUG] "my" variable in a recursive subroutine leaks to callers scope

2016-09-28 Thread jn...@jnthn.net via RT
On Sat Sep 24 01:02:24 2016, lloyd.fo...@gmail.com wrote:
> Reproduced. Looks like you shouldn't nest subs inside recursive functions
> atm :S.

I think it's only multis that suffer the problem.

/jnthn


[perl #129364] named arguments in sub signature not filled with values in surrounding where clause

2016-09-28 Thread jn...@jnthn.net via RT
On Mon Sep 26 15:42:15 2016, gfldex wrote:
> sub f( | ( :$a) where { dd $a } ) {}; f 42
> 
> # OUTPUT«Mu␤Constraint type check failed for parameter ''␤in sub f 
> at  line 1␤  in block  at  line 1␤␤»
> 
> # it should either work or complain that $a is not declared in this scope

Making it work would imply that we move checking of constraints to after 
unpacking the sub-signature, which would be a change of behavior from today 
(and mean that you cannot use the where clause to guard the unpack). So that's 
not really an option; it's useful in both ways, and you can get the other way 
by simply moving the where clause inside of the sub-signature.

$ ./perl6-m -e 'sub f( | ( :$a where { dd $a } ) ) {}; f a => 42'
Int $a = 42
Constraint type check failed for parameter '$a' in sub-signature
  in sub f at -e line 1
  in block  at -e line 1

The fail is simply because `dd` returns `Nil`, which is falsey.

The problem with "not declared" is that it is declared in that the symbol has 
already been poked into the symbol table, it's just not yet bound to a value 
because the where clause runs prior to the unpack. Contrast it with:

$ ./perl6-m -e 'sub f( | where { dd $a } (:$a) ) {}; f 42'
===SORRY!=== Error while compiling -e
Variable '$a' is not declared
at -e:1
--> sub f( | where { dd ⏏$a } (:$a) ) {}; f 42

Which fails as expected.

In summary, I'm not at all sure we want to "make it work". Some kind of warning 
or error that you reference the symbol before it's bound is possible, though I 
suspect implementing it will involve quite some contortions, as it goes against 
the one-passing that such errors typically fall out of.

/jnthn



Re: Best way to get a PCRE6 on the JVM?

2016-09-28 Thread Will Coleda
To start with, there isn't a PCRE6.

If you want, more generically, to be able to use Perl 6 Regular
Expressions in Java, you can build a rakudo that runs (with reduced
functionality) on the JVM.

I'm not sure there's a way at this point to call into the Perl 6 code
from arbitrary Java code, however.

On Wed, Sep 28, 2016 at 6:10 AM, Toolforger  wrote:
> Hi all,
>
> title says it all: I have a use case for a Perl6 PCRE on the JVM.
>
> Sorry for wasting your time if such a thing already exists; if no, I'd like
> to discuss strategies how to best do that.
>
> Thanks in advance!
> Jo



-- 
Will "Coke" Coleda


[perl #129259] [UNI] Unicode 9.0 (say ‘

2016-09-28 Thread jn...@jnthn.net via RT
On Mon Sep 12 14:01:41 2016, alex.jakime...@gmail.com wrote:
> It is a known issue, but I figured a ticket is not going to hurt.
> 
> Code:
> say ‘🦋’.uniname
> 
> Result:
> 
> 
> Expected Result:
> BUTTERFLY

Works now, and added a test in S15-unicode-information/uniname.t to verify it 
works.

There are some further issues that need resolving as a result of bumping to 
Unicode 9, however. The NFG algorithm will need updates due to changes in the 
grapheme boundary specification to add support for emoji. There are already two 
RT issues tracking that issue, so I'll resolve this one given we've done what 
it says. :-)

/jnthn


[perl #129596] [BUG] .subst-mutate does not return all matches when :x option is used

2016-09-28 Thread Zoffix Znet via RT
Fixed in https://github.com/rakudo/rakudo/commit/f6524e61e8
Tests added in https://github.com/perl6/roast/commit/391ecba7b9


On Wed Sep 28 06:02:48 2016, c...@zoffix.com wrote:
> # I have the fix; filing for records
> 
> The .subst-mutate routine returns a Match object (or Nil) on singular
> operations or a List of Match objects when :g/:global is used, as that
> produces several matches.
> 
> The :x option also produces several matches:
> 
> m: say "1234567".match: /\d/, :x(5)
> rakudo-moar c01fc3: OUTPUT«(「1」 「2」 「3」 「4」 「5」)␤
> 
> However, only a single match object is returned when that option is
> used with .subst-mutate, even though the option does have the desired
> effect on the substitutions:
> 
> m: my $x = "1234567"; say $x.subst-mutate: /\d/, '', :x(5); say $x
> rakudo-moar c01fc3: OUTPUT«「1」␤67␤»





[perl #129596] [BUG] .subst-mutate does not return all matches when :x option is used

2016-09-28 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #129596]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129596 >


# I have the fix; filing for records

The .subst-mutate routine returns a Match object (or Nil) on singular 
operations or a List of Match objects when :g/:global is used, as that produces 
several matches.

The :x option also produces several matches:

m: say "1234567".match: /\d/, :x(5)
rakudo-moar c01fc3: OUTPUT«(「1」 「2」 「3」 「4」 「5」)␤

However, only a single match object is returned when that option is used with 
.subst-mutate, even though the option does have the desired effect on the 
substitutions:

m: my $x = "1234567"; say $x.subst-mutate: /\d/, '', :x(5); say $x
rakudo-moar c01fc3: OUTPUT«「1」␤67␤»



[perl #129430] where-clause on capture does not work

2016-09-28 Thread via RT
# New Ticket Created by  Wenzel Peppmeyer 
# Please include the string:  [perl #129430]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129430 >


sub f( |c where { c } ) {}; f 42

# OUTPUT«===SORRY!=== Error while compiling ␤Variable '&c' is not 
declared␤at :1␤--> sub f( |c where { ⏏c } ) {}; f 42␤»

# expected to work analog to

sub f( *@a where { @a } ) {}; f 42


Best way to get a PCRE6 on the JVM?

2016-09-28 Thread Toolforger

Hi all,

title says it all: I have a use case for a Perl6 PCRE on the JVM.

Sorry for wasting your time if such a thing already exists; if no, I'd 
like to discuss strategies how to best do that.


Thanks in advance!
Jo