[00:04] *** aborazmeh joined [00:04] *** aborazmeh left [00:04] *** aborazmeh joined [00:06] Dear diary. Today I learned about the repeated function. Please bless() all the good people developing this wonderful language. Amen. [00:39] *** thundergnat left [00:43] *** lucasb left [00:51] *** Altai-man_ joined [00:52] *** vrurg left [00:53] *** sena_kun left [00:58] *** vrurg joined [01:01] *** margeas left [01:09] *** ensamvarg joined [01:19] *** mowcat left [01:41] *** wildtrees left [01:45] *** thowe joined [01:45] Hello [01:48] *** MasterDuke left [01:48] *** lichtkind left [02:01] anyone know of any non-core examples of making something that is awaitable? [02:01] *** Doc_Holliwood left [02:07] *** molaf left [02:18] * leont has build such a thing, actually [02:19] *** molaf joined [02:21] (but apparently hadn't pushed it to github until now) [02:22] *** Xliff joined [02:22] https://github.com/Leont/raku-actor/blob/master/lib/Actor.pm6#L45 [02:23] Though I guess that's cheating by essentially delegating the awaitableness to a Promise [02:32] hmm, yeah - that's just Promise [02:33] thanks anyway. maybe i'll just "try some stuff":) [02:44] Implementing Awaitable::Handle doesn't look to hard [02:44] (famous last words) [02:44] *** Xliff left [02:52] *** sena_kun joined [02:54] *** Altai-man_ left [02:58] *** xelxebar left [02:59] *** xelxebar joined [03:04] *** imcsk8 left [03:04] *** leont left [03:06] *** imcsk8 joined [03:25] *** ZzZombo_ joined [03:27] *** ZzZombo left [03:27] *** ZzZombo_ is now known as ZzZombo [03:35] *** orinthe left [03:54] *** holyghost left [03:55] *** holyghost joined [03:57] *** orinthe joined [04:05] *** squashable6 left [04:09] *** squashable6 joined [04:19] *** aborazmeh left [04:51] *** Altai-man_ joined [04:53] *** sena_kun left [05:29] *** sauvin joined [05:52] *** molaf left [05:54] *** Doc_Holliwood joined [06:22] *** stoned75 joined [06:52] *** sena_kun joined [06:54] *** Altai-man_ left [06:56] *** thowe left [06:56] hello [07:11] *** Doc_Holliwood left [07:15] *** reach_satori left [07:25] hi stoned75 [07:26] *** stoned75 left [07:27] *** stoned75 joined [07:28] *** Sgeo_ joined [07:28] *** ensamvarg left [07:30] *** Sgeo left [07:34] *** finanalyst_mobil joined [07:38] *** finanalyst left [07:52] *** stoned75 left [07:52] *** finanalyst_mobil left [07:53] *** finanalyst joined [07:53] *** finanalyst left [08:04] *** vike left [08:07] *** dakkar joined [08:07] *** AndyMcD joined [08:07] Hello, sirs and madams. [08:08] i have been reading the raku site for information and came across this [08:08] https://docs.raku.org/language/ --> 403 Forbidden [08:08] *** sno left [08:08] figured to put it here and let someone know. if there is a better way to report it, please let me know and i will do so [08:08] cheers [08:10] AndyMcD: On which page was the dead link? [08:11] https://docs.raku.org/language/faq#I'm_a_Perl_5_programmer._Where_is_a_list_of_differences_between_Perl_5_and_Raku? [08:11] then click the link " Language section of the documentation" [08:12] AndyMcD: btw this is the place to report issues. Do you like to open one or should I? [08:13] if its okay with you, could you do it please? i just started my work day, so i have stuff to get on with. [08:13] apologies for the laziness [08:19] AndyMcD: Only if you promise me to improve your raku skills today :-) [08:20] *** wamba joined [08:24] *** reach_satori joined [08:25] haha :) definitely working on it :) [08:26] *** AndyMcD left [08:46] *** sno joined [08:51] *** Altai-man_ joined [08:54] *** sena_kun left [09:01] *** wamba left [09:02] *** natrys joined [09:05] *** wamba joined [09:13] *** Black_Ribbon left [09:15] *** vike joined [09:18] *** reach_satori_ joined [09:18] *** reach_satori left [09:25] *** vike left [09:31] *** ufobat joined [09:32] * lizmat clickbaits https://rakudoweekly.blog/2020/03/09/2020-10-the-videos/ [09:38] *** finanalyst joined [09:40] * [ptc] already took the bait [09:40] 2015-04-11T14:48:17Z #perl6 ptc: http://www.reddit.com/r/perl6/comments/326wat/examplesperl6org/cq8q0yq [09:40] 2015-04-16T14:44:15Z #perl6 <[TuxCM]> ptc: https://github.com/travis-ci/travis-ci/issues/2978# [09:40] <[ptc]> lizmat++ [09:41] /o [ptc] long time, no see online :-) [09:43] *** pecastro joined [09:44] <[ptc]> o/ heh :-) Managed to get back online at G[P&R]W2020. [09:45] lizmat++ [09:46] *** abraxxa left [09:46] *** abraxxa joined [09:47] * lizmat hopes [ptc] will be able to exercise their Raku muscles again [09:49] * [ptc] hopes so too! [09:49] <[ptc]> I already have ideas from the workshop. Just need some peace and quiet to start implementing them :-) [09:50] * lizmat orders [ptc] some peace and quiet [09:51] * moritz flips a round tuit to [ptc] [09:52] *** finanalyst left [09:52] *** tejr left [09:52] *** reach_satori_ left [09:52] *** tejr joined [09:53] *** reach_satori_ joined [10:01] <[ptc]> hehe [10:03] *** vike joined [10:04] *** abraxxa left [10:04] *** abraxxa joined [10:05] *** wamba left [10:08] *** reach_satori_ left [10:08] *** reach_satori_ joined [10:08] *** wamba joined [10:27] *** finanalyst joined [10:28] *** mowcat joined [10:31] *** caterfxo left [10:32] *** caterfxo joined [10:52] *** margeas joined [10:52] *** sena_kun joined [10:53] *** Altai-man_ left [11:13] *** bdju left [11:14] *** bdju joined [11:20] *** finanalyst left [11:31] *** markoong joined [11:31] *** margeas left [11:44] *** wamba left [11:51] When writing my own submethod BUILD, should I be binding or assigning the values to my attributes? I have seen both examples in the docs. [11:54] *** Sgeo__ joined [11:57] rypervenche: do you expect to change the values after they've been BUILD ? [11:57] *** Sgeo_ left [11:57] if not, then you could use binding [11:57] of you are going to change them, the easiest would be to assign [11:58] binding would save you one scalar container from being allocated [11:58] depending on how many times you create an object of such a class, that could be an optimization opportunity [11:59] The huge opportunity for binding is when you have an array or hash [12:00] Especially if it's a big one [12:00] jnthn: well, that actually hasn't been implemented yet, it only binds for scalars atm [12:00] Since assignment into a hash or array is a copying operation (so O(n)) while binding is O(1) [12:00] my first attempt at binding in those cases, produced some weird errors :-( [12:00] lizmat: He was writing his own submethod BUILD, so is fine :) [12:00] uh, if "he", shouldn't assume [12:01] they is easier :-) [12:01] Indeed. [12:01] Somehow my brain parsed "ryan" out of the nick...which isn't there at all...wtf brain [12:02] I used such binding in the MoarVM heap profiler to avoid copying many-megabyte native int arrays around [12:02] even if you know the gender, people unconsciously assign value to gender specifications [12:02] *** wamba joined [12:02] Which saves vast amounts of time and memory :) [12:03] m: class Point { has $.x = 0; has $.y = 0 }; Point.new for ^1000000; say now - INIT now # rypervenche [12:03] rakudo-moar 8c995febd: OUTPUT: «0.4616124␤» [12:03] m: class Point { has $.x is built(:bind) = 0; has $.y is built(:bind) = 0 }; Point.new for ^1000000; say now - INIT now # using bound attributes [12:03] rakudo-moar 8c995febd: OUTPUT: «0.2738341␤» [12:16] lizmat: Ahh, no I won't be changing them. Good to know. I need to reread the docs on binding and starting using it in my code where allowed/necessary. [12:19] jnthn: Haha, it's all good. "they" is easier so you don't have to remember. ryper is actually a sort of French slang/pig latin of my name Perry. A fellow beardy guy. [12:19] *** llnu joined [12:30] *** leont joined [12:38] *** xelxebar left [12:41] *** xelxebar joined [12:44] *** lucasb joined [12:51] *** Altai-man_ joined [12:52] *** reach_satori_ left [12:54] *** sena_kun left [12:55] Hi guys! I was trying to use DB::MySQL with no luck… it cant find the dynlib… any advice? [12:55] *** cpan-raku left [12:56] *** cpan-raku joined [12:56] *** cpan-raku left [12:56] *** cpan-raku joined [13:06] *** Doc_Holliwood joined [13:07] SmokeMachine: install the mysqlclient-dev package or something similarly named? [13:07] Is DBIish recommended for databases? [13:07] I tried… (i forgod to mention I was tring to install it on macos) [13:08] rypervenche: I recumbent Red… :) [13:08] Touché :P [13:08] SmokeMachine: with brew? [13:09] Yes, with brew and from msql site… with no luck... [13:13] SmokeMachine: when I am on mac, I tend to work with containers [13:14] in order to walk around the mac pain for packages [13:14] *** wamba left [13:14] El_Che: I’ll try that when I get back home... [13:15] SmokeMachine: I meant docker for mac [13:15] tried podman (what I use on Linux), but it was just a docker proxy [13:15] docker desktop for mac [13:16] Yes, I know… the mysql server was running on a container… I’ll try to test my code inside a container also... [13:17] ah, ok [13:17] just checking :) [13:18] *** wamba joined [13:18] SmokeMachine: tried stuff like export DYLD_LIBRARY_PATH="..." ? [13:19] yes... [13:19] GMFA [13:19] (Great Minds Fail alike ;) ) [13:20] I was thinking much worse words... [13:21] and that was happening with both DBIish and DB::MySQL... [13:21] rypervenche: that's why you can't have nice things [13:22] *** mowcat left [13:24] That explains a lot :( [13:26] :) [13:26] Question, I'd like to add a type constraint to a subroutine of an array of objects. I tried doing Classname:D @array, but I get an error: Type check failed in binding to parameter '@array'; expected Positional[Classname] but got Array ($[Classname.new(...) [13:27] Is it possible to do what I'm looking for? Or do people not usually put type constraints on arrays? [13:28] *** aborazmeh joined [13:28] *** aborazmeh left [13:28] *** aborazmeh joined [13:32] rypervenche: I type arrays, but nothing fancy [13:33] *** reach_satori joined [13:36] rypervenche: The array that you pass in also has to have a matching type [13:36] e.g. be declared with that type [13:38] *** wamba left [13:41] m: sub bla(Int @a) {}; bla Array[Int].new: 1,2,3,4; bla 1,2,3,4 [13:41] rakudo-moar 8c995febd: OUTPUT: «5===SORRY!5=== Error while compiling ␤Calling bla(Int, Int, Int, Int) will never work with declared signature (Int @a)␤at :1␤------> 3t @a) {}; bla Array[Int].new: 1,2,3,4; 7⏏5bla 1,2,3,4␤» [13:41] m: sub bla(Int @a) {}; bla Array[Int].new: 1,2,3,4; bla [1,2,3,4] [13:41] rakudo-moar 8c995febd: OUTPUT: «Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[1, 2, 3, 4])␤ in sub bla at line 1␤ in block at line 1␤␤» [13:42] m: sub bla(Int @a) {}; bla Array[Int].new: 1,2,3,4; # bla [1,2,3,4] [13:42] rakudo-moar 8c995febd: ( no output ) [13:42] jnthn: Ahhh, that did it. Thank you. [13:42] I've been wondering how to do that for a while. knowledge++ [13:44] I have to say, even though Python is seen as one of the easiest programming languages to learn, I had trouble understanding OOP and classes and methods (too many parentheses and "self"). I'm rather surprised and happy that I've picked it up as easily as I have in Raku. The syntax is much easier to understand and OOP finally makes sense to me. [13:45] *** Doc_Holliwood left [13:45] *** caterfxo left [13:48] *** caterfxo joined [13:53] rypervenche: that's great to hear, thanks! [14:19] *** aborazmeh left [14:31] *** finanalyst joined [14:41] *** nightfrog left [14:52] *** sena_kun joined [14:52] *** rindolf joined [14:54] *** Altai-man_ left [14:58] *** domidumont joined [15:00] *** reach_satori left [15:04] *** leont left [15:15] *** Actualeyes left [15:18] *** Actualeyes joined [15:46] *** libertas left [16:02] *** molaf joined [16:05] in my humble opinion, OOP never really truly "makes sense" :P [16:06] the actor model is a good abstraction for it IMO [16:06] it's a thing, that can hold stuff, and do stuff [16:07] IMHO there are problems that fit so well into our OO models that I feel it "makes sense" [16:08] and then there are things don't fit at all with our OO modeling techniques [16:09] OO certainly has been misused or overused across the years [16:09] if you have a system in which not everything is an object to begin with, I'd agree :-) [16:12] *** Doc_Holliwood joined [16:19] I think that part of the misuse and misunderstanding of OO stems from the focus on the syntax in the first place [16:20] people then go "great, I learned classes, that was the next step after variables and functions" and then spam them everywhere because why level up if you don't exercise yuor skills after that [16:20] i blame java :) [16:20] I blame C++, perhaps because I learned it first :P [16:21] ironically, one of the things that helped me *understand* OO was C, Gtk+ specifically [16:22] it has objects, but it doesn't have classes. You pass structs around, but you never look inside them, and afair the documentation doesn't even tell you what's inside them. You accept that they're opaque and that's iet [16:29] *** aborazmeh joined [16:29] *** aborazmeh left [16:29] *** aborazmeh joined [16:36] *** libertas joined [16:41] it gets worse when someone learns any "patterns". all of the sudden everything is poorly poured into a "pattern". [16:45] *** molaf left [16:47] lizmat: did you have a chance to ponder on my suggestions for ObjectCache? [16:51] *** Altai-man_ joined [16:54] *** sena_kun left [16:57] *** entonian left [16:57] *** entonian joined [16:59] *** entonian left [17:00] *** abraxxa left [17:22] *** Kaiepi left [17:25] Does Raku compile/work on the Windows Subsystem for Linux? [17:26] I find myself booting into my Windows partition of my laptop more in the evening, would be nice to be able to work too. [17:26] *** vike left [17:27] ssh [17:28] *** vike joined [17:41] *** dakkar left [17:42] *** finanalyst_mobil joined [17:42] *** domidumont left [17:45] *** aluaces left [17:45] *** finanalyst left [17:46] *** finanalyst_mobil left [17:47] *** finanalyst joined [17:52] *** Ven`` joined [17:57] is there a way to have lazy reduce? i.e. `[&&] ^1e1000`? [18:00] *** sno left [18:01] *** pecastro left [18:02] Altreus: I'm afraid I missed any ObjectCache suggestions :-( [18:06] *** wamba joined [18:10] *** m_athias left [18:12] *** aluaces joined [18:12] *** ptrcmd left [18:13] kawaii: it does. runs fine [18:14] *** ptrcmd joined [18:14] synthmeat: I think not. Every reduction needs to culminate in a single value and that by definition cannot be lazy [18:17] *** MasterDuke joined [18:25] If you want all the intermediate values, you can do the triangle reduce ([\&&] instead), which is probably lazy [18:25] *** sauvin left [18:33] *** m_athias joined [18:39] ok, so `[&&] 0..100000` takes a bit, but `[&&] (0..100000).reverse` is basically instant, which is all good. i imagined reduce as `0 && 1 && ... && n)`, but instead it's `(...(0 && 1) && ... && n)`, so that makes sense. right? [18:41] meaning, evaluation of reduce starts from the outermost, which is 100000 in this case? [18:43] m: say &infix:<&&>.assoc [18:43] rakudo-moar 8c995febd: OUTPUT: «No such method 'assoc' for invocant of type 'Sub+{Precedence}'␤ in block at line 1␤␤» [18:45] *** aborazmeh left [18:52] *** ufobat_ joined [18:52] *** sena_kun joined [18:53] *** Altai-man_ left [18:56] *** ufobat left [18:57] *** wamba left [18:57] *** wamba joined [18:59] *** Doc_Holliwood left [19:05] *** rindolf left [19:08] *** pecastro joined [19:12] *** rindolf joined [19:22] *** aborazmeh joined [19:22] *** aborazmeh left [19:22] *** aborazmeh joined [19:23] *** Black_Ribbon joined [19:26] i don't know. my expectation was for `[&&] 0..100000` to finish fast, and `[&&] (0..100000).reverse` to take a bit. && is left to right, right? [19:29] synthmeat: (0..N).reverse is I believe statically optimized to N..0 [19:30] so shouldn't really have a difference in performance [19:30] *** wildtrees joined [19:30] but quite possibly I'm out of date or wrong in that respect [19:30] *** Doc_Holliwood joined [19:31] *** wildtrees left [19:31] *** wildtrees joined [19:35] no, i mean `0 && 1 && ... && n` will finish fast at `0 &&` already. `n && ... && 1 && 0` has to go through all the way, and that's why it's taking longer. but it appears to work in opposite manner (in repl, anyways) [19:35] (unrelated, any convenient method to time the execution in repl?) [19:43] but `[*] 0..100000` is faster than `[*] (0..100000).reverse`, which aligns with my intuition [19:43] i'm not understanding something here badly ^_^ [19:44] synthmeat: I don't use the REPL, I use an alias: alias r='time raku -e' [19:44] *** pilne joined [19:44] it allows me to run code like: r 'say 42' [19:44] and get timing info at the same time [19:44] *** sno joined [19:45] *** [Coke] joined [19:45] *** [Coke] left [19:45] *** [Coke] joined [19:47] * [Coke] wonders how long his irssi executable has been missing while he was running it. oops [19:49] lizmat: and what does `r '[*] 0..100000'` do for you? error over here, something about sink context [19:50] the r should be outside of the quotes [19:50] <[Coke]> coming in late, but you have to do something with the result, e.g. "say" it. [19:50] and NOT in the REOLK [19:50] *REPL [19:50] * [Coke] defers to liz [19:51] no, `` are conversational quotes here, as i use them [19:51] <[Coke]> just watched https://www.video.uni-erlangen.de/clip/id/12901, good to see some people again. [19:51] what [Coke] said :-) [19:51] lizmat: funny to watch you type and waching your presentation at the same time :) [19:51] <[Coke]> m: 3 [19:51] rakudo-moar 8c995febd: OUTPUT: «WARNINGS for :␤Useless use of constant integer 3 in sink context (line 1)␤» [19:51] <[Coke]> ^^ same error. [19:51] k [19:52] <[Coke]> basically, if you go to the trouble to do something, and then ignore it, the compiler assumes that's a bug. [19:52] <[Coke]> er, not a bug, per se, but something to worry about. :) [19:53] ok, so `[&&] (0..1000000).reverse` is 10 times slower than `[&&] 0..1000000` [19:54] s/slower/faster [19:55] * lizmat is seeing the same [19:55] but `[*] 0..1000000` is many magnitudes faster than `[*] (0..1000000).reverse` [19:56] interesting... [19:56] and both * and && are left to right and expected to "fail fast" (so i don't abuse "lazy" term) [19:56] <[Coke]> [*] has a range optimization. [19:56] <[Coke]> m: (0..10000000).^name.say [19:56] rakudo-moar 8c995febd: OUTPUT: «Range␤» [19:57] <[Coke]> m: (0..10000000.reverse).^name.say [19:57] rakudo-moar 8c995febd: OUTPUT: «Seq objects are not valid endpoints for Ranges␤ in block at line 1␤␤» [19:57] <[Coke]> m: (0..10000000).reverse.^name.say [19:57] rakudo-moar 8c995febd: OUTPUT: «Seq␤» [19:57] <[Coke]> ^^ with a Seq, you have to go through the whole thing. with a range, you can cheat (and we do) [19:59] <[Coke]> (now watch, we're not cheating and I'm remembering something from parrot) [20:00] A company next village is offering a PHP position. Tempting benefits and easy too reach, but frankly, I'd rather jump into an ant pit with my gut sliced open. [20:01] mental health insurance included ? [20:01] Maybe I should write them anyway, see if they have heard of this promising new language ... [20:01] *** wamba left [20:02] *** wamba joined [20:04] [Coke]: ok, when i convert them both to lists, perf seems exactly the same. that jives (kinda. i'm assuming there's a reason it doesn't stop at first item and just say `0`) [20:06] <[Coke]> that would be a better cheat! [20:07] *** domidumont joined [20:07] <[Coke]> (but would probably slow down the general case if we had to add a compare to each element) [20:09] *** domidumont left [20:12] Nice. I converted my password manager script from Bash to Raku: https://gist.github.com/rypervenche/23461184c16b0efea0fcbced1788d61f [20:13] *** wamba left [20:14] *** mensvaga left [20:15] rypervenche: if you add "is built(:bind)" to each attribute definition, you can drop the BUILD method completely [20:15] Oooh [20:16] Before or after the "is required" or does it not matter? [20:17] https://gist.github.com/rypervenche/23461184c16b0efea0fcbced1788d61f#file-passman-raku-L80-L83 could probably be `return @input.first(*.site eq $chosen-entry-name)` if you wanted [20:17] Oooh, also a nice shortcut. Thanks. [20:19] why are you doing `.lines.join("\n")` here https://gist.github.com/rypervenche/23461184c16b0efea0fcbced1788d61f#file-passman-raku-L88-L92 ? [20:21] That....is a good question.... Let me try it without and see what it gets me, but it should be the exact same thing without it... [20:23] Yep, I don't know what I was thinking there. Removed it. [20:24] And cool, looks like order of the "is" parts doesn't matter. [20:24] *** Ven`` left [20:25] fwiw, i'm not 100% sure if `.lines.join("\n")` will treat windows/mac/*nix newlines all the same as just doing nothing. may depend on what you pass it to whether it matters (if it's not the same) [20:26] That's true. I only use Linux and am only writing this for myself, (at last for now). These are also little projects for myself to learn more of the language. [20:26] So thank you very much for the feedback. [20:26] np [20:27] This is really the only place I can chat about Raku. :P [20:31] *** natrys left [20:31] *** wamba joined [20:32] you can always talk to yourself though [20:36] >< [20:40] *** natrys joined [20:43] *** molaf joined [20:44] *** stoned75 joined [20:47] *** MasterDuke left [20:51] *** Altai-man_ joined [20:52] *** MasterDuke joined [20:54] *** sena_kun left [20:58] *** wamba left [21:13] *** sena_kun joined [21:15] *** Altai-man_ left [21:15] *** Kaiepi joined [21:17] *** Kaiepi left [21:17] *** Kaiepi joined [21:37] *** aborazmeh left [21:40] *** wamba joined [22:11] *** natrys left [22:13] *** rindolf left [22:29] *** regreg left [22:29] *** regreg joined [22:38] *** Kaeipi joined [22:38] *** Kaeipi left [22:38] *** Kaiepi left [22:42] *** wamba left [22:42] *** mowcat joined [22:48] *** wamba joined [23:03] *** mowcat left [23:07] *** shadowpaste left [23:09] *** vrurg left [23:09] *** vrurg joined [23:12] *** shadowpaste joined [23:13] *** Altai-man_ joined [23:15] *** sena_kun left [23:16] *** a3f left [23:20] *** a3f joined [23:21] *** shadowpaste left [23:28] *** pecastro left [23:35] *** aborazmeh joined [23:35] *** aborazmeh left [23:35] *** aborazmeh joined [23:37] *** SQuoll left [23:56] *** SQuoll joined