Re: Rust community in distress

2023-06-09 Thread Daniel Sockwell via perl6-users
Depending on how many would leave the original product, the pace of development of both could be slowed down by a factor of 2 or even more. That's technically correct (which, after all, is the best kind of correct, https://knowyourmeme.com/photos/909991-futurama ). But while the pace of

Re: Regex surprises

2022-09-15 Thread Daniel Sockwell
option if you're trying to keep something concise.) Using that syntax, your example goes from S:g[(x)|(y)] = $0 ?? x-replacement !! y-replacement to S:g[$=[x]|y] = $ ?? x-replacement !! y-replacement which is pretty similar. I hope that helps! Best, Daniel -- Daniel Sockwell

⏰ Raku conference talk proposals due Sun 18:00 UTC

2022-04-29 Thread Daniel Sockwell via perl6-users
As a final reminder, the Perl and Raku Conference's call for proposals closes in TWO DAYS – on Sunday, May 1 at 18:00 UTC (2pm eastern time).   Don't forget to submit your talk proposal by then! (And, if you aren't yet planning to propose a talk, it's not too late to do so: you don't need to

Re: A natural opportunity for Raku?

2022-02-12 Thread Daniel Sockwell
February 12, 2022 4:12 PM, "Parrot Raiser" <1parr...@gmail.com> wrote: > In this article, "Every Simple Language Will Eventually End Up Turing > Complete" > https://solutionspace.blog/2021/12/04/every-simple-language-will-eventually-end-up-turing-complete > the author points out an unfortunate

Re: coercion

2022-02-11 Thread Daniel Sockwell
> The question now is that I can't find anything about COERCE in the > documentation. Yeah, COERCE definitely should be documented but just hasn't been yet. There's a raku/doc issue about needing to add it (https://github.com/Raku/doc/issues/3807) but unfortunately none of us has done so yet

Re: file format extensions

2021-12-30 Thread Daniel Sockwell
+1 from me too. I'd also add test files to the list, which have at least .t and .rakutest (with the latter being preferred AFAK, so that GitHub will start highlighting them correctly). I'm not sure if there are other acceptable extensions for test files, though?

Re: the MAIN questions

2021-12-29 Thread Daniel Sockwell
> * I'm pretty sure i saw something like :!$test to express Bool :$test = False. > Did i just dreamed about it ? You sort of dreamed it. :!test passes test => False as a Pair, which means $test = False. But that's syntax for calling the fn, not declaring it. You could do Bool() :$test=0, but

Re: junctions with given/when

2021-11-08 Thread Daniel Sockwell
Hi Larry, I have a follow up question based on your May 31 email that I'm hoping you may be able to answer. In that email, you wrote: > In my opinion, the most consistent approach is to disallow any > autothreading of the argument to .ACCEPTS, such that > 3.ACCEPTS(any(3,4)) simply returns

Re: junctions with given/when

2021-11-08 Thread Daniel Sockwell
Hi Larry, I have a follow up question based on your May 31 email that I'm hoping you may be able to answer. In that email, you wrote: > In my opinion, the most consistent approach is to disallow any > autothreading of the argument to .ACCEPTS, such that > 3.ACCEPTS(any(3,4)) simply returns

Re: callbacks with placeholder vars

2021-08-25 Thread Daniel Sockwell
I just submitted a PR based on this useful thread. https://github.com/Raku/doc/pull/3942 Thanks to you both! (Also, apparently $:a has the same behavior – after the first time, you can use $a )

Re: [naive] hash assingment

2021-07-14 Thread Daniel Sockwell
To expand slightly on what Clifton said, the reason that > %a = %a.map: { .sqrt }; > # (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979) does what you mean but > %a{'column1'} ==> map( { .sqrt } ) > # (2.23606797749979) does not is that the method .map maps over *each item* in the

Re: Buf to Str

2021-06-09 Thread Daniel Sockwell
Hi Paul, If you _do_ want/need to work with C-style null-terminated strings, you can use the (core) NativeCall library. So, given your example: > my Buf $b .= new([72, 105, 0, 32, 97, 103, 97, 105, 110, 0]); > say $b.decode; > I would expect this to print 'Hi'. > > Instead it prints 'Hi

Re: File::Find using a junction with exclude

2021-05-24 Thread Daniel Sockwell
> Oh, and WAT is [short for] "Weird/will Ass Thing"? No, it's not an abbreviation for anything – it's the word "what", but pronounced in a way that indicates the speaker is surprised/confused. More specifically, it's a reference to the WAT talk (a really good one, even if it is about a

Re: File::Find using a junction with exclude

2021-05-24 Thread Daniel Sockwell
taking about tricks: > > ('a' | 'b,b' | 'c')».&(-> $ { ++⚛$c }); > > Apparently, this one is not ugly by semantics, but by its notation too. Also > worth noting that the > hyper-op is needed here because pointy blocks are not auto-threaded over > junctions and

Re: File::Find using a junction with exclude

2021-05-23 Thread Daniel Sockwell
> For example, you can't get a count of the number of elements in a junction Well, if you're willing to stoop to ugly enough hacks, there's _always_ a way :D any('a', 'b').raku.substr(3).EVAL.elems # OUTPUT «3» > My guess would be that the `ACCEPTS` method for a Junction is special cased to

Re: Please create a Raku community channel

2021-03-14 Thread Daniel Sockwell
I agree with the points Vadim and JJ made: There's a good chance that having a more official communication channel would _not_ have prevented surprise here, since the amount of progress on the a potential docs redesign seems to have taken many people (including me!) by surprise. I guess

Re: Find Packages with prefix ...

2021-03-07 Thread Daniel Sockwell
Hi Paul, That's an interesting question, and I have a few thoughts below. Before I get to those, I wanted to point out an issue with the way you started your email with "Hey Gents": the Raku community includes many talented women, and I'd love to see it include more. On to the technical

Re: Module Documentation

2021-03-02 Thread Daniel Sockwell
Richard Hainsworth wrote: > My suggestion is that some formal decision is made about documentation for > Raku modules, that some > documentation good practices are put together and included in the Modules > page. I think that this is a great idea (and that your suggestions afterwords are a

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Daniel Sockwell
Kevin Pye wrote: > Just because mathematics allows an implied multiplication doesn't mean Raku > does -- in fact I can't > think of any programming language which does. As a (potentially) interesting side note, while Raku doesn't provide implied multiplication, it _is_ one of the few

Re: list of all raku classes?

2021-02-28 Thread Daniel Sockwell
> Is there a convenient way to get a list of all classes built-in to Raku? Short answer: raku -e '.say for (|CORE::, |UNIT::, |OUTERS::, |MY::).grep({ .key eq .value.^name }).grep({ .value.HOW.^name eq "Perl6::Metamodel::ClassHOW" }).map(*.key).unique' Somewhat longer answer: