Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-28 Thread Elizabeth Mattijsen
lines.contains... is really short for: lines.Str.contains... Do you then understand what's going on? > On 28 Jan 2023, at 21:41, William Michels via perl6-users > wrote: > > Some more examples: > > ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.contains(/ \h /).pu

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-28 Thread William Michels via perl6-users
Some more examples: ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.contains(/ \h /).put;' True ~$ raku -e 'put "1\02\03";' | raku -e 'lines.contains(/ \h /).put;' False ~$ raku -e 'put "1\02\03";' | raku -e 'lines.contains(/ 12 /).put;' False ~$ raku -e 'put "1

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
ers < > perl6-us...@perl.org> wrote: > >> ~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True >> !! False;' >> True >> > > lines() returns a Seq. The contains method for a Seq coerces its argument > to a Str and calls cont

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread Sean McAfee
On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < perl6-us...@perl.org> wrote: > ~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True > !! False;' > True > lines() returns a Seq. The contains method for a Seq coerces its argument

`lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
n2\n3";' | raku -e 'put slurp.contains(/ \h /) ?? True !! False;' False ~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True !! False;' True However, my 'control case' (second example above) is showing that a string devoid of apparent whitespace is coming up posi

EnumStr necessary for MAIN handling (was Fwd: [rakudo/rakudo] `MAIN`: `Str` arguments do not accept `True` or `False` (#2794))

2019-03-25 Thread Trey Ethan Harris
If one uses MAIN with arguments, one simply cannot get strings like "Bool::True" and "True" from the command line into the same argument, regardless of whether one uses no type constraint, a Str, a Str(), or a slurpy. See the quote below from rakudo #2794 <https://github.c

[perl #127869] [BUG] if my $match is True and False

2018-03-10 Thread Jan-Olof Hendig via RT
On Sun, 18 Dec 2016 15:36:31 -0800, c...@zoffix.com wrote: > On Sun, 10 Apr 2016 07:56:38 -0700, mar...@senfdax.de wrote: > > Hi there, > > > > following code dies in this line: > > > > if my $match = $r.match($meth, $uri) { die "What?!" unless $match } > > > > this happens on both moar-2015.12

[perl #125674] [LTA] error message prints wrong eject position (if True if { };)

2018-02-02 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
clared routine?)"); > > > > I tried various things but nothing can trigger it. I found (via > > google) some > > code snippets that used to result in this error message, but nowadays > > it simply > > says “Missing block”. I bisected that change to > > &g

[perl #127775] Declaring enums with Bools, IntStrs and maybe other things ( enum Foo (:Bar(1), :Baz(True) ))

2017-12-16 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Foo (:Bar(1), :Baz(<42>)) > > Result: > ===SORRY!=== > Incompatible MROs in P6opaque rebless for types IntStr and Foo > > On 2017-10-07 17:16:30, alex.jakime...@gmail.com wrote: > > Actually, it's not about the error message. The whole thing can be > > golfed t

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 > <perl6-bugs-follo...@perl.org> wrote: > > Still reproducible (2017.11,HEAD(e5b660e)) >

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 > <perl6-bugs-follo...@perl.org> wrote: > > Still reproducible (2017.11,HEAD(e5b660e)) >

[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 attribute

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

2017-12-01 Thread Zefram via RT
senting 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
senting 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
non|94497069725968>} 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 exceptio

[perl #127775] Declaring enums with Bools, IntStrs and maybe other things ( enum Foo (:Bar(1), :Baz(True) ))

2017-10-07 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
The whole thing can be > golfed to > this: > > enum Foo (:Bar(1), :Baz(True)) > > And the error happens because: > > Code: > use nqp; > say so nqp::istype(True, Int); > nqp::rebless(True, Int) > > Result: > True > Incompatible MROs in P6opaque r

[perl #125674] [LTA] error message prints wrong eject position (if True if { };)

2017-10-07 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
r it. I found (via > google) some > code snippets that used to result in this error message, but nowadays > it simply > says “Missing block”. I bisected that change to > https://github.com/rakudo/rakudo/commit/8a70c921e98ed260d3198d81b81b0960c8daa83b > > > On 2015-07-24

[perl #125674] [LTA] error message prints wrong eject position (if True if { };)

2017-10-06 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
that used to result in this error message, but nowadays it simply says “Missing block”. I bisected that change to https://github.com/rakudo/rakudo/commit/8a70c921e98ed260d3198d81b81b0960c8daa83b On 2015-07-24 05:13:59, alex.jakime...@gmail.com wrote: > Code: > if True if { }; > > ==

[perl #125463] [BUG] $non-existent-file.IO.unlink returns True

2017-05-01 Thread Zoffix Znet via RT
> On 23 Jun 2015, at 15:37, Rob Hoelz (via RT) follo...@perl.org> wrote: > Unlinking a non-existent file should fail() rather than return True. The end-goal of .unlinking stuff is for the file to stop existing. IMO that goal is achieved even if the method is called for non-existent

[perl #125463] [BUG] $non-existent-file.IO.unlink returns True

2017-05-01 Thread Zoffix Znet via RT
> On 23 Jun 2015, at 15:37, Rob Hoelz (via RT) follo...@perl.org> wrote: > Unlinking a non-existent file should fail() rather than return True. The end-goal of .unlinking stuff is for the file to stop existing. IMO that goal is achieved even if the method is called for non-existent

Re: [perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-08 Thread Lloyd Fournier
Thanks for doing that experiment. Not sure why the code breaks. But yeah on second thought it was a bad idea. If something accepts a Mu in its signature it should probably be given a Mu even with ~~. LL On Sat, Apr 8, 2017 at 12:58 PM Zoffix Znet via RT < perl6-bugs-follo...@perl.org> wrote: >

[perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-07 Thread Zoffix Znet via RT
On Fri, 07 Apr 2017 19:09:55 -0700, lloyd.fo...@gmail.com wrote: > IMO any() junctions should propagate exceptions regardless of whether one of > its other values succeeded Well, they do. The exception gets thrown. It just aborts all of the results. In a superimposition of multiple universes

Re: [perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-07 Thread Lloyd Fournier
rl.org> wrote: And if you just give a Failure into a Junction it doesn't explode it and propagates it: m: say so any("flarg",42)».Numeric rakudo-moar 15a25d: OUTPUT: «True␤» m: say sub ($_) { .^name }( +any("flarg",42) ) rakudo-moar 15a25d: OUTPUT: «any(Fail

[perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-07 Thread Zoffix Znet via RT
And if you just give a Failure into a Junction it doesn't explode it and propagates it: m: say so any("flarg",42)».Numeric rakudo-moar 15a25d: OUTPUT: «True␤» m: say sub ($_) { .^name }( +any("flarg",42) ) rakudo-moar 15a25d: OUTPUT: «any(Fai

[perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-07 Thread Zoffix Znet via RT
rts of the > junction if at least one of them satisfies the condition. You could, > for instance, evaluate that differently so the new junction looks > something like this: > > any( True, Failure ); > > But, I don't think it should evaluate to another junction at all. The &

[perl #131118] Junctions that can evaluate to True shouldn't blow up for items that won't

2017-04-07 Thread brian d foy
'.' in '⏏flarg' (indicated by ⏏) in block at line 1 But, it should't matter that what happens with any other parts of the junction if at least one of them satisfies the condition. You could, for instance, evaluate that differently so the new junction looks something like this: any( True, Failure ); Bu

[perl #130827] [BUG] %hash«$key»:exists is true allways

2017-02-22 Thread via RT
# New Ticket Created by Jarkko Haapalainen # Please include the string: [perl #130827] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130827 > EXAMPLE: my %hash = foo => 1; if %hash:exists { say "not gonna print this"; } my

[perl #130827] [BUG] %hash«$key»:exists is true allways

2017-02-21 Thread Zoffix Znet via RT
$x"» rakudo-moar 80e0bc: OUTPUT: «"a b"␤» So now, if we circle back to the original code: %hash«$key»:exists { say "why i'm here" }; It will always succeed, as long as $key is not an empty string, because you're always giving a slice to lookup and getting a list

[perl #130432] [REGRESSION] Changed behavior when assigning to array but not providing all elements (@b[1, 2, 3] = True)

2016-12-28 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130432] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130432 > Code: my @b; @b[1, 2, 3] = True; @b.perl.say Result (2015

[perl #130182] [LTA] Using True in a sub signature makes no sense but there is no warning (sub foo(True) {})

2016-12-25 Thread Zoffix Znet via RT
On Sat, 26 Nov 2016 13:19:50 -0800, alex.jakime...@gmail.com wrote: > *Code:* > sub foo(True) { say ‘ok’ }; > foo(False) > > *Result:* > ok > > > The reason for it is the following: > > *Code:* > 42 ~~ True > > *Result:* > Potential difficulties:

[perl #127869] [BUG] if my $match is True and False

2016-12-18 Thread Zoffix Znet via RT
On Sun, 10 Apr 2016 07:56:38 -0700, mar...@senfdax.de wrote: > Hi there, > > following code dies in this line: > > if my $match = $r.match($meth, $uri) { die "What?!" unless $match } > > this happens on both moar-2015.12 and moar-2016.03 > > > > > > class Abc { > has Str $.method; >

Re: [perl #130365] [REGRESSION] last in grep is no longer working (.grep(last if $_ < 50; True}))

2016-12-16 Thread Elizabeth Mattijsen
loop, so next and last without an argument > will iterate or terminate the grep itself, not some loop surrounding the > statement containing the grep” > > OK, so 「last」 in grep is supposed to work. And it did… > > Code: > say (^Inf).grep({last if $_ > 5; True})[^20] > > Resu

[perl #130365] [REGRESSION] last in grep is no longer working (.grep(last if $_ < 50; True}))

2016-12-16 Thread via RT
op, so next and last without an argument will iterate or terminate the grep itself, not some loop surrounding the statement containing the grep” OK, so 「last」 in grep is supposed to work. And it did… Code: say (^Inf).grep({last if $_ > 5; True})[^20] Result (2016.02): (0 1 2 3 4 5 Nil Nil Ni

[perl #130251] [LTA] error message when a semicolon is missing before a while loop (my $x = 5 while True {})

2016-12-03 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130251] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130251 > Code: my $x = 5 while True { } Result: ===SORRY!=== Error wh

[perl #121940] [@LARRY] say True but False # should be 'True' (advent2010-day19)

2016-11-26 Thread Zoffix Znet via RT
On Thu, 11 Aug 2016 06:14:52 -0700, sml...@gmail.com wrote: > You're right, that one *is* inconsistent with `True but False`. > > `$bool1 but $bool2` and `$int1 but $int2` should either both override > the value, or both *not* override the value. There's actually no inconsistency a

[perl #130182] [LTA] Using True in a sub signature makes no sense but there is no warning (sub foo(True) {})

2016-11-26 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130182] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130182 > *Code:* sub foo(True) { say ‘ok’ }; foo(False) *Result:*

[perl #121940] [@LARRY] say True but False # should be 'True' (advent2010-day19)

2016-08-09 Thread David Warring via RT
The behavious still seems the same: % perl6 --v This is Rakudo version 2016.07.1-135-g77724b2 built on MoarVM version 2016.07-16-g85b6537 implementing Perl 6.c. % perl6 -e'my $s = False but True; say $s; say $s.so;' True True This is inconsistent with: % perl6 -e'my $s = 0 but True; say $s

[perl #121940] [@LARRY] say True but False # should be 'True' (advent2010-day19)

2016-08-09 Thread Will Coleda via RT
On Wed May 21 13:36:58 2014, david.warring wrote: > [08:09] r: my $value = True but False; say $value > [08:09] <+camelia> rakudo-jvm 196b4f: OUTPUT«(timeout)» > [08:09] <+camelia> ..rakudo-{parrot,moar} 196b4f: OUTPUT«False␤» > ... > [08:10] rakudo-jvm is all "

Re: [perl #128823] Perl6 note outputs an extra "True"

2016-08-02 Thread Timo Paulssen
This is because of how the REPL decides whether to output the result of a function or not. When something outputs stuff on stdout (like say does), it'll notice that and suppress the return value printing. note, however, outputs on stderr, which the REPL doesn't inspect for output. I think this

[perl #128823] Perl6 note outputs an extra "True"

2016-08-02 Thread via RT
udo-star-2016.07-x86_64 (JIT) I entered the code below and got the indicated response. > say "Hello"; Hello > note "Hello"; Hello True > say "Why does the above note add an extra True?"; Why does the above note add an extra True?

[perl #127869] [BUG] if my $match is True and False

2016-04-10 Thread via RT
# New Ticket Created by Martin Barth # Please include the string: [perl #127869] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127869 > Hi there, following code dies in this line: if my $match = $r.match($meth, $uri) { die

[perl #121310] [BUG] Null PMC access when smartmatching True ~~ True on the REPL in Rakudo on Parrot

2015-11-28 Thread Christian Bartolomaeus via RT
As a status update: There is no NPE anymore: $ ./perl6-j > True ~~ True Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at :1 --> True ~~⏏ True TrueTrue >

[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 = Bl

[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' Mu+{}

[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-True asp

[perl #125675] LTA error message when doing (1, 2, 3).map(True)

2015-07-24 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #125675] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=125675 Code: (1, 2, 3).map(True) Error: Unhandled exception: Method 'count' not found

[perl #125674] LTA error message prints wrong eject position: if True if { };

2015-07-24 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #125674] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=125674 Code: if True if { }; ===SORRY!=== Error while compiling ./test.pl Missing block

[perl #125463] $non-existent-file.IO.unlink returns True

2015-06-23 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125463] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=125463 Unlinking a non-existent file should fail() rather than return True.

Re: [perl #125463] $non-existent-file.IO.unlink returns True

2015-06-23 Thread Elizabeth Mattijsen
Unlinking a non-existent file should fail() rather than return True. To expand on this: it appears that on MoarVM nqp::unlink returns the filename regardless of whether successful or not. On the JVM, it appears to return 0 for success, and -2 for non-existing file, and throws an exception

[perl #125289] [BUG] Array with pair written with the value implicitly True, [:a], won't evaluate (or .perl) properly in Rakudo

2015-05-31 Thread Carl Mäsak via RT
Fixed (37e2c9), spectested (c2effba). Resolving ticket.

[perl #125289] [BUG] Array with pair written with the value implicitly True, [:a], won't evaluate (or .perl) properly in Rakudo

2015-05-30 Thread Carl Mäsak
: OUTPUT«[:a(1)]␤» camelia rakudo-moar c2a57e: OUTPUT«[:a(1)]␤» lizmat m: [a= True].perl.say # closer to the thing camelia rakudo-moar c2a57e: OUTPUT«[:a]␤» lizmat m: [a= True].perl.EVAL # not roundtripping camelia rakudo-moar c2a57e: OUTPUT«Type check failed in binding op; expected 'Any' but got 'Mu

[perl #111734] [BUG] Can't locally redefine True in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
Great, redefinition of truth works as expected! I added a test to S04-declarations/constant.t with the following commit: https://github.com/perl6/roast/commit/c855d94be4

[perl #121940] say True but False # should be 'True'

2014-05-21 Thread via RT
# New Ticket Created by David Warring # Please include the string: [perl #121940] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=121940 [08:09] dwarring r: my $value = True but False; say $value [08:09] +camelia rakudo

[perl #121310] [BUG] Null PMC access when smartmatching True ~~ True on the REPL in Rakudo on Parrot

2014-02-23 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #121310] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=121310 Rotwang okay, one more question, and I'll leave you guys alone [; Rotwang p: True

Re: [perl #111734] [BUG] Can't locally redefine True in Rakudo

2013-08-30 Thread Parrot Raiser
On 8/29/13, Carl Mäsak via RT perl6-bugs-follo...@perl.org wrote: This now appears to be fixed: masak r: constant True = yeah, well, you know, that's just, like, your opinion, man; say True camelia rakudo e1f255: OUTPUT«yeah, well, you know, that's just, like, your opinion, man␤» masak \o

[perl #111734] [BUG] Can't locally redefine True in Rakudo

2013-08-29 Thread Carl Mäsak via RT
masak (): Nope, not fixed: masak r: constant True = Yeah, well, you know, that's just, like, your opinion, man.; say True camelia rakudo b2072f: OUTPUT«True␤» * masak adds to https://rt.perl.org/rt3/Public/Bug/Display.html? id=111734 This now appears to be fixed: masak r: constant True

[perl #111734] [BUG] Can't locally redefine True in Rakudo

2013-06-20 Thread Carl Mäsak via RT
On Sun Jun 09 08:00:22 2013, jn...@jnthn.net wrote: On Tue Mar 13 13:35:18 2012, masak wrote: masak nom: constant True = 42; say True p6eval rakudo fee891: OUTPUT«True␤» masak hm. benabik r: constant True = 42; say +True p6eval rakudo fee891: OUTPUT«1␤» benabik Huh * masak submits

[perl #114716] [BUG] Type objects of two anonymous classes compare as True undef infix:=== in Rakudo

2012-09-03 Thread Carl Mäsak
␤» p6eval ..rakudo 962b9b: OUTPUT«anon␤» masak rn: say (class {}) === (class {}) p6eval niecza v21-1-ga8aa70b: OUTPUT«False␤» p6eval ..rakudo 962b9b: OUTPUT«True␤» masak o.O masak Rakudo! really, True? masak r: say (class { has $.x }) === (class {}) p6eval rakudo 962b9b: OUTPUT«True␤» masak r: say (class

[perl #111978] [BUG] ?^1 gives True in Rakudo

2012-03-25 Thread Carl Mäsak
..rakudo a4c78f: OUTPUT«True» * masak submits rakudobug GlitchMr ?^ operator benabik r: say ^1 p6eval rakudo a4c78f: OUTPUT«0..^1␤» benabik I think ?^1 is just ?(^1) GlitchMr According to S03, it's boolean not... benabik I could be wrong, I'll admit. GlitchMr ... I don't mean upto operator... masak

[perl #111978] [BUG] ?^1 gives True in Rakudo

2012-03-25 Thread Patrick R. Michaud via RT
Now fixed in b1acd74. Needs spectest coverage to close ticket. Thanks! Pm

[perl #111734] [BUG] Can't locally redefine True in Rakudo

2012-03-13 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #111734] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111734 masak nom: constant True = 42; say True p6eval rakudo fee891: OUTPUT«True

[perl #107348] [BUG] Can't call a sub with a True literal parameter in Rakudo

2011-12-31 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #107348] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=107348 masak nom: sub foo(True) { say OH HAI }; foo(False) p6eval nom 2b6f86: OUTPUT

[perl #101022] [BUG] Rakudo nom segfault on '(True but role {}).say'

2011-10-10 Thread via RT
# New Ticket Created by Geoffrey Broadwell # Please include the string: [perl #101022] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101022 As the subject says, nom segfaults on this: (True but role

[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. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=100782 nom does not understand the short form phrases '$val but True

[perl #78256] [BUG] %*ENVsomething-nonexistent.defined returns Bool::True in Rakudo

2010-10-06 Thread Carl Mäsak
%*ENVPERL6LIB; p6eval rakudo e9e7fc: OUTPUT«Bool::True␤Bool::True␤lib␤» mberends rakudo: say %*ENV.exists('FOO'); say %*ENVFOO.defined; say %*ENVFOO; p6eval rakudo e9e7fc: OUTPUT«Bool::False␤Bool::True␤␤» * masak submits rakudobug masak mberends++

[perl #77140] [BUG] Nil.defined should probably not return True

2010-08-10 Thread via RT
# New Ticket Created by Stephane Payrard # Please include the string: [perl #77140] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77140 perl6 say Nil.defined 1 -- cognominal stef

[perl #77140] [BUG] Nil.defined should probably not return True

2010-08-10 Thread Carl Mäsak via RT
On Tue Aug 10 09:00:25 2010, cognominal wrote: perl6 say Nil.defined 1 It goes against my expectations too, but it's spec. Rejecting ticket.

[perl #77080] Smart-matching against True and False should not be a fatal error

2010-08-08 Thread via RT
and 590f3ba0ffab5ae4a689f71bc86a22cdfe3ddfad broke t/spec/S03-smartmatch/any-bool.t: $ ./perl6 t/spec/S03-smartmatch/any-bool.t ===SORRY!=== Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at line 7, near True),

[perl #76574] [BUG] Int ~~ Num is True in Rakudo; shouldn't be

2010-07-20 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #76574] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76574 jnthn rakudo: say Int ~~ Num p6eval rakudo cf5f19: OUTPUT«1␤» jnthn die die die!

[perl #76574] [BUG] Int ~~ Num is True in Rakudo; shouldn't be

2010-07-20 Thread jn...@jnthn.net via RT
On Mon Jul 19 09:25:15 2010, masak wrote: jnthn rakudo: say Int ~~ Num p6eval rakudo cf5f19: OUTPUT«1␤» jnthn die die die! mathw Int isn't a Num? jnthn mathw: Not any more jnthn It's a Numeric jnthn And we go to quite a length to make Int pretend it's a Num. jnthn Almost certain it

Re: [perl #75706] [PATCH] Pass False to MAIN for negated argument --/bool, not True does False

2010-06-14 Thread Ira Byerly
Moritz, Thank you very much. - Ira On Sun, Jun 13, 2010 at 7:31 AM, Moritz Lenz via RT perl6-bugs-follo...@perl.org wrote: Hi, thanks for your patch, I've applied it as bdbdfb2a27514595147664dbc8744882f51c609e and added some test to t/spec/S06-other/main-usage.t Cheers, Moritz

[perl #75706] [PATCH] Pass False to MAIN for negated argument --/bool, not True does False

2010-06-13 Thread via RT
--/bool) the value passed is not False, but is actually True does False. For example: $ perl6 -e 'sub MAIN (Bool :$bool) {say \$bool=$bool, ?\$bool=, ?$bool}' --/bool $bool=1, ?$bool=0 This can be mind-bending to debug because the string value is 1. Also this behavior appears to be inconsistent

[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 b c; (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; it works

[perl #74056] [BUG] A grep matching nothing boolifies to True in Rakudo

2010-04-05 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #74056] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74056 masak rakudo: my @a=svg form web; say ?...@a.grep(all) p6eval rakudo 02cf9c:

[perl #64968] [BUG] After declaring my @x; @x.defined returns true and should not

2010-04-03 Thread Carl Mäsak via RT
On Wed Apr 22 06:25:42 2009, ronaldxs wrote: From IRC below 19:07 PhatEddy rakudo: my @x; say 'ok' if @x.defined 19:07 p6eval rakudo 69b318: OUTPUT«ok?» The equivalent Perl 5 code says nothing unless you put something in @x at some point. This is similar to some other tickets like Rt

[perl #73434] [BUG] An empty hash boolifies to a true value in Rakudo

2010-03-09 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #73434] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=73434 moritz_ rakudo: say ?{} p6eval rakudo df743f: OUTPUT«1␤» * moritz_ calls BUG *

[perl #72972] [BUG] False ~~ True in Rakudo

2010-02-22 Thread Patrick R. Michaud via RT
Marking ticket as resolved, as Rakudo currently matches the specification. Pm

[perl #72972] [BUG] False ~~ True in Rakudo

2010-02-22 Thread Moritz Lenz via RT
On Sat Feb 20 13:31:33 2010, masak wrote: spinclad rakudo: say False ~~ True p6eval rakudo ec47f3: OUTPUT«1␤» masak o.O spinclad (which is Worng) colomon alpha: say False ~~ True p6eval alpha 30e0ed: OUTPUT«1␤» lue pugs: say False ~~ True p6eval pugs: OUTPUT«␤» * masak submits rakudobug

Re: [perl #72972] [BUG] False ~~ True in Rakudo

2010-02-22 Thread David Green
some_function($_) {...} } won't work as intuitively expected if $thing is false and some_function returns True. The problem is the same construct is trying to do two different things. I agree that Any ~~ Bool should compare both sides as bool, because that's more consistent, and there should

[perl #72972] [BUG] False ~~ True in Rakudo

2010-02-21 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #72972] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=72972 spinclad rakudo: say False ~~ True p6eval rakudo ec47f3: OUTPUT«1␤» masak o.O

[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. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=72848 masak rakudo: 0 but True p6eval rakudo 70667a: OUTPUT«No applicable candidates found

[perl #72048] [BUG] Negative smartmatching against a role always returns a true result in Rakudo

2010-01-12 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #72048] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=72048 This be Rakudo db84bc, running on Parrot r43174. $ perl6 -e 'class A {}; say A.new

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

2009-05-10 Thread via RT
$ ./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 So it seems that Bool isn't a real Enum somehow. This needs to be fixed. Cheers, Moritz

[perl #64968] [BUG] After declaring my @x; @x.defined returns true and should not

2009-04-23 Thread via RT
# New Ticket Created by Ron Schmidt # Please include the string: [perl #64968] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64968 From IRC below 19:07 PhatEddy rakudo: my @x; say 'ok' if @x.defined 19:07 p6eval

[perl #63396] And-assigning (=) True with False doesn't produce False or equiv

2009-03-25 Thread jn...@jnthn.net via RT
On Sun Feb 22 08:07:39 2009, masak wrote: jnthn rakudo: my $x = True; $x = True; say $x; p6eval rakudo 2a9382: OUTPUT«1␤» jnthn rakudo: my $x = True; $x = False; say $x; p6eval rakudo 2a9382: OUTPUT«1␤» jnthn ...erm. * jnthn summons masak masak ta-daa! jnthn masak: Hey look rakudobug

[perl #63396] And-assigning (=) True with False doesn't produce False or equiv

2009-02-22 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #63396] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63396 jnthn rakudo: my $x = True; $x = True; say $x; p6eval rakudo 2a9382: OUTPUT«1␤» jnthn

[perl #63236] 0 but Bool::True seems to put rakudo in an infinite loop

2009-02-17 Thread Vasily Chekalkin via RT
On Sat Feb 14 16:38:43 2009, fri...@gmail.com wrote: Fix is there http://github.com/bacek/rakudo/commit/bb16aabbd266f503726b6d600c7a510c5c9be6e4 -- Bacek

[perl #63236] 0 but Bool::True seems to put rakudo in an infinite loop

2009-02-15 Thread via RT
# New Ticket Created by fREW Schmidt # Please include the string: [perl #63236] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63236

[perl #62012] !regex parses but always returns true

2009-01-06 Thread via RT
';my $y='def';$x~~/!digit/ and say 'got digit';$y~~/digit/ and say 'not got digit'; got digit The assumption was !digit is the logical inverse of digit Either way, /!digit/ is returning true with and without a digit ( $x test in first and third lines both give 'got digit').

Following up on (True|False) vs Bool::$!

2008-12-09 Thread Mark J. Reed
not a dupe. Maybe I'm just getting too far ahead of the development curve in terms of what I expect to work at this point. Basically, True and False are acting weird. I thought they were simply aliases for their fully-qualified brethren Bool::True and Bool::False. Is that supposed

Re: Following up on (True|False) vs Bool::$1

2008-12-09 Thread Mark J. Reed
curve in terms of what I expect to work at this point. Basically, True and False are acting weird. I thought they were simply aliases for their fully-qualified brethren Bool::True and Bool::False. Is that supposed to be the case? It is true in pugs, FWTW. But in current Rakudo they seem

[perl #58000] Comparison operators on junctions should return junction of True/False

2008-08-16 Thread [EMAIL PROTECTED] (via RT)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #58000] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58000 - Needs junction dispatcher

[perl #45209] [BUG] parrot considers -0.0 to be true

2008-06-14 Thread James Keenan via RT
qw( . lib ../lib ../../lib ); + +use Test::More; +use Parrot::Config; +use Parrot::Test tests = 5; + +pir_output_is( 'CODE', 'OUT', Positive and negative integers ); +.sub test :main +$I0 = 1 +unless $I0 goto not_one +say 1 is true + +not_one: +$I0 = -1 +unless $I0 goto

Conditions with always true components

2008-05-16 Thread Alberto Simões
Hi, Folks. There are a few files on the parrot source where the compiler complains about a logic value that is always true. Let us check a specific case: on src/jit_emit.h:231, if (!base !(i scale) (!emit_is8bit(disp) || 1)) { This is exactly if (!base !(i scale)) { Now

Re: Conditions with always true components

2008-05-16 Thread chromatic
On Friday 16 May 2008 13:12:19 Alberto Simões wrote: There are a few files on the parrot source where the compiler complains about a logic value that is always true. Let us check a specific case: on src/jit_emit.h:231, if (!base !(i scale) (!emit_is8bit(disp) || 1

Re: Conditions with always true components

2008-05-16 Thread Nicholas Clark
On Fri, May 16, 2008 at 03:20:34PM -0500, Patrick R. Michaud wrote: On Fri, May 16, 2008 at 09:12:19PM +0100, Alberto Simões wrote: Hi, Folks. There are a few files on the parrot source where the compiler complains about a logic value that is always true. Let us check a specific

Re: Conditions with always true components

2008-05-16 Thread Patrick R. Michaud
On Fri, May 16, 2008 at 11:12:54PM +0100, Nicholas Clark wrote: On Fri, May 16, 2008 at 03:20:34PM -0500, Patrick R. Michaud wrote: On Fri, May 16, 2008 at 09:12:19PM +0100, Alberto Simões wrote: if (!base !(i scale) (!emit_is8bit(disp) || 1)) { This is exactly if

[perl #49894] [PATCH] .true method for all objects

2008-01-17 Thread Ævar Arnfjörð Bjarmason
binwFiSNZdAhZ.bin Description:

[perl #45209] [BUG] parrot considers -0.0 to be true

2007-09-06 Thread via RT
, NaN is true. Currently, parrot considers -0.0 to be true. This is shown by t/examples/tutorial.t, for the 51_if_unless.pir test.

[perl #42412] Configure.pl things =no is true

2007-05-04 Thread James Keenan via RT
On Thu May 03 21:02:21 2007, allison !-- x -- at perl.org wrote: Andy Dougherty wrote: On Tue, 1 May 2007, James Keenan via RT wrote: On Tue Apr 10 01:45:31 2007, jrisom !-- x -- at gmail.com wrote: Configure should act as though writing --foo=no is false instead of true. Tonight I

  1   2   >