Re: Correct enum incantation?

2021-05-05 Thread Fernando Santagata
On Wed, May 5, 2021 at 6:00 PM William Michels via perl6-users < perl6-us...@perl.org> wrote: > Hello, > > I've been reading over an interesting Answer on StackOverflow by wamba: > > https://stackoverflow.com/a/67324175/7270649 > > I started trying to explore enums on my own and quickly realized t

Re: Correct enum incantation?

2021-05-05 Thread William Michels via perl6-language
Thank you Fernando! (still on Rakudo 2020.10 here). On Wed, May 5, 2021 at 10:24 AM Fernando Santagata < nando.santag...@gmail.com> wrote: > On Wed, May 5, 2021 at 6:00 PM William Michels via perl6-users < > perl6-us...@perl.org> wrote: > >> Hello, >> >> I've been reading over an interesting Ans

Re: Performance of matrix arithmetic in Raku

2021-02-08 Thread Timo Paulssen
Hi, raku doesn't have matrix operations built into the language, so you're probably refering to modules out of the ecosystem? Math::Matrix seems to have everything implemented in pure raku, which you should not expect to outperform pure python without some optimization work. Math::libgsl::

Re: Checking for nil return

2020-12-31 Thread Darren Duncan
On 2020-12-29 6:26 a.m., Ruud H.G. van Tol wrote: Basically, never mix error-state and return-value. Rather use a different channel/dimension for each. Such a separation can't be absolute though. One needs to be able to user-define routines that implement additional generic Failure related fe

Re: Checking for nil return

2020-12-31 Thread yary
Moving the "can't catch Nil return, why is Nil also a failure?" question to a Raku issue, https://github.com/Raku/doc/issues/3760 This got me going through Raku source code to see where Nil gets passed through; this looks promising. rakudo/src/vm/moar/spesh-plugins.nqp line 308

Re: Checking for nil return

2020-12-30 Thread yary
This commit shows where Nil expanded from being "Absence of a value" to, alternatively, "a benign failure". Unfortunately I haven't found discussion on "benign failure" – semantics, use case, prior art, example, that sort of thing – and the commit doesn't elaborate. https://github.com/Raku/doc/com

Re: Checking for nil return

2020-12-29 Thread Ruud H.G. van Tol
Basically, never mix error-state and return-value. Rather use a different channel/dimension for each. And any value itself can have special state too, like "absence" and (via its type) "has-default". On that docs-page, my stomach protested against the Nil/default pairing. Now I need to thin

Re: Checking for nil return

2020-12-28 Thread Brad Gilbert
The closest to null is actually an undefined type object On Mon, Dec 28, 2020, 3:36 PM yary wrote: > Been thinking about this, and checked out the Rakudo repository to peek > into the source. > > Allowing Failure as a return always makes sense to me– every block needs > to be capable of passing

Re: Checking for nil return

2020-12-28 Thread yary
Been thinking about this, and checked out the Rakudo repository to peek into the source. Allowing Failure as a return always makes sense to me– every block needs to be capable of passing along a failure, that's how the language is designed. On the other hand, Nil is not a Failure. Conceptually it

Re: Multiline/embedded comments

2020-12-23 Thread Parrot Raiser
> On 12/22/20, Vadim Belman wrote: >> >> You interpret it incorrectly. The problem is in your '#`{' comment On 12/23/20, Parrot Raiser <1parr...@gmail.com> wrote: > Removing the space between the #` and { changes the error message to: > > ===SORRY!=== Error while compiling /home/guru/bin/comment_

Re: Multiline/embedded comments

2020-12-22 Thread Vadim Belman
You interpret it incorrectly. The problem is in your '#`{' comment. You have a space between the backtick and the opening brace. Therefore it's interpreted as a single line comment. Though even if you remove the space the compiler will complain because it wouldn't find closing } due to unbalan

Re: Checking for nil return

2020-12-20 Thread Brad Gilbert
Nil is always a valid return value regardless of any check. This is because it is the base of all failures. On Sat, Dec 19, 2020, 8:17 PM yary wrote: > Is this a known issue, or my misunderstanding? > > > subset non-Nil where * !=== Nil; > (non-Nil) > > sub out-check($out) returns non-Nil { ret

Re: Checking for nil return

2020-12-20 Thread yary
After writing that email, I remembered a bit of logic from a class long ago, that any assertion made on the empty set is true. Since Nil is a representation of no results, it would make sense to have assertions about it return true. I think this example shows an optimization to skip return type che

Re: Checking for nil return

2020-12-20 Thread Joseph Brenner
yary wrote: > Is this a known issue, or my misunderstanding? > >> subset non-Nil where * !=== Nil; > (non-Nil) >> sub out-check($out) returns non-Nil { return $out } > &out-check >> out-check(44) > 44 >> out-check(Nil) > Nil > > ^ Huh, I expected an exception on "out-check(Nil)" saying the return

Re: Diagnostics?

2019-07-08 Thread Vadim Belman
If you think this is a bug you're always welcome to open a ticket at https://github.com/rakudo/rakudo/issues. Even if it eventually would turn out to be not a bug that wouldn't hurt anybody. In either case it would be very welcomed to always include examples paired with output. Best regards,

Re: Announce: french perl workshop (Aka Journées Perl)

2019-05-25 Thread Laurent Rosenfeld via perl6-language
Hello Mark, I was thinking about submitting a talk on the P6 Object System, but I could also change it to Grammars (or do both). Cheers, Laurent. Le mar. 21 mai 2019 à 10:30, Marc Chantreux a écrit : > hello perl6 people, > > we hope there will be some events around the French Perl Worshop >

Re: $? and $! equivalents

2018-10-22 Thread N6Ghost
On Fri, 14 Sep 2018 18:15:21 -0400 Brandon Allbery wrote: > 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 c

Re: "put" vs "say"

2018-10-21 Thread Parrot Raiser
Thanks for the suggestions. I ran a couple of tests: my $data_list = 1..1001; say $data_list; produces 1..1000 real0m0.357s user0m0.435s sys 0m0.048s my $data_list = 1..1001; put $data_list; produces the list of integers from 1 to 1001 (obviously a single string). real0m0.470

Re: "put" vs "say"

2018-10-21 Thread Timo Paulssen
put is meant for machines, while say is meant for humans. this is implemented by having say call the .gist method and put calling the .Str method. Try using say and put on a list of a thousand elements or more and you'll see what I mean. HTH   - Timo On 21/10/2018 18:29, Parrot Raiser wrote: >

Re: "temp" vs "my"

2018-10-05 Thread Jonathan Scott Duff
What you want is OUTER ... my $v = "original"; > { > my $v = OUTER::<$v>; > say $v; > $v = "new one"; > say $v; > } > say $v; It's how you access the outer scope from an inner scope. -Scott On Wed, Oct 3, 2018 at 1:10 AM yary wrote: > Reading and playing with https://docs.p

Re: "temp" vs "my"

2018-10-03 Thread Brad Gilbert
Note that OUTER::<$v> only goes up one level. So to go up two levels OUTER::OUTER::<$v> There is also OUTERS::<$v> which will go up as many levels as it needs to find the variable { my $a = 1; my $b = 2; { my $a = 3; { say OUTER::<$a>

Re: "temp" vs "my"

2018-10-03 Thread yary
Thanks! Knew I'd seen the concept of OUTER but couldn't remember the keyword. -y On Wed, Oct 3, 2018 at 5:51 AM, Timo Paulssen wrote: > you can refer to the outer $v as OUTER::('$v'), that ought to help :) > On 03/10/2018 08:10, yary wrote: > > Reading and playing with https://docs.perl6.org/ro

Re: "temp" vs "my"

2018-10-03 Thread Timo Paulssen
you can refer to the outer $v as OUTER::('$v'), that ought to help :) On 03/10/2018 08:10, yary wrote: > Reading and playing with https://docs.perl6.org/routine/temp > > There's an example showing how temp is "dynamic" - that any jump > outside a block restores the value. All well and good. > > Th

Re: $? and $! equivalents

2018-09-15 Thread Parrot Raiser
OK, different paradigm, different methods. Thanks. Another couple of entries for the "differences" list? Even a note the thing doesn't exist saves fruitless further searching. On 9/14/18, Brad Gilbert wrote: > On Fri, Sep 14, 2018 at 5:08 PM Parrot Raiser <1parr...@gmail.com> wrote: >> >> This

Re: $? and $! equivalents

2018-09-14 Thread Brad Gilbert
On Fri, Sep 14, 2018 at 5:08 PM Parrot Raiser <1parr...@gmail.com> wrote: > > This is probably going to be a forehead-slapper, but I can't find a > reference in either perlintro.com or http://docs.perl6.org/ > (5to6-perlfunc or top-down) for the equivalents of $? and $! in > P6.What are they? > >

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 Trey Harris
When executed: - ??? is warn.- ... is fail. - !!! is ‘die`. Otherwise, they’re identical (notably, when *not* executed, which is the usual case). You’d use ??? when you’re not implementing something yet but it needs to be callable (say, a debugging function). Given the difference in behavi

Re: 3 kinds of yadda

2018-09-10 Thread yary
Semantically !!! is "if control flow hits here, it's an error" ... is "The implementation is elsewhere, or this is not yet implemented" at least that's my impression -y On Mon, Sep 10, 2018 at 12:04 PM, Parrot Raiser <1parr...@gmail.com> wrote: > There are 3 kinds of yadda, yadda operator: >

Re: 3 kinds of yadda

2018-09-10 Thread Parrot Raiser
> Bash is treating ! as the history substitution character, and either erroring > out or substituting a previous command line. Thanks; that struck me between the time I hit send and got confirmation. :-)*

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: Is negative lookbehind behaving here?

2018-05-04 Thread Timo Paulssen
Yes, you've encountered a bug. It's got these two tickets: https://rt.perl.org/Public/Bug/Display.html?id=124898 https://rt.perl.org/Public/Bug/Display.html?id=131964 I've got a branch in nqp and rakudo that I'll merge very soon that fixes both of these bugs. Until then you can switch $ and ^, b

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

2018-03-14 Thread yary
I want an epsilon that doesn't confuse newbies and which also is efficient. epsilon=1/2**(mantissa bits-1) fits the bill. Why I want this- It would be great to have numbers survive round-trip conversions, when feasible. Specifically I have no need to compare Rats and Nums for equality, but I do

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

2018-03-07 Thread Solomon Foster
On Sun, Mar 4, 2018 at 8:49 AM, yary wrote: > In that spirit, I'd expect numeric comparison in general, and epsilon > specifically, to be set so these return True: > > > pi == pi.Rat # Does Num to Rat conversion keep its precision? > False > > pi.Str.Num == pi # Does Num survive string round-trip

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

2018-03-04 Thread yary
The point of Rats is making Perl6 more correct and less surprising in common cases, such as $ perl6 > 1.1+2.2 3.3 > 1.1+2.2 == 3.3 True > 1.1+2.2 != 3.3 False vs any language using binary floating-point arithmetic DB<1> p 1.1+2.2 3.3 DB<2> p 1.1+2.2 == 3.3 DB<3> p 1.1+2.2 != 3.3 1 In that

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

2018-03-04 Thread Solomon Foster
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 smaller vs. 0 "max > possib

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

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

2018-03-03 Thread yary
Still thinking this out. Does the default epsilon influence a Rat == Float comparison? If so, for that purpose, the most useful epsilon is one that maximizes its correctness.

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

2018-03-03 Thread yary
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 smaller vs. 0 "max possible precision?"

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

2018-03-03 Thread yary
Zeroing in on one point: > > A solution might be to instead provide a pragmatic, rather than > mathematical > > parameter: > > > > :$numbits = 64 > > > > This would say to keep as much precision as possible while making the > result > > fit in 64 bits. For example 2.147483647e0.Rat would res

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

2018-03-03 Thread Brad Gilbert
On Fri, Mar 2, 2018 at 4:33 PM, Jim Avera wrote: > Hello, > > Using Rakudo 2018.01: > > my Rat $rat-from-literal = 1.23456789; > my Rat $rat-from-str = "1.23456789".Rat; > my Real $real = 1.23456789e0; > my Rat $rat-from-real= $real.Rat; > > say $rat-from

Re: Naming debate- what's the location for it?

2018-02-20 Thread Timo Paulssen
FWIW, Jupyter can also be used with Perl 6, though surely we ought to advertise it more broadly.

Re: Naming debate- what's the location for it?

2018-02-20 Thread vijayvithal jahagirdar
While I am not an expert in R, My observation about the specific features that I use often in R and its equivalence in Perl is as follows. - The *apply functions, Technically it is similar to Perl's map/grep and friends. - Magrittr: Perl5 has no equivalent function, Perl6 has the pipe

Re: Naming debate- what's the location for it?

2018-02-20 Thread yary
A bit of a digression around marketing/evangelizing > When I wanted to learn DataScience, courses using R and Python were > readily available. Even though I had been using Perl for 20 years, I did > not even know where to start in the Perl ecosystem! > I've wondered why PDL isn't more popular, m

RE: Naming debate- what's the location for it?

2018-02-20 Thread Eaglestone, Robert J
Cc: Perl Language ; raiph mellor Subject: Re: Naming debate- what's the location for it? CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe. Marketing is not only about branding. It is also

Re: Naming debate- what's the location for it?

2018-02-16 Thread vijayvithal jahagirdar
lieve along with re branding we also need powerful narratives about how Modern Perl and P6 are better than their competitors in the selected domains. Regards Vijay On Sat, Feb 17, 2018 at 3:26 AM, Darren Duncan wrote: > If we assume the use of NQP is part of the project's identity, th

Re: A proposal for Perl's branding - let's free all the butterflies

2018-02-16 Thread Nigel Hamilton
> Here is a suggestion for Perl's branding: >> >> http://nigelhamilton.com/perl-branding-proposal.html >> > > I like your proposal. > > :-) > But its details would need fleshing out more, particularly at the end, > where it says this: > > Perl $new_runtime_name_for_perl5_goes_here (tm) > Perl $n

Re: A proposal for Perl's branding - let's free all the butterflies

2018-02-16 Thread Darren Duncan
On 2018-02-16 11:15 AM, Nigel Hamilton wrote: Here is a suggestion for Perl's branding: http://nigelhamilton.com/perl-branding-proposal.html I like your proposal. But its details would need fleshing out more, particularly at the end, where it says this: Perl $new_runtime_name_for_perl5_goe

Re: Naming debate- what's the location for it?

2018-02-16 Thread Darren Duncan
If we assume the use of NQP is part of the project's identity, then yes that makes sense. Historically that wasn't the case, eg the earlier Rakudo were written to Parrot PIR directly, and there's the possibility this could change again, though I see that as unlikely. Not a bad idea. -- Darren

Re: Naming debate- what's the location for it?

2018-02-16 Thread Lloyd Fournier
I'm about to publish some blog posts with using Perl 6 to demonstrate some cryptographic primitives. I was thinking about calling it "rakudo" to at least intrigue people and make them google it. Couldn't we call the language rakudo and the implementation nqp-rakudo? (ie a rakudo implementation in

Re: Naming debate- what's the location for it?

2018-02-14 Thread Patrick R. Michaud
On Wed, Feb 14, 2018 at 05:55:54PM +, raiph mellor wrote: > (Perl) Rakudo > === > > If jnthn and pmichaud and larry can warm to this idea, then: > [...] > The 'Perl' could be dropped from Rakudo specific propaganda, > calling the language just Rakudo instead, to reinforce that it refer

Re: Naming debate- what's the location for it?

2018-02-14 Thread raiph mellor
timing of the purported event [at official Python 2.x EOL?] ... There are differing views ... whether it will occur in one event or two [Raptor relaunch of P5... Rakudo relaunch of P6...] ... the term "rapture" is derived from the text of the Latin ... —"we will be caught up" [It&#x

Re: Naming debate- what's the location for it?

2018-02-10 Thread Ruud H.G. van Tol
Don't type here. On 2018-02-10 05:16, Parrot Raiser wrote: On 2/10/18, Darren Duncan wrote: I think if we want to keep "Perl" in the name we should use "C" as a precedent. Other related languages keeping "C" include "Objective C", "C#", "C++", Perl++ would work. https://en.wikipedia.org/

Re: Naming debate- what's the location for it?

2018-02-10 Thread Darren Duncan
Bad idea. There should not be any number in the name, in any way shape or form. No six, no ten, or any other. Differentiating factors should be something not a number. -- Darren Duncan On 2018-02-09 9:15 PM, Brent Laabs wrote: Might as well follow Apple and Microsoft and call it Perl Ten. 

Re: Naming debate- what's the location for it?

2018-02-09 Thread Brent Laabs
Might as well follow Apple and Microsoft and call it Perl Ten. Yes, spelled out. On Fri, Feb 9, 2018 at 8:16 PM, Parrot Raiser <1parr...@gmail.com> wrote: > On 2/10/18, Darren Duncan wrote: > > > I think if we want to keep "Perl" in the name we should use "C" as a > precedent. > > Other related

Re: Naming debate- what's the location for it?

2018-02-09 Thread Parrot Raiser
On 2/10/18, Darren Duncan wrote: > I think if we want to keep "Perl" in the name we should use "C" as a > precedent. > Other related languages keeping "C" include "Objective C", "C#", "C++", > > Perl++ would work.

Re: Naming debate- what's the location for it?

2018-02-09 Thread Steve Pitchford
Ok. So here is something revolutionary. Free up "Perl 6" for a future generation of Perl 5 and remove the ceiling on the perl 5 language. Perl 6 has become more than a major iteration, hasn't it? Perl on parrot Perl on jam Perl on mono Lots of space for a five from six once you vacate the lot.

Re: Naming debate- what's the location for it?

2018-02-09 Thread Darren Duncan
On 2018-02-09 12:55 PM, Eaglestone, Robert J wrote: I think a name change is too radical. /And yet/. I think Steve has a point, though I don’t know what to do about it.  The developers in my little corner of the world may not be up on the new-language-of-the-week, but even they see Perl as a h

RE: Naming debate- what's the location for it?

2018-02-09 Thread Eaglestone, Robert J
matches /perl/i they automatically toss it in the bit bucket. Some of them are too nice to say it outright. Some aren’t. Six. From: Steve Pitchford [mailto:steve.pitchf...@gmail.com] Sent: Friday, February 09, 2018 2:08 PM To: Lucas Buchala Cc: Perl6 Subject: Re: Naming debate- what'

Re: Naming debate- what's the location for it?

2018-02-09 Thread Steve Pitchford
Thought the conversation felt like bikeshedding but... My point still stands. This is a new language targetted at a post php world. The significance of a version number will be lost outside the perl echo chamber and in that context seen as baggage... IMHO... YMMV... On 9 Feb 2018 6:15 pm, "Lucas B

Re: Naming debate- what's the location for it?

2018-02-09 Thread Lucas Buchala
I doubt the name is "up for discussion" just because there's a blog post about it. The name ain't changing ever, or at least that's how I understand things. But, please, feel free to correct me if I'm wrong. Sure, you can have as many alternative nicknames and aliases as you want (for marketing pu

Re: Naming debate- what's the location for it?

2018-02-08 Thread Parrot Raiser
Looking at possible candidates from a search-engine results and alternative manings test. some possible choices: Mu, (the root object class), Camelia, (the spokesbug taking over), Shesh, (the female form of 6 in Hebrew, but unfortunately also in the Urban Dictionary - look it up for yourself).

Re: Naming debate- what's the location for it?

2018-02-08 Thread Steve Pitchford
Well, for what it's worth, as an outsider - IMHO, leaving "perl" behinds a good thing. Love it or loath it, we live in a js/python/jvm leaning world. Perl was great, but it's dated. Why have the baggage? Rakudo is a new language. Treat it as such - best hope for it. In layman's terms an informal "P

Re: Naming debate- what's the location for it?

2018-02-08 Thread Darren Duncan
My personal favorite resolution is to officially name the language Rakudo, full stop. The implementation that was/is using the name would be renamed to something else so it isn't the same as the language. Then we say "Rakudo" is a sibling language of "Perl", full stop. Then "Perl 6" becomes

RE: Naming debate- what's the location for it?

2018-02-08 Thread Eaglestone, Robert J
* What's the counter word for computer languages, anyway? -mai? As an abstraction from paper printouts? From: Brent Laabs [mailto:bsla...@gmail.com] Sent: Thursday, February 08, 2018 2:51 PM To: Aaron Sherman Cc: yary ; Perl6 Subject: Re: Naming debate- what's the locat

Re: Naming debate- what's the location for it?

2018-02-08 Thread Aaron Sherman
Just Mu would be an amusing Perlish pun based on Muttsu... Making the interpretation either Perl "six" or Perl "most undefined". I like yary's idea too. Frankly, if Perl had an identity, I would not care about the name. I feel like it lacks that right now. -- Aaron Sherman, M.: P: 617-440-433

Re: Naming debate- what's the location for it?

2018-02-08 Thread Brent Laabs
Thanks for the summary of the high points, as there were a large number of low points in previous discussions. Roku is not the only reading for 六 in Japanese, the kun reading is muttsu. So we could become Mupperl. What's the counter word for computer languages, anyway? On Thu, Feb 8, 2018 at 1

Re: Naming debate- what's the location for it?

2018-02-08 Thread yary
On Thu, Feb 8, 2018 at 2:15 PM, Aaron Sherman wrote: > ... > IMHO, 6 has always been the personal name, but it could be changed to > something that's "sixish" without being an explicit number. Normally, I'd > recommend Latin, but Perl Sex is probably not where anyone wants to go... > Greek: ExiP

Re: Naming debate- what's the location for it?

2018-02-08 Thread Aaron Sherman
I think this is a fine place, personally. Past discussions have included these high points as I recall them: 1. Perl is definitely the family name 2. Rakudo started out as the name of an implementation, but started to wander into being the name of the specific leaf in the family tree

RE: Announce: Rakudo Star Release 2017.07

2017-07-26 Thread Mark Devine
Perl6 Developers, Thank you for your efforts. I'm having a great time working with this language. As a systems person, I'm getting the feeling that this might actually be the "last language I ever have to learn" (cite: Wall). My cantankerous `command` outputs are now very manageable. Concur

[perl6/specs] 7000e0: Introduce versioning of the META6.json spec for re...

2017-05-15 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: 7000e04e42e3bb31994e5202b52c269457d18dab https://github.com/perl6/specs/commit/7000e04e42e3bb31994e5202b52c269457d18dab Author: Stefan Seifert Date: 2017-05-14 (Sun, 14 May 2017) Changed paths: M S22

Re: fixing infinities and ranges etc

2016-12-11 Thread Darren Duncan
On 2016-10-30 4:11 PM, Darren Duncan wrote: On 2016-10-30 5:45 AM, yary wrote: Before/AfterEverything are also easy to understand, and would be as natural to use for sorting strings, eg. for saying if a database NULL should go before the empty string or after everything else. On the other hand,

Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread Perl6
it's not so difficult, really. you just gotta know the trick: - cd into the repository you want, then run "git am". - Use your mail client's "view source" function (ctrl-u in thunderbird for example). - copy the complete mail source including headers - paste it into the terminal that's running git

Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread franc...@avalenn.eu
On Thu, Dec 01, 2016 at 10:15:03AM -0500, Will Coleda wrote: > This will be much more likely to be applied if you provide a pull > request to the repo at https://github.com/perl6/doc I agree but it was a lot simpler for me to send it by e-mail at the moment. I will perhaps try to make a pull-reque

Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread franc...@avalenn.eu
On Thu, Dec 01, 2016 at 10:46:17AM -0600, andy_b...@wiwb.uscourts.gov wrote: > Hmm: > $ cat /tmp/here.pl6 > my ($first, $second) = qq:to/END1/, qq:to/END2/; > FIRST > MULTILINE > STRING > END1 >SECOND >MULTILINE >STRING >END2 > say "f: $first, s: $second"; > > $ perl6 /tmp/

Re: [PATCH] multiple heredoc beginning in the same line

2016-12-01 Thread Will Coleda
This will be much more likely to be applied if you provide a pull request to the repo at https://github.com/perl6/doc On Wed, Nov 30, 2016 at 10:31 AM, wrote: > This is to document the fact that, as in POSIX shell, you can use > multiple HEREDOC strings in the same line. > > --- > doc/Language/

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
I feel like you're focusing on the wrong thing somehow. The issue is not that what nqp is doing is somehow wrong. The issue is that the thing it is doing is necessarily an implementation detail, and as such should be isolated from the language level and any failures/errors exposed as language level

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
I guess I wasn't clear in what I was asking: What, exactly, was it that NQP was doing? What were the inputs and what was the behavior that you observed? So far, all I have to go on is one example that you feel is not illustrating the broken behavior of NQP that you want to work around with a chang

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 Jon Lang
So what is the assuming method, and why is it in a callable role? What was the logic behind that decision? On Nov 14, 2016 1:38 PM, "Brandon Allbery" wrote: > This should probably have been cc-d to the list. > > Callable claims to be the thing we want. What it actually is, is a mix-in > that add

Re: CALL-ME vs. Callable

2016-11-14 Thread Brandon Allbery
This should probably have been cc-d to the list. Callable claims to be the thing we want. What it actually is, is a mix-in that adds the assuming method. I am not sure these can be conflated. Note that the current docs actually do claim it is what I want. This is because I first brought this up i

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 Aaron Sherman
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. Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plu

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 Aaron Sherman
Fair points, all. 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... Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and life-long

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

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
Role-based testing seems very perl6ish. I'd suggest the role name be "Invocable" with much the sort of signature as you've described. 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. Aaron Sherman, M.: P: 617

Re: fixing infinities and ranges etc

2016-10-30 Thread Darren Duncan
On 2016-10-30 5:45 AM, yary wrote: I'm not sure I entirely understand the proposal- does it change Inf aka ∞ ? Part of the issue I think is that the existing "Inf" aka "∞" don't seem to be very clearly defined. What I could find so far, at least with respect to Ranges, is that they are just

Re: fixing infinities and ranges etc

2016-10-30 Thread yary
I'm not sure I entirely understand the proposal- does it change Inf aka ∞ ? Otherwise I like it, and prefer the X::NegInf and X::PosInf,spellings as being easy-to-understand & a good Huffman-encoding. Before/AfterEverything are also easy to understand, and would be as natural to use for sorting s

Re: Documentation for error messages

2016-10-24 Thread Wenzel P. P. Peppmeyer
On Mon, 24 Oct 2016, Parrot Raiser wrote: Where's the best current description of error messages from file "open" commands, and how to control them? `git grep 'does X::IO'` is your best bet right now because some X::IO-exceptions are not documented yet.

Re: Is this a bug?

2016-09-19 Thread Aaron Sherman
Thank you. Silly me, thinking "this is so simple I don't need to run it through the command-line to test it." :-) Anway, yeah, say $_ for reverse lines Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and life-long student.

Re: Is this a bug?

2016-09-19 Thread Parrot Raiser
It may make it clearer if I explain the broader objective. I'm trying to learn P6 thoroughly by developing training courses to teach it from scratch. (Fans of Gerald Weinberg may recognise the idea.) Obviously, while doing so, I want to explore pathological cases, both to clarify the concepts and t

Re: Is this a bug?

2016-09-19 Thread Timo Paulssen
On 19/09/16 16:02, Aaron Sherman wrote: > I'm guessing that what you meant was "say as a function was what I > meant to > use there." In which case: > > say for reverse lines > > or > > for reverse lines { say } > > These are both valid ways of asking for each element of the iterable > thing retur

Re: This seems to be wrong

2016-09-19 Thread Timo Paulssen
On 19/09/16 15:56, Aaron Sherman wrote:> You can also use map, but it's slightly clunkier: > > "for @inputs.map: .Int -> $i { ... }" This also needs to have "*.Int" or "{ .Int }" otherwise you'll pass $_.Int as the argument to map rather than telling map to call .Int on things.

Re: Is this a bug?

2016-09-19 Thread Aaron Sherman
I'm guessing that what you meant was "say as a function was what I meant to use there." In which case: say for reverse lines or for reverse lines { say } These are both valid ways of asking for each element of the iterable thing returned from lines to be printed with a newline. But remember th

Re: This seems to be wrong

2016-09-19 Thread Aaron Sherman
"for @inputs.map( .prefix:<+> ) {...}" That's spelled: "for @inputs>>.Int -> $i { ... }" You can also use map, but it's slightly clunkier: "for @inputs.map: .Int -> $i { ... }" Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
D’oh! I’m blind. 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 Cool seem to

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 6:30 PM Brandon Allbery allber...@gmail.com wrote: > 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 val

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: Is this a bug?

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 16:49 Parrot Raiser <1parr...@gmail.com> wrote: say { $_ } was the correct thing to use there. (I'm trying to avoid > any mention of O-O for the moment.) > “Trying to avoid any mention of O-O” seems like a Perl 6 obfuscation or golf constraint, not a desirable development o

  1   2   3   4   5   6   7   8   9   10   >