Re: What is `Γäó`?

2022-07-01 Thread Larry Wall
Technically speaking, it's mojibake. Larry On Fri, Jul 1, 2022 at 7:34 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi All, > > Windows 10 Pro - 21H2 > RakudoMoar-2022.06.01-win-x86_64-msvc.msi > > > raku -v > Welcome to Rakudo™ v2022.06. > Implementing the Raku®

Re: What's going on with "given (junction) {when (value)...}"

2021-05-31 Thread Larry Wall
any(True, False) : : > ? (3.ACCEPTS(any(3,4))) : True : : -y : : : On Mon, May 31, 2021 at 6:38 PM Larry Wall wrote: : : > On Sun, May 30, 2021 at 10:18:13PM -0400, yary wrote: : > : This came up in today's Raku study group (my own golfing-) : > : : > : &g

Re: What's going on with "given (junction) {when (value)...}"

2021-05-31 Thread Larry Wall
On Sun, May 30, 2021 at 10:18:13PM -0400, yary wrote: : This came up in today's Raku study group (my own golfing-) : : > ? (any(4,3) ~~ 3) : True : > ? (3 ~~ any(4,3)) : True : > given any(4,3) { when 3 {say '3'}; say 'nope'} : nope : > given 3 { when any(4,3) {say '3'}; say 'nope'} : 3 : > given

Re: Language Design: 'special casing' of split()? (i.e. .split performs concomitant .join? )

2020-10-12 Thread Larry Wall
On Mon, Oct 12, 2020 at 01:14:09PM -0300, Aureliano Guedes wrote: : > This seems pretty convenient and intuitive. At least, it is possible : > to mimic that behavior in Raku: : > : > List.^find_method('split').wrap: { $^a.map: *.split($^b) } : > List.^find_method('sin').wrap:

Re: lines :$nl-in question

2020-09-02 Thread Larry Wall
ference are the people on stage, being attended-to by the : attendants sitting down below them. : : : : On 9/1/20, Larry Wall wrote: : > On Sun, Aug 30, 2020 at 03:12:26PM -0700, yary wrote: : > : I have a quibble there. 1st & 2nd sentences disagree slightly by going : >

Re: print particular lines question

2020-09-01 Thread Larry Wall
On Mon, Aug 31, 2020 at 05:05:53PM -0700, yary wrote: : I like this better for alpha counter : : raku -e "for (1..4) { say (BEGIN $ = 'AAA')++ }" : : with BEGIN, the assignment of AAA happens once. With the earlier ||= it : checks each time through the loop. : -y Careful with that, though,

Re: lines :$nl-in question

2020-09-01 Thread Larry Wall
On Sun, Aug 30, 2020 at 03:12:26PM -0700, yary wrote: : I have a quibble there. 1st & 2nd sentences disagree slightly by going from : active to passive voice. "Caller, the one who calls" vs "object on which : that method is being called" : : Suggestion for 2nd sentence "The invocant of a method

Re: Combining multiple "is..." traits into one?

2020-08-11 Thread Larry Wall
On Wed, Aug 12, 2020 at 12:12:34AM +0200, Tobias Boege wrote: : I have no idea if this attribute or the format : for the 'prec' key in particular are standardized. The whole point of providing equiv/tighter/looser was to avoid standardizing absolute precedence levels. That being said, I don't

Re: Learning the "ff" (flipflop) infix operator? (was Re: Raku version of "The top 10 tricks... .")

2020-07-26 Thread Larry Wall
On Sat, Jul 25, 2020 at 04:32:02PM -0500, Brad Gilbert wrote: : In the above two cases ff and fff would behave identically. : : The difference shines when the beginning marker can look like the end : marker. The way I think of it is this: You come to the end of "ff" sooner, so you do the end

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Larry Wall
On Sun, Jul 19, 2020 at 09:38:31PM -0700, William Michels via perl6-users wrote: : Hello, : : I ran across this 2010 Perl(5) article on the Oracle Linux Blog: : : "The top 10 tricks of Perl one-liners" : https://blogs.oracle.com/linux/the-top-10-tricks-of-perl-one-liners-v2 : : Q1. Now that

Re: unflattering flat

2020-04-07 Thread Larry Wall
On Tue, Apr 07, 2020 at 09:15:06AM -0700, Larry Wall wrote: : Maybe if I actually put a Chinese character in like 楽 it will leave it in UTF-8? Oops, actually, now that I think about it, 楽 (raku) is a Japanese-only character. The Chinese equivalents are traditional 樂 and simplified 乐. I really

Re: unflattering flat

2020-04-07 Thread Larry Wall
On Mon, Apr 06, 2020 at 08:04:45PM -0400, yary wrote: : Larry's answer came through my browser with munged Unicode, it looks like : this : : [image: image.png] : - with the Chinese character for "garlic" after the word "values" I wrote the Unicode equivalent of:

Re: unflattering flat

2020-04-04 Thread Larry Wall
this as a hack that works to 10 : levels deep: : : my %hash-with-arrays = a => [1,2], b => [3,4]; : sub postfix:<[**]> ($arg) { $arg[*;*;*;*;*;*;*;*;*;*]} : say %hash-with-arrays.values[**].flat # (1 2 3 4) : : On Sat, Apr 4, 2020 at 7:46 PM Larry Wall wrote: : > : > You c

Re: unflattering flat

2020-04-04 Thread Larry Wall
You can also do a hyper descalarize if you're into that sort of thing: %hash-with-arrays.values»[].flat Larry

Re: Malformed UTF-8 ???

2018-10-15 Thread Larry Wall
On Sun, Oct 14, 2018 at 02:03:23AM -0700, ToddAndMargo via perl6-users wrote: : On 10/13/18 3:02 AM, ToddAndMargo via perl6-users wrote: : >Hi All, : > : > if  $StdOut  { $ReturnStr = $$proc.out.slurp-rest; } : > : >gives me : > : > Malformed UTF-8 : > : >How do I clean up

Re: routine declaration line question

2018-10-12 Thread Larry Wall
On Fri, Oct 12, 2018 at 06:47:40AM -0400, Curt Tilmes wrote: : Adding it gives more information to the consumers of that routine, : the people reading it, the compiler optimizing use of the routine, : and the runtime execution which will validate the return and throw an : exception for you if it

Re: routine declaration line question

2018-10-05 Thread Larry Wall
On Thu, Oct 04, 2018 at 09:35:08PM +0200, JJ Merelo wrote: : El jue., 4 oct. 2018 21:21, Brandon Allbery escribió: : : > I don't think we've reached the point of such conventions yet. And there's : > some history here, in --> not having done anything in the early days except : > possibly slow

Re: routine declaration line question

2018-10-05 Thread Larry Wall
On Thu, Oct 04, 2018 at 03:13:15PM -0400, Trey Harris wrote: : Right; that's what I meant by "stylistically" — a `--> Mu` can highlight : that something is being returned (and that side-effects are not the primary : purpose), while nothing indicates that the return value, though it exists, : is

Re: Could this be any more obscure?

2018-10-02 Thread Larry Wall
On Tue, Oct 02, 2018 at 05:28:01PM -0700, ToddAndMargo wrote: : On 10/2/18 11:23 AM, Ralph Mellor wrote: : >So, to recap: a postfix `[]` acts on whatever is on its left, : >pulling out elements from the thing on its left, treated as : >a list like thing, with the elements selected according to :

Re: join questions

2018-10-01 Thread Larry Wall
On Sun, Sep 30, 2018 at 04:02:15AM -0700, ToddAndMargo wrote: : Hi All, : : https://docs.perl6.org/routine/join#(List)_routine_join : : method join(List:D: $separator --> Str:D) : : $ p6 'say (1, ).join("|");' : 1|a b c : : : It states in the manual that this will happen. : : Questions: : :

Re: Could this be any more obscure?

2018-09-28 Thread Larry Wall
On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote: : On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote: : > > I am NOT asking it to limit my request to Infinity. : > : >Yes you are, implicitly. If you don't pass any parameter for : >$limit, $limit will take the default value

Re: words[] question

2018-09-26 Thread Larry Wall
On Wed, Sep 26, 2018 at 01:16:26PM -0400, Parrot Raiser wrote: : Would it be correct to say: : [ ] aka square brackets, always surround the subscript of an array or : list, i.e. here "n: is an integer, [n] always means the nth item, : while : ( ), round brackets or parentheses, separate and

Re: extending built-in classes

2018-09-22 Thread Larry Wall
On Sat, Sep 22, 2018 at 11:40:13AM -0700, Joseph Brenner wrote: : Sounds good, thanks. Well, yes, *sounds* good. :-) Monkey patching is allowed but discouraged in Perl 6, because Ruby. Larry

Re: Need regex help

2018-09-15 Thread Larry Wall
On Sat, Sep 15, 2018 at 06:45:33PM -0700, ToddAndMargo wrote: : Hi All, : : I have been doing a bunch with regex's lately. : I just throw them out based on prior experience : and they most all work now. I only sometimes have to : ask for help. (The look forward () feature : is sweet.) : :

Re: What is the official name of regex switches?

2018-09-15 Thread Larry Wall
On Sat, Sep 15, 2018 at 06:37:34PM -0700, ToddAndMargo wrote: : Hi All, : : \L : \N I don't really know what you mean by those. Regex switches are things like :i for case insensitivity. They're also called regex modifiers or regex options. They always start with colon. Something with a

Re: need p5/p6 :: help

2018-09-15 Thread Larry Wall
On Fri, Sep 14, 2018 at 06:12:15PM -0400, Vadim Belman wrote: : Though technically this aspect was clear to me, but to settle things down in my mind completely: for now ordinary (not 'our') sub belongs not to the package object but to the block which belongs to that package. Is it correct way to

Re: ->

2018-09-14 Thread Larry Wall
On Fri, Sep 14, 2018 at 09:30:51PM +0200, Elizabeth Mattijsen wrote: : The combination of “->” and “{ }” is sometimes referred to as a “pointy block”, or even maybe just a “pointy”. Note that "pointy" is specifically referring to the syntax here, not the semantics. People use other terms when

Re: need p5/p6 :: help

2018-09-14 Thread Larry Wall
On Fri, Sep 14, 2018 at 04:15:02AM -0700, Todd Chester wrote: : Also, did you answer my question about "::" and did it : just go over my head? The implication was that "::" didn't change, but the default package scoping of p5 that you're relying on is no longer the default in p6. : The p5 guys

Re: Please explain this to me

2018-09-12 Thread Larry Wall
On Tue, Sep 11, 2018 at 10:28:27PM -0700, ToddAndMargo wrote: : Okay, foul! :Str:D: Cool:D $needle : why is there not a comma between "Str:D:" and "Cool:D"? : And what is with the extra ":". By chance is the extra ":" : a confusing way of using a comma for a separator? Well, "confusing" is

Re: Nil ?

2018-09-12 Thread Larry Wall
Basically, ignore any advice to treat Nil as a normal value, because it really is intended to represent the *absence* of a value as much as possible. It's a bit like the way solid-state electronics treats "holes" as if they were real particles, and gets away with it much of the time. But not all

Re: Functions and subroutines?

2018-09-11 Thread Larry Wall
On Tue, Sep 11, 2018 at 03:47:46AM -0700, ToddAndMargo wrote: : In Perl, what is the proper terminology? We're not picky, since Perl has never made a hard and fast distinction between routines that return values and routines that don't. You can call them all functions or routines or procedures

Re: how do I do this index in p6?

2018-09-11 Thread Larry Wall
Oh, I guess Timo suggested .defined. I should relearn to read, now that I can see again... Larry

Re: how do I do this index in p6?

2018-09-11 Thread Larry Wall
On Tue, Sep 11, 2018 at 02:42:20AM -0700, ToddAndMargo wrote: : How do I clean this up for use with Perl 6? : : $ perl -E 'say index("abc", "z") == -1 ? "False" : "True"' : False I'm a little bit surprised nobody suggested the most basic method: say index("abc", "z").defined ?? "True" !!

Re: Appropriate last words

2018-09-03 Thread Larry Wall
On Mon, Sep 03, 2018 at 11:45:58AM -0500, Stephen Wilcoxon wrote: : Why the change in die handling between Perl 5 and 6? Suppressing line : numbers with newline was very handy. Alternatively, adding some sort of : directive would be more straight-forward (at least for Perl 5 users moving : to

Re: a `pe4rl6 -c` error to fix

2018-06-21 Thread Larry Wall
On Wed, Jun 20, 2018 at 10:58:01PM -0700, Brent Laabs wrote: : -c does compile time warnings, not runtime warnings. You can't make : runtime warnings appear at compile time without using a BEGIN block. That's perhaps a bit oversimplified, since in this case the warning is coming out of the

Re: How do I remove leading zeros?

2018-06-13 Thread Larry Wall
I'd probably just write something like: s:g { « <( 0+ )> \d+ » } = ''; The first <( and the last » are not strictly necessary, but add clarity, or at least balance. But in golf mode you could get away with something like: sg/«0+)>\d//; Larry

Re: What is my sub?

2018-05-26 Thread Larry Wall
On Fri, May 25, 2018 at 07:23:45PM -0700, ToddAndMargo wrote: : Follow up: based on Yary's wonderful advice, this is my keeper : on the subject: : : : : perl6: what is the name of the subroutine you are currently in: : : It is: : &?ROUTINE.name : callframe(0).code.name : : $ p6

Re: Is there a backward "for @"

2018-05-15 Thread Larry Wall
On Tue, May 15, 2018 at 03:31:07PM -0700, ToddAndMargo wrote: : Hi All, : : This seems like a trivial question, but I really adore : the "for" loops. Is there a way to do the backwards? : In other words, start at the end of the array and loop : to the beginning? Does the "next" and "last" work

Re: number of letters question

2018-05-15 Thread Larry Wall
On Tue, May 15, 2018 at 12:44:12AM -0700, ToddAndMargo wrote: : "abcrd-12.3.4" would be five letters, six numbers, and one : I don't care. Here's another approach: $ p6 '"abcrd-12.3.4".comb.classify(*.uniprop).say' {Ll => [a b c r d], Nd => [1 2 3 4], Pd => [-], Po => [. .]} $ p6

Re: odd and even

2018-05-01 Thread Larry Wall
On Tue, May 01, 2018 at 01:43:44AM -0700, ToddAndMargo wrote: : The worst thing I had problems with in Perl was folks telling it : was "Lexiconical". What? I wish they would have also said "which : means Perl figures out your variables type on the fly, so you don't : have to type cast

Re: Chained sequence operators

2018-01-26 Thread Larry Wall
The most detailed description of ... is still to be found starting down a few paragraphs in the https://design.perl6.org/S03.html#List_infix_precedence section. In general the operators have not suffered as much "spec rot" as some other parts of the "speculations" known as Synopses, so most of

[perl #122929] quoted LHS of pair constructor inside enum definition makes elements be ignored

2017-11-28 Thread Larry Wall via RT
Fixed in 754664ed54aea24f9c9162002b6e68aadd311412. On Wed, 08 Oct 2014 05:20:07 -0700, timo wrote: > compare: > > > perl6-m -e 'enum Bug ("foo" => -1, "A", "B"); say +A; say +B;' > > 1 > > 2 > > and: > > > perl6-m -e 'enum Bug (foo => -1, "A", "B"); say +A; say +B;' > > 0 > > 1 > >

[perl #128017] enum treats a Seq of Pairs as a List of Str

2017-11-28 Thread Larry Wall via RT
Fixed in 754664ed54aea24f9c9162002b6e68aadd311412. On Thu, 28 Apr 2016 07:06:42 -0700, gfldex wrote: > enum Bits ( (('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256)) ); dd Bits.enums; > # OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit- > 4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5,

[perl #130446] [REGRESSION] [LTA] Creating an enum from a Hash does not work but no longer warns (enum Bits (%thing))

2017-11-28 Thread Larry Wall via RT
Fixed in 754664ed54aea24f9c9162002b6e68aadd311412. Note however, that there's a braino above, since the 'my' is initialized after the value is needed. So the fix is to warn about an empty variable, not to make it work. (It does work if you make it a constant, or put the my inside a BEGIN.)

[perl #130041] [BUG] Pair in enum declaration should either DWIM or parsefail

2017-11-28 Thread Larry Wall via RT
Actually, the Z=> misbehavior is already called out in #128017. On Tue, 28 Nov 2017 00:04:05 -0800, larry wrote: > This also showed up when doing things like: > enum Foo ( Z=> 1,2,3); > > Fixed in d9021cf16e7df051c5e17c33919c9bde44c5e0db but tests needed. > > > On Mon, 07 Nov 2016 11:37:06

[perl #130041] [BUG] Pair in enum declaration should either DWIM or parsefail

2017-11-28 Thread Larry Wall via RT
Actually, the Z=> misbehavior is already called out in #128017. On Tue, 28 Nov 2017 00:04:05 -0800, larry wrote: > This also showed up when doing things like: > enum Foo ( Z=> 1,2,3); > > Fixed in d9021cf16e7df051c5e17c33919c9bde44c5e0db but tests needed. > > > On Mon, 07 Nov 2016 11:37:06

[perl #130041] [BUG] Pair in enum declaration should either DWIM or parsefail

2017-11-28 Thread Larry Wall via RT
This also showed up when doing things like: enum Foo ( Z=> 1,2,3); Fixed in d9021cf16e7df051c5e17c33919c9bde44c5e0db but tests needed. On Mon, 07 Nov 2016 11:37:06 -0800, FROGGS.de wrote: > m: enum Foo ( A => 42, 'B', 'C', 'D' ); say +B > rakudo-moar e10f76: OUTPUT«43␤» > > m: enum Foo (

Re: Need a second pair of eyes

2017-09-26 Thread Larry Wall
On Mon, Sep 25, 2017 at 10:25:42AM -0400, Brandon Allbery wrote: : So as to make this not entirely content-free: I would suggest that the : string language note the line on which it sees a bare newline, and if it : subsequently hits a syntax error while still parsing that string it could : output

[perl #131991] [REGEX] Longest Alternation followed by an Alternation fails

2017-08-29 Thread Larry Wall via RT
Yes, as noted above, this is a dup of rejected ('better docs needed', really) ticket #130562.

[perl #131991] [REGEX] Longest Alternation followed by an Alternation fails

2017-08-29 Thread Larry Wall via RT
Yes, as noted above, this is a dup of rejected ('better docs needed', really) ticket #130562.

[perl #131922] [LTA] "Variadic" or "slurpy"?

2017-08-18 Thread Larry Wall via RT
Only *@foo and *%foo are slurpy, as in "slurping up the rest of the arguments. But the term "variadic" refers to all optional arguments including named ones, so it would be incorrect to call those "slurpy", because they don't. It's like the difference between * and ? in regex. Larry On Fri,

[perl #131922] [LTA] "Variadic" or "slurpy"?

2017-08-18 Thread Larry Wall via RT
Only *@foo and *%foo are slurpy, as in "slurping up the rest of the arguments. But the term "variadic" refers to all optional arguments including named ones, so it would be incorrect to call those "slurpy", because they don't. It's like the difference between * and ? in regex. Larry On Fri,

[perl #131695] [LTA] Confusion in precedence with <<$foo>>[0]

2017-07-04 Thread Larry Wall via RT
We now warn on the ambiguity of >> or » when used where it could easily be intended as either a hyper or the quotewords terminator. While we could, in theory, do some lookahead to try to suppress this warning in some cases, it will be brittle in the face of languages that mutate the postfix

[perl #123572] [BUG] :256[list of numbers] wrongly allows the numbers to exceed 255 in Rakudo

2017-06-02 Thread Larry Wall via RT
On Fri, 09 Jan 2015 10:59:08 -0800, masak wrote: > m: say :256["☺".ords] > rakudo-moar c5dcdf: OUTPUT«9786␤» > m: say :256[0x263a] > rakudo-moar c5dcdf: OUTPUT«9786␤» > seems we could use a check there... > m: say :256[256,256] > rakudo-moar c5dcdf: OUTPUT«65792␤» > * masak submits

Re: Modulino in Perl 6

2017-05-02 Thread Larry Wall
On Tue, May 02, 2017 at 05:02:40PM +0200, Gabor Szabo wrote: : Using the caller() in Perl 5 one can figure out if the file was loaded : as a module or executed as a script. : : In Python one could check if __name__ is equal to "__main__". : : Is there some way in Perl 6 to tell if a file was

Re: smtp question

2017-02-10 Thread Larry Wall
On Fri, Feb 10, 2017 at 06:27:07AM -0500, Brandon Allbery wrote: : If this were Haskell it'd be ByteString. But it's Perl 6 and byte arrays : are too much of a PITA at present, since you can't do string-y things with : them sensibly. The currently suggested workaround is to temporarily pretend

Re: Can I call myself

2017-02-06 Thread Larry Wall
On Sat, Feb 04, 2017 at 08:39:52PM -0800, ToddAndMargo wrote: : Are there any special rules, like in Perl 5? Do I need to : pre-declare the sub? : : sub BummerDude ($); : sub BummerDude ($) { do something; } For normal subs, you never have to predeclare, because the calling syntax can assume an

Re: log base zero ???

2016-10-20 Thread Larry Wall
06:31 < [Coke]> iBakeCake: latest message on perl6-users about log(23,0) seems to be something in your current wheelhouse 06:32 < iBakeCake> [Coke]: what is it? 06:32 < iBakeCake> Isn't log base 0 undefined 06:32 < moritz> log to base 0? 06:32 < [Coke]>

Re: [perl #129884] Strange behaviour on "say".

2016-10-15 Thread Larry Wall
On Sat, Oct 15, 2016 at 09:59:01PM +0200, Timo Paulssen wrote: : Actually, I just tested the code and on my machine it always outputs : "test". The only difference between uncommenting "say 'run'" is that : it'll output "run" once at the end - or not. : : So now I'm wondering what i did

Re: [perl #129884] Strange behaviour on "say".

2016-10-15 Thread Larry Wall
On Sat, Oct 15, 2016 at 09:59:01PM +0200, Timo Paulssen wrote: : Actually, I just tested the code and on my machine it always outputs : "test". The only difference between uncommenting "say 'run'" is that : it'll output "run" once at the end - or not. : : So now I'm wondering what i did

Re: Sorting Multidimentional Arrays

2016-10-01 Thread Larry Wall
On Sat, Oct 01, 2016 at 07:57:34PM +0200, mimosinnet wrote: : @opposite = @opposite.sort({@$^a[3]}); I'd probably write that as: @opposite .= sort: { $^a[3] } or maybe just @opposite .= sort( *[3] ); Larry

Re: [perl #129346] [BUG] Whatever being called on where-blocked subroutine cannot handle the sigilless values correctly

2016-09-24 Thread Larry Wall via RT
On Fri, Sep 23, 2016 at 11:42:20PM -0700, Itsuki Toyota wrote: : # New Ticket Created by Itsuki Toyota : # Please include the string: [perl #129346] : # in the subject line of all future correspondence about this issue. : # https://rt.perl.org/Ticket/Display.html?id=129346 > : : : See the

Re: [perl #129346] [BUG] Whatever being called on where-blocked subroutine cannot handle the sigilless values correctly

2016-09-24 Thread Larry Wall
On Fri, Sep 23, 2016 at 11:42:20PM -0700, Itsuki Toyota wrote: : # New Ticket Created by Itsuki Toyota : # Please include the string: [perl #129346] : # in the subject line of all future correspondence about this issue. : # https://rt.perl.org/Ticket/Display.html?id=129346 > : : : See the

[perl #114438] [@LARRY] Rakudo gives an error about a missing 'self' when a subroutine uses an invocant parameter

2016-08-13 Thread Larry Wall via RT
Rakudo now gives a decent error (X::Syntax::Signature::InvocantNotAllowed), and there's even a test for it.

[perl #77664] [@LARRY] Rakudo parses q\\ as quoting but STD as routine q call

2016-08-13 Thread Larry Wall via RT
I'm fine with the rakudo behavior here.

[perl #77550] [@LARRY] $. in regexp accepted by Rakudo but not by STD

2016-08-13 Thread Larry Wall via RT
The chance of someone using $. inside a regex and meaning what it means in Perl 5 is minimal. Best to just leave this as a "can never match".

[perl #124568] [GLR] [@LARRY] 'Rakudo still uses Nil here' (Or bogus test?)

2016-08-13 Thread Larry Wall via RT
Test was bogus. Replaced with test that assumes Empty semantics on next. test fixed in 06f9c5d010986a7a8dde907971e25985e8ba4601

[perl #128550] [@LARRY] <[a..z]> ranges break grapheme awareness

2016-08-13 Thread Larry Wall via RT
The code generator in nqp for char ranges was incorrectly using ordat and ordfirst to find the character to compare, which throw away information on synthetic characters. We now use the getcp_s instruction instead, which leaves synthetics negative, so that they drop out of the character range

[perl #128860] [LTA] [@LARRY] List.invert only works if the list contains Pairs but the error message isn't very clear about that fact

2016-08-12 Thread Larry Wall via RT
Binding of the map routine internally now requires list elements to bind as Pair, which improves the error message. (The alternate approach of inserting a CATCH into the map closure could in theory produce an even better message, but it appeared to slow things down more than the Pair binding

[perl #123072] [GLR] 'for' loop in sink context isn't invoking block in sink context

2016-08-12 Thread Larry Wall via RT
Some method calls were not properly sunk as a final statement in a loop. Fix in 977797fa401856e5310155f13469b7e6ff5f620a Test in bc8fa4fd8d449573eb6001b5f43f8890f65b9196

[perl #127879] [BUG] map subroutine ignores the sequence in the specific case

2016-08-09 Thread Larry Wall via RT
The unwanted() routine needed to add an explicit sink to certain methods found in a block-final Want node. (Method calls for dispatch:<.=> and Pair.new are exempt, however. In the case of .=, it is 'nosink' because it's essentially going to cause a side effect anyway, and doing it twice tends

[perl #127563] repeat while loop not being entered when inside a routine and block

2016-08-05 Thread Larry Wall via RT
The repeat and loop constructs weren't properly self-sinking at statementlist level. Fixed in 589061eac14f2847e2c4b401d2ff2eb30c62675e Test in cbbff3ba0f1120fe7dfded0a980f9b73263f0868

[perl #128596] [BUG] repeat {} doesn't repeat when it's last item inside a sub called from a loop

2016-08-05 Thread Larry Wall via RT
The repeat and loop constructs were not properly sinking themselves at statementlist level. Fixed in 589061eac14f2847e2c4b401d2ff2eb30c62675e Untodo'd existing test.

[perl #128830] [LTA] Error on while (0){}

2016-08-03 Thread Larry Wall via RT
We now examine the preceding character, and if it's a closing brace, suggest use of whitespace before curlies taken as a hash subscript. Fixed in 7ec824e52ab5b285cda47179e6f41e452d870762

[perl #128802] [BUG] Spurious useless use warning in for (@a xx 1) { }

2016-08-02 Thread Larry Wall via RT
This turns out to be a fascinating bug, not the usual "useless use of useless use". We were cloning a closure twice because we were calling EXPR twice on the same expression, namely inside the 'for' rule that looks for a C-style for loop. It was doing this inside a because it was just

[perl #128811] non-associatives are somehow getting treated as list associatives

2016-08-02 Thread Larry Wall via RT
We've split the non-associative exceptions into the base class, X::Syntax::NonAssociative, with a subclass off X::Syntax::NonListAssociative. nqp's EXPR now calls a different method to fail list associativity, and rakudo provides the alternate method to get the appropriate message. nqp fix in

[perl #128766] Useless use of $a in sink context is spurious

2016-07-29 Thread Larry Wall via RT
The onearg form of reduce wasn't correctly marking wantedness of either the operator or the argument. Fixed in fc28b67185d711cf8e4b3f9e6987e1ceee34e37b. (We don't test sink warnings currenlty.)

[perl #128770] 5334cb725 causes erroneous sink on ($_ with "foo")

2016-07-29 Thread Larry Wall via RT
The logical ops andthen, notandthen, and orelse were not propagating wantedness to their thunky args. Fixed in 7ba6dbfae97f5ff9398336e49267d51606512df9. Note that we don't generally test sink warnings currently.

Re: can a method name contain a funny character?

2016-05-21 Thread Larry Wall
On Fri, May 20, 2016 at 09:39:30AM -0400, yary wrote: : On Tue, Apr 12, 2016 at 6:12 PM, Brandon Allbery : wrote: : > I was explaining why some "symbols" are acceptable to the parser. Which : one : > is more appropriate is not my call, : : I was thinking about what exactly

Re: re-writing a for comments

2016-05-07 Thread Larry Wall
On Sat, May 07, 2016 at 09:54:42PM +0800, Richard Hainsworth wrote: : Hi, : In S05, I found: : "Although the default |<.ws>| subrule recognizes no comment : construct, any grammar is free to override the rule. The |<.ws>| : rule is not intended to mean the same thing everywhere." : : I was

Re: testing with a "warn"

2016-04-29 Thread Larry Wall
On Fri, Apr 29, 2016 at 03:50:21PM -0400, Brandon Allbery wrote: : On Fri, Apr 29, 2016 at 3:47 PM, Brandon Allbery : wrote: : > Oh, they are resumable exceptions? Useful but rather high cost I'd think. : > (Granting that perl6 isn't one of those languages that think

[perl #127965] [BUG] Texas hyper doesn't parse correctly in topicalized quoteword associative index assignment

2016-04-22 Thread Larry Wall via RT
Not A Bug. LTM requires it to recognize => over = inside, and then you're missing a >. Looking at it from the other direction, thinking that it will find the >> on the end and then back up to isolate the = is a subtle mental trap of two-pass parsing, which is typically forbidden in Perl 6.

Re: can a method name contain a funny character?

2016-04-12 Thread Larry Wall
On Mon, Apr 11, 2016 at 11:32:29PM +0200, Theo van den Heuvel wrote: : Thanks Larry for the answer and the great language. : : It is quite ok for me to start alphabetically. I use the funny char : to indicate a particular aspect shared by a bunch of subs operators : and methods. : So I tried: :

Re: can a method name contain a funny character?

2016-04-11 Thread Larry Wall
You have to write it like this: class Foo { method ::('❤') { "mem heart".say } } my Foo $foo .= new; $foo.'❤'(); Other than that, only names beginning alphabetically are allowed. You could work around this on the caller end with a postfix:<❤>, but that would be an

[perl #127097] Error message for calling $.attr in BUILD could be improved

2015-12-31 Thread Larry Wall via RT
Now says: Virtual method call $.foo may not be used on partially constructed object (maybe you mean $!foo for direct attribute access here?) Fix in 5a69da88b9b16f916125add8f89aff68113a9877

[perl #127013] [BUG] 'while' only returns list from routine with explicit return

2015-12-30 Thread Larry Wall via RT
Fix in 386905f6f62f9fa3525c887a8a86fa48b22b4b35 and 37e742f0bb6f36f1a9d9a5f947c5c0de15d236c2 Test in ba521fa8101f3114c87ec1a295707cb68b5b

[perl #127069] [BUG] Simple loop dies

2015-12-30 Thread Larry Wall via RT
Dup of #127013. Tests for this particular ticket in a8bbde8fa06d5d55bc6d5879a0c84a669d7f0481

[perl #127022] [BUG] Can't find infix < in the middle of nowhere (a given)

2015-12-30 Thread Larry Wall via RT
Dup of #127013, see fix there.

[perl #126005] UNDO always fires for while, until, loop, whenever, with/without, (others too)?

2015-12-23 Thread Larry Wall via RT
Fixed in 02588190492349fabde00c5a15b873ea61a9333e Tested in 2f126a3ab7d0991767ca84c562b8f3ae97b25c4e There are no tests there for with or whenever, but those did not appear to misbehave when I tried them on the command line. Feel free to add more tests for those.

[perl #125769] Failure bound to variable, as result of if statement, sinks and throws

2015-12-19 Thread Larry Wall via RT
Fixed in 091ee7507464595e7712f4ae911d95d467e5281b Tests in 8b97aa4f6191affdd91da78607eca4ae6dc73b11

[perl #100232] Implementation details leak through in variable interpolation into regexes

2015-12-19 Thread Larry Wall via RT
A new restricted dialect of regex is implemented in 28ab83f947b4899a4f8698eee5bc056742f356f1 and 19d84be0066978f616ace6fa9f506e742161a378 Tests in 1becd7c9b456b707a14bfba40d672ec28945f199

[perl #125769] Failure bound to variable, as result of if statement, sinks and throws

2015-12-16 Thread Larry Wall via RT
Minimal test case: { my $f := Failure.new("bar"); } This doesn't seem to be sink related, at least not directly. It seems more to be related to the difference between storing things in a local vs in a lexical, and how those are treated on statement or return boundaries.

[perl #121406] [BUG] No "useless use in sink context" warning on in sink context in Rakudo

2015-12-16 Thread Larry Wall via RT
fixed in 323a5c077efeaa058de48871963046507e33b272

[perl #126926] [BUG] Pairs of numbers don't sort consistently

2015-12-15 Thread Larry Wall via RT
I shouldn't file bugs when I haven't slept...

[perl #81336] [BUG] infix:<~~> isn't chaining in Rakudo

2015-12-10 Thread Larry Wall via RT
~~ is now chaining where it can be; it obviously makes little sense to chain something on both sides that is not a normal data value. So if you include a regex or a closure, it must be the final test. Also, in order to get $a ~~ $b ~~ $c to work, we cannot topicalize $b. Fix in

[perl #118791] [BUG] Rxx doesn't thunk its rhs in Rakudo

2015-12-10 Thread Larry Wall via RT
Fixed, along with all the other metaops, in: 1e1556b1a25bc4c73a505fdd249d4179ffc813de 0a2303c0f6a2a3782fecb13db1523cb5442467de 67202d697d3fe48b800e95262bebe6da17bfcf49 e2e23fb8853808839884f23a0b8aa91f458fd310 97ef742f350e84dae275ed2dc9d453795f057dba 6516930c86d6ff4296ee8699a64eb1315eed2583 Tests:

[perl #125811] 2 ** 99999999999999999999999999999999999 = 0

2015-12-04 Thread Larry Wall via RT
Fixed with 67795245fd9b17ca11036b63aa04e17deabb8e7a Tests needed.

[perl #126761] [BUG] tighter and export not working together

2015-12-04 Thread Larry Wall via RT
The add_categorical method was assuming it was adding a fresh definition of an operator, not one borrowed from a module, so it overrode the existing precedence with the defaults, which are wrong if the existing precedence doesn't happen to match the default. Fixed with

[perl #126771] internal error with m:i:m

2015-12-03 Thread Larry Wall via RT
fix in MoarVM, 6da907f72a8a0015f4631b7d11a20fc428e9aad4 test in 0d2a5c01972d11c0a35573e8362c040bf974cde3

[perl #126789] A caught exception still exits a sub ?

2015-12-03 Thread Larry Wall via RT
The default of die is to, er, die. You can resume after a die, but only if you do so explicitly, in which case you are responsible for overriding the expectations of whoever wrote the die and likely did not expect it to return. > p6 'sub a($a) { $a(); CATCH { default { say "default"; .resume }

  1   2   3   4   5   6   7   8   9   10   >