🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:03
guifa2 joined
00:48
guifa2 left
00:49
pecastro left
00:54
berber44 joined
00:56
xinming joined,
frost-lab joined
01:17
DiffieHellman left
01:18
DiffieHellman joined
01:37
Doc_Holliwood left
01:38
Doc_Holliwood joined
01:40
wingfold_ left
01:41
wingfold joined,
pecastro joined
01:45
wingfold_ joined,
wingfold left
01:46
wingfold joined,
wingfold_ left
01:51
wingfold left
|
|||
codesections | m: class B {...}; class A { has $.bar; method COERCE(B) { A.new(:bar<42>) }}; class B { method FALLBACK(|c) { dd c; Hash }; method foo { A(self)}}; B.foo | 01:56 | |
camelia | \("A") Impossible coercion from 'B' into 'A': method A returned a type object Hash in method foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
codesections | Why does ^^^^ call B.FALLBACK instead of A.COERCE? Am I misunderstanding the mro of the new coercions, or is there a bug? | 01:58 | |
02:04
wingfold joined
02:05
wingfold_ joined,
wingfold left
02:07
wingfold joined,
wingfold_ left
|
|||
summerisle | i don't recall what the title of the page describing type parameters was, does anyone know? | 02:10 | |
codesections | Like Array[Str]? iirc, it's under Role, but I'm not sure | 02:11 | |
summerisle | parameterized roles | 02:12 | |
just found it | |||
02:12
kvw_5_ joined
02:15
kvw_5 left,
wingfold left
|
|||
summerisle | on a related note, are there any good examples of the semantics of multi roles (docs mention that role parameters can have similar semantics to multi dispatch) | 02:29 | |
02:36
wingfold joined
02:40
wingfold left
02:57
wingfold joined
03:07
muffindrake left
03:08
Doc_Holliwood left
03:09
muffindrake joined
03:12
pecastro left
03:48
Kaiepi left,
Kaiepi joined
04:30
k-man left
04:41
guifa2 joined
04:44
k-man joined
04:46
Kaiepi left,
Kaiepi joined
04:55
parabolize left
|
|||
summerisle | can you destructure a hash when assigning? | 04:56 | |
05:05
benkolera joined
05:08
wingfold left
|
|||
codesections | does destructuring a slice do what you want? | 05:09 | |
m: my %h = (:a<b>:c<d>); say my ($foo, $bar) = %h<a c> | |||
camelia | (b d) | ||
05:09
maggotbrain joined
|
|||
guifa2 | also | 05:12 | |
m: my %x; %x<a b> = 1, 2; say %x | |||
camelia | {a => 1, b => 2} | ||
guifa2 | but you can't do, eg | 05:13 | |
my %x = :1a, :2b; my %(:$a, :$b) = %x; | 05:14 | ||
moon-child | I want to be able to index a scalar with any value (or, at least, any natural) and get back the same scalar. Is there a way to do that? | 05:18 | |
05:21
wingfold joined
05:37
guifa2 left
05:50
maggotbrain left
05:51
maggotbrain joined
05:55
Kaiepi left,
aindilis left
05:56
Kaiepi joined
06:06
ensamvarg joined
06:17
krkini joined
06:18
kini left
06:35
Kaiepi left,
Kaiepi joined
06:37
krkini left
06:48
kini joined
07:04
rindolf joined
07:12
Kaiepi left,
Kaiepi joined
07:15
benkolera left
|
|||
moritz | moon-child: yes, you can define your own GET-POS method; see docs.raku.org/language/subscripts | 07:18 | |
moon-child | but can I change the default AT-POS? | 07:25 | |
07:35
wingfold left
07:36
wingfold joined
07:38
wingfold_ joined,
wingfold left
07:39
wingfold joined,
wingfold_ left
07:41
squashable6 left
07:44
squashable6 joined,
wingfold left
07:54
wamba joined
07:56
wingfold joined,
synthmeat left
07:57
synthmeat joined
08:08
clarjon1 left
08:15
BuildTheRobots left,
BuildTheRobots joined
08:16
timeless left
08:18
timeless joined
08:20
kawaii_ joined
08:23
kawaii left,
kawaii_ is now known as kawaii
08:44
domidumont joined
08:52
Doc_Holliwood joined
08:59
jmerelo joined
09:20
kini left
09:22
kini joined
09:24
xinming left
09:26
xinming joined
09:28
wamba left
09:56
tejr left
10:01
wingfold left
10:05
wingfold joined
10:06
wingfold left,
wingfold joined
10:07
Sgeo_ left
10:08
tejr joined
10:09
xinming left
10:10
xinming joined,
wingfold left
|
|||
CIAvash | Happy new year everyone! 😀 | 10:21 | |
10:33
jmerelo left
10:36
frost-lab left
10:37
wingfold joined
10:38
dg left
10:41
xinming left
10:43
xinming joined
11:01
tejr left
11:02
tejr joined
|
|||
El_Che | CIAvash: the Persian one? | 11:14 | |
if so, nice | |||
CIAvash | Yeah. I was kinda joking with people who say "happy new year everyone" when it's new Gregorian year, although the most popular one. 🙂 | 11:16 | |
El_Che | hehe | ||
the most hardcore are the one that stayed on the Julian calender :P | 11:17 | ||
sligtly off | |||
11:25
wamba joined
11:38
pecastro joined
|
|||
El_Che | github.com/patrickmn/go-cache | 11:44 | |
met dat kan ik caching toevoegen aan de jwtintrospect ding | |||
zoals keep validation for x time | |||
11:45
Kaiepi left
|
|||
El_Che | damn | 11:45 | |
wrong window :) | |||
11:47
Kaiepi joined
11:52
a6502_ is now known as a6502
11:59
Kaiepi left
12:00
Kaiepi joined,
wingfold left,
wingfold joined
12:02
Kaeipi joined
12:03
Kaiepi left
12:04
Kaeipi left
12:05
Kaeipi joined
12:54
_jrjsmrtn left,
__jrjsmrtn__ joined
13:18
b2gills left
13:20
tejr left
13:22
tejr joined
13:44
b2gills joined,
monkey__ joined
13:49
brown121407 joined
13:50
Black_Ribbon left
|
|||
brown121407 | Hi! I just came across Raku about a month ago and it stayed in my mind that I should probably learn it. It looks like a very fun language to work in! I'm curios if there are people doing – sorry to put it this way – serious things with it. | 13:52 | |
codesections | brown121407: hi and welcome! There definitely are - one recent example that comes to mind is the project described in this talk at FOSDEM fosdem.org/2021/schedule/event/rak...as_server/ | 13:57 | |
14:04
berber44 left,
dg joined
14:06
wingfold left
|
|||
brown121407 | codesections, thank you, that looks interesting. | 14:09 | |
I think I'll start solving university homework in Raku also besides the "approved" languages, so I get some practice. | 14:10 | ||
codesections | Sounds like a good plan | 14:11 | |
14:20
Kaeipi left
14:25
parabolize joined
14:37
monkey__ left
15:01
Doc_Holliwood left
15:09
Doc_Holliwood joined
15:11
Kaiepi joined
15:12
xinming left
15:14
xinming joined
15:36
aindilis joined
15:58
guifa2 joined
16:18
epony left
16:22
epony joined
16:27
wingfold joined
16:30
wingfold_ joined,
wingfold left
17:30
evalable6 left,
linkable6 left
17:32
linkable6 joined,
evalable6 joined
18:15
wingfold_ left
18:21
sena_kun left
18:24
vike left
18:26
sena_kun joined
18:35
Sgeo joined,
domidumont left
18:38
domidumont joined
18:40
domidumont left
18:50
vike joined
19:07
mahafyi left
19:08
aborazmeh joined
19:16
epony left
19:17
epony joined
19:22
Xliff joined
|
|||
Xliff | \o | 19:22 | |
Constant names can't be fully qualified? | |||
m: class ICal::Property::DTEnd { }; constant ICal::Property::DateTimeEnd is export := ICal::Property::DTEnd; | 19:23 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing initializer on constant declaration at <tmp>:1 ------> 3Cal::Property::DTEnd { }; constant ICal:7⏏5:Property::DateTimeEnd is export := ICal |
||
Xliff | m: class ICal::Property::DTEnd { }; constant DateTimeEnd is export := ICal::Property::DTEnd; | ||
camelia | ( no output ) | ||
Xliff | Another question... can packages be augmented? | 19:24 | |
summerisle | what are the limits of multiple dispatch on destructured parameters? | 19:55 | |
i have a situation where multiple dispatch would be very handy, but the mop seems to get confused when trying to look up the method | 19:56 | ||
19:57
HarmtH joined
|
|||
raydiak | Xliff: from here, it looks like everything you've asked about is better handled by subclassing. why all the monkey-patching? | 20:01 | |
20:03
HarmtH left,
HarmtH joined
20:06
berber44 joined
|
|||
raydiak | summerisle: I don't recall exacly how destructuring interacts with multi-dispatch. If you could golf us down an example to play with, it might help | 20:07 | |
summerisle | yeah, that's what i'm trying to do | 20:08 | |
here's an excerpt with some comments but it doesn't really provide a working example gist.github.com/caea726269872be110...5850829243 | 20:10 | ||
20:10
berber44 left
|
|||
summerisle | Node[ClassTag] has according declare() implementations | 20:11 | |
the documentation for multi is really frustrating because it doesn't at all go in to semantics, which would be really helpful | |||
it just shows an extremely basic overloading example that barely scratches the surface of use cases for multi | 20:12 | ||
Xliff | raydiak: I am subclassing, I would like to make an alias to a subclass without having to redeclare the entire class under another name. | 20:14 | |
m: class C { }; constant A::B = C | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing initializer on constant declaration at <tmp>:1 ------> 3class C { }; constant A:7⏏5:B = C |
||
Xliff | My real question is why doesn't this ^^ work? | 20:15 | |
I could try to declare a package A and declare B within it, but I have many of these files and can't have said package defined in all of them. | 20:16 | ||
20:16
HarmtH left
20:17
HarmtH joined
|
|||
summerisle | Xliff: subset A::B of C; | 20:18 | |
m: class C {}; subset A::B of C; say C ~~ A::B; | |||
camelia | True | ||
Xliff | summerisle: Hmm... Will look into that. Thanks! | ||
20:18
HarmtH left
|
|||
summerisle | also, note that A.HOW ~~ PackageHOW | 20:19 | |
20:19
HarmtH joined
20:21
jmiven joined
|
|||
Xliff | summerisle++ # Works like a treat! Thanks | 20:21 | |
20:22
HarmtH left
|
|||
summerisle | Xliff: glad to help | 20:22 | |
20:23
HarmtH joined
20:25
mowcat joined
20:39
mowcat left
20:40
mowcat joined
|
|||
raydiak | m: multi foo ([], [$a], :$) { say $a }; multi foo ([], [$a, *@rest], :$) { say "foo" }; foo [], [1]; foo [], [1,2] | 20:47 | |
camelia | 1 foo |
||
summerisle | right, which is weird because i put together a test to similar effect myself | 20:48 | |
raydiak | I cannot duplicate your first problem, that's why you golf more. narrow it down until you find the difference, because your problem doesn't seem to be what you think it is. the second problem is because @ expects a Positional argument, while *@ expects any number of anything | 20:50 | |
summerisle | right, but the second @ is always given a Positional | 20:51 | |
while i don't expect you to fix this, here's the code and its input for some context at least - gist.github.com/RomanHargrave/a9b7...467584504a | |||
i'll see if i can figure out what it's tripping over | |||
20:55
aborazmeh left
|
|||
raydiak | similarly with the second failure as the first, I cannot reproduce it with identical signatures. I'll look around elsewhere in your code, see if anything jumps out at me | 21:04 | |
21:08
rindolf left
21:17
sena_kun left,
sena_kun joined
21:19
sena_kun left,
sena_kun joined
21:23
sena_kun left
21:25
sena_kun joined
21:28
softmoth joined
21:49
benkolera joined
21:53
softmoth_ joined,
softmoth_ left
|
|||
softmoth | Hi, friends. I've discovered a multi-threading crash in Template::Mustache, and could use some help fixing it: github.com/softmoth/raku-Template-.../issues/41 | 21:55 | |
It's getting X::HyperRace::Died with `Cannot invoke this object (REPR: Uninstantiable; Callable)` | 22:00 | ||
If anyone has any pointers on likely culprits, I'd be very grateful. | 22:01 | ||
22:40
HarmtH left
22:41
HarmtH joined
22:42
HarmtH left,
HarmtH joined,
kst left
22:43
HarmtH left,
HarmtH_ joined
22:46
HarmtH_ left,
HarmtH joined
22:51
HarmtH left,
HarmtH_ joined
22:59
xinming left
23:00
xinming joined
23:25
wamba left
23:29
kst joined
23:34
oneeggeach joined
23:35
mowcat left,
neshpion joined
23:37
[Coke]_ is now known as [Coke]
|
|||
[Coke] | . | 23:37 | |
23:42
oneeggeach left
23:43
oneeggeach joined,
oneeggeach left,
oneeggeach joined
|
|||
moon-child | .. | 23:47 | |
raydiak | summerisle: I got way distracted by that. Haven't had a lot of luck. I do suspect a bug but not sure exactly which combination of circumstances triggers it yet. Certainly that candidate list in the error message looks concerning | 23:48 | |
summerisle | hmm | 23:49 | |
luckily i've worked around it | |||
and simplified the grammar too | |||
raydiak | glad you moved forward, anyway. I might poke at it again later for fun and a possible bug report | 23:55 |