Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:39:10PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 14:12, Peter Pentchev wrote: > > On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-08 02:45, Richard Hainsworth wrote: > > > > Ok Todd, let me have a go 

RE: question about the multi in method

2020-06-08 Thread Mark Devine
Peter, I applaud your excellent assistance with Raku. Et. al. (you know the names)... Outstanding community! Mark -Original Message- From: Peter Pentchev Sent: Monday, June 8, 2020 17:13 To: perl6-users@perl.org Subject: Re: question about the multi in method On Mon, Jun 08, 2020

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-08 14:12, Peter Pentchev wrote: On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote: On 2020-06-08 02:45, Richard Hainsworth wrote: Ok Todd, let me have a go at this issue. From what I understand, you see 'multi' and think 'there are more than one', which 

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 02:45, Richard Hainsworth wrote: > > Ok Todd, let me have a go at this issue. > > > > From what I understand, you see 'multi' and think 'there are more than > > one', which leads to the question 'where 

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo
On 2020-06-08 08:05, Peter Pentchev wrote: On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote: Ok Todd, let me have a go at this issue. Thank you, Richard, for your help. I apologize to Todd and to everyone on the list for my outburst in my last e-mail. G'luck, Peter Hi

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-08 02:45, Richard Hainsworth wrote: Ok Todd, let me have a go at this issue. From what I understand, you see 'multi' and think 'there are more than one', which leads to the question 'where are they?' My understanding of 'multi' is 'there COULD be more than one', which leads to 

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote: > Ok Todd, let me have a go at this issue. Thank you, Richard, for your help. I apologize to Todd and to everyone on the list for my outburst in my last e-mail. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org

Re: question about the multi in method

2020-06-08 Thread Richard Hainsworth
Ok Todd, let me have a go at this issue. From what I understand, you see 'multi' and think 'there are more than one', which leads to the question 'where are they?' My understanding of 'multi' is 'there COULD be more than one', which leads to the question 'are there any?' This is actually a

Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 10:15 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > On 2020-06-08 00:48, Fernando Santagata wrote: > > On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users > > mailto:perl6-users@perl.org>> wrote: > > > > On 2020-06-07 22:39, Peter Pentchev wrote:

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:12:07AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 22:39, Peter Pentchev wrote: > > I thought I explained that. The Rakudo developers are*never* finished > > with the development of some methods. Somebody*will* want to extend > > them in their own

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-08 00:48, Fernando Santagata wrote: On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-06-07 22:39, Peter Pentchev wrote: I addressed this in my original e-mail: the documentation is currently: 1. a reference manual Targets

Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > On 2020-06-07 22:39, Peter Pentchev wrote: > > I addressed this in my original e-mail: the documentation is currently: > > 1. a reference manual > > Targets at what audience? > I think that that point

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-07 22:39, Peter Pentchev wrote: I thought I explained that. The Rakudo developers are*never* finished with the development of some methods. Somebody*will* want to extend them in their own module. The Rakudo developers*want* to declare some methods as "multi" to allow the Rakudo

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 07:07:29PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 14:20, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-07 08:19, Peter Pentchev wrote: > > > > On Sun, Jun 07, 2020 at

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
On 2020-06-07 14:20, Peter Pentchev wrote: On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users wrote: On 2020-06-07 08:19, Peter Pentchev wrote: On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users <

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:20:03AM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-06-07 08:19, Peter Pentchev wrote: > > > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > > On Sun, Jun 7, 2020 at 3:15 AM

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 08:19, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > > perl6-users@perl.org> wrote: > > >

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
On 2020-06-07 08:29, Veesh Goldman wrote: I imagine they called it cool because it, indeed, is cool. The Raku developers do have a sense of humor. Cool, needle, slurp, spurt: someone had a good laugh. :-)

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
On 2020-06-07 08:19, Peter Pentchev wrote: On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: Hi All, Dumb question: Does the "multi" in "multi method" mean there is more than one way to

Re: question about the multi in method

2020-06-07 Thread Veesh Goldman
I imagine they called it cool because it, indeed, is cool. On Sun, Jun 7, 2020, 18:28 Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 06:19:29PM +0300, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 06:19:29PM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > perl6-users@perl.org> wrote: > > > > > Hi All, > > > > > > Dumb question: > > > > > > Does the

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > perl6-users@perl.org> wrote: > > > Hi All, > > > > Dumb question: > > > > Does the "multi" in "multi method" mean there > > is more than one way to address a method? > >

Re: question about the multi in method

2020-06-07 Thread Brad Gilbert
There are four different types of a function. (both method and sub) - `multi` - `proto` - `only` - `anon` A `proto` function is mainly just to declare there will be multiple functions with same name. `multi` is short for "multiple", meaning more than one. `only` is the default, it means there is

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
On 2020-05-30 21:28, Kevin Pye wrote: While the original documentation you were referring to called them Pod comments, that's not really accurate. The full documentation (to which I referred you) calls them "Pod documents" which is much more descriptive. The Pod document is parsed by Rakudo,

Re: question on pod comments

2020-05-30 Thread Kevin Pye
While the original documentation you were referring to called them Pod comments, that's not really accurate. The full documentation (to which I referred you) calls them "Pod documents" which is much more descriptive. The Pod document is parsed by Rakudo, and the contents can be used. Pod documents

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
On Sun, 31 May 2020 at 13:30, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: >> On Sun, 31 May 2020 at 12:43, ToddAndMargo via perl6-users >> mailto:perl6-users@perl.org> >> wrote: >> >> Hi

Re: question on pod comments

2020-05-30 Thread Kevin Pye
As I said, they're abbreviated blocks. Keep reading. On Sun, 31 May 2020 at 13:30, ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > >> On Sun, 31 May 2020 at 12:43, ToddAndMargo via perl6-users > >> mailto:perl6-users@perl.org>> wrote: > >> > >> Hi All, > >> > >> I am

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
On Sun, 31 May 2020 at 12:43, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, I am somewhat confused about pod comments: https://docs.raku.org/language/syntax#Pod_comments Seems pretty straight forward. But when I look at

Re: question on pod comments

2020-05-30 Thread Kevin Pye
They're not Pod comments, they're Pod abbreviated blocks: https://docs.raku.org/language/pod Kevin. On Sun, 31 May 2020 at 12:43, ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Hi All, > > I am somewhat confused about pod comments: > >

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
Hi Timo, Thanks for the answer: > the liskov substitution principle I didn't knew about this principle. I'm now going down the rabbit hole. Is this always the case for all the derived classes in Raku? Best regards, David Santiago Timo Paulssen escreveu no dia terça, 11/02/2020 à(s) 13:32: > >

Re: Question about Blob and Buf

2020-02-11 Thread Brad Gilbert
The problem is that you are using ~ with an uninitialized Buf/Blob my Buf $read; $read ~ Buf.new; # Use of uninitialized value element of type Buf in string context. Note that it is not complaining about it being a Buf. It is complaining about it being uninitialized. If you

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
On 11/02/2020 14:14, David Santiago wrote: > Awesome explanation! Thank you! > > BTW, >> my Blob $read = Buf.new; > Is it creating either a Blob or a Buf? > > Regards, > David Santiago Hi David, "my Blob $read" will define the variable $read to 1) only accept things that typecheck against

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
Awesome explanation! Thank you! BTW, > my Blob $read = Buf.new; Is it creating either a Blob or a Buf? Regards, David Santiago -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
On 11/02/2020 10:56, David Santiago wrote: > Hi! > > Can someone explain me why this doesn't work: > > my Blob $read; > $read ~= $socket.read(1024); > > Dies with error: > > X::Buf::AsStr: Cannot use a Buf as a string, but you called the Stringy > method on it > > This also doesn't work: > > my

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
A 11 de fevereiro de 2020 12:03:19 CET, Simon Proctor escreveu: >Ok I 100% don't know after trying this out : > >my Buf $a = Buf.new(1,2,3); >my Blob $b = Blob.new(4,5,6); >$a ~= $b; >say $a > >And it worked fine so... I dunno. > > >On Tue, 11 Feb 2020 at 11:00, Simon Proctor wrote: > >> I

Re: Question about Blob and Buf

2020-02-11 Thread Simon Proctor
Ok I 100% don't know after trying this out : my Buf $a = Buf.new(1,2,3); my Blob $b = Blob.new(4,5,6); $a ~= $b; say $a And it worked fine so... I dunno. On Tue, 11 Feb 2020 at 11:00, Simon Proctor wrote: > I think the problem is IO::Socket.read() returns a Blob not a Buf. > > ~ has a Buf,

Re: Question about Blob and Buf

2020-02-11 Thread Simon Proctor
I think the problem is IO::Socket.read() returns a Blob not a Buf. ~ has a Buf, Buf variant : https://docs.raku.org/language/operators#infix_~ But not a Blob one. Buf does Blob but not vice versa. I think you need to transform the output from .read into a Buf if you want to use the ~= how you

Re: Question about Blob and Buf

2020-02-11 Thread Kevin Pye
~ works fine for concatenating Bufs; For example: my $a = Buf.new(1,2,3); my $b = $a ~ Buf.new(4,5,6) will assign correctly to $b. I can't work out what the problem is here, despite trying various combinations. Perhaps socket isn't really returning a Blob? Kevin. On Tue, 11 Feb 2020 at 21:01,

Re: Question about Blob and Buf

2020-02-11 Thread JJ Merelo
You are using ~, which stringifies. Bufs are not strings: you need to decode them to concatenate it to a string. If what you want is to concatenate the buffer, probably ,= will work (not sure about this, would have to check), or any other operator that works on Positionals. JJ El mar., 11 feb.

Re: Question about "colon syntax" for calling other methods on 'self' inside a method

2019-11-19 Thread Brad Gilbert
$ by itself is a an anonymous state variable. So these two lines would be exactly the same. $.foo (state $).foo A feature was added where $.foo would instead be used for public attributes. Since a public attribute just adds a method, it was allowed to use it to call any method. Which

Re: Question about "colon syntax" for calling other methods on 'self' inside a method

2019-11-18 Thread Raymond Dresens
Hello Vadim, Yary, Thanks for your feedback, I've filed an issue: https://github.com/rakudo/rakudo/issues/3306 Yary, about the dollar sign, The snippet of code in the issue shows that expression "$.attribute" inside a method 'just works' for accessing individual attributes (or rather:

Re: Question about "colon syntax" for calling other methods on 'self' inside a method

2019-11-18 Thread Vadim Belman
I would say filing an issue might make sense in this case. Here is a related comment from Jonathan: https://github.com/rakudo/rakudo/issues/3222#issuecomment-539915286 – and it explicitly states that $. is a shortcut for method calling. Therefore, use of colon instead of braces should be a

Re: Question about "colon syntax" for calling other methods on 'self' inside a method

2019-11-18 Thread yary
I take that back! What is the dollar sign doing there in the '$.print: ..." example? Try it without the dollar sign. Right now you're calling .print on the anonymous variable '$' -y On Mon, Nov 18, 2019 at 8:38 AM yary wrote: > looks like a bug to me-file an issue on the rakudo GitHub > > On

Re: Question about "colon syntax" for calling other methods on 'self' inside a method

2019-11-18 Thread yary
looks like a bug to me-file an issue on the rakudo GitHub On Sat, Nov 16, 2019 at 5:29 AM Raymond Dresens wrote: > Hello, > > I have a question related to the 'colon syntax' of Raku, which allows > you to call methods without parenthesis like this: > > class Foo > { > method

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:31 PM, Brad Gilbert wrote: On Sun, Jun 3, 2018 at 3:08 PM, ToddAndMargo > wrote: On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? Well, a bit.  When I see     chmod

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:25 PM, Patrick Spek via perl6-users wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 The < > syntax is a bit like qw<> from Perl 5. You'll get a List (or Array, not sure which type exactly from it. So is a list with two elements, "myfile1" and "myfile2". If you

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:16 PM, Brandon Allbery wrote: On Sun, Jun 3, 2018 at 4:09 PM ToddAndMargo > wrote: $ touch a b c $ p6 'chmod 0o777 < a b c >;' ===SORRY!=== Error while compiling -e Preceding context expects a term, but found infix > instead. at

Re: <> question

2018-06-03 Thread Brad Gilbert
On Sun, Jun 3, 2018 at 3:08 PM, ToddAndMargo wrote: > On 06/03/2018 11:01 AM, Brandon Allbery wrote: > >> Is there something missing in the examples at the link? >> > > Well, a bit. When I see > > chmod 0o755, ; > > I think `myfile1` and `myfile2` are "functions", not > data. > They

Re: <> question

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 The < > syntax is a bit like qw<> from Perl 5. You'll get a List (or Array, not sure which type exactly from it. So is a list with two elements, "myfile1" and "myfile2". If you want to use a variable, you can just provide it with one or more

Re: <> question

2018-06-03 Thread Brandon Allbery
On Sun, Jun 3, 2018 at 4:09 PM ToddAndMargo wrote: > $ touch a b c > $ p6 'chmod 0o777 < a b c >;' > ===SORRY!=== Error while compiling -e > Preceding context expects a term, but found infix > instead. > at -e:1 > --> chmod 0o777 < a b c >⏏; > You're missing the comma after the mode

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? Well, a bit. When I see chmod 0o755, ; I think `myfile1` and `myfile2` are "functions", not data. I instead look for something like chmod 0o755, < $myfile1 $myfile2 >; or

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? yes, `` is confusing to me. I can't tell is `<>` is an editorial comment or Perl syntax. Is it chmod 0o755, $f1, $f2; or chmod 0o755 <$f1 $f2>; or either?

Re: <> question

2018-06-03 Thread ToddAndMargo
https://docs.perl6.org/language/quoting#Word_quoting:_%3C_%3E On Sun, Jun 3, 2018 at 1:42 PM ToddAndMargo > wrote: What is this? https://docs.perl6.org/routine/chmod#role_IO chmod 0o755, ; Is it? chmod 0o755, $file1, $file2 On

Re: <> question

2018-06-03 Thread Brandon Allbery
Yes, it's a quick way to mak a list of quoted strings. Think qw() in perl 5, but < > is equivalent to single quotes whereas << >> is equivalent to double quotes. https://docs.perl6.org/language/quoting#Word_quoting:_%3C_%3E On Sun, Jun 3, 2018 at 1:42 PM ToddAndMargo wrote: > What is this? > >

Re: <<>> question

2017-10-06 Thread ToddAndMargo
On 10/05/2017 09:44 AM, Andy Bach wrote: > is    <<>> > synonymous with    qw[] ? IIUC - close, it like qqw: https://docs.perl6.org/language/quoting#index-entry-quote_qqww-quote_<<_>>-quote_«_»-Word_quoting_with_interpolation_and_quote_protection:_qqww It's actually synonymous w/ qqww but

Re: <<>> question

2017-10-06 Thread ToddAndMargo
On 10/05/2017 02:50 PM, Brad Gilbert wrote: On Thu, Oct 5, 2017 at 11:44 AM, Andy Bach wrote: is <<>> synonymous with qw[] ? `<<>>` is the same as `qqww<<>>` Which is short for `Q :qq :ww <<>>` the `:qq` is short for `:double`, that is it turns on double quote

Re: <<>> question

2017-10-05 Thread Brad Gilbert
On Thu, Oct 5, 2017 at 11:44 AM, Andy Bach wrote: > >> is ><<>> >> synonymous with >qw[] > ? `<<>>` is the same as `qqww<<>>` Which is short for `Q :qq :ww <<>>` the `:qq` is short for `:double`, that is it turns on double quote behaviour `:double` is short for

Re: <<>> question

2017-10-05 Thread Andy Bach
> is <<>> > synonymous with qw[] ? IIUC - close, it like qqw: https://docs.perl6.org/language/quoting#index-entry-quote_qqww-quote_ <<_>>-quote_«_»-Word_quoting_with_interpolation_and_quote_protection:_qqww It's actually synonymous w/ qqww but depending upon your use of quotes w/i the list

Re: <<>> question

2017-10-05 Thread James Ellis Osborne III
MIME Is The Sacha Guitry Picture. On Oct 4, 2017 8:23 PM, "Todd Chester" wrote: > On 10/04/2017 08:20 PM, Todd Chester wrote: > >> So in this context "{$x}" means insert (interpolate) a >> variable into the list? I was thinking it meant to >> insert a variable into a

Re: <<>> question

2017-10-04 Thread Todd Chester
On 10/04/2017 08:20 PM, Todd Chester wrote: So in this context "{$x}" means insert (interpolate) a variable into the list?  I was thinking it meant to insert a variable into a string.  Did saying <<>> automatically tell Perl6 that this was a list and not a sting? is <<>> synonymous with

Re: <<>> question

2017-10-04 Thread Todd Chester
On 10/04/2017 12:48 PM, Andy Bach wrote: > I think maybe I don't understand how <<>> is used in a and how <<>> differs from a "" <<>> is quoteword, no commas needed. You get back a list.  "" create a string, you get back a single thing. my $z=<>; (xyz abc def) is the same as

Re: <<>> question

2017-10-04 Thread Andy Bach
> I think maybe I don't understand how <<>> is used in a and how <<>> differs from a "" <<>> is quoteword, no commas needed. You get back a list. "" create a string, you get back a single thing. my $z=<>; (xyz abc def) is the same as my $z=<>; (xyz abc def) > my $x = "ab"; ab >

Re: <<>> question

2017-10-04 Thread ToddAndMargo
On Wed, Oct 4, 2017 at 1:29 PM, ToddAndMargo > wrote: On 10/02/2017 01:18 PM, ToddAndMargo wrote: Hi All, I am writing up a keeper note on <<>> and such. This example puzzles me. Why the space?

Re: <<>> question

2017-10-04 Thread ToddAndMargo
On 10/02/2017 01:18 PM, ToddAndMargo wrote: Hi All, I am writing up a keeper note on <<>> and such.  This example puzzles me.  Why the space? Example of <<>> (double quote and allow insertion of variables into strings):    $ perl6 -e 'my $x="abc"; my $y=<>; say "\$x=$x

Re: <<>> question

2017-10-04 Thread Eirik Berg Hanssen
On Wed, Oct 4, 2017 at 7:06 PM, Andy Bach wrote: > perl6 -e 'my $y=("ab",12,"xx"); print "y=", $y.join(", "), "\n"' > perl6 -e 'my @y=("ab",12,"xx");print "y=", @y.join(", "), "\n"' > This might be a good place to remind folks that perl6 allows interpolation of method calls,

Re: <<>> question

2017-10-04 Thread Andy Bach
> It's the same as in perl5, an array interpolated in a string shows its > elements with spaces in between. Your example has an array stored in $y. Typo alert - you were printing $x/@x, not y perl -e 'my @y=("ab",12,"xx");print "y=@y\n"' y=ab 12 xx perl6 -e 'my $y=("ab",12,"xx");print "y=$y\n"'

Re: <<>> question

2017-10-04 Thread yary
> Hi All, > I am writing up a keeper note on <<>> and such. This example > puzzles me. Why the space? It's the same as in perl5, an array interpolated in a string shows its elements with spaces in between. Your example has an array stored in $y. perl -e 'my @y=("ab",12,"xx");print "y=@x\n"'

Re: <<>> question

2017-10-02 Thread ToddAndMargo
On 10/02/2017 04:31 PM, ToddAndMargo wrote: is examples if ^ of

Re: <<>> question

2017-10-02 Thread ToddAndMargo
On Oct 2, 2017 1:18 PM, ToddAndMargo wrote: Hi All, I am writing up a keeper note on <<>> and such.  This example puzzles me.  Why the space? Example of <<>> (double quote and allow insertion of variables into strings):     $ perl6 -e 'my $x="abc"; my

Re: :: question

2017-09-17 Thread ToddAndMargo
On Fri, Sep 15, 2017 at 5:39 PM, ToddAndMargo > wrote: On 09/13/2017 10:57 PM, Brandon Allbery wrote: On Thu, Sep 14, 2017 at 1:48 AM, Brandon Allbery

Re: :: question

2017-09-17 Thread yary
9: our sub Which ( What if you remove the space between Which and the paren? -y On Fri, Sep 15, 2017 at 5:39 PM, ToddAndMargo wrote: > On 09/13/2017 10:57 PM, Brandon Allbery wrote: > >> On Thu, Sep 14, 2017 at 1:48 AM, Brandon Allbery >

Re: :: question

2017-09-15 Thread ToddAndMargo
On 09/13/2017 10:57 PM, Brandon Allbery wrote: On Thu, Sep 14, 2017 at 1:48 AM, Brandon Allbery > wrote: If you want to use the other way, the CheckSystemDependency module MUST define Which as: our sub Which ... If it is not

Re: :: question

2017-09-14 Thread ToddAndMargo
On 09/13/2017 10:57 PM, Brandon Allbery wrote: On Thu, Sep 14, 2017 at 1:48 AM, Brandon Allbery > wrote: If you want to use the other way, the CheckSystemDependency module MUST define Which as: our sub Which ... If it is not

Re: :: question

2017-09-13 Thread Brandon Allbery
On Thu, Sep 14, 2017 at 1:48 AM, Brandon Allbery wrote: > If you want to use the other way, the CheckSystemDependency module MUST > define Which as: our sub Which ... > If it is not explicitly declared "our", then it is declared "my" and the > only way the name can be seen

Re: :: question

2017-09-13 Thread Brandon Allbery
On Thu, Sep 14, 2017 at 12:46 AM, ToddAndMargo wrote: > What is the Perl6 equivalent of the perl 5 "::"? > > $Found = CheckSystemDependancy::Which ( $ProgramName, $HowToExit ); > It's the same... but unlike Perl 5, there is a difference between subs and methods, and subs

Re: : question

2017-07-28 Thread ToddAndMargo
On 07/28/2017 02:52 PM, Brandon Allbery wrote: On Fri, Jul 28, 2017 at 5:49 PM, ToddAndMargo > wrote: On 07/28/2017 02:41 PM, Brandon Allbery wrote: > That's not Perl, it's JSON generated by Perl. Mumble, mumble ...

Re: : question

2017-07-28 Thread Timo Paulssen
This article uses httpbin.org which is a nice service that'll take any kind of request and tell you exactly what it saw. It shows what it got as a json dictionary literal. Here's an example for your browser, so you can just click it:

Re: : question

2017-07-28 Thread Brandon Allbery
On Fri, Jul 28, 2017 at 5:49 PM, ToddAndMargo wrote: > On 07/28/2017 02:41 PM, Brandon Allbery wrote: >>> > That's not Perl, it's JSON generated by Perl. > > Mumble, mumble ... I have a hard enough time learning > Perl without someone throwing in another language. >

Re: : question

2017-07-28 Thread ToddAndMargo
Now I am really confused. It is all over the place on http://perl6maven.com/simple-web-client For instance: { "args": { "language": "Perl", "math": "19+23=42", "name": "Larry Wall" },

Re: : question

2017-07-28 Thread Brandon Allbery
That's not Perl, it's JSON generated by Perl. On Fri, Jul 28, 2017 at 5:39 PM, ToddAndMargo wrote: > On 07/28/2017 02:02 PM, Timo Paulssen wrote: > >> The first one is valid perl 6 code and the bottom one is not. It's >> likely you were looking at JSON (or equivalently

Re: : question

2017-07-28 Thread ToddAndMargo
On 07/28/2017 02:02 PM, Timo Paulssen wrote: The first one is valid perl 6 code and the bottom one is not. It's likely you were looking at JSON (or equivalently JavaScript) and confused that with perl6 code. Now I am really confused. It is all over the place on

Re: : question

2017-07-28 Thread Timo Paulssen
The first one is valid perl 6 code and the bottom one is not. It's likely you were looking at JSON (or equivalently JavaScript) and confused that with perl6 code.

Re: Question for the developers on splice

2017-03-21 Thread ToddAndMargo
On 03/21/2017 05:05 AM, Timo Paulssen wrote: Shifting from the front will just move the "beginning" pointer one slot forwards, and popping will decrease the "element count" number. I'm not sure if splice with an empty "insertion" list that happens to be at the end will also just reduce the

Re: Question for the developers on splice

2017-03-21 Thread Parrot Raiser
"Premature optimisation is the root of many evils", or words to that effect. (I forget who said it, but I think it was someone credible.) Write your code as clearly and simply as you can, then see if it performs adequately under load. If it does, you're finished. If it doesn't, instrument and

Re: Question for the developers on splice

2017-03-21 Thread Timo Paulssen
Shifting from the front will just move the "beginning" pointer one slot forwards, and popping will decrease the "element count" number. I'm not sure if splice with an empty "insertion" list that happens to be at the end will also just reduce the number of elements or if it does a bit of

Re: Question for the developers on splice

2017-03-21 Thread Elizabeth Mattijsen
> On 21 Mar 2017, at 10:00, ToddAndMargo wrote: > on this command: > > perl6 -e 'my @foo = ; @foo.splice(0,3); say @foo;' > > Are you actually moving one set up data into another set's > element/slot/index, or are you just rearranging the pointers > to each element? How

Re: question about Supply.act()

2016-04-28 Thread Moritz Lenz
On 04/28/2016 11:11 AM, mt1957 wrote: Hi, The documentation about the method act explains that 'the given code is guaranteed to be only executed by one thread at a time'. Can I assume from this that any other thread including the main thread isn't running? No. Other threads might still be