🦋 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:09 reportable6 left 00:10 reportable6 joined 00:15 monkey_ joined 00:48 monkey_ left 00:50 nativecallable6 joined, committable6 joined, benchable6 joined 00:52 coverable6 joined, bloatable6 joined 01:06 dextercd left 01:48 evalable6 joined 01:52 notable6 joined 01:58 defaultxr left, defaultxr joined 02:09 monkey_ joined 02:13 Oshawott left 02:17 colemanX joined 02:27 colemanX left 02:28 colemanX joined 02:46 xinming left 02:48 xinming joined 02:50 linkable6 joined 02:51 statisfiable6 joined 02:52 bisectable6 joined
guifa how does one use the MOP to create a role? AFAICT this should work 02:53
my \Foo := Metamodel::ParametricRoleHOW.new_type(name => "Foo"); Foo.^add_method("foo", { "called foo" } ); class Bar { }; my $x = Bar.new; $x does Foo; say $x.foo; 02:55
bu it bombs with Language revision must be a concrete string
02:55 tejr left, tejr joined 03:00 Arathorn left 03:14 Arathorn joined 03:49 sabrytos joined 03:56 monkey_ left 04:02 monkey_ joined 04:13 archenoth joined 04:17 sabrytos left 04:31 monkey_ left 05:20 seednode left, seednode joined 05:46 tejr left, tejr joined 06:08 reportable6 left, reportable6 joined 07:08 sourceable6 left, coverable6 left, reportable6 left, statisfiable6 left, bloatable6 left, linkable6 left, notable6 left, evalable6 left, bisectable6 left, unicodable6 left, nativecallable6 left, benchable6 left, tellable6 left, quotable6 left, shareable6 left, squashable6 left, releasable6 left, committable6 left, greppable6 left, greppable6 joined 07:09 sourceable6 joined 07:10 statisfiable6 joined, linkable6 joined, coverable6 joined, bisectable6 joined 07:11 reportable6 joined, shareable6 joined, releasable6 joined 07:24 seednode left 07:25 seednode joined 07:39 msudx joined
msudx hello 07:44
can someone answer my questions 07:47
07:59 frost joined 08:03 msudx left 08:09 squashable6 joined 08:11 tellable6 joined 09:01 jrjsmrtn left 09:02 jrjsmrtn joined 09:09 bloatable6 joined, nativecallable6 joined 09:10 evalable6 joined 09:11 benchable6 joined, committable6 joined, notable6 joined 09:32 lichtkind_ joined 09:34 lichtkind_ left 10:11 quotable6 joined 10:15 jjido joined 10:55 RakuIRCLogger left, RakuIRCLogger joined 11:01 RakuIRCLogger left 11:02 RakuIRCLogger joined
spacekookie Is there some way to turn a list of hashes into a hash with the key and values being determined from each hash in the list? 11:09
Like [ { key => a, val => b} { key => c, val => d }] ---> { a => b, c => d } 11:10
moon-child m: say [{key => 'a', val => 'b'}, {key => 'c', val => 'd'}].map({$_<key> => $_<val>}).Hash 11:12
camelia {a => b, c => d}
11:12 Sgeo left
moon-child spacekookie: ^ 11:12
spacekookie huh! I tried $<key> => $<val> but that didn't work. Is $_ special? 11:13
moon-child yes
docs.raku.org/syntax/$_ 11:14
spacekookie thanks!
moon-child you might also write -> $x { $x<key> => $x<val> }, or { $^x<key> => $^x<val> }, or sub ($x) { $x<key> => $x<val> }
in cases where you don't ever use a parameter more than one, you can use * (whatever star) and skip the braces 11:15
sooo many ways to write functions :P
11:37 holyghost joined
holyghost Happy newyear, everyone 11:39
12:08 reportable6 left 12:11 reportable6 joined 12:12 jjido left 12:18 Xliff joined
Anton Antonov @holyghost Happy New Year, to you too! 12:43
12:57 jjido joined 13:02 frost left
@moon-child Thanks for mentioning Cyc! 13:06
moon-child no problem 13:08
symbolic ai is not dead, just on its last elbows!
spacekookie moon-child: it's very strange because I could have sworn that my map(-> $x { $x<key> => $x<val> }, @list) produced an error along the lines that hashes couldn't be mapped. But I can't actually reproduce it anymore... 13:18
holyghost moon-child, inference engines are not dead :-) 13:19
moon-child as I said, on its last elbows only
(though logic programming is alive and well, at least; see z3, sql, kanren, et al) 13:20
13:21 lichtkind joined
holyghost rules/facts based learning may be old yes, from LISP days 13:21
You can represent more in LISP/Scheme that way 13:22
13:35 jjido left 13:44 jjido joined
nine guifa: you're missing a bit: 13:57
m: my \Foo := Metamodel::ParametricRoleHOW.new_type(name => "Foo"); Foo.^add_method("foo", my method :: () { "called foo" } ); Foo.^set_body_block(-> |args {}); Foo.^compose; class Bar { }; Foo.new; my $x = Bar.new; $x does Foo; say $x.foo;
camelia called foo
guifa nine ty! I didn't realize that was required 13:58
nine m: my \Foo := Metamodel::ParametricRoleHOW.new_type(name => "Foo"); { Foo.^add_method("foo", my method foo () { "called foo" } ); Foo.^set_body_block(-> |args {}); }; Foo.^compose; class Bar { }; Foo.new; my $x = Bar.new; $x does Foo; say $x.foo; # probably better yet
camelia called foo
nine You definitely always have to call ^compose on them, before using synthetically created types. And methods really have to be methods 13:59
14:12 unicodable6 joined 14:16 jjido left
Anton Antonov My Wolfram Community post “Connecting Mathematica and Raku” was made a “Staff pick” this morning: community.wolfram.com/groups/-/m/t/2434981 . 14:34
15:02 dextercd joined
Geth doc/master: 4 commits pushed by finanalyst++, (Richard Hainsworth)++ 15:11
15:24 dextercd left 15:31 dextercd joined
guifa Anton++ 16:26
16:48 monkey_ joined
guifa nine: well, thanks for the help :-) Unfortunately, couldn't quite pull off what i was hoping for. Is there a way to create a multi sub via MOP? I see a MultiMethodHOW but not a MultiSubHOW 16:56
nine Everything can be created via the MOP, as that's what the compiler itself uses. It's just not always obvious what to do. 16:58
guifa err, yeah, sorry I haven't had my coffee yet this morning 16:59
nine Note that there is no MultiMethodHOW either. It's MultiMethodContainer - the role that e.g. a meta class does for supporting multi methods. Multi subs and multi methods themselves are just instances of a normal class.
gotta make dinner now 17:00
guifa ugexe tonyo1 over in #raku-beginners someone mentioned that zef search X is hanging sometimes. I was able to reproduce just now but it's sporadic. Any advice I can pass along / debugging I can do ? 17:06
ugexe you'd want to know if github.com/ugexe/zef/blob/7d6b48db...#L175-L177 is getting stuck searching one of the ecosystems 17:20
17:25 finanalyst joined
ugexe you can run i.e. 'raku -I. bin/zef search X --debug' if you add debugging statements, no need to keep reinstalling 17:26
i ran that 10 times without hanging, so i don't have much else to suggest
17:27 monkey_ left 17:28 jjido joined
guifa ugexe if I can get it to do it again (it's only happened once for me) I'll see if I can track it down. Is there a way via command line to limit the search to specific ecosystems? 17:28
17:29 monkey_ joined
ugexe --/p6c --/cpan --/cached --/fez would disable all ecosystems 17:29
guifa ugexe++ 17:30
ugexe github.com/ugexe/zef/blob/7d6b48db...on#L25-L79 17:34
note this is an array of array
each inner array will be hyperd
so for a search the flow looks like [ [fez].hyper.search(...).Slip, [p6c, cpan].search(...), [cached].search(...).Slip ] 17:36
er, each of those .search should be .hyper.search
i mention because it might not necessarily be a specific ecosystem that is the issue, but e.g. waiting on multiple (the p6c + cpan one) 17:37
17:53 Manifest0 joined 17:58 jjido left 18:08 reportable6 left 18:14 jjido joined 18:39 morte_ joined 18:42 Sgeo joined 18:46 holyghost left 19:17 morte_ left 19:22 monkey_ left 19:27 abraxxa-home joined
Geth doc: finanalyst++ created pull request #4006:
change run on config explanation to match actual behaviour
19:31
20:05 Xliff_ joined, Kaipi joined, kawaii__ joined 20:08 greyrat_ joined, [Coke]_ joined 20:09 ProperN[out] joined, Some-body_ joined 20:10 Od1n1 joined 20:11 djerius_ joined, jcallen_ joined 20:12 Kaipi left, dextercd1 joined, Oshawott joined 20:13 Sgeo__ joined, dextercd left, kawaii__ is now known as kawaii_, unicodable6 left, Xliff left 20:14 m_athias_ joined, abraxxa-home1 joined, charsbar_ joined, gfldex_ joined 20:15 benchable6 joined, perlmaros_ joined, releasable6 joined, quotable6 joined, shareable6 joined, dcx joined, Kaipi left, lockywolf left, TempIRCLogger left, abraxxa-home left, m_athias left, charsbar left, leah2 left, RakuIRCLogger__ left, gfldex left, Voldenet left, dg left, vasko left, sftp left, Sgeo_ left, archenoth left, merpader1 left, dustinm` left, charsbar_ is now known as charsbar, nativecallable6 joined, merpaderp joined, gfldex_ is now known as gflsex 20:16 gflsex is now known as gfldex, leah2 joined, dg joined 20:17 Scotteh joined, perlmaros_ is now known as perlmaros, RakuIRCLogger_ left, Some-body_ is now known as DarthGandalf, [Coke] joined 20:18 dextercd1 left, Manifest1 left, Gruber left 20:19 m_athias_ is now known as m_athias, TempIRCLogger joined, squashable6 joined, xinming joined, vasko joined, unicodable6 joined, Sgeo__ joined, linkable6 joined, statisfiable6 joined, lucs joined, Od1n1 joined, demostanis[m] left, jrjsmrtn joined, Manifest1 joined 20:20 dextercd1 joined, seednode joined 20:21 AlexDaniel left, CIAvash left, greyrat_ left, sftp joined, Grrrr left 20:22 Grrrr joined, greyrat joined 20:23 swaggboi joined, andrea[m] left, markmarkmark joined 20:24 Arathorn left, sienet_ja_LSD[m] left 20:25 Geth joined 20:26 dustinm` joined 20:27 Xliff joined 20:28 [Coke]_ joined, [Coke] left 20:35 bartolin joined 20:38 monkey_ joined 20:43 leah2 left 20:44 leah2 joined 20:51 abraxxa-home1 left 21:06 demostanis[m] joined 21:07 notable6 joined 21:08 committable6 joined, bisectable6 joined, coverable6 joined 21:23 [Coke]_ is now known as [Coke] 21:24 monkey_ left 21:29 AlexDaniel joined 21:30 sienet_ja_LSD[m] joined 21:31 CIAvash joined 21:48 sienet_ja_LSD[m] left, AlexDaniel left, demostanis[m] left 21:50 RakuIRCLogger__ joined 21:51 CIAvash joined 21:52 perlmaros left, RakuIRCLogger left 21:53 perlmaros joined 22:02 monkey_ joined 22:06 greppable6 joined, bloatable6 joined 22:09 reportable6 joined 22:15 AlexDaniel joined, sienet_ja_LSD[m] joined, andrea[m] joined, demostanis[m] joined, Arathorn joined, AlexDaniel left 22:16 CIAvash left 22:17 jjido left 22:18 demostanis[m] left 22:19 andrea[m] left, jjido joined 22:37 morte_ joined 22:41 kybr left 22:47 colemanX left 22:49 lichtkind left 22:57 MasterDuke joined 23:01 kybr joined 23:06 evalable6 joined 23:07 tellable6 joined 23:10 jjido left 23:19 finanalyst left 23:33 dextercd1 left