🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 00:03 reportable6 joined 00:17 MasterDuke47 joined 01:17 linkable6 left 01:20 linkable6 joined 01:57 a3r0 joined 02:04 vrurg joined 02:16 vrurg left 02:44 unixcat64 left 02:45 unixcat64 joined 02:49 evalable6 joined 03:19 frost joined, unixcat64 left, unixcat64 joined 03:31 frost left 04:07 lucs left 04:28 vrurg joined 04:41 vrurg_ joined, vrurg left 05:40 vrurg_ left
xinming releasable6: status 05:41
releasable6 xinming, Next release in ≈1 day and ≈13 hours. There are no known blockers. Changelog for this release was not started yet
xinming, Details: gist.github.com/979bb3007e0eac8714...93f6373636
05:41 vrurg joined 05:46 vrurg left 06:02 reportable6 left 06:04 abraxxa joined 06:05 reportable6 joined 06:09 abraxxa left, abraxxa joined 06:12 vrurg joined 06:28 vrurg left 06:29 Kaiepi left 06:40 vrurg joined 06:45 vrurg left 06:55 immedlate joined 06:56 vrurg joined 07:02 vrurg left 07:05 lizmat left, Sgeo left, Sgeo joined, lizmat joined 07:13 vrurg joined 07:16 immedlate left 07:20 Kaiepi joined 07:25 vrurg left 07:29 Sgeo left 07:34 patrickb joined 07:38 vrurg joined 07:40 patrickz joined 07:41 patrickb left 07:43 vrurg left 08:10 bdju left
SmokeMachine I was wondering about the assuming issue... would it make any sense to make something like this: `my &func = -> $a -> $b, $c -> $d { "$a $b $c $d" }` be equivalent to `my &func = -> $a { -> $b, $c { -> $d { "$a $b $c $d" } } }` and make the `[]` post circunfix operator on Callable work like getting as many arguments as the function expects from the list and passing the rest for the returning function? like: `fun[1, 2, 3, 4]` would 08:17
be equivalent to `fun(1).(2, 3).(4)`. Would that make any sense?
08:52 RakuIRCLogger left, RakuIRCLogger joined 09:01 immedlate joined
xinming SmokeMachine: I personally would think it's a good api call. :-) 09:26
`fun(1).assuming(3,4).()` <--- This to me will be more clear example. 09:27
something like, admin-task-for-user($user-id).assuming('add-credit', 3).(); 09:28
my &add-user-credit = admin-task-for-user($user-id).assuming('add-credit'); add-user-credit(3); 09:29
just illustration
CIAvash SmokeMachine: well, the `func[1,2,3,4]` part would not be compatible with the language I think, because `[1,2,3,4]` gets called on the return value of `func`. 09:30
SmokeMachine CIAvash: I meant a new multi for .[]... but it could be any postcircunfix operator... 09:31
CIAvash That would be confusing, and against the rule of different operators for different things. 09:32
09:39 vrurg joined
CIAvash But maybe Raku functions could act like in Haskell? I don't know if it is possible or how complicated it is(considering multi dispatch), otherwise they wouldn't add the `assuming` method if they could do it, I don't know. 09:40
Also there is no need for dots in function call, `func(1)(2,3)(4)` 09:41
09:43 vrurg left 09:44 vrurg joined 09:45 immedlate left 09:49 vrurg left
Altreus I had to read to the end of that to remember the dot was not concatenation 09:49
:O
grondilu while developping a module raku seems to keep using the precomp version and ignore my changes in the source code. What am I doing wrong?
I do 'raku -Ilib t/test.t' to test 09:50
and yes I did save the changes on disk beforehand.
CIAvash Also signatures in Raku are more complicated, there are optional arguments, named arguments, captures, ... 09:53
lizmat grondilu: what does the use statements inside test.t say ?
*do
grondilu just use Test; use MyModule::Path; 09:55
SmokeMachine CIAvash: but that would work as well, wouldn't it? `-> $a? -> *@b -> :$c {...}` being equivalente to `-> $a? { -> *@b { -> :$c {...} } }` right?
(I'm talking more on how to create the function returning functions than the way to call it...) 09:56
grondilu I do have the same module installed with zef, so maybe it's using this instead on the one on lib/ 09:58
CIAvash Yeah, the calling is the more complicated part.
SmokeMachine because you will be able to do something like: `my &add = -> $a -> $b { $a + $b }; my &incr = add 1; say incr 41`
(I mean, call like that, that would already be useful) 09:59
grondilu uninstalls it to be sure
SmokeMachine (and it would be much more readable IMHO) 10:02
10:24 immedlate joined 10:26 vrurg joined 10:31 vrurg left 10:36 Maylay left 10:43 vrurg joined 10:44 Maylay joined 10:54 vrurg left
grondilu any idea why 'my uint @a; @a = @b;' would give a different result than 'my uint @a; @a = my uint @ = @b;' ? 11:06
11:08 leah2 left 11:25 frost joined 11:27 leah2 joined 11:28 abraxxa left
grondilu found it. @b was actually referencing @a so that was bad. It was something like @a = @a[1], @a[0] 11:36
m: my
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my
at <tmp>:1
------> 3my7⏏5<EOL>
grondilu m: my @a = (1, 2); @a =
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3my @a = (1, 2); @a =7⏏5<EOL>
expecting any of:
prefix
term
grondilu sorry fat finger 11:37
m: my @a = (1, 2); @a = @a[1], @a[0]; say @a
camelia [2 1]
grondilu hum that works though. I don't get it. 11:38
11:48 bdju joined 11:55 immedlate left 12:02 reportable6 left 12:05 reportable6 joined
grondilu m: my uint32 ($x, $y, $z) = <3397201341 1759006370 581115732>; say $y +^ ($x +| +^$z) 12:45
camelia -1213881571
grondilu why would a bitwise expression of unsigned integers ever return a signed integer? 12:46
12:50 vrurg joined
grondilu m: say +^my uint32 $ = 581115732 12:52
camelia -581115733
grondilu m: say +^my uint8 $ = 1 12:53
camelia -2
12:55 vrurg left, [Coke] joined
grondilu searches roast to see if that is specced 12:56
grondilu doesn't find anything relevant 13:03
whatever that's too weird, I'm posting an issue 13:04
13:08 vrurg joined
CIAvash SmokeMachine: I wrote a little function for calling functions that return functions, if you are interested: gist.github.com/CIAvash/686114e5b4...8d725fcf3b 13:09
codesections grondilu I'm pretty sure that is a bug, and is related to github.com/rakudo/rakudo/issues/3429 13:10
13:13 vrurg left
grondilu well maybe it's not, I've just checked in C and it returns 2 too. 13:13
which is baffling to me. 13:14
timo our uint support is .. a little "weak" 13:15
SmokeMachine CIAvash: it looks great! Maybe it could accept the named parameters anywhere instead of only on the "right place"... maybe testing the named ones on every function... 13:16
timo gasp 13:22
this is like reverse currying?
or i guess how function application works in a language that curries everything, like haskell
SmokeMachine CIAvash: of course it could be much improved, but I was thinking into something like this (I mean the named param being able tube used anywhere...): gist.github.com/FCO/58f648cb9df26f...58f81d9f03 13:29
I really think the `my &sum = -> $a -> $b { $a + $b }` is a good idea, and this currying operator would make it even better... 13:30
13:31 very joined, vrurg joined 13:36 vrurg left 13:43 vrurg joined 13:44 Sgeo joined 14:18 xinming left
Geth App-Rakubrew/master: 8 commits pushed by (Patrick Böker)++ 14:19
14:20 xinming joined 14:25 Maylay left 14:33 Maylay joined 14:37 vrurg left 14:45 jess joined, very left 14:49 xinming left 14:51 xinming joined 15:00 frost left 15:04 xinming left, xinming joined 15:33 lucs joined 15:57 daxim left 16:09 vrurg joined 16:14 vrurg left 16:30 gordonfish- joined 16:32 gordonfish left, sena_kun joined
Geth doc: ca2e03ab16 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Update faq.pod6

Various language tweaks.
16:36
linkable6 Link: docs.raku.org/language/faq
Geth doc: e2d8bdacce | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Update faq.pod6

Add missing question marks.
16:41
linkable6 Link: docs.raku.org/language/faq
16:45 vrurg joined, vrurg left 17:08 MasterDuke47 left 17:21 clarjon1 joined 18:00 archenoth joined 18:02 reportable6 left 18:03 Oshawott left 18:04 reportable6 joined 19:01 patrickz left 19:21 randy88 joined 19:30 randy88 left 19:34 randy100 joined, randy100 left 20:00 sftp left 20:10 sftp joined 20:16 bgran left 21:16 evalable6 left 21:17 evalable6 joined 22:04 jess left 23:04 linkable6 left, releasable6 left, evalable6 left 23:05 linkable6 joined 23:06 evalable6 joined 23:07 releasable6 joined