|
00:05
kurahaupo1 joined
00:09
kurahaupo left,
kurahaupo1 is now known as kurahaupo
00:29
polettix left
01:15
hulk joined
01:16
kylese left
01:19
[Coke] left
01:26
kurahaupo left
01:27
kurahaupo joined
01:45
[Coke] joined
01:53
wayland76 joined
02:15
hulk left,
kylese joined
04:03
wayland76 left,
wayland joined
04:25
lhj98787 joined
|
|||
| wayland | Hi all! I wanted to make a new class that's a special kind of executable, and then be able to run it as C() but that's a type coercion: gist.github.com/wayland/2a3950eae1...7d814fae00 . Is the only way to get what I want to do a Slang? | 05:21 | |
| I don't mind some working around on the class side, but I want it to be like a normal function from the calller POV. | 05:22 | ||
| disbot | <vendethiel> ugexe: rakuast is really all I wanted and more! | 05:41 | |
|
05:45
polettix joined
|
|||
| disbot | <vendethiel> m: say substr "a": 1, 2 | 05:54 | |
| evalable6 | |||
| disbot | <vendethiel> m: my $s = "a"; say substr $a: 1,2 | 05:55 | |
| evalable6 | (exit code 1) ===SORRY!=== Error while compilin… | ||
| vendethiel, Full output: gist.github.com/8b789138f3939859a5...a4c7111672 | |||
| disbot | <vendethiel> ugh, I remember that syntax was ambiguous with another, but I don't remember what ended up happening with disambiguation | ||
| <vendethiel> mmh... | 05:56 | ||
| <vendethiel> m: my $s = "abc"; say substr ($a): 1,2 | |||
| evalable6 | (exit code 1) ===SORRY!=== Error while compilin… | ||
| vendethiel, Full output: gist.github.com/1e1dc131ab1543d79f...7c64fe2b6f | |||
| disbot | <vendethiel> m: my $s = "abc"; say substr ($s): 1,2 | ||
| evalable6 | bc | ||
| disbot | <vendethiel> right-o. | 05:57 | |
|
05:59
hwj joined
06:03
Sgeo left
|
|||
| disbot | <vendethiel> ugexe: doesn't seem to work, the latter just shadows the former | 06:03 | |
| <vendethiel> bit contrived, but here's what I went with: | 06:04 | ||
| <vendethiel> RAKUDO_RAKUAST=1 raku -e 'my class A { my $.class; method f { my $class = Metamodel::ClassHOW.new_type(name => "B"); $class.^compose; $.class = $class; constant Cls = $class; my multi method x(Cls $inst: Int){1}; my multi method x(Cls $inst: Str) {2} } }; my $a = A.new; my $f = $a.f; $f($a.class.new, 1);' | |||
| <vendethiel> (the constant clause is a dance because I don't think I can do $class $inst: to specify the expected caller type) | |||
| <vendethiel> > Can only use the : invocant marker in the signature for a method :( | 06:10 | ||
|
06:26
Ekho left
06:40
Ekho joined
07:06
polettix left
07:36
abraxxa joined,
abraxxa left
07:38
abraxxa joined
07:47
lhj98787 left
08:14
lizmat left
08:15
lizmat joined
08:32
halloy7773 joined
08:33
halloy7773 left
08:49
lhj98787 joined
08:56
abraxxa left
08:58
abraxxa1 joined
09:03
lhj98787 left
09:07
lhj98787_ joined
|
|||
| disbot | <melezhik.> Added http basic auth for git push in dsci | 10:10 | |
|
10:22
dmvrtx left
10:23
dmvrtx joined
10:55
polettix joined
10:57
guifa left
11:00
guifa joined
|
|||
| tbrowder | fyi, my github problem with workflows and actions was cured by updating actions to v7. | 11:48 | |
| Voldenet | m: class C does Callable { method CALL-ME($x?) { $x // <zero> }}; say C.() | 11:59 | |
| camelia | zero | ||
| Voldenet | that's the shortest you can get for type call, no need for (C)() | 12:01 | |
|
12:01
kurahaupo left,
kurahaupo joined
|
|||
| Voldenet | m: class C does Callable { method CALL-ME($x?) { $x // <zero> }}; sub C() { C() }; say C() # unfortunately, this doesn't work | 12:01 | |
| camelia | (C(Any)) | ||
| Voldenet | (sub is never taken ;\) | 12:02 | |
| lizmat | m: class A { method CALL-ME($a) { dd $a } }; A(42) # much simpler | 12:03 | |
| camelia | 42 | ||
| lizmat | must use parentheses in the call though | ||
| m: class A { method CALL-ME($a) { dd $a } }; A 42 | |||
| camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> ss A { method CALL-ME($a) { dd $a } }; A<HERE> 42 expecting any of: infix infix stopper statement end statement modifier… |
||
| lizmat | in other words: you don't need to do Callable (unless you want that for other reasons | 12:04 | |
| and the call doesn't need the . (as in C.()), just C() will do) | |||
| Voldenet ^^ | 12:16 | ||
| Voldenet | it's the previous problem wayland has posted | 12:20 | |
| you need arguments in that case | |||
| and C() won't work, because C is a type name, so C() becomes coercion | 12:21 | ||
|
12:22
polettix left
12:24
polettix joined
12:25
lhj98787_ left
|
|||
| Voldenet | I'm not sure if I like that syntax overall, it feels like something that could get broken by some new syntax in the future | 12:25 | |
|
12:33
hwj left
12:34
hwj joined
12:51
polettix left
12:53
polettix joined
13:00
hwj left
14:03
hwj joined
14:09
merp left
|
|||
| lizmat | and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2026/08/18/2026-...-infinity/ | 14:25 | |
|
14:37
abraxxa1 left
|
|||
| disbot | <melezhik.> Dsci UI now has minimal user session , and git push behind by http basic auth, GitAuthUser/GitAuthPassword | 14:50 | |
| <melezhik.> deadsimpleci.sparrowhub.io/doc/configuration | |||
| <melezhik.> Lizmat++ thanks for weekly and mentioning dsci | 14:51 | ||
| <melezhik.> Lizmat: ++ ^^ | |||
|
15:09
lichtkind joined
|
|||