Re: push() practice: misplaced semicolon creates list elements within array?

2019-05-02 Thread Richard Hainsworth
Hi Bill, a) The documentation about semicolons in contexts that call for Arrays or Lists is very sparse and *should* be improved. This can best be done by raising an issue on https://github.com/perl6/doc If you would do this it would help the community. b) You have said that the

Re: push() practice: misplaced semicolon creates list elements within array?

2019-05-02 Thread JJ Merelo
El dom., 14 abr. 2019 a las 22:27, yary () escribió: > Looks like perl6 semicolon has different meaning in a list vs a capture. > In a list, it "makes sense to me" > > > perl6 --version > This is Rakudo Star version 2018.10 built on MoarVM version 2018.10 > implementing Perl 6.c. > >perl6 > To

Re: push() practice: misplaced semicolon creates list elements within array?

2019-05-01 Thread William Michels via perl6-users
Thank you yary. I'm not sure we've seen any clarification on this. There's a reference to "Literal Lists" in the Perl 6 docs that looks related, but I don't have a "plain-speak" explanation for how semicolons, lists, push() and arrays inter-relate. https://docs.perl6.org/language/list Hoping a

Re: push() practice: misplaced semicolon creates list elements within array?

2019-05-01 Thread William Michels via perl6-users
Hello Richard and thank you for your comment, I'm not sure I have clarity on the use of semicolons in Perl 6. Most references in the documentation refer to the semicolon as a statement separator. Many references point out where semicolons are optional (e.g. particular lines within blocks). Now

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-16 Thread William Michels via perl6-users
Thank you, yary. I'm not that familiar with PDL data structures, although they look interesting. Arrays in R are pretty straight-forward. https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Arrays-and-matrices On Sun, Apr 14, 2019 at 10:37 AM yary wrote: > > I don't know much about

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-14 Thread yary
Looks like perl6 semicolon has different meaning in a list vs a capture. In a list, it "makes sense to me" > perl6 --version This is Rakudo Star version 2018.10 built on MoarVM version 2018.10 implementing Perl 6.c. >perl6 To exit type 'exit' or '^D' > ('a').perl "a" > ('a';).perl "a" > ('a', 'b'

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-14 Thread Joseph Brenner
Just in case it wasn't clear from Bill's discussion, I think the reason this case seems weird is normally we expect trailing separators to be ignored, as with the extra comma here: > my @monsters = ('ghidora', 'mothera', 'wolfman', 'zuckerberg',); [ghidora mothera wolfman zuckerberg] If you

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-14 Thread Joseph Brenner
Great, now I'm trouble finding semicolon examples in PDL, too. (Bill: PDL is the "perl data language", a perl5 descendent of stuff like Matlab, which you'd probably recognize as being a bit like R.) Larry Wall does discuss this stuff in the 9th Synopsis (one of the original design documents,

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-14 Thread yary
I don't know much about PDL (the Perl Data Lanuage) but I do remember that the semicolon as a "higher-level" array separator in P6 is a nod to PDL. It is a bit of stub feature until someone needs it and specs out, prototypes more of that data-slicing style. It's likely under-documented due to that

Re: push() practice: misplaced semicolon creates list elements within array?

2019-04-14 Thread Richard Hainsworth
A semicolon is the syntax used for multidimensional arrays. See https://docs.perl6.org/language/subscripts#Multiple_dimensions On 14/04/2019 15:07, William Michels via perl6-users wrote: Hello, I've been working through Patrick Michaud's excellent videos from the The Perl Conference 2016. At