[00:08] *** Black_Ribbon joined [00:13] *** dogbert11 joined [00:16] *** dogbert17 left [00:19] *** guifa2 left [00:28] *** japhb joined [00:31] i'll add that the only noticeable slowness (for what i've been doing) seems to be from the parse phase, which i'm sure could be optimized [00:38] Which is really slowness in the grammar engine [00:39] Which is exactly what it's so difficult [00:55] *** pecastro left [00:58] *** guifa2 joined [01:05] *** guifa2 left [01:05] *** guifa2 joined [01:05] *** cgfbee joined [01:08] *** squashable6 left [01:11] *** squashable6 joined [01:32] *** MasterDuke left [01:37] *** dogbert11 left [01:42] *** DiffieHellman left [01:43] *** DiffieHellman joined [01:55] *** gnufr33dom joined [02:03] *** kvw_5_ joined [02:06] *** kvw_5 left [02:16] *** codesections left [02:16] *** codesections joined [02:21] *** codesections left [02:22] *** codesections joined [02:26] *** codesections left [02:26] *** leont left [02:26] *** codesections joined [03:05] *** codesections left [03:06] *** codesections joined [03:13] *** guifa2 left [03:15] *** codesections left [03:15] *** codesections joined [03:17] *** codesections left [03:17] *** codesections joined [03:21] *** codesections left [03:21] *** codesections joined [03:23] *** Garbanzo joined [04:07] *** gnufr33dom left [04:17] *** gnufr33dom joined [04:49] *** Black_Ribbon left [04:56] *** kaiwulf left [05:49] *** sortiz joined [06:21] playing with the lazy keyword and i notice that it's really only friendly to loops, wheras if i say `my $foo = lazy frobnicate;` then `frobnicate` is called and lazy is treated as a prefix call (e.g. lazy on invocant) [06:29] yes, lists can be lazy in raku, scalars not so much [06:29] that's what i was wondering [06:30] *** jmcgnh left [06:35] *** jmcgnh joined [06:47] *** Discipulus joined [06:51] *** Discipulus left [06:54] *** Discipulus joined [06:54] *** aluaces joined [07:03] *** ZzZombo joined [07:04] *** ZzZombo left [07:31] *** gnufr33dom left [07:38] *** Sgeo_ joined [07:41] *** Sgeo left [07:42] *** stoned75 left [07:58] *** wamba joined [08:00] *** stoned75 joined [08:13] *** domidumont joined [08:31] *** parabolize left [08:46] *** jmerelo joined [08:50] *** Sgeo_ left [09:19] *** pecastro joined [09:46] *** Scimon joined [09:48] *** imcsk8 joined [09:59] *** wamba left [10:29] *** wamba joined [10:32] summerisle: maybe https://modules.raku.org/dist/Object::Delayed is what your looking for, specifically "slack" ? [10:37] *** El_Che joined [11:13] *** abraxxa left [11:37] *** wamba left [11:40] *** leont joined [11:53] *** wamba joined [12:03] *** rindolf joined [12:10] *** Black_Ribbon joined [12:29] *** sivoais_ joined [13:04] *** Discipulus_ joined [13:05] *** Black_Ribbon left [13:05] *** Discipulus left [13:19] *** aborazmeh joined [13:19] *** aborazmeh left [13:19] *** aborazmeh joined [13:23] *** sortiz left [13:50] *** guifa2 joined [13:55] *** Sgeo joined [13:56] *** guifa2 left [14:06] *** wamba left [14:18] *** aborazmeh left [14:34] *** wamba joined [15:08] *** gnufr33dom joined [15:52] *** gnufr33dom left [15:58] *** patrickb joined [16:08] *** wamba left [16:48] *** dogbert11 joined [16:48] *** dogbert11 left [16:51] lizmat: yeah, that's it [17:00] *** parabolize joined [17:11] *** dogbert17 joined [17:27] i'd kind of expect a lazy &x to behave like haskell and only call x when the scalar is used [17:38] *** aborazmeh joined [17:39] *** wamba joined [17:45] *** codesections left [17:46] *** codesections joined [17:53] *** Scimon left [18:14] *** guifa2 joined [18:16] *** domidumont left [18:18] *** wamba left [18:28] *** wamba joined [18:37] *** _jrjsmrtn joined [18:38] *** __jrjsmrtn__ left [18:47] *** aborazmeh left [18:55] *** MasterDuke joined [19:55] *** evalable6 left [19:55] *** linkable6 left [19:56] *** evalable6 joined [19:57] *** linkable6 joined [20:08] *** wamba left [20:14] *** guifa2 left [20:16] *** Garbanzo left [20:53] hi, gang. [20:53] o/ [20:54] is there any way to get raku to return the same sequence from pick on multiple calls? [20:54] codesections: hey! [20:55] something like setting the initial seed to a constant. [20:56] I'm confused. That sounds like you just want a sequence. Why use pick at all? [20:56] it would be handy in some use cases, like repeated monte carlo runs. [20:56] hm, maybe so [20:57] *** patrickb left [20:57] i have an ordered list of numbers and i want to randomize the list one time [20:58] every time the script is run i should get the same result unless i change the seed [20:59] Oh, I see [20:59] hm, i'll look into rand/random some more [20:59] thnx [21:00] yeah, there is https://docs.raku.org/type/Num#sub_srand but that's not quite it [21:05] i'm having non-secure connection problems again and can't see that :-( [21:05] (my first thought is just to do that with a cache of some sort - either compute it at compile time and then use that value until the module is re-compiled or compute it once and read it to disk. But that might be more work/IO than you want to do) [21:05] yepper! [21:06] > sub srand(Int $seed --> Int:D) [21:06] > Seeds the pseudo random number generator used by Num.rand with the provided value. [21:06] it's easy in perl as i recall, but my perl foo is very rusty. [21:07] ok, thnx, i'll go play with that a bit, bye. [21:15] p6: for ^10 { srand 0; (^10).pick.say } [21:15] raydiak, rakudo-moar 3235f3e42: OUTPUT: «4␤3␤3␤3␤3␤3␤3␤3␤3␤3␤» [21:15] why is the first one different? [21:24] *** guifa2 joined [21:26] *** guifa2 left [21:37] *** rindolf left [21:40] *** rypervenche joined [21:50] that's...interesting... [21:52] codesections: success. it took 127 tries to collect all 29 numbers in a random order. script gave repeatable results [21:52] ooh, cool. What's the trick? [21:52] time was almost instantaneous [21:55] So what do you do to get it to work? Does it use srand? [21:55] i had to use a hash and an array. while the hash.elems < 29, get the int for 30.rand. next if zero, next if it's in the hash; put in hash, push to array. spit out array which is list of 29 random numbers [21:56] clunky but i'm sure someone can golf into much less [21:57] I'm sure! [21:57] i started the script with settin srand [22:00] the use case is i have to pick 5 candidates out of 29 for board members on college grad assoc. i've read all 5 and think they're all pretty much qualified, so i'm picking 5 to study closer. [22:00] read all 29! [22:01] Raku to the Rescue! [22:01] thnx for hint [22:02] *** guifa2 joined [22:02] No problem. Thanks for telling me how you got it to work [22:34] New module! https://github.com/alabamenhu/IntlNumberPlural [22:37] (not that this is one anyone will use probably but me lol) [22:39] *** aborazmeh joined [22:48] *** sortiz joined [23:07] *** Discipulus_ left [23:24] guifa2: that actually looks _very_ useful. I've written at least two hacky &pluralize functions in the last couple of months – and that was just to support English, with only two grammatical numbers. I don't know if/when I'll internationalize anything, but if I do that will *definitely* be in my dependencies [23:26] codesections: if you're doing a lot of localized text, you'll probably want one of the localziation modules (which in turn will depend on this one) [23:26] I've actually now got enough stuff rewritten to the new version of Intl::CLDR that I'm going to go back and rewrite Fluent from scratch [23:28] instead of building in the localization manager into the module, I'm going to split them, that way the localization manager can pull from any number of localization formats that will (hopefully) have a mostly standardized API or be able to have 1-2 liner bridging functions [23:29] well, by the time I need to localize anything, it sounds like it'll [23:29] *be a pretty smooth experience! [23:30] Also the Plural module will need to be rewritten when RakuAST comes out haha [23:31] So much rewriting to do haha [23:33] also, I was reading this man page the other day and thought of you when I got to the second item in the BUGS section at the bottom: https://www.gsp.com/cgi-bin/man.cgi?section=1&topic=MTM [23:36] *** MasterDuke left