»ö« #raku and #raku-dev are OPEN FOR BUSINESS | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by mst on 15 October 2019.
00:23 Doc_Holliwood left 00:25 redable left 00:28 lucasb left 00:35 aborazmeh joined, aborazmeh left, aborazmeh joined 00:40 redable joined, redable left 00:50 aborazmeh left 01:02 jcallen left 01:16 jcallen joined 01:32 daxim joined 01:56 molaf left 02:03 reach_satori joined 02:04 Manifest0 left, Manifest0 joined 02:09 molaf joined 02:23 Cabanoss- joined 02:24 Cabanossi left, Cabanoss- is now known as Cabanossi 02:38 aborazmeh joined, aborazmeh left, aborazmeh joined 02:45 molaf left, aborazmeh left 02:48 xelxebar_ joined, xelxebar left 02:49 aborazmeh joined, aborazmeh left, aborazmeh joined 02:56 www201 joined 02:57 molaf joined 02:58 www201 left 03:08 wamba left 03:24 Cabanossi left 03:32 Cabanossi joined 03:38 kaare__ left 03:47 aborazmeh left 04:22 rindolf joined 04:30 marcusr left, marcusr joined 05:22 sauvin joined 05:44 Hermit joined
Hermit [{a=>1}, {b=>2}, {c=>3}].reduce({ $^a{$^b.keys} = $^b.values }) 05:44
should work? 05:45
anyone home? 05:49
another version, better error message: 05:50
({a=>1}, {b=>2}, {c=>3}).reduce( sub (Hash $a, Hash $b) { $a{$b.keys} = $b.values })
so basically, if you try to .reduce an Array of Hashes, it won't bind the individual Hashes to Hashes -- it tries to bind something to List 05:51
never mind, figured it out 05:53
reduce is a weird operator
06:04 xelxebar_ left, xelxebar joined 06:20 epony left 06:56 Hermit left 07:08 kylese joined, sena_kun joined 07:12 Doc_Holliwood joined 08:18 wamba joined 09:06 sarna joined 09:24 kylese left 09:32 xinming_ left 09:34 xinming_ joined 09:39 Doc_Holliwood left 10:09 cpan-raku left 10:10 cpan-raku joined, cpan-raku left, cpan-raku joined 10:34 SCHAPiE left 10:36 ExtraCrispy joined 10:41 SCHAPiE joined 10:59 sarna left 11:05 sena_kun left 11:21 sena_kun joined 11:23 sena_kun left
Juerd What are you trying to accomplish? 11:23
Oh, they left hours ago :) 11:24
timotimo i'm pretty sure the surprise came from $b.values being returned from the first invocation and being passed as $a the next time 11:25
11:38 xinming_ left 11:39 xinming_ joined 12:02 kst left 12:13 markmark joined 12:14 markmark is now known as markmarkmark, markmarkmark is now known as info 12:15 info is now known as markmarkmark 12:24 kylese joined 12:30 markmarkmark is now known as markmark 12:38 markmark is now known as markmarkmark
rindolf Juerd: timotimo : hi, sup? 12:43
Juerd Soup?
rindolf Juerd: soup nazi!
Juerd Er, what? 12:44
rindolf Juerd: no soup for you
Juerd: en.wikipedia.org/wiki/The_Soup_Nazi
Juerd: seriously now: how are you? 12:45
Juerd: sup is en.wiktionary.org/wiki/sup#Interjection 12:46
Juerd I don't discuss personal matters in publicly logged channels
rindolf Juerd: ah, ok
Juerd Have done so before, didn't like it a decade later.
rindolf Juerd: you can pm me or /join #perlcafe 12:47
Juerd: i've been working on a captioned image
12:50 Doc_Holliwood joined 12:59 lucasb joined
SmokeMachine m: say [{:1a}, {:2b}, {:3c}].reduce: { { |$^a, |$^b } } 13:03
evalable6 (exit code 1) Too many positionals passed; expected 0 or 1 arguments but got 2
in block <unit> at /tmp/btKQHJAR5M line 1
SmokeMachine m: say [{:1a}, {:2b}, {:3c}].reduce: { %( |$^a, |$^b ) } 13:04
evalable6 {a => 1, b => 2, c => 3}
13:14 molaf left 13:27 xinming_ left, xinming_ joined 13:34 rjbs joined 13:36 epony joined 13:45 cpan-raku left 13:47 cpan-raku joined, cpan-raku left, cpan-raku joined 13:59 aindilis joined 14:12 molaf joined 14:31 Doc_Holliwood left 14:39 wamba left 14:47 xinming_ left 14:50 xinming_ joined, wamba joined 15:06 xinming_ left 15:10 xinming joined 15:21 xinming left, xinming joined 15:22 user3 joined, redable joined 15:23 user3 left 15:26 jeromelanteri joined 15:33 redable left 15:38 kylese left 15:40 wamba left 15:41 pecastro joined 15:47 kylese joined 15:57 domidumont joined 16:06 aindilis left 16:08 aindilis joined 16:14 jeromelanteri left 16:18 sena_kun joined 16:38 aindilis left 16:40 aindilis joined 16:53 aindilis left 16:55 redable joined 16:56 aindilis joined 17:01 aindilis left 17:06 abraxxa joined 17:07 aindilis joined 17:10 aindilis left 17:11 abraxxa left 17:12 abraxxa joined 17:27 wildtrees joined, wildtrees left 17:28 wildtrees joined 17:36 redable left 17:38 wildtrees left, domidumont left, abraxxa left, wildtrees joined 17:39 redable joined 17:44 aindilis joined 17:48 kaare__ joined 18:15 Cabanossi left 18:18 Cabanossi joined 18:40 redable left 18:41 xinming left, xinming joined 19:12 molaf left 19:14 wamba joined 19:18 kst joined 19:21 Geth_ joined, Geth left 19:22 finanalyst joined 19:24 redable joined 19:35 sena_kun left 19:58 domidumont joined 20:02 redable left 20:04 domidumont left 20:09 cpage joined 20:19 xinming left 20:20 xinming joined 20:25 kylese left 20:31 domidumont joined 20:35 domidumont left 20:49 sno left, sno joined 21:18 khisanth_ left 21:29 cad joined 21:40 wamba left 21:43 khisanth_ joined 21:48 molaf joined 21:56 zahat joined 22:04 wildtrees left 22:05 zahat left 22:28 [Sno] joined 22:30 sno left 22:40 gnufr33dom left 22:43 pecastro left 22:55 rindolf left 23:21 rindolf joined 23:36 cad left 23:48 lucasb left