Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 14:26, Joseph Brenner wrote: Joseph Brenner wrote: The signatures in the documentation are certainly helpful, but they're no substitute for code examples. I'd go after adding more code examples, rather than removing other stuff. But then, maybe I'm coming into this discussi

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 14:06, Joseph Brenner wrote: The signatures in the documentation are certainly helpful, but they're no substitute for code examples. I'd go after adding more code examples, rather than removing other stuff. Hi Joseph, I would compromise on that. I would also like to see th

Re: modules and subsets

2019-12-11 Thread Todd Chester
On 2019-12-11 10:22, Fernando Santagata wrote: File test.pm6 unit module test; subset PosInt of Int is export where * > 0; File test.p6 use lib '.'; use test; sub mytest(PosInt $a) { say $a } mytest(1); # output: 1 mytest(-1);    # output Constraint type check failed in binding to par

Re: modules and subsets

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 10:16, Elizabeth Mattijsen wrote: $ 6 'subset A of Int; dd OUR::.keys' ("A",).Seq Hi Elizabeth, subset A of Int; dd OUR::.keys ("A",).Seq Nil Would you explain how your are using dd and what your are showing me here? Also how it ties into my original question as to if the ca

Re: modules and subsets

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 09:54, JJ Merelo wrote: By default, the scope of anything (containers, classes, whatever) is lexical to the scope they are in. Hi JJ, Thank you for responding. By the way, I'd be a Golden. I don't understand how you are using the word "lexical". I may be mixing Modula2 with

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Joseph Brenner
Joseph Brenner wrote: > The signatures in the documentation are certainly helpful, but they're > no substitute for code examples. I'd go after adding more code > examples, rather than removing other stuff. But then, maybe I'm coming into this discussion in the middle-- is the topic here adding

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Joseph Brenner
The signatures in the documentation are certainly helpful, but they're no substitute for code examples. I'd go after adding more code examples, rather than removing other stuff.

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Simon Proctor
I would argue that signatures are great for any command line script because you can use them with MAIN to get input checking. On Wed, 11 Dec 2019, 18:07 Veesh Goldman, wrote: > I believe there's a disparity here between the needs of a sysadmin and > people who program hardcore with Raku. That's

Re: Precedence: assignment vs smartmatch? (Now--with square brackets... .)

2019-12-11 Thread William Michels via perl6-users
Thank you, Brad. I think I've got it (let me know if below is incorrect): pseudocode: 1. eval(LHS --> $_) 2. eval($_ ~~ RHS) 3. overwrites(LHS <-- Step#2), except for S/// and TR/// [ When I first learned the "~~" smartmatch operator, I only thought it was for testing (e.g. with rx/// and m

Re: modules and subsets

2019-12-11 Thread Fernando Santagata
File test.pm6 unit module test; subset PosInt of Int is export where * > 0; File test.p6 use lib '.'; use test; sub mytest(PosInt $a) { say $a } mytest(1); # output: 1 mytest(-1);# output Constraint type check failed in binding to parameter '$a'; expected test::PosInt but got Int (-1)

Re: modules and subsets

2019-12-11 Thread Elizabeth Mattijsen
$ 6 'subset A of Int; dd OUR::.keys' ("A",).Seq > On 11 Dec 2019, at 18:57, JJ Merelo wrote: > > > > El mié., 11 dic. 2019 a las 18:54, JJ Merelo () escribió: > Subsets follow pretty much the same rules as every other declared thing. > Change subset by "variable" or "class", if the answer is

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread Veesh Goldman
I believe there's a disparity here between the needs of a sysadmin and people who program hardcore with Raku. That's what I'm seeing in the discussion here. Signatures are very important to those who write programs, because they help you arrange your code in a clean and maintainable and predictabl

Re: modules and subsets

2019-12-11 Thread JJ Merelo
El mié., 11 dic. 2019 a las 18:54, JJ Merelo () escribió: > Subsets follow pretty much the same rules as every other declared thing. > Change subset by "variable" or "class", if the answer is true, it's also > true for subsets. > > By default, the scope of anything (containers, classes, whatever)

Re: modules and subsets

2019-12-11 Thread JJ Merelo
Subsets follow pretty much the same rules as every other declared thing. Change subset by "variable" or "class", if the answer is true, it's also true for subsets. By default, the scope of anything (containers, classes, whatever) is lexical to the scope they are in. El mié., 11 dic. 2019 a las 18

modules and subsets

2019-12-11 Thread ToddAndMargo via perl6-users
Hi All, If I create a subset in the global section of a module (not inside a sub), can the subset be seen by the main program? Can a subset be declared on a sub's declaration line? (Hope springs eternal.) Many thanks, -T

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-11 Thread yary
> The signatures are very important to the developers. > They only confuse the programmer. Speak for yourself, I'm not developing the innards of Raku, I'm just using it for projects- like you. And I NEED the signatures. They tell me so much!! -y On Mon, Dec 9, 2019 at 6:53 PM ToddAndMargo via p