Re: Fwd: Re: Variables in modules

2017-03-09 Thread Todd Chester
On 03/09/2017 02:22 PM, Theo van den Heuvel wrote: Is this what you are looking for? our $IAm is export; ( $IAm = $?FILE ) ~~ s|.*"/"||; Hi Theo, Almost. I only want the code inside the module (pm) to see it. I don't want it exported. On the other hand, you just taught me h9owto

Fwd: Re: Variables in modules

2017-03-09 Thread Theo van den Heuvel
Is this what you are looking for? our $IAm is export; ( $IAm = $?FILE ) ~~ s|.*"/"||; -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: [perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread Brandon Allbery
The discussion I'm thinking of starts around here: http://colabti.org/irclogger/irclogger_log/perl6?date=2017-03-04#l1490 On Thu, Mar 9, 2017 at 4:04 PM, Zefram wrote: > Brandon Allbery via RT wrote: > >In any case I am specifically thinking of a discussion recently in IRC >

Re: [perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread Zefram
Brandon Allbery via RT wrote: >In any case I am specifically thinking of a discussion recently in IRC >which went over why at least some of this is actually self-consistent *for >perl 6*. I would be interested in seeing that discussion. >(That said, there may actually be some lingering

Re: [perl #130970] [BUG] Set.new confused by Nil

2017-03-09 Thread Zefram
Brandon Allbery via RT wrote: >Erm. Isn't Nil a silent Failure? It may well represent such a thing, but it is also a reified object. Putting objects into sets is an operation that's applicable to any kind of object, and which (for comparison) does in fact work on objects of the Failure class.

Re: [perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread Brandon Allbery
Self-consistency is itself a fuzzy concept. In any case I am specifically thinking of a discussion recently in IRC which went over why at least some of this is actually self-consistent *for perl 6*. I may be able to dig it up again, or hopefully someone else already has it on tap. (That said,

Re: [perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread Zefram
Brandon Allbery via RT wrote: >This should be your hint. Enums *are* numeric, specifically Int. I'm aware of that, and that's why I call this an LTA rather than a bug, and why I didn't say conclusively which coercion was wrong. Indeed, on the basis of the enum/Int subclassing, I proposed in [perl

Re: issues with

2017-03-09 Thread ToddAndMargo
On 03/09/2017 04:00 AM, Timo Paulssen wrote: Hey, X11::Xlib::Raw is buggy. It has to have all modules it uses internally inside its "provides" section in the META6.json, otherwise "use" will not find them. I'll open a ticket with the module author. HTH - Timo Hi Timo, As long as

Re: Variables in modules

2017-03-09 Thread ToddAndMargo
On 03/09/2017 03:58 AM, Timo Paulssen wrote: "my" variables are lexically scoped to the curly braces that contain them. That means that your $IAm is limited exactly to that init block. Also, =~ isn't in perl6. You can put "my $IAm" outside that block and assign to it inside the block, though.

Re: [perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread Brandon Allbery
On Thu, Mar 9, 2017 at 2:55 PM, Zefram wrote: > The same goes for coercions from other enum types. This should be your hint. Enums *are* numeric, specifically Int. I don't know what language you are trying to force Perl 6 to be, but you might want to consider the

Re: [perl #130970] [BUG] Set.new confused by Nil

2017-03-09 Thread Brandon Allbery
Erm. Isn't Nil a silent Failure? Insisting that it be propagated and retained in all circumstances basically asserts that it must be a distinct concrete value, and specifically *not* any form of Failure. Could someone clarify this? (At present my understanding is that it is a silent Failure and

[perl #130970] [BUG] Set.new confused by Nil

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130970] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130970 > > Set.new(Nil).perl set(Any) > set(Nil).perl set(Any) > set(Nil).WHICH Set|Any|U16962232

[perl #130969] [LTA] more inconsistent coercions for Bool

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130969] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130969 > On the same lines as [perl #127019], the Bool.Real coercion is surprisingly inconsistent with

[perl #130965] [LTA] `but role { ... }` interacts strangely with outer lexicals, and doesn't warn about it

2017-03-09 Thread jn...@jnthn.net via RT
On Thu, 09 Mar 2017 07:39:39 -0800, elizabeth wrote: > Yes, this is because classes / roles are not proper closures. And > yes, I’ve been bitten by this as well. > It boils down to roles and classes being compile-time constructs, while closures are decidedly runtime ones. You can force a role

[perl #130968] [BUG] Range.new confused by Nil

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130968] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130968 > The Range class allows almost anything to be used as an endpoint, including most type objects.

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Will Coleda
Recommended to use ".fc" instead of ".uc" when trying to do manual case-insenstive matches. (helps out with unicode edge cases) On Thu, Mar 9, 2017 at 1:48 PM, Theo van den Heuvel wrote: > however in such a simple case we could just write > > token idf { $=[ \w+ ] .uc eq

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
however in such a simple case we could just write token idf { $=[ \w+ ] .uc eq 'WHERE' }> } cheers, Theo van den Heuvel schreef op 2017-03-09 19:42: I use something like token idf { $=[ \w+ ] ~~ :i/^ where $/}> } but there are likely to be simpler solutions. yary schreef op 2017-03-09

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
I use something like token idf { $=[ \w+ ] ~~ :i/^ where $/}> } but there are likely to be simpler solutions. yary schreef op 2017-03-09 16:12: The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long

[perl #130891] [LTA] infix: always returns a Block with .arity 0 and .count Inf

2017-03-09 Thread Zoffix Znet via RT
On Tue, 28 Feb 2017 14:41:07 -0800, sml...@gmail.com wrote: > my = *+1; > my = */2; > > say # 1 > say # 1 > say ( o ).arity; # 0 > > say # 1 > say # 1 > say ( o ).count; # Inf > > Ideally, the result of the `o` operator

[perl #130967] [BUG] Junction.perl confused by iterable element

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130967] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130967 > > any(([],)).perl any([]) > any(([],)).perl.EVAL.perl any() > any(((),)).perl any(()) >

[perl #130965] [LTA] `but role { ... }` interacts strangely with outer lexicals, and doesn't warn about it

2017-03-09 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #130965] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130965 > sub a ($a) { return True but role { method foo { $a } } }

Re: [perl #130965] [LTA] `but role { ... }` interacts strangely with outer lexicals, and doesn't warn about it

2017-03-09 Thread Elizabeth Mattijsen
Yes, this is because classes / roles are not proper closures. And yes, I’ve been bitten by this as well. To me, making them proper closures, feels like the correct solution to me. But I’ll settle for a warning / exceptione :-) > On 9 Mar 2017, at 16:35, Sam S. (via RT)

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread yary
The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you want to change "identifier" to

Re: [perl #130963] [BUG] Array.perl.EVAL loses Nil

2017-03-09 Thread Zefram
Zoffix Znet via RT wrote: >Looks to me it's not Nil it's losing, it's the `is default` that it's losing: That's a reasonable way to look at it. Note that a binding also loses its bindiness: > my @a; @a[0] := Nil Nil > @a[0] Nil > @a.perl.EVAL[0] (Any) > @a.perl.EVAL[0] = 3 3 > @a[0] = 3 Cannot

[perl #130963] [BUG] Array.perl.EVAL loses Nil

2017-03-09 Thread Zoffix Znet via RT
On Thu, 09 Mar 2017 04:06:27 -0800, zef...@fysh.org wrote: > > my @a is default(Nil); @a[0] = Nil > Nil > > @a[0] > Nil > > @a.perl.EVAL[0] > (Any) > > .perl.EVAL fails to round-trip the Nil element value in the Array. > Nil itself round-trips fine, so the failure here is specific to the Array. >

Re: Your thoughts on Padre?

2017-03-09 Thread Timo Paulssen
On 09/03/17 08:29, ToddAndMargo wrote: > https://atom.io/ > > as it is specifically written for Perl 6 Not quite. It's a general-purpose code editor that you could say comes from the javascript corner of programming. However, we do have active devs improving the perl6-related plugins for

Re: Your thoughts on Padre?

2017-03-09 Thread Luca Ferrari
On Thu, Mar 9, 2017 at 8:29 AM, ToddAndMargo wrote: > https://atom.io/ > > as it is specifically written for Perl 6 > I'm not sure about that...but I would prefer Emacs. Luca

Re: [perl #130962] [BUG] List.Array loses Nil

2017-03-09 Thread Zefram
Elizabeth Mattijsen via RT wrote: >The *only* way to keep Nil in here, is to make it the default: There's also binding: > my @a; @a[0] := Nil Nil > @a[0] Nil >I'm not sure we want to do that for all Array coercions, It's not required for all Array coercions. Only where there's a Nil element

Re: [perl #130962] [BUG] List.Array loses Nil

2017-03-09 Thread Elizabeth Mattijsen
> On 9 Mar 2017, at 12:57, Zefram (via RT) wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130962] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=130962 > > >

[perl #130963] [BUG] Array.perl.EVAL loses Nil

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130963] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130963 > > my @a is default(Nil); @a[0] = Nil Nil > @a[0] Nil > @a.perl.EVAL[0] (Any) .perl.EVAL fails

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Timo Paulssen
Hi, Wouldn't it be enough to use something that backtracks? As you might know, "token" is "regex + ratcheting" and "rule" is "token + sigspace". HTH - Timo

Re: issues with

2017-03-09 Thread Timo Paulssen
Hey, X11::Xlib::Raw is buggy. It has to have all modules it uses internally inside its "provides" section in the META6.json, otherwise "use" will not find them. I'll open a ticket with the module author. HTH - Timo On 08/03/17 22:08, ToddAndMargo wrote: > Hi All, > > What is wrong with this?

Re: Variables in modules

2017-03-09 Thread Timo Paulssen
"my" variables are lexically scoped to the curly braces that contain them. That means that your $IAm is limited exactly to that init block. Also, =~ isn't in perl6. You can put "my $IAm" outside that block and assign to it inside the block, though. HTH - Timo

[perl #130962] [BUG] List.Array loses Nil

2017-03-09 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130962] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130962 > > (Nil,).perl (Nil,) > (Nil,).Array.perl [Any] The coercion from List to Array transforms the

Re: Your thoughts on Padre?

2017-03-09 Thread Andreas Mueller
how funny is that ?? =:-) (please watch the clip) but I think we need an editor written in perl6 - not in Java ;) -am On 08.03.17 23:29, ToddAndMargo wrote: > Hi All, > > The guys on the chat line told me to look at > > https://atom.io/ > > as it is specifically written