Re: [perl #126099] [BUG] .WHICH fails for Block but True

2017-12-03 Thread Elizabeth Mattijsen
Can be golfed to “Block but True”. Problem also existed for “Code but True”. Fixed with e31a414 . Tests needed. > On 3 Dec 2017, at 05:00, Aleks-Daniel Jakimenko-Aleksejev via RT > wrote: > > Still reproducible (2017.11,HEAD(e5b660e)) > > On 2015-09-18 12:12:49, zef

Re: [perl #126099] [BUG] .WHICH fails for Block but True

2017-12-03 Thread Elizabeth Mattijsen via RT
Can be golfed to “Block but True”. Problem also existed for “Code but True”. Fixed with e31a414 . Tests needed. > On 3 Dec 2017, at 05:00, Aleks-Daniel Jakimenko-Aleksejev via RT > wrote: > > Still reproducible (2017.11,HEAD(e5b660e)) > > On 2015-09-18 12:12:49, zef

[perl #126099] [BUG] .WHICH fails for Block but True

2017-12-02 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Still reproducible (2017.11,HEAD(e5b660e)) On 2015-09-18 12:12:49, zef...@fysh.org wrote: > Basic introspection methods fail on the value Block but True: > > $ ./perl6 -e 'my $a = Block; say $a.WHICH; my $b = Block but True; say > $b.WHICH' > Block > Cannot look up

Re: [perl #126098] [BUG] malformed .perl for Mu but True

2017-12-01 Thread Zefram via RT
epresenting everything else. For example, "(Mu but True).perl" could yield the string "Mu". The bug is that .perl produces output so broken that .EVAL errors. -zefram

Re: [perl #126098] [BUG] malformed .perl for Mu but True

2017-12-01 Thread Zefram
epresenting everything else. For example, "(Mu but True).perl" could yield the string "Mu". The bug is that .perl produces output so broken that .EVAL errors. -zefram

[perl #126098] [BUG] malformed .perl for Mu but True

2017-12-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Do we really want it to dump the source? Or am I misunderstanding something? On 2015-09-18 12:09:19, zef...@fysh.org wrote: > $ ./perl6 -e 'my $a = Mu but True; say $a.WHICH; say $a.perl; my $b = > $a.perl.EVAL' > Mu+{} > Mu+{} > X::Multi::NoMatch exception produced no messag

[perl #126097] [BUG] lossy .perl for 0 but True

2015-09-18 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #126097] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126097 > If .perl is used to serialise a value of 0 but True, it doesn't represent the but-Tru

[perl #126098] [BUG] malformed .perl for Mu but True

2015-09-18 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #126098] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126098 > $ ./perl6 -e 'my $a = Mu but True; say $a.WHICH; say $a.perl; my $b = $a.perl.EVAL&#

[perl #126099] [BUG] .WHICH fails for Block but True

2015-09-18 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #126099] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126099 > Basic introspection methods fail on the value Block but True: $ ./perl6 -e 'my $a

[perl #100782] [BUG] nom does not handle short form '$val but True'

2011-10-07 Thread via RT
# New Ticket Created by Geoffrey Broadwell # Please include the string: [perl #100782] # in the subject line of all future correspondence about this issue. # https://rt.perl.org:443/rt3/Ticket/Display.html?id=100782 > nom does not understand the short form phrases '$val but True&#x

[perl #65514] Can't mix in True or False as ($value but True)

2010-06-06 Thread jn...@jnthn.net via RT
On Sat May 09 04:31:06 2009, moritz wrote: > This works fine: > > $ ./perl6 -e 'enum A ; ("abc" but c).uc.say' > ABC > > This doesn't > > $ >./perl6 -e '("abc" but Bool::True).uc.say' > The but operator can only be used with a role or enum value on the right > hand side > You can now write this

[perl #72848] [BUG] '0 but True' causes a no-applicable-candidates error in Rakudo

2010-02-15 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #72848] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=72848 > rakudo: 0 but True rakudo 70667a: OUTPUT«No applicable candidates foun

[perl #65514] Can't mix in True or False as ($value but True)

2009-05-10 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #65514] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=65514 > This works fine: $ ./perl6 -e 'enum A ; ("abc" but c).uc.say' ABC This doesn't $ >./pe

Re: but true

2003-12-23 Thread Larry Wall
etting the value to the enum value that means "nope". For example, there isn't a "true" property, per se. There's a Boolean role/property with a boolean attribute that can have the value either true or false. When you say "but true", it first makes sure that

Re: but true

2003-12-23 Thread Piers Cawley
correctly, adding a role at runtime using but > : won't override any methods defined by the class itself (but it > : will override inherited methods). But then if I create a class > : that has its own method of saying whether it's true or not, does > : that mean that

Re: but true

2003-12-20 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > is classof($x) Ouch. $x's class isn't a property or trait of it? > class AnonClass is classof($x) does FooBar { }.bless($x, foobar => bar) I don't understand what the bit at the end is doing. This is calling .bless on the overriden method? And I'm not

Re: but true

2003-12-20 Thread Jonathan Lang
Larry Wall wrote: > Maybe there's an intermediate syntactic form like: > > $x but subclass MyClass does FooBar[bar] { } IMHO, C should be defined as generating a singleton class that derives from the variable's class and composes a specified role - but not neccessarily a I role. How about de

Re: but true

2003-12-19 Thread Larry Wall
On Fri, Dec 19, 2003 at 12:24:29PM -0700, Luke Palmer wrote: : Abhijit A. Mahabal writes: : > On Fri, 19 Dec 2003, Larry Wall wrote: : > : > > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: : > > : Of course, when I do: : > > : : > >

Re: but true

2003-12-19 Thread Luke Palmer
Abhijit A. Mahabal writes: > On Fri, 19 Dec 2003, Larry Wall wrote: > > > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: > > : Of course, when I do: > > : > > : my $x = 0 but (true|false); > > : > > : then what happens? > > >

Re: but true

2003-12-19 Thread Abhijit A. Mahabal
On Fri, 19 Dec 2003, Larry Wall wrote: > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: > : Of course, when I do: > : > : my $x = 0 but (true|false); > : > : then what happens? > > That's the problem with making them methods. Any such operational

Re: but true

2003-12-19 Thread Larry Wall
On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote: : Of course, when I do: : : my $x = 0 but (true|false); : : then what happens? That's the problem with making them methods. Any such operational definition is going to get you in trouble. I think I like them better as

Re: but true

2003-12-19 Thread Larry Wall
ide any methods : defined by the class itself (but it will override inherited methods). But then : if I create a class that has its own method of saying whether it's true or not, : does that mean that "but true" and "but false" won't do anything to it? :

Re: but true

2003-12-19 Thread Austin Hastings
; > > > > ... > > > > > > then somewhere in a function > > > > return Complex::new(0,0) but true; > > Alternatively, think of the "simple" properties not as C > specifications, but as method overrides. > > In this case, we're d

Re: but true

2003-12-19 Thread Austin Hastings
ded to a class cannot conflict (per the paper and $Larry), but traits added at run-time would be a different category. Larry said something about dynamic derivation of a singleton class, etc. > But then if I create a class that has its own method of saying > whether it's true or not,

but true

2003-12-19 Thread Adam D. Lopresto
methods). But then if I create a class that has its own method of saying whether it's true or not, does that mean that "but true" and "but false" won't do anything to it? class Complex { has $.real; has $.imag; ... #Actually, how do we define this? method asB

RE: Properties and "0 but true".

2001-05-18 Thread Austin Hastings
> That's not how I see it. The filehandle is naturally true if > it succeeds. It's the undef value that wants to have more > information. In fact, you could view $! as a poor-man's > way of extracting the error that was attached to the last > undef. Hmm. Thus? sub fuu() { my $retval is err

RE: Properties and "0 but true".

2001-05-18 Thread David Grove
> David Grove writes: > : > That's not how I see it. The filehandle is naturally true if it > : > succeeds. It's the undef value that wants to have more information. > : > In fact, you could view $! as a poor-man's way of extracting the error > : > that was attached to the last undef. > : > : If

Re: Properties and "0 but true".

2001-05-18 Thread Larry Wall
David Grove writes: : > That's not how I see it. The filehandle is naturally true if it : > succeeds. It's the undef value that wants to have more information. : > In fact, you could view $! as a poor-man's way of extracting the error : > that was attached to the last undef. : : If I were wealt

RE: Properties and "0 but true".

2001-05-18 Thread David Grove
> That's not how I see it. The filehandle is naturally true if it > succeeds. It's the undef value that wants to have more information. > In fact, you could view $! as a poor-man's way of extracting the error > that was attached to the last undef. If I were wealthy enough in time and patience t

Re: Properties and "0 but true".

2001-05-18 Thread Larry Wall
h, except in the places you currently would see "0 but true". I think the status will generally be returned as the actual argument, and extra info attached as a property: return undef is error("Gorkulator borked"); That is, it's returning the exception that it *would*

Re: Properties and "0 but true".

2001-05-18 Thread Austin Hastings
--- Jarkko Hietaniemi <[EMAIL PROTECTED]> wrote: > Yes... if you are using only the "true" property. But assume func() > can attach either "true" or "false" to its return value (and in the > latter case, also the "what_went_wrong" property to indicate the > cause, > $retval.what_went_wrong("Gork

Re: Properties and "0 but true".

2001-05-18 Thread Jarkko Hietaniemi
> The statement I read was "true in any possible way", which implies that > if $retval had a "true" property, the result of func would be > irrelevant, since if func gave 0, "any possible way" would see the > "$retval is true" property and take the "it worked" route. > > Thus, this code: > > my

Re: Properties and "0 but true".

2001-05-18 Thread Austin Hastings
> false" > > Any feature is incomprehensible if one is not used to it. Pointers > in C are incomprehensible if one has never met the concept before. > > As far as I understand one rationale behind the "false (in Perl 5 > terms) > but true (in Perl 6 terms)" is t