🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left
00:02
reportable6 joined
00:10
jpn joined
|
|||
[Coke] | you can specify degree and batch - there are defaults | 00:22 | |
oh, oops: method race(Int(Cool) :$batch = 64, Int(Cool) :$degree = 4 --> Iterable) | 00:24 | ||
Nemokosch | are they different from other default values? | ||
[Coke] | right in the docs. I thought those were driven by a per machine config | 00:25 | |
00:39
NemokoschKiwi joined
|
|||
Nemokosch | and apparently I'm not doing a great job at reading chat | 00:40 | |
00:45
jpn left
00:58
NemokoschKiwi left
01:13
jpn joined
01:22
jpn left
01:35
jpn joined
01:41
razetime joined
01:48
jpn left
02:01
jpn joined
02:31
jpn left
02:44
jpn joined
02:50
jpn left
03:02
jpn joined
03:47
jpn left
04:11
jpn joined
04:16
jpn left
04:17
jpn left
04:31
jpn joined
04:41
xinming left
04:42
xinming joined
05:09
jpn left
05:33
epony left
05:35
jpn joined
05:50
jpn left
06:00
reportable6 left
06:01
grondilu joined
|
|||
grondilu | Hi | 06:01 | |
06:01
reportable6 joined
|
|||
grondilu | m: say (-> &f { 1, &f.assuming(*, 1) ... * })({ cos $^a + $^b })[^10] | 06:01 | |
camelia | (1 -0.4161468365471424 0.834344819917976 -0.2605081543348971 0.7388111056961248 -0.16722541329588864 0.6728257104204812 -0.10185245484442669 0.6230599786146125 -0.05223986213471105) | ||
grondilu | m: say (-> &f { 1, &f.assuming(*, 1) ... * })(&cos o &[+])[^10] | 06:02 | |
camelia | Too many positionals passed; expected 0 to 2 arguments but got 3 in sub __PRIMED_ANON at EVAL_2 line 4 in sub __PRIMED_ANON at EVAL_2 line 1 in block <unit> at <tmp> line 1 |
||
grondilu | m: say (&cos o &[+]).assuming(*, pi)(2) | 06:03 | |
camelia | 0.4161468365471423 | ||
06:03
jpn joined
|
|||
grondilu | m: say { &^f.assuming(*, pi) }(&cos o &[+])(2) | 06:05 | |
camelia | 0.4161468365471423 | ||
grondilu | m: say { 1, &^f.assuming(*, pi) ... * }(&cos o &[+])(2) | ||
camelia | No such method 'CALL-ME' for invocant of type 'Seq' in block <unit> at <tmp> line 1 |
||
grondilu | m: say { 1, &^f.assuming(*, pi) ... * }(&cos o &[+]) | 06:06 | |
camelia | (...) | ||
grondilu | m: say { 1, &^f.assuming(*, pi) ... * }(&cos o &[+])[^10] | ||
camelia | Too many positionals passed; expected 0 to 2 arguments but got 3 in sub __PRIMED_ANON at EVAL_2 line 4 in sub __PRIMED_ANON at EVAL_2 line 1 in block <unit> at <tmp> line 1 |
||
grondilu | sorry for the noise, but I think there is a bug here | ||
to recap... | |||
m: say { &^f.assuming(*, pi) }(&cos o &[+])(2) # this works | 06:07 | ||
camelia | 0.4161468365471423 | ||
grondilu | m: say { 1, &^f.assuming(*, pi) ... * }(&cos o &[+])[^10] # but not this? | ||
camelia | Too many positionals passed; expected 0 to 2 arguments but got 3 in sub __PRIMED_ANON at EVAL_2 line 4 in sub __PRIMED_ANON at EVAL_2 line 1 in block <unit> at <tmp> line 1 |
||
grondilu | I know that is a convoluted line but that's the best I could come up with to reproduce a weird error I got in some digest code of mine. | 06:09 | |
06:09
jpn left
|
|||
grondilu | slightly shorter: | 06:10 | |
m: say 1, (&cos o &[+]).assuming(*, pi) ... * > 10 | |||
camelia | Too many positionals passed; expected 0 to 2 arguments but got 3 in sub __PRIMED_ANON at EVAL_2 line 4 in sub __PRIMED_ANON at EVAL_2 line 1 in block <unit> at <tmp> line 1 |
||
grondilu | the part about three arguments is especially weird. where are there three args?? | 06:12 | |
grondilu was about to post an issue on github and notices rakudo already has 1k issues | 06:16 | ||
damn that is a lot of issues | 06:17 | ||
06:18
oodani left
|
|||
grondilu | oh maybe the Seq interprets (...).assuming(*, pi) as { (...).assuming($_, pi) } | 06:20 | |
m: say 1, { (&cos o &[+]).assuming($_, pi) } ... * > 10 | |||
camelia | Cannot resolve caller Real(Sub+{Callable[Mu]}:D: ); none of these signatures matches: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
grondilu | nope | 06:21 | |
06:21
oodani joined
|
|||
grondilu | m: my &f = (&cos o &[+]).assuming(*, pi); say 1, &f ... * > 10 | 06:21 | |
camelia | Too many positionals passed; expected 0 to 2 arguments but got 3 in sub __PRIMED_ANON at EVAL_2 line 4 in sub __PRIMED_ANON at EVAL_2 line 1 in block <unit> at <tmp> line 1 |
||
grondilu | m: my &f = (&cos o &[+]).assuming(*, pi); say &f(e) | 06:22 | |
camelia | 0.9117339147869649 | ||
grondilu | m: my &f = (&[+]).assuming(*, pi); say 1, &f ... * > 10 | 06:23 | |
camelia | (1 4.141592653589793 7.283185307179586 10.42477796076938) | ||
grondilu | m: my &f = &cos o &[+].assuming(*, pi); say 1, &f ... * > 10 | 06:24 | |
camelia | (1 -0.5403023058681398 -0.8575532158463933 -0.654289790497779 -0.7934803587425655 -0.7013687736227564 -0.7639596829006542 -0.7221024250267077 -0.7504177617637604 -0.73140404242251 -0.7442373549005568 -0.7356047404363472 -0.7414250866101092 -0.73750689… | ||
grondilu | m: say (&[+]).assuming(*, pi).count | 06:35 | |
camelia | 1 | ||
grondilu | m: say (&[+]).assuming(*, pi).arity | 06:36 | |
camelia | 0 | ||
grondilu | ?? | ||
m: say (&cos o &[+]).assuming(*, pi).count | |||
camelia | Inf | ||
grondilu | m: say (&cos o &[+]).assuming(*, pi).arity | 06:37 | |
camelia | 0 | ||
grondilu | m: say (&cos o &[+]).assuming(*, pi).of | ||
camelia | (Mu) | ||
grondilu | that doesn't look right | ||
m: say (&cos o &[+]).arity | 06:38 | ||
camelia | 0 | ||
grondilu | m: say (&cos o &[+]).count | ||
camelia | 2 | ||
grondilu | m: say (&cos o &[+]).of | ||
camelia | (Mu) | ||
grondilu looks at the code for C<assuming> | 06:41 | ||
grondilu runs away in terror | |||
06:56
grondilu left
06:58
jpn joined
07:06
jpn left
07:17
epony joined
07:31
abraxxa joined
07:34
jpn joined
07:40
djerius left
07:41
djerius joined
07:42
xinming left,
xinming joined
07:44
sena_kun joined
08:16
jpn left
08:19
Sgeo left
08:20
xinming left
08:21
xinming joined
08:51
dakkar joined
08:54
jpn joined
09:25
tappi joined
09:35
jpn left
09:46
jpn joined
|
|||
guifa | grondilu: my understanding is that assuming was put together rather quickly | 10:15 | |
tellable6 | guifa, I'll pass your message to grondilu | ||
guifa | it's also rather slow. But there's definitely some potential for speed up | 10:16 | |
I need to spend sometime looking at those examples though to see what may be going on and if it makes sense | |||
10:46
evalable6 left
10:49
evalable6 joined
11:43
tappi left
11:55
pmurias joined
|
|||
pmurias | hi! | 11:55 | |
tellable6 | 2022-07-09T11:51:29Z #raku <Xliff> pmurias Hey there! Nice to see you around. Hope to catch up to you in the future! | ||
pmurias | simon.peytonjones.org/assets/pdfs/...nge-22.pdf - interesting to see the overlap with Raku junctions | 11:57 | |
lizmat | guifa: assuming is screaming "redo me with RakuAST" but we'll have to wait until the Raku grammar uses RakuAST, because we currently cannot introspect the given code enough | 11:58 | |
and/or re-use parts of it | |||
guifa | lizmat: yeah that's what I was thinking. If I could get a hold of a RAST representation of a sub, I'm fairly certain I could produce an assumed version of it super easily | 12:00 | |
lizmat | yup | ||
12:00
reportable6 left,
reportable6 joined
|
|||
lizmat | anyways, rakuast branch has been updated by vrurg and is now "main" :-) | 12:00 | |
guifa is really hoping that traits will get rakuast representations down the road | |||
because OMG the stuff I could with that | |||
lizmat | yup :-) | 12:01 | |
Nemokosch | Voldenet: reminder | 12:02 | |
Voldenet | Oh, nice | 12:05 | |
12:40
pmurias left
|
|||
Voldenet | ".assuming" is a weird part of the language, I shudder every time I remember it actually does _EVAL_ | 12:42 | |
Geth | ecosystem/main: 307669fc48 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Moved to the zef ecosystem One down, a few to go. |
12:48 | |
Voldenet | btw, nice junctions presentation, I adore usage of comic sans | 12:55 | |
leont doesn't quite understand why assuming can't just use Captures to do it's thing, all you really need to do is merging captures, right? | 13:01 | ||
Voldenet | iirc I've tried implementing it with Captures and it wasn't exactly trivial | 13:05 | |
Geth | ecosystem/main: 94fd1471b6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Moved to zef ecosystem Looking for greener pastures |
13:22 | |
14:18
razetime left
14:54
lichtkind joined
14:57
razetime joined
15:25
squashable6 left
15:26
squashable6 joined
15:41
yay joined
15:58
Sgeo joined
16:01
discord-raku-bot left,
discord-raku-bot joined
16:24
abraxxa left
|
|||
Geth | Raku-Steering-Council/main: 5ad315bdca | (Geoffrey Broadwell)++ | minutes/20221210.md Add RSC meeting minutes for 2022-12-10 |
16:24 | |
16:42
Kaiepi left
|
|||
[Coke] | ... Anyone who has found drag and drop to be acting "funny" on recent osx's ... disable "spring-loading" in accessibility. ahhh | 16:55 | |
17:01
jpn left,
Kaiepi joined
17:09
jpn joined
17:13
yay left
17:35
martinthewildpig joined
17:39
dakkar left
17:40
razetime left,
mscha joined
|
|||
mscha | m: my Int $n; say $n === 0; | 17:41 | |
camelia | False | ||
mscha | Is this the proper way to check for Int equality without complaining about uninitialized values? | ||
Doesn't seem to be documented for Int. | |||
Nemokosch | the reason this doesn't complain about uninitialized values is that it performs a very generic, WHICH based comparison | 17:45 | |
17:45
lizmat left
17:48
lizmat joined
|
|||
another quasi-solution would be to use quietly on the statement, silencing all runtime warnings | 17:48 | ||
mscha | m: my $a; say quietly $a == 0; | 17:50 | |
camelia | True | ||
mscha | m: my $a; quietly say $a == 0; | ||
camelia | True | ||
18:00
reportable6 left
18:01
reportable6 joined
18:09
martinthewildpig left
|
|||
mscha | m: my @a; @a[0].push: (3,4); say @a[0]; for @a[0] -> ($x,$y) { say "($x, $y)" } | 18:09 | |
camelia | [(3 4)] Too few positionals passed to '<anon>'; expected 2 arguments but got 1 in sub-signature in block <unit> at <tmp> line 1 |
||
mscha | What am I doing wrong here? | ||
m: my @a; @a[0].push: (3,4); say @a[0]; for |@a[0] -> ($x,$y) { say "($x, $y)" } | 18:13 | ||
camelia | [(3 4)] (3, 4) |
||
mscha | This works, but why is it needed? | ||
18:22
sena_kun left
|
|||
lizmat is getting ready to ditch WordPress completely | 18:23 | ||
El_Che | you ditcher | ||
18:23
sena_kun joined,
jpn left
|
|||
lizmat | it's like working on a 1200 baud line on a system in the US over satellite all over again | 18:23 | |
El_Che | hehe | 18:24 | |
you mean for raku weekly? | 18:25 | ||
lizmat | yeah, while I'm typing this I'm literally watching a whole line slowly appear in de WP editor | ||
El_Che | JS was a great solution | ||
:) | |||
lizmat | such behaviour was unacceptable when I wrote an editor for a client in the late 1988's, to run on 286 / 386 machines | 18:26 | |
30+ years later it's still the same :-( | |||
El_Che | I don't know when I will write a blogpost, but I will create static content from md | ||
I have a caddy container running to put hugo content | |||
hobbified | mscha: -> (($x, $y)) is another thing that works, if it makes you happier :) | 18:28 | |
mscha | hobbified: not really, bracket soup makes me nervous. ;-) | 18:31 | |
18:40
jpn joined
18:45
jpn left
|
|||
Nemokosch | well you did deliberately nest it so... | 18:48 | |
mscha | Because IRL I need more than @a[0]. But I still don't understand why "for @a[0]" gives me @a[0] itself, and not its contents. | 18:50 | |
Nemokosch | then we might have two things going on | 18:51 | |
dayum, 3 dimensional | 18:52 | ||
mscha | m: my @a; @a[0].push: (3,4); @a[0].push: (5,6); say @a[0]; for @a[0] -> ($x,$y) { say "(x='$x', y='$y')" } | 18:54 | |
camelia | [(3 4) (5 6)] (x='3 4', y='5 6') |
||
Nemokosch | okay, so here is the thing | ||
@a is an Array | |||
now, what are the elements of an Array? | |||
18:55
Nemokosch joined
|
|||
Nemokosch | m: my @a; @a[0].push: (3, 4); dd @a[0]; | 18:56 | |
camelia | Array @a = $[(3, 4),] | ||
mscha | m: my @a; @a.push: (3,4); @a.push: (5,6); say @a; for @a -> ($x,$y) { say "(x='$x', y='$y')" } | 18:57 | |
camelia | [(3 4) (5 6)] (x='3', y='4') (x='5', y='6') |
||
Nemokosch | See the dollar sign? The elements of an Array are _Scalars_ | ||
mscha | Ah, OK. | ||
18:58
jpn joined
|
|||
Nemokosch | btw I don't like how dd tries to lie to us: it wasn't Array @a obviously, it was Array @a[0]. It would be good to see where it takes the name from... | 18:58 | |
anyway, since it's a Scalar container and Scalar containers iterate as one element, the solution is within reach: | |||
mscha | Is there any way around this? In other words, can I get @a[0] to be (or behave like) an array? | ||
Nemokosch | m: my @a; @a[0].push: (3,4); say @a[0]; for @a[0][] -> ($x,$y) { say "($x, $y)" } | 18:59 | |
camelia | [(3 4)] (3, 4) |
||
mscha | OK, that's a bit better than my attempt. | 19:00 | |
Nemokosch | we might get a dedicated decont soon, if somebody fancies that :) | ||
conventionally, you can decontainerize using zen-slices <> and [] respectively. For positional stuff, I like [] more but it's completely up to you. | 19:01 | ||
m: my @a; @a[0].push: (3,4); say @a[0]; for @a[0]<> -> ($x,$y) { say "($x, $y)" } | |||
camelia | [(3 4)] (3, 4) |
||
mscha | 99% of the time I love Raku. But 1% of the time, it annoys me with unintuitive stuff like this. | ||
Yeah, [] looks better than <> in this case. | |||
Nemokosch | How to put it... this is the kind of stuff one can develop Stockholm syndrome for, quite quickly | 19:04 | |
I've grown to like the term "strangely consistent". I think it does express this ambivalence quite well. | 19:05 | ||
It could be read as an exaggeration of consistency but I frankly don't think that's the accurate interpretation. It's rather just "consistent in a way that often comes off as strange" | 19:07 | ||
mscha | Anyway, thanks for the explanation. | 19:08 | |
Nemokosch | no problem ^^ | 19:10 | |
19:10
Nemokosch left
|
|||
Nemokosch | Another note: I'm not sure if you really need an array as opposed to a plain list. That would not containerize its elements by default. | 19:12 | |
hobbified | you do if you want to build it up with push :) | 19:14 | |
lizmat | looks like clearing out all of WP's local cache, made the editor workable again | ||
hobbified | but if you can get around *that* (gather/take maybe?) | ||
19:16
jpn left
|
|||
mscha | @a[0][] stuff used at: github.com/mscha/aoc/blob/master/aoc2022/aoc12 | 19:17 | |
Nemokosch | yes, sure thing but I for one use push quite seldom - let alone with further Positionals as elements 😛 | ||
mscha | In calc-distance(). I can't think of a more elegant way to keep track of all points with distance d. | 19:19 | |
19:20
discord-raku-bot left,
discord-raku-bot joined
19:42
kylese joined,
jpn joined
19:53
Nemokosch joined,
Nemokosch left
20:00
kylese left
20:10
jpn left
20:12
grondilu joined
|
|||
grondilu | m: say my +^blob32.new(271733878)[0]; | 20:13 | |
camelia | ===SORRY!=== Error while compiling <tmp> Malformed my at <tmp>:1 ------> say my⏏ +^blob32.new(271733878)[0]; |
||
tellable6 | 2022-12-12T10:15:30Z #raku <guifa> grondilu: my understanding is that assuming was put together rather quickly | ||
grondilu | m: say +^blob32.new(271733878)[0]; | ||
camelia | -271733879 | ||
grondilu | I really didn't expect a negative value to come out of a bitwise boolean operator on Blob | 20:14 | |
m: say +^my uint32 $ = 271733878; | |||
camelia | 18446744073437817737 | ||
20:14
mscha left
|
|||
grondilu | m: say 18446744073437817737 Cmp 2**32 | 20:15 | |
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> say 18446744073437817737⏏ Cmp 2**32 expecting any of: infix infix stopper postfix statement end … |
||
grondilu | m: say 18446744073437817737 cmp 2**32 | ||
camelia | More | ||
grondilu | nor a larger value than 2**32 | ||
m: say .base(2) given +^my uint32 $ = 271733878; | 20:17 | ||
camelia | 1111111111111111111111111111111111101111110011011010101110001001 | ||
grondilu | looks like a uint64. Why does &[+^] promote a uint32 to a uint64? | 20:18 | |
Nemokosch | how does this work at all? | ||
20:18
Nemokosch joined
|
|||
Nemokosch | m: my uint32 $lol = 271733878; say +^ $lol; | 20:19 | |
camelia | 18446744073437817737 | ||
20:19
yay joined
|
|||
grondilu | and why isn't it consistent with how it behaves inside a blob32? | 20:19 | |
Nemokosch | oh okay, another thing that works differently in the REPL xd | ||
m: my uint32 $lol = 271733878; +^ $lol andthen .base(2).say; | 20:20 | ||
camelia | -10000001100100101010001110111 | ||
20:20
Nemokosch left
20:21
discord-raku-bot left,
discord-raku-bot joined
|
|||
Nemokosch | anyway, this is the invoked function: github.com/rakudo/rakudo/blob/704a...t.pm6#L541 | 20:23 | |
grondilu | yeah, I was looking at it too. I now think I recall that all native types are treated the same regarless of their size. | 20:24 | |
so they're all uint in that case | 20:25 | ||
m: say .base(2) given +^my uint $ = 271733878; | |||
camelia | 1111111111111111111111111111111111101111110011011010101110001001 | ||
20:25
jpn joined
|
|||
grondilu | and I suppose prefix:<+^> always uses the largest type not to lose information or something? | 20:26 | |
20:26
sena_kun left
|
|||
grondilu | m: say .base(2) given +^my uint $ = 1; | 20:26 | |
camelia | 1111111111111111111111111111111111111111111111111111111111111110 | ||
grondilu | yeah, it seems so. | ||
that's kind of LTA | 20:27 | ||
20:27
sena_kun joined
|
|||
Nemokosch | > This is due to the fact that Natives don't know their types because they're just values, without any metadata. In multi-dispatch, you can have a native candidate, but you cannot differentiate different sizes or signedness of the same native type. That is, you can have an Int and int candidates, but there would be an ambiguity between, for instance int, uint, atomicint or int64 candidates. | 20:27 | |
grondilu | I'm writing digest functions and I was hoping to do uint32 bitwise arithmetics without ever having to use the modulus operator | ||
20:30
discord-raku-bot left,
discord-raku-bot joined
|
|||
grondilu | couldn't the bitwise operators call their native equivalent when called with natives? | 20:30 | |
same for arithmetic operators while we're at it. | 20:31 | ||
lizmat | and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/12/12/2022-50-mainified/ | ||
Nemokosch | what does "their native equivalent" mean here? | 20:32 | |
grondilu | hum | ||
yeah I'm not quite sure how that would work, I admit. | 20:33 | ||
Nemokosch | I was thinking of a plain dumb adverb, by the way. to be able to say +^ 1234 :32bit or something like this | 20:35 | |
grondilu | :uint32 | 20:36 | |
Nemokosch | the details can be clarified ^^ | 20:37 | |
20:39
discord-raku-bot left
|
|||
grondilu | still, what about blobs, they do know their types, no? So boolean operators could behave appropriately when mapped to them. | 20:39 | |
20:39
discord-raku-bot joined
|
|||
grondilu | m: say +^<<blob8.new(^10) | 20:40 | |
camelia | (-1 -2 -3 -4 -5 -6 -7 -8 -9 -10) | ||
grondilu | ^I mean isn't that silly? | ||
m: say +^<<blob8.new(^10).map: *.base(2) | |||
camelia | (-1 -2 -11 -12 -101 -102 -111 -112 -1001 -1002) | ||
Nemokosch | what happened here? | ||
grondilu | m: say (+^<<blob8.new(^10)).map: *.base(2) | 20:41 | |
camelia | (-1 -10 -11 -100 -101 -110 -111 -1000 -1001 -1010) | ||
grondilu | blob8 is supposed to contain unsigned ints | ||
Nemokosch | oh, everything is just negative 😄 | ||
grondilu | m: say +^my uint $ = 1 | 20:42 | |
camelia | 18446744073709551614 | ||
grondilu | what happens in C if I do `short i = 1; long long j = ^i;`? I actually have no idea. | 20:44 | |
Nemokosch | well, from what I can see | 20:45 | |
MoarVM itself doesn't know negations of different sizes | |||
or at least doesn't expose such a thing to NQP | |||
grondilu looks at docs.raku.org/language/numerics#Native_numerics | 20:51 | ||
Geth | App-Rakubrew: c82c3ae540 | (Patrick Böker)++ | 4 files Track the master -> main branch rename in rakudo |
||
App-Rakubrew: 990cde0ea9 | (Patrick Böker)++ | 3 files Version 31 |
|||
grondilu | m: say (my uint8 $ = 0) -= 156 | ||
camelia | Cannot modify an immutable Int (0) in block <unit> at <tmp> line 1 |
||
grondilu | m: say (my uint8 $) -= 156 | 20:52 | |
camelia | 100 | ||
grondilu | m: say (my uint8 $) -= 100 | ||
camelia | 156 | ||
grondilu | m: say (my uint16 $) -= 100 | ||
camelia | 65436 | ||
grondilu | 🤔 | 20:53 | |
m: say (my uint32 $) -= 100 | |||
camelia | 4294967196 | ||
grondilu | 😕 | ||
oh I see, here we mutate the variable so it has to stay in the same native type | 20:54 | ||
m: my buf32 $b .= new: 1; $b[0] +^= 0; say $b | 20:55 | ||
camelia | Buf[uint32]:0x<00000001> | ||
grondilu | m: my buf32 $b .= new: 1; $b[0] = +^$b[0]; say $b | 20:56 | |
camelia | Buf[uint32]:0x<FFFFFFFE> | ||
grondilu | maybe that's what I shoud do | ||
Nemokosch | clever 😄 I wonder how this works | 21:00 | |
21:03
jpn left
|
|||
> qqx sets the topic to the cli response, | 21:09 | ||
> qqx sets the topic to the cli response, | 21:10 | ||
I didn't know that | |||
bartolin | grondilu: the "Cannot modify an immutable Int" is something, I've noted in github.com/rakudo/rakudo/blob/b0f9...kumod#L223 as well. It happens with int as well | 21:28 | |
m: (my int $x = 42) = 47 | |||
camelia | Cannot modify an immutable Int (42) in block <unit> at <tmp> line 1 |
||
bartolin | (which still looks wrong to me) | 21:29 | |
21:29
jpn joined
|
|||
grondilu | yeah that looks wrong | 21:47 | |
Nemokosch | agreed | 21:48 | |
although I think it's understandable. I haven't actually checked but I suspect native variables are special-cased for assignment | 21:50 | ||
hmm... they are stored in something called IntLexRef | 21:51 | ||
grondilu thinks he had sped up Digest::RIPEMD about 2 times 😄 | 21:52 | ||
Nemokosch | 👏 | ||
grondilu | apparently by just using a reduce instead of a loop | ||
which amazes me | 21:53 | ||
github.com/grondilu/libdigest-raku...896cff0ca8 | |||
Nemokosch | is bartolin and usev6 the same person? | ||
bartolin | Nemokosch: yes | 21:54 | |
tellable6 | bartolin, I'll pass your message to Nemokosch | ||
Nemokosch | good to see you around 🎉 | 21:56 | |
bartolin | grondilu: nice | 21:57 | |
grondilu | FP looks so nice. I'm still trying to figure out how to do it for the inner loop too, but it's not obvious | 21:58 | |
22:00
yay is now known as equinox
|
|||
Nemokosch | > buf32.new($h).clone xx 2 | 22:00 | |
does this replicate the same clone or make two clones? | |||
grondilu | make two clones, hopefully | ||
22:01
equinox is now known as equinox_
|
|||
grondilu | &[xx] is supposed to currify (I think that's the word) | 22:02 | |
Nemokosch | seems that it returns two objects with different id's | ||
22:02
equinox_ left
|
|||
grondilu | m: say rand xx 2 | 22:02 | |
camelia | (0.8816995699352017 0.8916930751171629) | ||
grondilu | m: say class {}.new.WHICH xx 2 | 22:03 | |
camelia | (<anon|1>|4297118153344 <anon|1>|4297118153376) | ||
[Coke] | it does the call and dupes the value | ||
m: say (class {}.new xx 2).map(*.WHICH) | 22:04 | ||
camelia | (<anon|1>|3958285555904 <anon|1>|3958285556928) | ||
22:19
habere-et-disper joined
|
|||
grondilu | weird, I've managed to rewrite the inner loop with a reduce too, but now it's slighly slower | 22:21 | |
22:23
perlbot left,
simcop2387 left
22:24
Nemokosch joined
|
|||
grondilu | in any case, it looks better. I put in on RC: rosettacode.org/wiki/RIPEMD-160#Raku | 22:28 | |
22:31
perlbot joined
22:34
simcop2387 joined
|
|||
habere-et-disper | How do I use the bisectable6 bot? | 22:42 | |
22:44
jpn left
|
|||
Nemokosch | github.com/Raku/whateverable/wiki/Bisectable | 22:44 | |
tellable6 | 2022-12-12T21:54:20Z #raku <bartolin> Nemokosch: yes | ||
Nemokosch | long story short: you can specify e.g old=2022.07 new=2022.12, and then add your code | ||
habere-et-disper | bisect: old=2022.07 sub foo ( @bar = (2, *+7 ...^ * > 28) ) { say @bar } | 23:02 | |
bisectable6 | habere-et-disper, On both starting points (old=2022.07 new=d52342e) the exit code is 0 and the output is identical as well | ||
habere-et-disper, Output on both points: «» | |||
habere-et-disper | bisect: old=2022.07 sub foo ( @bar = (2, *+7 ...^ * > 28) ) { say @bar }; foo() | ||
bisectable6 | habere-et-disper, On both starting points (old=2022.07 new=d52342e) the exit code is 0 and the output is identical as well | ||
habere-et-disper, Output on both points: «(2 9 16 23)» | |||
Nemokosch | do you have any objections? | 23:03 | |
23:05
jpn joined
23:28
jpn left
23:33
sena_kun left
23:55
jpn joined
|