[00:01] *** wamba left [00:04] m: say <1 2 3>[0 .. *]; say <1 2 3>[0 .. *-0] [00:04] rakudo-moar 726a75e24: OUTPUT: «(1 2 3)␤(1 2 3 Nil)␤» [00:04] moon-child: ^^^^^ [00:05] a ha! [00:06] so it's just * being magic, as usual [00:11] *** wingfold joined [00:11] *** wingfold left [00:12] *** wingfold joined [00:21] *** aindilis joined [00:32] *** b2gills left [00:36] *** dogbert11 joined [00:39] *** dogbert17 left [00:41] *** dogbert11 left [00:41] *** dogbert11 joined [00:42] *** dogbert11 left [00:43] *** dogbert11 joined [00:44] *** dogbert11 left [00:45] *** dogbert11 joined [00:47] *** Doc_Holliwood left [00:48] *** mowotter left [00:51] *** dogbert17 joined [00:52] *** _jrjsmrtn joined [00:53] *** Black_Ribbon joined [00:54] *** dogbert11 left [00:54] *** __jrjsmrtn__ left [00:59] *** wingfold left [00:59] *** wingfold joined [01:00] *** wingfold_ joined [01:00] *** wingfold left [01:01] *** wingfold joined [01:01] *** wingfold_ left [01:06] *** wingfold left [01:06] *** wingfold joined [01:11] *** wingfold left [01:11] *** dogbert17 left [01:11] *** brtastic left [01:14] *** b2gills joined [01:18] *** monkey__ joined [01:21] moon-child: a bare * is just a Whatever. You get a WhateverCode when you apply certain operators to it. [01:23] *** wingfold joined [01:25] *** blaboeir left [01:28] *** wingfold left [01:29] *** sxmx left [01:32] *** monkey__ left [01:36] *** londoed left [01:37] *** londoed joined [01:41] *** wingfold joined [01:49] *** wingfold left [01:51] *** dogbert17 joined [01:52] *** sxmx joined [02:09] anyone have an issue where raku repl doesn't show the prompt and just hangs after showing "Built on Moar..." [02:09] *** wingfold joined [02:09] I am on openbsd 6.9 [02:11] *** wingfold_ joined [02:11] *** wingfold left [02:12] *** sena_kun left [02:12] *** wingfold_ left [02:12] *** wingfold joined [02:13] *** kvw_5 joined [02:16] *** kvw_5_ left [02:17] *** wingfold left [02:18] *** Xliff left [02:27] *** sena_kun joined [02:32] *** sxmx left [02:34] *** sxmx joined [02:35] sxmx: it takes a long time to start up if not in cache; how long did you wait? [02:42] *** wingfold joined [02:43] *** g0nk left [02:50] *** wingfold left [03:11] *** berber44 joined [03:11] *** wingfold joined [03:13] a minute or two, I'll give it another shot moon-child [03:16] you were right moon-child , I was just impatient [03:17] I mean in fairness, a minute or two is a pretty long time for a repl to take to start up [03:17] I think it's caching the bootfiles [03:18] (so, should be faster in the future, until the next upgrade) [03:23] This is on a VPS, and it wasn't literally a minute, more like 20 seconds [03:30] *** DarthGandalf left [03:41] *** DarthGandalf joined [03:53] *** kaiwulf left [04:01] *** maggotbrain left [04:03] *** wingfold left [04:16] *** wingfold joined [04:23] *** wamba joined [04:26] *** Altai-man_ joined [04:28] *** sena_kun left [04:29] *** monkey__ joined [04:32] *** monkey__ left [04:42] *** ex_nihilo joined [04:49] *** defaultxr left [05:00] *** defaultxr joined [05:03] *** wingfold left [05:15] *** wingfold joined [05:21] *** parabolize left [05:26] *** samebchase-5 is now known as samebchase- [05:38] *** berber44 left [05:53] *** Doc_Holliwood joined [06:02] *** wingfold left [06:15] *** brtastic joined [06:15] *** wingfold joined [06:28] *** brtastic left [06:33] *** squashable6 left [06:35] *** squashable6 joined [06:35] *** wamba left [06:41] *** wamba joined [06:45] *** aluaces joined [06:46] *** frost-lab joined [07:04] *** wingfold left [07:06] *** abraxxa left [07:06] *** abraxxa joined [07:12] *** wingfold joined [07:18] *** ufobat joined [07:37] *** Sgeo left [07:51] *** Doc_Holliwood left [07:55] *** guifa2 joined [07:57] *** wingfold_ joined [07:57] *** wingfold left [08:02] *** wingfold_ left [08:02] *** rindolf joined [08:05] *** domidumont joined [08:22] *** wingfold joined [08:29] *** wingfold_ joined [08:29] *** wingfold left [08:31] *** frost-lab left [08:33] *** wingfold_ left [08:35] *** frost-lab joined [08:38] *** aborazmeh joined [08:40] *** aluaces left [08:40] *** aluaces joined [08:40] *** wingfold joined [08:42] *** ufobat_ joined [08:42] *** ufobat left [08:43] *** guifa2 left [08:43] *** guifa2 joined [08:59] *** Kaiepi left [09:02] *** jmerelo joined [09:05] *** frost-lab left [09:10] *** pecastro joined [09:23] *** Altai-man_ left [09:25] *** sena_kun joined [09:26] *** wingfold left [09:30] *** PimDaniel joined [09:31] *** PimDaniel left [09:32] *** PimDaniel joined [09:35] *** frost-lab joined [09:40] *** wingfold joined [09:46] *** frost-lab88 joined [09:49] *** Black_Ribbon left [09:50] *** frost-lab left [10:00] *** Heijki joined [10:01] *** Heijki left [10:02] *** frost-lab88 left [10:14] *** wingfold left [10:14] *** guifa2 left [10:14] *** wingfold joined [10:29] *** aborazmeh left [10:30] *** Matze37 joined [10:30] *** guifa2 joined [10:33] Hello. I get stuck and like to ask for a hint. I have list of word in a file. I would like to map this list to a hash mit a key '1'. I am trying to do this in an one-liner, but i dont dig it.. [10:33] i was trying something like my %str = map(@arr.list, '1'); [10:33] the array holds the list [10:36] *** clickmesh joined [10:37] *** clickmesh left [10:38] *** aluaces left [10:40] *** frost-lab joined [10:44] *** wamba left [10:48] *** Doc_Holliwood joined [10:49] *** aindilis left [10:49] *** aindilis joined [10:50] Matze37: what you're doing is just creating a 1 for each item in the list, and that assigns a long sequence of 1s to %str [10:50] 2021-03-18T20:53:08Z #raku guifa2 that did it. no clue why that didn't occur to me. this week has been cursed. [10:51] *** wamba joined [10:51] m: say map( , 1 ) [10:51] rakudo-moar 726a75e24: OUTPUT: «Cannot resolve caller map(List:D, Int:D); none of these signatures match:␤ (&code, +values)␤ in block at line 1␤␤» [10:51] actually, ha, I guess it doesn't work at all that way [10:51] anyways [10:52] Matze37: feels to me you're creating a Set [10:52] What you'll want is to do the map on the array. [10:52] my %str is Set = @arr [10:52] ^^ yeah, set (or maybe ultimately a bag, if there's going to be coutning) [10:53] If you're just needing a true/false (for the word existing or not), you'll want to use a set as lizmat says. [10:53] To actually map on the array, you'll want to use a slightly different syntax. [10:54] my @arr = ; my %str = @arr.map( * => '1' ); say %str [10:54] guifa2, rakudo-moar bf67b1f71: OUTPUT: «{a => 1, b => 1, c => 1}␤» [10:58] mhm [10:59] *** Kaiepi joined [11:00] looks like that my file is something crappy [11:01] this daid, something like that should work i guess: y %s = slurp('strings.csv').map(* => 'a'); [11:01] *my [11:04] my @arr = slurp('list.txt'); gives me [one [11:04] two [11:04] ] [11:05] Matze37: if you have CSV files, you should probably be using Text::CSV ? [11:05] i just named it so..its just a one-word list [11:07] *** aluaces joined [11:07] ok..its my slurp line..this is working well: for "list.txt".IO.lines -> $l { @arr.push: $l; } [11:09] *** benkolera left [11:09] so the question is, how to slurp a list into  @arr? [11:31] *** guifa2 left [11:31] weekly: https://www.edument.se/en/blog/post/comma-in-2020 [11:31] lizmat, Noted! (weekly) [11:32] Matze37: `my @arr = 'list.txt'.IO.lines;` or `my %set is Set = 'list.txt'.IO.lines;`? [11:39] *** guifa2 joined [11:41] lol, "While my code style choices are obviously the correct ones, in a magnanimous moment I decided that Comma should cater better to those who feel otherwise" [12:14] *** frost-lab left [12:17] *** frost-lab joined [12:18] SmokeMachine: How do we pass rhs side sql value to filter? [12:18] Something like, Model.^all.grep({ .creation_time >= "(now() - Interval '1d')" }) [12:29] *** xinming_ left [12:29] *** xinming_ joined [12:42] *** frost-lab left [12:43] *** Doc_Holliwood left [12:49] *** frost-lab joined [12:56] *** DiffieHellman left [13:03] *** DiffieHellman joined [13:23] *** domidumont left [13:27] *** samcv_ joined [13:29] *** xinming joined [13:29] *** lucs_ joined [13:31] *** andinus joined [13:33] *** xinming_ left [13:33] *** wamba left [13:33] *** b2gills left [13:33] *** spacebat2 left [13:33] *** samcv left [13:33] *** lucs left [13:34] Well done - thank you guifa2, CIAvash! [13:40] *** spacebat2 joined [13:41] *** wamba joined [13:41] *** b2gills joined [13:42] *** ensamvarg left [13:43] my %s = 'list.txt'.IO.lines.map(* => '1');  .. beautiful :) [13:44] or even my %s = 'list.txt'.IO.lines X=> 1; [13:47] *** jmerelo left [13:51] *** Doc_Holliwood joined [13:55] *** brtastic joined [13:59] *** aindilis left [14:05] *** Sgeo joined [14:06] *** frost-lab left [14:18] *** abraxxa left [14:18] this seems like a common practice for user-implemented custom value types (or, if not, like it should be): [14:18] m: class C { has Str $.stuff; method WHICH { ValueObjAt.new("C|{use nqp; nqp::sha1($.stuff)}")}}; say C.new(:stuff).WHICH [14:18] rakudo-moar 726a75e24: OUTPUT: «C|62CDB7020FF920E5AA642C3D4066950DD1F01F4D␤» [14:19] is there any particular reason why we don't expose nqp::sha1 in Raku? [14:20] why would we? [14:21] to encourage the idiom above. [14:22] i'm not sure use of sha1 is something to encourage [14:22] codesections: why not $.stuff.WHICH? [14:22] and the use of sha1 internally is an implementation detail that users shouldnt try to be interfacing with [14:22] rakudo happens to implement some packaging stuff with certain cryptographic hashes [14:23] but if it changes that to something else, it likely won't keep a sha1 implementation around [14:23] so exposing sha1 as a public API "just because" seems wrong [14:24] moritz: ? If I'm reading the source correctly, sha1 is where WHICH comes from for all non-trivial value types in Rakudo [14:25] that doesn't have anything to do with packaging [14:25] its still an implementation detail [14:25] *** Doc_Holliwood left [14:27] vrurg: $.stuff.WHICH returns the stringified $stuff. Which is fine for simple things, but not great for larger ones (as Raku seems to agree, based on the code) [14:27] m: Bag.new(1).WHICH [14:27] rakudo-moar 726a75e24: ( no output ) [14:27] m: say Bag.new(1).WHICH [14:27] rakudo-moar 726a75e24: OUTPUT: «Bag|A7ECAB1324EE10383A958D58A3120EBBEC860F8E␤» [14:29] ugexe: it's an implementation detail that _users_ need to implement for their types if they want them to act like built-in onse [14:29] it doesn't have to be sha1 [14:30] So it seems that exposing objectid generation API would be beneficial, not sha1 in particular. [14:30] agreed! [14:30] and when/if the core decides to move off sha1 we would have to keep it around because we already encouraged users to do it that way [14:30] vrurg++ that's a much better idea [14:38] *** lucs_ is now known as lucs [14:47] *** brtastic left [14:50] *** Matze37 left [14:52] *** CodeR32 joined [14:53] Hello [14:56] o/ [14:56] *** CodeR32 left [14:57] *** imcsk8 left [14:58] *** muffindrake joined [14:58] *** imcsk8 joined [15:03] *** parabolize joined [15:04] *** Doc_Holliwood joined [15:04] *** brtastic joined [15:06] Hm, I seem to be unable to install JSON::Fast:ver<0.15> at the moment [15:06] zef doesn't seem to find any candidates for that, even though it worked before. I can install 0.14, though [15:09] *** berber44 joined [15:28] *** Kaiepi left [15:34] *** Kaiepi joined [15:39] *** Kaiepi left [15:42] *** Kaiepi joined [15:43] m: say (CompUnit::Repository::Distribution but role :: { method Str { "mystring" } }).id; # totally up to spec! [15:43] rakudo-moar 726a75e24: OUTPUT: «9CE3EA4D6FAC2165933B3971E6D5A13753C7D878␤» [16:04] *** Doc_Holliwood left [16:07] *** cetjs2 left [16:16] *** samcv_ is now known as samcv [16:16] *** samcv left [16:16] *** samcv joined [16:28] *** samcv left [16:31] *** ex_nihilo left [16:32] *** daimon is now known as daemon [16:33] *** brtastic left [16:43] *** guifa2 left [16:50] *** londoed is now known as parsec [16:50] m: grammar G { rule TOP { ^ . $ }; }; role A { method TOP($/) { say $/ ~~ m/'a'/; }; }; G.parse("b", :actions(A)); [16:50] rakudo-moar 726a75e24: OUTPUT: «Cannot assign to a readonly variable or a value␤ in method TOP at line 1␤ in regex TOP at line 1␤ in block at line 1␤␤» [16:50] *** parsec is now known as londoed [16:53] is there a way to figure out at what point in a corpus of text a grammar stops matching? [16:57] *** mahafyi joined [16:57] there's grammar::tracer [16:57] you can see the steps the grammar goes through and when it stops matching [17:30] *** samcv joined [17:37] *** aborazmeh joined [17:45] *** muffindrake left [17:45] *** muffindrake joined [18:00] *** wingfold_ joined [18:00] *** wingfold left [18:39] *** ufobat_ left [18:45] m: grammar G { rule TOP { ^ . $ }; }; role A { method TOP($m) { say $m ~~ m/'a'/; }; }; G.parse("b", :actions(A)); [18:45] rakudo-moar 726a75e24: OUTPUT: «False␤» [18:53] m: "b" ~~ m/^.$/; say $/ ~~ m/"a"/ [18:53] rakudo-moar 726a75e24: OUTPUT: «True␤» [18:53] m: "a" ~~ m/^.$/; say $/ ~~ m/"a"/ [18:53] rakudo-moar 726a75e24: OUTPUT: «「a」␤» [18:56] m: "b" ~~ m/^.$/; say $/.clone ~~ m/"a"/ [18:56] rakudo-moar 726a75e24: OUTPUT: «False␤» [19:00] *** berber44 left [19:11] *** dataangel joined [19:30] *** aborazmeh left [19:44] *** Doc_Holliwood joined [19:50] *** xinming left [19:52] *** xinming joined [20:04] *** guifa2 joined [20:11] *** epony left [20:11] *** epony joined [20:28] *** xinming left [20:35] *** PimDaniel left [20:37] *** mowcat joined [20:46] *** aindilis joined [20:48] *** guifa2 left [20:48] *** rindolf left [20:52] *** wamba left [21:53] *** Black_Ribbon joined [21:59] so i have an action method that uses make to attach a payload to a match. i'd like to be able to inspect that payload in a later action method, but it appears to be unset [21:59] and i can verify they execute in the desired order [22:06] how are you trying to access the made later? [22:06] i have a toml 1.0.0 compliant grammar/action that i'm testing now, i can put somewhere if an example would help. [22:10] could be my mistake on my part. this week has been a trip. [22:10] seeing the expected behavior in other atcion methods [22:10] *** Sgeo_ joined [22:10] *** UukGoblin joined [22:12] an example might help me (or others) help ya [22:12] *** HobGoblin left [22:12] *** vike left [22:12] *** jjatria_ joined [22:12] *** a6502_ joined [22:12] *** [Coke]_ joined [22:12] *** jjatria left [22:12] *** a6502 left [22:12] *** [Coke]_ left [22:12] *** [Coke]_ joined [22:13] *** Sgeo left [22:13] *** jjatria_ is now known as jjatria [22:13] *** vike joined [22:13] *** [Coke] left [22:18] *** vike left [22:28] *** vike joined [22:33] *** vike left [22:34] *** muffindrake left [22:34] *** muffindrake joined [22:45] *** vike joined [22:47] Anyone to remind me if regexes have something to express <-[ $char ]> without string interpolation in <{ }>? [22:47] *in -> with [23:01] ok, more grammar stuff, is there a way when specifying a within the body of another token to specify that any corresponding action method not be run? [23:02] or would i just want to create a copy of token-name without a corresponding action method [23:05] *** vike left [23:09] vrurg: istr some discussion about that a little while ago, but i don't think there was a conclusion other than what you just said [23:12] *** monkey__ joined [23:27] *** vike joined [23:34] MasterDuke: thanks! I also remember the discussion existed, but otherwise nothing about it. [23:34] summerisle: I don't think so. An action method is invoked unconditionally. [23:35] yeah, i ended realising i had a bad design in that area anyways so i'm reworking it [23:36] vrurg: https://github.com/Raku/problem-solving/issues/97 [23:38] *** monkey__ left [23:40] MasterDuke: thanks! [23:42] np [23:57] *** mowcat left