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 run

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 kno

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 1/100,000 vs. something

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, Brando

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 "currying"). &some-callable.ass

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
over the meaning of Callable). On Mon, Nov 14, 2016 at 4:30 PM, Jon Lang 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" wrote: > >> >> On Mon, Nov 14, 2016 at 3:42 PM, Aaron Sh

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 systemic issue. That

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
On Mon, Nov 14, 2016 at 3:42 PM, Aaron Sherman wrote: > I do think, though that if the concern is really with "the 4 cases when > nqp hauls a CALL-ME out of its bowels" then that's what should be > addressed... > The main addressing of that is some kind of role to abstract it properly. I just th

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 the question of w

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
On Mon, Nov 14, 2016 at 3:06 PM, Aaron Sherman wrote: > That being said, I don't think that the current error is terrible. It > clearly shows that the issue is with the attempt to invoke a Bool. In that situation it is obvious, because I took the simplest of the 4 cases when nqp hauls a CALL-ME

CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
This started out some weeks ago as a user in #perl6 confused by an error that gofled down to: [28 19:01:37] m: my Bool $x = False; $x() [28 19:01:38] rakudo-moar 0dc6f7: OUTPUT«No such method 'CALL-ME' for invocant of type 'Bool' This is, at the very least, LTA. But it also got me thinking abou

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 > invocant of class 'An

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 the docs about Coo

Re: This seems to be wrong

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

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 sub, not a multi me

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 ther

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: 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: 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 Parrot backend hasn't

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 version numbers without

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* perl6 to bend the rule

Re: Rationale for $!

2016-01-28 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 11:06 AM, Felipe Gasper wrote: > On 27 Jan 2016 11:03 AM, Brandon Allbery wrote: >> >> On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper > <mailto:fel...@felipegasper.com>> wrote: >> >> Unrelated, but, does open() not throw on fai

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 noodling can matter. -- br

Re: Commensurability as Key

2013-08-21 Thread Brandon Allbery
On Tue, Aug 20, 2013 at 11:19 PM, Doug McNutt wrote: > 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 container of some kind,

Re: Problem using a module containing a grammar

2013-03-25 Thread Brandon Allbery
On Mon, Mar 25, 2013 at 11:01 AM, 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 associates allber...

assignable mutators (S06/Lvalue subroutines)

2008-05-16 Thread Brandon Allbery
S06/Lvalue subroutines: "Lvalue subroutines return a proxy object that can be assigned to. (...)" S13/Methods: "Setter methods that expect the new value as an argument do not fall into the well-behaved category, however." When I take these two together, in a way which may be out of contex