[00:16] *** wamba left [00:20] *** wildtrees left [00:22] *** shadowpaste joined [00:23] *** SQuoll left [00:29] *** shadowpaste left [00:37] *** caterfxo left [00:39] *** lucasb left [00:40] *** SQuoll joined [00:51] *** ribasushi left [00:54] *** caterfxo joined [00:57] *** ribasushi joined [01:13] *** sena_kun joined [01:15] *** Altai-man_ left [01:20] *** k-man left [01:22] *** k-man joined [01:26] *** markoong left [01:29] *** Doc_Holliwood left [01:36] *** SQuoll left [01:41] Is it possible to output bytecode into a file? Like using --target=mbc ? I tried that but got: Cannot dump this object; no dump method [01:48] *** SQuoll joined [01:50] *** Black_Ribbon left [01:51] *** Black_Ribbon joined [01:54] *** SQuoll left [02:02] *** MasterDuke left [02:05] *** SQuoll joined [02:06] *** molaf left [02:18] *** molaf joined [02:27] *** SQuoll left [02:33] *** SQuoll joined [02:41] *** sono__ joined [02:42] *** Black_Ribbon left [03:01] *** camelCaser left [03:02] *** camelCaser joined [03:03] *** molaf left [03:12] *** Altai-man_ joined [03:15] *** sena_kun left [03:15] *** molaf joined [03:15] rypervenche: did you also give it a --output=blah? [03:27] *** ensamvarg joined [03:53] *** aborazmeh left [03:58] *** pilne left [04:16] *** aborazmeh joined [04:16] *** aborazmeh left [04:16] *** aborazmeh joined [04:18] *** rindolf joined [04:36] https://imgur.com/gallery/Wa45rla [04:48] *** molaf left [05:13] *** sena_kun joined [05:15] *** Altai-man_ left [05:35] *** aborazmeh left [05:41] *** sauvin joined [06:01] *** PavelB joined [06:01] *** rindolf left [06:12] *** rindolf joined [06:33] *** ensamvarg left [06:41] *** domidumont joined [07:13] *** Altai-man_ joined [07:15] *** sena_kun left [07:38] *** stoned75 left [07:41] *** finanalyst left [08:10] *** PavelB left [08:11] *** Kaiepi joined [08:13] *** xelxebar left [08:16] *** xelxebar joined [08:36] *** sauvin left [08:46] *** vrurg left [08:47] *** vrurg joined [08:48] *** abraxxa joined [08:48] *** Geth left [08:49] *** Geth joined [08:49] *** xelxebar left [08:49] *** cpan-raku left [08:49] *** dogbert11 joined [08:49] *** Kaiepi left [08:49] *** cpan-raku joined [08:49] *** cpan-raku left [08:49] *** cpan-raku joined [08:49] *** Kaiepi joined [08:52] *** dogbert17 left [08:57] *** xelxebar joined [08:59] *** tyil left [09:00] *** cooper left [09:00] *** cooper joined [09:13] *** sena_kun joined [09:14] *** dakkar joined [09:14] lizmat: I put them on github :D [09:15] Github is a big place [09:15] your repo is a small one though :) [09:15] *** Altai-man_ left [09:15] https://github.com/lizmat/ObjectCache/issues [09:16] found them :-) [09:25] *** wamba joined [09:38] *** finanalyst joined [09:40] *** sono__ left [09:40] *** sauvin joined [09:41] *** sauvin left [09:42] Altreus: new version of ObjectCache, with evict capability, on its way to CPAN [09:43] *** pecastro joined [09:57] *** MasterDuke joined [09:58] *** Doc_Holliwood joined [10:01] *** finanalyst left [10:19] woot! [10:19] also TFW you don't notice your SSH has disconnected [10:19] even though you closed your laptop for half an hour and changed networks [10:21] > The `!EVICT` method returns the object that is removed from the cache, or `Nil` if the object was not in the cache. [10:21] This is why liz code is quality code [10:22] I've recently opened an issue on something else that does not behave along a similar pattern [10:22] forgot what mind you [10:30] *** vike left [10:34] *** vike joined [10:41] :-) [10:59] Now I can cache my ButReals and uncache them if I want to be sure of re-fetch [10:59] and the way you force a re-fetch is to evict it [10:59] nice nice [10:59] Later [10:59] :( [11:04] method re-fetch() { self!EVICT; self.bless(id => $!id) } [11:05] method re-fetch() { self!EVICT; self.bless(:$!id) } # shorter :-) [11:06] *** aborazmeh joined [11:06] *** aborazmeh left [11:06] *** aborazmeh joined [11:12] *** Altai-man_ joined [11:14] self!EVICT; self.fetch [11:14] :P [11:15] *** sena_kun left [11:18] self!EVICT.fetch even :-) [11:19] assuming you're sure the object wasn't evicted before :-) [11:19] can't be [11:19] User might de-cache it Just In Case [11:20] honestly I think I might just have uncache as a separate thing [11:20] Then the user can say what they mean [11:20] After all, the cached thing is an Object::Delayed, so fetch might not be the thing they do [11:21] hmm... but Object:Delayed needs a container, ObjectCache doesn't give containers ? [11:23] Indeed, I'll be caching the ButReal [11:23] There are layers going on :) [11:23] The idea is that you can freely create the top-level object, which really only has an ID and an Object::Delayed property [11:24] Once instantiated, that property now contains a data object that is in the ObjectCache [11:24] That way, if you do (for example) Channel.new(1234), then when you access any data from that channel, the Object::Delayed runs a constructor, which is cached [11:24] If it isn't cached, the constructor fetches it [11:25] in theory! [11:25] timotimo: Yes, I did give it an --output like that. Same error. [11:30] *** vike left [11:37] *** theovdh joined [11:40] Hi gurus, getting: 'Cannot find method 'has_hook' on object of type NQPMu' when debugging big program containing Grammar. Suggestions? [11:45] you could start by making a gist of the output of the stack trace when run with --ll-exception [11:47] *** vike joined [11:51] thanks @lizmat [11:57] *** _jrjsmrtn joined [11:58] *** aborazmeh left [11:59] *** __jrjsmrtn__ left [12:01] timotimo: Ahh, I think I kind of found my problem. I ran --target=mbc on a script that doesn't expect input and that works fine. I guess it doesn't work if it expects user input. [12:06] *** aindilis left [12:10] *** aindilis joined [12:14] *** markoong joined [12:25] *** markong joined [12:25] *** markoong left [12:34] *** Kaeipi joined [12:34] *** Kaiepi left [12:53] *** natrys joined [13:02] *** Voldenet left [13:04] *** camelCaser left [13:06] *** camelCaser joined [13:13] *** sena_kun joined [13:15] *** Altai-man_ left [13:16] *** daxim left [13:16] *** Voldenet joined [13:16] *** Voldenet left [13:16] *** Voldenet joined [13:21] *** daxim joined [13:38] *** rypervenche left [13:41] *** rypervenche joined [13:43] *** Doc_Holliwood left [13:59] *** lucasb joined [14:02] *** cpup left [14:02] *** cpup joined [14:02] *** Doc_Holliwood joined [14:07] *** MasterDuke left [14:26] rypervenche: hum, the script you're using it on shouldn't make a difference i think? [14:27] rypervenche: can you give the exact commandline you're using? [14:27] perl6 --target=mbc --output=blah.moarvm -e 'say "hello world"' [14:27] ^- this works for me [14:31] *** tejr left [14:37] Ahhh, it doesn't seem to work with -o, but does work with --output. I've tried: raku --target=mbc -o /tmp/blah.moarvm ./script.raku and also with -o=/tmp/blah.moarvm [14:38] *** tejr joined [14:40] *** molaf joined [14:43] *** bdju left [14:44] *** sarna left [14:49] *** MasterDuke joined [14:51] *** molaf left [14:52] *** sarna joined [14:54] *** AlexDaniel joined [14:54] *** AlexDaniel left [14:54] *** AlexDaniel joined [14:59] *** ChanServ sets mode: +o AlexDaniel [14:59] *** camelia was kicked by AlexDaniel (Kicked by AlexDaniel)) [14:59] *** ChanServ sets mode: -o AlexDaniel [15:05] *** bdju joined [15:06] *** Doc_Holliwood left [15:12] *** Altai-man_ joined [15:13] *** evalable6 left [15:15] *** evalable6 joined [15:15] *** sena_kun left [15:18] *** evalable6 left [15:21] *** evalable6 joined [15:26] *** xelxebar left [15:28] *** xelxebar joined [15:31] *** aindilis left [15:32] *** aindilis joined [15:44] *** mowcat joined [16:00] maybe "-o blah" not working is something we can fix [16:09] *** veesh_ joined [16:12] *** veesh left [16:12] *** veesh_ is now known as veesh [16:13] *** regreg_ joined [16:15] *** Doc_Holliwood joined [16:16] *** regreg left [16:23] I'll submit an issue to rakudo then. [16:23] *** theovdh left [16:30] *** tyil joined [16:30] *** tyil left [16:30] *** wamba left [16:49] I have the following snippet of code I'm a little confused about - I've got a subroutine (`start-vote`) which returns a promise which is supposed to last for 60 seconds. It's my understanding that using `.then` means whatever you feed it doesn't happen until something you're awaiting has completed - but all of these things in the code sample just trigger at the same time [16:49] https://gist.githubusercontent.com/kawaii/284f5a6cba68c910589a74ffb1183099/raw/5d112ffbce6527b7040a0b2dc91af73897f808e9/test.p6 [16:51] *** finanalyst joined [16:58] *** finanalyst left [16:58] *** aborazmeh joined [16:58] *** aborazmeh left [16:58] *** aborazmeh joined [16:58] kawaii: but you're not doing .then on start-vote [16:58] kawaii: you're doing it on send-message, no? [16:59] AlexDaniel: you're right, it's triggering _both_ `.then`'s at the same time [16:59] nice catch, thanks [16:59] I need to chain them [16:59] point is I don't see where you call start-vote and if you do at all [17:00] aahhh I see now [17:00] right, you're doing .then on the wrong thing :) [17:00] *** abraxxa left [17:00] for example, it can be inside the parens [17:02] *** Guest1277 left [17:03] Yep, I fixed it, thanks :) [17:04] kawaii: also why don't you just put that whole thing into a react block or something [17:04] you can do whenever Foo { whenever Foo { whenever Foo { } } } [17:05] jnthn: btw what's the right way to have whenevers outside the lexical scope? [17:05] jnthn: some of my programs are just… uh… a single react block [17:05] sure I can call subs from whenevers but then I don't have the ability to just plug a whenever anywhere in my code [17:05] which I do a lot [17:06] IIRC it was possible earlier but then we figured out it was accidental and is not supposed to work, but now I really want it :D [17:07] AlexDaniel: this is really the first thing I've done which makes use of Promises and async in P6, still not entirely sure I'm doing things right but solving one problem at a time 🥴 [17:07] https://gist.githubusercontent.com/kawaii/79eb3bd1a5a3c5b5518034185fc787e5/raw/6f3482d617ffa3ddd9371166da8cca20acdd1bbb/zoe-voteban.p6 [17:08] It looks messy but... small steps :) [17:09] kawaii: it's weird to see .then. Just use react? [17:10] react { whenever ….send-message { whenever start-vote { say ‘ok we're done!’ } }} [17:10] alternatively just make start-vote blocking, you're using it as such anyway [17:10] 🤔 [17:12] our docs for react really suck, actually [17:12] we should be advertising it throughout all doc pages [17:13] there's this monster example here: https://docs.perl6.org/type/Proc::Async [17:13] *** sena_kun joined [17:15] *** wamba joined [17:15] *** Altai-man_ left [17:16] AlexDaniel: Factor some of them out to separate `supply` blocks, and `whenever` those [17:17] jnthn: that may sound easy but in reality it requires some refactoring which I'm not always willing to do :S [17:18] I guess I just need to make a module for myself :) [17:21] it's a common problem when you're dealing with timed sequences of things [17:21] “do this, then sleep, then do that”, but oh wait can't really sleep here [17:22] what's wrong with `await`? [17:22] dakkar: it's more plumbing than porcelain ? [17:22] dakkar: are you talking about kawaii's code or my problem? :) [17:22] really? [17:23] because you can use a promise in a whenever [17:23] if I need to go through a sequence of non-blocking calls, `await first-thing();await second-thing();` looks nice to me [17:23] `whenever` feels more apt for things that can happen more than once [17:24] m: react whenever Promise.in(3) { say "waited" } [17:24] lizmat, rakudo-moar 0e8723568: OUTPUT: «waited␤» [17:24] dakkar: that doesn't make any sense if you have other async events happening [17:24] surely you can `start` everything, but then you get all the usual problems [17:24] AlexDaniel: true [17:27] (also I can't find examples in my code where I use `await`, but plenty of `whenever`, so maybe I'm just confused today ☺) [17:27] Hi there! Is there a way of finding what attributes a method use? [17:28] SmokeMachine: I'm not aware of one [17:30] moritz: thanks! Wouldn’t that be good? Find what attributes a method use, what outside variables a closure use... this kind of thing... [17:33] I think this goes back to a discussion jnthn moritz nine and I had before the GPaRW [17:33] we lose too much introspection opportunities during compilation [17:33] *many [17:33] I was trying to find a way of making something like: `class C { has $.a = 2; has $.b is some-trait = $!b + 2 }` and when I do something like: $!a = 40, $!b would be automatically 42... [17:34] (nitpick: you can detect which attributes a method *could* access (i.e. which are mentioned), not exactly which ones it really accesses (since the latter reduces to the halting problem)) [17:35] SmokeMachine: Those kinds of things wait for us to have a user-visible AST, which is part of the macros work. I'm doing some initial experimenting in that area. [17:39] *** chloekek joined [17:39] jnthn: great! But that would be possible with a macro? Should the Attribute.build be a macro for that? Or will it have a way to get the ast from a given method from outside of a macro? (Sorry, just trying to understand...) [17:41] dakkar: I meant mentioned... :) [17:41] SmokeMachine: btw Math::Model solves this problem by having the user write functions that take named args, and you can introspect those [17:42] *** [Coke] left [17:42] https://perlgeek.de/blog-en/perl-6/physical-modelling.html [17:42] y_acceleration => { $:force / $:mass }, [17:43] .oO( only one more Rakuer, and they're all not found: https://www.reddit.com/r/rakulang/ ) [17:43] *** dakkar left [17:45] *** [Coke] joined [17:46] *** [Coke] left [17:46] *** [Coke] joined [17:47] SmokeMachine: Current thinking is that it'll be possible to obtain the AST up until CHECK time. So for example a trait on a routine could get the AST of the routine. [17:48] moritz: looks good (I do something similar here (https://github.com/FCO/ProblemSolver/blob/master/send-more-money.p6#L16)) but wouldn’t it be better to just do `has $.y-acceleration = $!force / $!mass`? [17:49] jnthn: cool! [17:49] *** aluaces left [17:54] jnthn: something like this? #`(inside trait code) &attr.build.GET-AST # or whatever it’ll be called [17:54] jnthn: I mean, will it be like a method on Routines? [17:56] Probably along those lines, though I doubt you'll have to shout it :P [17:56] :) [17:57] It will make Red’s life much easier! :) [18:02] *** reportable6 left [18:03] *** reportable6 joined [18:06] *** pecastro left [18:14] *** aborazmeh left [18:19] *** aluaces joined [18:24] *** wildtrees joined [18:43] *** woolfy joined [18:45] *** woolfy left [18:45] *** perigrin_ joined [18:45] *** perigrin_ left [18:46] *** woolfy joined [18:47] *** woolfy left [18:52] *** ufobat__ joined [18:55] *** perigrin joined [18:56] *** ufobat_ left [18:56] *** molaf joined [19:01] *** perigrin left [19:12] *** Altai-man_ joined [19:15] *** sena_kun left [19:26] *** melezhik joined [19:33] Hi! I launched a beta version of SparrowHub - http://repo.westus.cloudapp.azure.com/hub/ , I'd interested to hear about what kind of plugins could be useful for Raku community. Would appreciate for any feedback. Warning - some of the plugins could not work as a migration of Sparrow to Raku has not finished yet. [19:37] *** domidumont left [20:04] *** wamba left [20:08] *** mowcat left [20:10] melezhik: Ah, is that the cro app you've been writing recently? :) [20:11] yeah, I rewrote former SparrowHub to Raku/Cro making some system redesign on the way [20:12] basically it's just UI to search/read docs on "official" sparrow plugins (https://github.com/melezhik/sparrow-plugins) [20:12] as well as main repo [20:22] *** mowcat joined [20:38] *** rindolf left [20:39] *** SQuoll left [20:48] *** pecastro joined [20:57] *** SQuoll joined [21:04] *** foo222 joined [21:14] *** sena_kun joined [21:15] *** Altai-man_ left [21:19] *** Possum joined [21:20] *** AlexDaniel left [21:20] *** AlexDani` joined [21:28] *** SQuoll left [21:52] *** SQuoll joined [22:04] *** squashable6 left [22:06] *** squashable6 joined [22:07] *** chloekek left [22:13] *** veesh left [22:16] *** _jrjsmrtn left [22:20] *** __jrjsmrtn__ joined [22:24] *** ensamvarg joined [22:25] *** SQuoll left [22:27] *** veesh joined [22:31] *** pnu__ left [22:31] *** dylanwh left [22:31] *** Hotbees left [22:32] *** pnu__ joined [22:34] *** dylanwh joined [22:34] *** Hotbees joined [22:35] *** melezhik left [22:36] *** Black_Ribbon joined [22:36] *** isacl___ left [22:36] *** BuildTheRobots left [22:36] *** PotatoGim left [22:36] *** tbrowder left [22:36] *** mrsolo left [22:38] *** mrsolo joined [22:40] *** ribasushi left [22:40] *** BuildTheRobots joined [22:40] *** tbrowder joined [22:40] *** PotatoGim joined [22:42] *** ribasushi joined [22:43] *** isacl___ joined [22:45] *** stoned75 joined [22:46] *** ChoppedBacon left [22:47] *** SQuoll joined [22:49] *** ChoppedBacon joined [22:50] *** caasih left [22:50] *** timeless left [22:51] *** timeless joined [22:51] *** caasih joined [22:52] *** foo222 left [22:55] *** natrys left [22:56] *** mithaldu_ left [22:56] *** kawaii left [22:56] *** zostay left [22:56] *** Grinnz left [22:56] *** lucasb left [22:56] *** spycrab0 left [22:56] *** peteretep left [22:56] *** stoned75 left [22:56] i need some advice for a much simpler problem: given a routine to return the fractional part of a number, for an integer input should it return undefined (Any) or zero? [22:57] *** stoned75 joined [22:58] *** mithaldu_ joined [22:59] *** peteretep joined [23:00] *** zostay joined [23:00] *** Grinnz joined [23:00] *** aborazmeh joined [23:00] *** aborazmeh left [23:00] *** aborazmeh joined [23:01] what is the type of the fractional part it returns if it is *not* an integer? Str or Int ? [23:03] *** spycrab0 joined [23:03] *** lucasb joined [23:03] *** kawaii joined [23:09] as i have the routine coded now, i check for the input type and eventually the input, if not an integer, will be a Num. [23:11] and in that case the frac part becomes undefined for an allomorph input as "1.0" [23:12] *** aborazmeh left [23:12] *** Altai-man_ joined [23:13] looking at all my test cases as input, i'm leaning toward zero in all cases including int input. [23:14] *** MasterDuke left [23:15] *** sena_kun left [23:16] given my main use case as a string input of base other than dec, oct, hex, or oct, then zero makes more sense to me if the string either has no radix point or has nothing other than zeroes after the radix point. [23:17] *oct => binary [23:20] *** AlexDani` is now known as AlexDaniel [23:20] *** AlexDaniel left [23:20] *** AlexDaniel joined [23:24] *** camelia joined [23:26] tbrowder: what does it return for 1.0001 ? [23:27] 0001 (radix point implied) [23:27] and what's the type of that? [23:27] str [23:28] Str [23:28] so why would you return a zero instead of an empty string if you always return a string? [23:33] i'm looking at a caller testing for the fractional part so, with no number of value after an existing radix point, or a nonexistent radix point, the return value should be falsy imho: either zero or '' or undefined. [23:33] "does it matter" i guess is my question. [23:34] "who needs that" is mine [23:34] er, i do, for the moment. [23:35] just "testing the warer [23:35] *water" [23:40] *** Actualeyes left [23:46] *** MasterDuke joined [23:53] *** aborazmeh joined [23:53] *** aborazmeh left [23:53] *** aborazmeh joined