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 devel
be a good
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
--
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 h
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 ten
> 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 :
+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?
> * 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
i
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 False
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 False
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 )
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 A
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 again'
> 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 different
liable trick would be to use a sub and a counter
> variable:
>
> my atomicint $c = 0;
> sub foo($) { ++⚛$c }('a' | 'b,b' | 'c');
> say $c;
>
> Or, taking about tricks:
>
> ('a' | 'b,b' | 'c')».&(-> $ { ++
> It can be done without the EVAL:
>
>> any('a', 'b', 'c').raku.substr(4, *-1).split(',').elems
>
> 3
Yeah, but only at the cost of some fragility:
> any('a', 'b,b', 'c').raku.substr(4, *-1).split(',').elems
4
I suppose you could do:
> any('a', 'b,b', 'c').elems.raku.substr(4, *-1).split(',')
> But .EVAL is evil, right?
Indeed! And
any('a', 'b', 'c').raku.substr(3).EVAL.elems;
arguably deserves _extra_ evil points for using the .EVAL method which, unlike
the
EVAL sub, doesn't even warn about how dangerous it is (even though it probably
should).
> 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 ha
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 that's
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 quest
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
go
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 programmi
> 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:
https://stackoverf
22 matches
Mail list logo