Re: Problem using a module containing a grammar

2013-03-25 Thread Brandon Allbery
On Mon, Mar 25, 2013 at 11:01 AM, phi...@free.fr wrote: grammar SalesExportGram is export { (...) my $parsed = SalesReportGram.parsefile('sales_report.txt'); Might help if you used the same name in both places? -- brandon s allbery kf8nh sine nomine

Re: Commensurability as Key

2013-08-21 Thread Brandon Allbery
On Tue, Aug 20, 2013 at 11:19 PM, Doug McNutt dougl...@macnauchtan.comwrote: I confess. I'm here because I hoped perl 6 would do vector operations after reading an early small book. I don't think anyone has said that it won't/can't. Perl 6 indeed returns a scalar... but that scalar may be a

Re: Intalling Perl6

2016-06-26 Thread Brandon Allbery
On Sun, Jun 26, 2016 at 1:51 PM, Julian Brown wrote: > I search for packages on Debian Jessie for Perl 6 and found Rakudo and > Parrot. > > Does everyone install per user and not system-wide? > Does anyone use Parrot instead of Moar? > Debian is, as always, way behind. The

Re: It's time to use "use v6.c"

2016-02-06 Thread Brandon Allbery
On Sat, Feb 6, 2016 at 2:30 PM, yary wrote: > this morning I installed the 2016.01 R*. Now I'm at the NYC perl6 > study group, and a helpful neighbor asked me to start up p6doc. > This is something of an edge case. It is reasonable for stuff that is supposed to ship *with*

Re: It's time to use "use 6.c"

2016-02-09 Thread Brandon Allbery
On Tue, Feb 9, 2016 at 5:38 AM, Peter Pentchev wrote: > For the record, just to clear up some possible confusion, "use 6.c" > doesn't work in source files; you need "use v6.c". > Clarifying: yary seems to have been confused by the fact that META6.json (only) needs to use

Re: Rationale for $!

2016-01-28 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper wrote: > Unrelated, but, does open() not throw on failures anyway? (Noodling with > the perl6 REPL just now seems inconclusive.) There have been issues with failures in sink context not throwing, IIRC? So how you were

Re: Rationale for $!

2016-01-28 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 11:06 AM, Felipe Gasper <fel...@felipegasper.com> wrote: > On 27 Jan 2016 11:03 AM, Brandon Allbery wrote: >> >> On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper <fel...@felipegasper.com >> <mailto:fel...@felipegasper.com>> wro

Re: Justification for the "reversed" instruction format

2016-09-07 Thread Brandon Allbery
On Wed, Sep 7, 2016 at 6:08 PM, Parrot Raiser <1parr...@gmail.com> wrote: > There is a "flip" in P6, to reverse the characters in a string, and a > "reverse", to return the elements of a list. Would either of those be > an equivalent? > Not without an "apply" mechanism used for function / method

Re: This seems to be wrong

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 4:31 PM, Parrot Raiser <1parr...@gmail.com> wrote: > but seems to have a problem with larger numbers: > > 7 > 3 > 21 <- This > 2 > 1 > 0 > 4 > bamm-bamm > barney > (Any) <--- Produces this > betty > fred > 0

Re: This seems to be wrong

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 6:29 PM, Trey Harris wrote: > But I see there’s a multi method Str defined on Any, and you can’t do > @inputs.map( .Str ), either (Use of uninitialized value $_ of type Any in > string context). Why not? (There’s no multi method Num on Any, even > though

Re: This seems to be wrong

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 6:36 PM, Trey Harris wrote: > Does not being defined on Any explain why the error for @input.map( .Str ) > is different (Use of uninitialized value $_ of type Any in string context) > than the error for @input.map( .Num ) (Method 'Num' not found for >

Re: Is this a bug?

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 4:49 PM, Parrot Raiser <1parr...@gmail.com> wrote: > What is this -> ;; $_? is raw { #`(Block|170303864) … } output? It's the gist of a Block, which is what you asked for when you did a `say` on an executable block. Why do you believe `say { $_ }` is the right thing

Re: This seems to be wrong

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 6:06 PM, Trey Harris wrote: > Not work? It results inMethod 'prefix:<+>' not found for invocant of > class 'Any', but the docs > > > say it is defined as a multi on Any…. > > No, they say it's a multi

Re: This seems to be wrong

2016-09-18 Thread Brandon Allbery
On Sun, Sep 18, 2016 at 6:15 PM, Brandon Allbery <allber...@gmail.com> wrote: > for @inputs.map({ .:<+> }) { ... } Which means the shorter way is: for @inputs.map(+*) { ... } -- brandon s allbery kf8nh sine nomine associates allb

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
On Mon, Nov 14, 2016 at 5:00 PM, Jon Lang wrote: > So what is the assuming method, and why is it in a callable role? What was > the logic behind that decision? It's perfectly sensible: it's how you implement partial application (which as sadly usual is mis-called

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
latter is bad, but it seems to be a patch > around a problem in the former... > > > > > Aaron Sherman, M.: > P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com > Toolsmith, developer, gamer and life-long student. > > > On Mon, Nov 14, 2016 at 4:32 PM, Brandon A

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
On Mon, Nov 14, 2016 at 4:28 PM, Aaron Sherman wrote: > So, you said that the problem arises because NQP does something > non-obvious that results in this error. Can you be clear on what that > non-obvious behavior is? It sounds to me like you're addressing a symptom > of a

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
he meaning of Callable). On Mon, Nov 14, 2016 at 4:30 PM, Jon Lang <datawea...@gmail.com> wrote: > Okay, let's go with that. What does Callable do, and why is it called that? > > On Nov 14, 2016 1:09 PM, "Brandon Allbery" <allber...@gmail.com> wrote: > >>

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
Also... On Mon, Nov 14, 2016 at 3:06 PM, Aaron Sherman wrote: > Role-based testing seems very perl6ish. I'd suggest the role name be > "Invocable" with much the sort of signature as you've described. If it's Invokable then the method should probably be INVOKE. It still leaves

Re: 3 kinds of yadda

2018-09-10 Thread Brandon Allbery
Bash is treating ! as the history substitution character, and either erroring out or substituting a previous command line. ^ has related behavior at the start of a line. ... is specially recognized by the compiler, for example treating a class stubbed with ... as a forward declaration. I don't

Re: (default) Real->Rat precision should match what compiler uses for literals

2018-03-03 Thread Brandon Allbery
Max precision rapidly becomes more memory requires than your computer has. On Sat, Mar 3, 2018 at 3:32 PM, yary wrote: > Or instead of 1/2**(32 or 64), re-asking these questions about epsilon: > > " Why so large? > >Why not zero? " > > What's justification for using

Re: $? and $! equivalents

2018-09-14 Thread Brandon Allbery
Magic variables make multiple threads impossible, which is why perl 5 is stuck with ithreads: what happens if two threads each "run" something at around the same time? In Perl 6, you have a Proc object for each subprocess, and can query it for its status and/or result code; for things like sub