[00:03] *** perryprog_ left [00:10] *** perryprog joined [00:11] *** perryprog left [00:12] *** epony left [00:16] *** BenGoldberg left [00:17] *** perryprog joined [00:25] *** BenGoldberg joined [00:26] *** perryprog left [00:27] *** perryprog joined [00:37] *** jmcgnh left [00:44] *** jmcgnh joined [01:04] *** approaching236 left [01:14] *** aborazmeh left [01:16] *** a3f left [01:17] *** aborazmeh joined [01:18] *** aborazmeh left [01:18] *** aborazmeh joined [01:18] *** epony joined [01:19] *** a3f joined [01:22] *** BenGoldberg left [01:22] *** Ben_Goldberg joined [01:22] *** Ben_Goldberg is now known as BenGoldberg [01:35] *** leont left [01:36] *** yuplushi_ left [01:37] *** perryprog left [01:37] *** aluaces left [01:37] *** perryprog joined [01:38] *** mowcat left [01:42] *** BenGoldberg left [01:42] *** Ben_Goldberg joined [01:42] *** Ben_Goldberg is now known as BenGoldberg [01:45] *** holli__ left [01:57] *** molaf left [01:59] *** Ben_Goldberg joined [01:59] *** BenGoldberg left [01:59] *** Ben_Goldberg is now known as BenGoldberg [02:10] *** molaf joined [02:22] *** Kaeipi left [02:22] *** Merfont joined [02:48] *** yuplushi joined [03:07] *** k-man left [03:09] *** Kaeipi joined [03:11] *** Merfont left [03:16] *** k-man joined [03:19] *** Ben_Goldberg joined [03:19] *** BenGoldberg left [03:19] *** Ben_Goldberg is now known as BenGoldberg [03:38] *** orinthe left [03:39] *** orinthe joined [04:17] *** Kaeipi left [04:20] *** Kaiepi joined [04:20] *** afresh1 joined [04:23] *** MasterDuke left [04:26] *** Kaeipi joined [04:27] *** Kaiepi left [04:28] *** BenGoldberg left [04:28] *** Ben_Goldberg joined [04:28] *** Ben_Goldberg is now known as BenGoldberg [04:30] *** BenGoldberg left [04:30] *** Ben_Goldberg joined [04:30] *** Ben_Goldberg is now known as BenGoldberg [04:33] *** afresh1 left [04:36] *** afresh1 joined [04:40] *** skids left [04:49] *** xinming left [04:51] *** xinming joined [04:57] *** BenGoldberg left [04:57] *** Ben_Goldberg joined [04:58] *** Ben_Goldberg is now known as BenGoldberg [05:02] *** aluaces joined [05:03] *** aluaces is now known as alberto [05:03] *** alberto is now known as Guest26585 [05:04] *** holli__ joined [05:08] *** jmerelo joined [05:08] *** newbie76 joined [05:16] *** molaf left [05:25] *** frot-lab joined [05:26] *** bocaneri joined [05:28] *** molaf joined [05:35] *** bocaneri left [05:35] *** bocaneri joined [05:36] *** bocaneri left [05:37] *** bocaneri joined [05:37] *** newbie76 left [05:38] *** bocaneri left [05:38] greppable: :P5 [05:38] AlexDaniel`, 21 lines, 9 modules: https://gist.github.com/5d59400d110d66b0082dfb63f673c7ae [05:38] *** bocaneri joined [05:38] *** bocaneri left [05:39] *** molaf left [05:42] *** xinming left [05:44] *** xinming joined [05:53] *** xinming left [05:53] *** xinming joined [05:57] *** xinming_ joined [06:01] *** xinming left [06:02] *** dmc00 left [06:14] *** tejr left [06:14] *** xelxebar left [06:14] *** tejr joined [06:14] *** xelxebar joined [06:15] *** maettu joined [06:16] *** BenGoldberg left [06:16] *** Ben_Goldberg joined [06:17] *** Ben_Goldberg is now known as BenGoldberg [06:25] *** holli__ left [06:43] *** dakkar joined [06:53] *** Altai-man joined [07:07] *** Guest26585 is now known as aluaces [07:12] *** tony-o left [07:12] *** tony-o joined [07:12] *** maettu left [07:17] *** domidumont joined [07:20] *** kensanata joined [07:35] *** bocaneri joined [07:35] *** MasterDuke joined [07:39] *** alainbebe joined [07:42] *** BenGoldberg left [07:43] *** bocaneri left [07:44] *** bocaneri joined [08:00] *** alainbebe left [08:02] *** frot-lab is now known as hungrydonkey [08:11] How do I access WHY of a class attribute? [08:11] *** Sgeo left [08:14] *** rindolf joined [08:21] *** pecastro joined [08:28] *** hungrydonkey left [08:30] *** frot-lab joined [08:35] Not sure, using `^attributes` on the class? [08:39] *** maettu joined [08:40] *** holli__ joined [09:00] *** domidumont left [09:07] *** wamba joined [09:21] Good morning :) I'm having some issues in capturing errors/exceptions from a Proc (or maybe an IO::Pipe?!) object. I have `my $cmd = run @cmd, :in, :out, :err;` but my process is dying at the point of `$cmd.in.close;`, I've tried wrapping it in a `try` block and doing `if $! { say $cmd.exitcode }` and `$cmd.err.slurp.say` but _nothing_ I do seems to let me assign the value of the exception or even see the exit code. [09:21] full routine code at the moment for those interested https://www.irccloud.com/pastebin/tYxJPGun/ [09:22] *** holli__ left [09:22] kawaii: my experience with this is that it's easier to get it working reliably with Proc::Async [09:25] one problem is that UNIX pipes only buffer so much output before they block. That means you must drain the stdout and stderr pipes before they run full, without blocking them if there's nothing to read [09:25] not an easy task when using blocking IO [09:25] (this might not be your actual problem, but still a problem that needs solving) [09:26] http://perlpunks.de/paste/show/5f7d89ba.323f.a6 this is part of the code I use to run external programs; no piping to stdin in this example though [09:27] *** maettu left [09:27] moritz: thanks, I'll take a look at Proc::Async instead and see if it's simple enough to make it worth refactoring this block :) [09:28] you can print to its stdin ith `$proc.print(Str)`, and at the end $proc.close-stdin; [09:29] good luck :-) [09:33] *** pecastro left [09:37] moritz: well, time to see if it works :D https://www.irccloud.com/pastebin/KOczCSdO/ [09:41] *** sena_kun joined [09:41] *** Kaeipi left [09:43] *** Altai-man left [09:46] https://www.irccloud.com/pastebin/BU1txtpN/moritz%3A%20nice%2C%20got%20it%20working%20the%20same%20as%20before%20like%20so%3B%20now%20time%20to%20see%20if%20I%20can%20capture%20errors%2C%20thanks%20for%20your%20help%21%20%3A) [09:46] moritz: nice, got it working the same as before like so; now time to see if I can capture errors, thanks for your help! :) [09:50] *** aborazmeh left [09:51] so I'm pretty new to using supplies/taps, and now my stdout and stderr are both supplies, are supplies False if nothing is sent down them? What's the best way to "do X if stderr else do Y if !stderr"? [10:06] *** holli__ joined [10:07] kawaii: i think the docs have a good example with react/whenever [10:07] MasterDuke: yep, reading those now :D [10:32] hmm `whenever $cmd.stdout(:bin) { $document = $_; }` I tried this but I assume the actual result of my command isn't contained within `$_` [10:32] *** BenGoldberg joined [10:34] the whenever block could be run multiple times [10:34] so it would overwrite the previous value each time [10:36] timotimo: I am not really sure if what I'm writing even makes sense https://www.irccloud.com/pastebin/NKkIfapE/ [10:40] you can output a little message whenever the stdout block runs [10:40] to see if it's run multiple times [10:41] or initialize $document to be a buf8.new() and do $document ~= $_ inside the block which will work whether or not the block runs multiple times [10:41] *** Kaiepi joined [10:48] *** __jrjsmrtn__ left [10:49] *** holli__ left [10:50] *** __jrjsmrtn__ joined [10:52] https://www.irccloud.com/pastebin/DYyA3QGS/ [10:53] timotimo: further down the rabbit hole :D https://www.irccloud.com/pastebin/TJJDOy0Q/ [10:53] note that my `say 'awoo';` was nowhere to be seen 🤔 [10:54] well, yeah, i don't think the program outputted anything on stdout [10:54] given how it spits out an error on stderr [10:56] ¦ problem-solving: AlexDaniel self-unassigned META6 specification only exists "de facto" https://github.com/Raku/problem-solving/issues/236 [10:56] timotimo: so I feel like something is up with my `print` and `close-stdin` then, if the program is upset about what it's being fed [10:57] wow async is awful to work with :D [10:57] have you tried outputting exactly what $content is that you're feeding into it? [10:57] i gotta go now tho [10:58] yeah it's just raw markdown [11:02] *** xelxebar left [11:02] ah, start must be called before close-stdin [11:02] probably my issue [11:02] *** xelxebar joined [11:06] *** BenGoldberg left [11:14] *** aborazmeh joined [11:14] *** aborazmeh left [11:14] *** aborazmeh joined [11:17] *** jmerelo left [11:19] *** cpan-raku left [11:21] *** cpan-raku joined [11:21] *** cpan-raku left [11:21] *** cpan-raku joined [11:41] *** MasterDuke left [11:42] *** leont joined [11:48] *** frot-lab left [11:53] *** MasterDuke joined [12:01] *** maettu joined [12:12] *** domidumont joined [12:14] *** jmerelo joined [12:14] *** pecastro joined [12:16] *** MasterDuke left [12:17] *** andinus joined [12:29] *** aborazmeh left [12:31] *** aborazmeh joined [12:31] *** aborazmeh left [12:31] *** aborazmeh joined [12:34] *** JJAtria[m]1 left [12:34] *** matiaslina left [12:34] *** kiti_nomad[m] left [12:34] *** suzusime[m] left [12:34] *** unclechu left [12:34] *** AlexDaniel` left [12:34] *** ThaEwat left [12:34] *** CIAvash left [12:39] *** AlexDaniel` joined [12:45] *** unclechu joined [12:45] *** ThaEwat joined [12:46] *** kiti_nomad[m] joined [12:46] *** CIAvash joined [12:46] *** matiaslina joined [12:46] *** JJAtria[m] joined [12:46] *** suzusime[m] joined [12:46] *** aborazmeh left [12:49] *** aborazmeh joined [12:49] *** aborazmeh left [12:49] *** aborazmeh joined [12:50] *** jmerelo left [12:54] *** maettu left [13:03] *** Kaeipi joined [13:03] *** suzusime[m] left [13:03] *** CIAvash left [13:03] *** Kaiepi left [13:03] *** finsternis left [13:03] *** m_athias left [13:03] *** hoelzro left [13:03] *** bisectable6 left [13:03] *** tellable6 left [13:03] *** sourceable6 left [13:03] *** statisfiable6 left [13:04] *** committable6 left [13:04] *** quotable6 left [13:04] *** evalable6 left [13:04] *** nativecallable6 left [13:04] *** linkable6 left [13:04] *** notable6 left [13:04] *** benchable6 left [13:04] *** Altreus left [13:04] *** timlegge left [13:04] *** m_athias joined [13:05] *** CIAvash joined [13:09] *** suzusime[m] joined [13:09] *** finsternis joined [13:09] *** hoelzro joined [13:09] *** bisectable6 joined [13:09] *** tellable6 joined [13:09] *** sourceable6 joined [13:09] *** statisfiable6 joined [13:09] *** committable6 joined [13:09] *** quotable6 joined [13:09] *** evalable6 joined [13:09] *** nativecallable6 joined [13:09] *** linkable6 joined [13:09] *** notable6 joined [13:09] *** benchable6 joined [13:09] *** Altreus joined [13:09] *** timlegge joined [13:09] *** suzusime[m] left [13:09] *** suzusime[m] joined [13:15] *** holli__ joined [13:17] *** jmerelo joined [13:23] *** MasterDuke joined [13:23] is there a regex flag to return a copy when applying to an immutable string? [13:23] you use S instead of s [13:24] big S returns me a string of 'False' timotimo [13:24] `CATCH { template 'templates/error.crotmp', $_.message ~~ s:g/"\n"/"
"/ }` [13:25] m: say S/lmao/roflmao/ given "hellmao" [13:25] rakudo-moar 85847d2f1: OUTPUT: «helroflmao␤» [13:25] you need to use it a bit differently from s/// [13:25] ahh [13:26] *** domidumont left [13:26] timotimo: thanks, works :D [13:28] *** gordonfish left [13:32] *** nige left [13:36] *** nige joined [13:40] *** Altai-man joined [13:40] *** domidumont joined [13:42] *** |Sno| left [13:42] *** sena_kun left [13:44] *** sno joined [13:49] *** wamba left [13:49] *** skids joined [13:56] *** holli__ left [13:57] *** BenGoldberg joined [13:57] *** pecastro left [13:58] *** maettu joined [14:27] *** Sgeo joined [14:27] *** silug left [14:31] *** BenGoldberg left [14:34] *** MasterDuke left [14:42] ¦ Raku-Steering-Council/main: 97030f054d | (Elizabeth Mattijsen)++ | announcements/20200907.md [14:42] ¦ Raku-Steering-Council/main: Add announcement of Vadim Belman joining [14:42] ¦ Raku-Steering-Council/main: review: https://github.com/Raku/Raku-Steering-Council/commit/97030f054d [14:46] *** MasterDuke joined [15:00] Is there a point in setting the type of a constant variable? [15:05] rypervenche: what do you mean by "constant variable"? [15:06] A variable set with the "constant" prefix. [15:06] we call that a constant, not a variable :-) [15:06] Touché :X [15:07] well, you can always use the type annotation to communicate with the reader of the program [15:07] m: constant Int A = "foo" [15:07] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Missing initializer on constant declaration␤at :1␤------> 3constant Int7⏏5 A = "foo"␤» [15:07] m: constant Int $a = "foo" [15:07] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Missing initializer on constant declaration␤at :1␤------> 3constant Int7⏏5 $a = "foo"␤» [15:07] oh [15:07] you cannot even [15:07] apparently :-) [15:07] In the scripts that I've looked at, I usually see people not setting a constant's type. I was just curious if that was a personal choice or if there was maybe a reason one doesn't need to. [15:08] rypervenche: if a type were allowed, it would cause a compile-time check [15:08] m: my Int $a := BEGIN "foo" [15:08] rakudo-moar 85847d2f1: OUTPUT: «Type check failed in binding; expected Int but got Str ("foo")␤ in block at line 1␤␤» [15:08] hmmm... that's runtime :-) [15:09] <[Coke]> "as soon as possible (maybe sooner later)" [15:09] Ⓜ my Int constant $a := 1; say $; [15:09] gah, emoji plugin... [15:10] m: my Int constant $a := 1; say $; [15:10] rakudo-moar 85847d2f1: OUTPUT: «(Any)␤» [15:10] m: my Int constant $a := 1; say $a; [15:10] rakudo-moar 85847d2f1: OUTPUT: «1␤» [15:10] m: my Int constant $a = "foo" [15:10] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Type check failed in constant declaration of $a; expected Int but got Str ("foo")␤at :1␤------> 3my Int constant $a = "foo"7⏏5␤» [15:12] Ok, so perhaps if I were doing some operation that *could* result in a type that I'm not expecting when setting my constant, I might want to use that. Otherwise, if I'm simply setting a constant to a value, I wouldn't need/want the type check then, yes? [15:13] *** maettu left [15:17] correct [15:18] m: constant A = 42; sub f(Str $x) { }; if False { f(A) } # checking if the compiler is smart enough to catch that [15:18] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Calling f(Int) will never work with declared signature (Str $x)␤at :1␤------> 3t A = 42; sub f(Str $x) { }; if False { 7⏏5f(A) } # checking if the compiler is sma␤» [15:22] Thanks. I'm always looking to have good standards for myself and not do anything unnecessary or redundant. [15:45] *** jmerelo left [15:52] *** [Coke] left [15:57] *** holli__ joined [15:58] *** [Coke] joined [15:59] *** mowcat joined [16:01] *** gordonfish joined [16:17] *** molaf joined [16:19] *** kensanata left [16:23] *** aborazmeh left [16:28] *** maggotbrain left [16:29] *** maggotbrain joined [16:33] *** mowcat left [16:34] *** dakkar left [16:50] *** bdju left [16:50] *** bdju joined [16:51] *** domidumont left [16:55] *** bdju left [16:56] *** bdju joined [16:57] *** pecastro joined [17:03] *** approaching236 joined [17:12] *** wamba joined [17:22] *** BenGoldberg joined [17:35] *** Doc_Holliwould joined [17:36] New module released to CPAN! Math::Libgsl::Histogram (0.0.1) by 03FRITH [17:38] *** holli__ left [17:38] *** jmerelo joined [17:41] *** sena_kun joined [17:43] *** Altai-man left [17:57] *** BenGoldberg left [18:08] *** orinthe left [18:09] *** orinthe joined [18:15] *** aluaces left [18:23] *** Black_Ribbon joined [18:24] *** mowcat joined [18:27] *** wamba left [18:29] *** orinthe left [18:30] *** orinthe joined [18:37] *** orinthe left [18:43] *** orinthe joined [18:55] *** jmerelo left [18:55] kawaii: Did you consider to use Shell::Piping? I'm asking because your problems sound strangly familiar and I believe to have covered them all in that module. [19:03] *** wamba joined [19:12] *** vrurg left [19:17] *** MasterDuke left [19:24] *** vrurg joined [19:29] *** Zero_Dogg left [19:36] *** aluaces joined [19:43] *** Zero_Dogg joined [19:59] *** rindolf left [20:05] *** vrurg left [20:07] *** vrurg joined [20:18] *** sena_kun left [20:19] *** vrurg left [20:19] *** vrurg joined [20:30] *** Sgeo_ joined [20:31] *** orinthe8 joined [20:31] *** oodani left [20:31] *** colomon__ joined [20:31] *** colomon_ left [20:31] *** cooper left [20:31] *** oodani joined [20:32] *** andinus` joined [20:32] *** cooper joined [20:32] *** andinus left [20:33] *** orinthe left [20:33] *** Sgeo left [20:33] *** orinthe8 is now known as orinthe [20:45] *** wamba left [20:48] *** BenGoldberg joined [20:50] *** patrickb joined [20:51] m: enum RPS < rock paper scissors >; say 'rock' ~~ RPS; # Should this work, or is my syntax wrong? [20:51] rakudo-moar 85847d2f1: OUTPUT: «False␤» [20:53] m: enum RPS < rock paper scissors >; say rock ~~ RPS [20:53] rakudo-moar 85847d2f1: OUTPUT: «True␤» [20:53] rypervenche: ^^ that's how it works [20:54] and if you want to look up an enum element by name, you can do it like this: [20:54] m: enum RPS < rock paper scissors >; say RPS::.^name [20:54] rakudo-moar 85847d2f1: OUTPUT: «RPS␤» [20:56] *** nige left [20:57] moritz: Hmmm, how might I test a string given to me to see if it matches an enum then? (My first time using enums :P ) [20:57] For example, if I do something like: my $var = get; [20:59] m: enum RPS; my $good = "rock"; my $bad = "granite"; say RPS::{$good}; say RPS::{$bad}; [20:59] rakudo-moar 85847d2f1: OUTPUT: «rock␤(Any)␤» [21:00] Ahhhh, thanks. [21:00] x is generally shorthand for x{"y"} [21:04] *** MasterDuke joined [21:12] *** pecastro left [21:12] *** skids left [21:12] *** mtj_ left [21:13] *** pecastro joined [21:22] *** BenGoldberg left [22:06] *** bocaneri left [22:09] *** maggotbrain left [22:09] *** bocaneri joined [22:10] *** maggotbrain joined [22:27] *** patrickb left [22:30] *** patrickb joined [22:51] *** patrickb left [22:57] *** leont left [23:04] *** codesections joined [23:05] o/ [23:05] 2020-10-05T20:08:06Z #raku codesections is it ok to use yr raku.sublime-text syntax code? if so, what should attribution be? would it be ok to use in PR to Zola? [23:12] *** leont joined [23:14] *** skids joined [23:14] .tell tbrowder Oh, I should probably have noted in the file: that code is forked from https://github.com/silentTee/sublimetext3-perl6-syntax [23:14] codesections, I'll pass your message to tbrowder [23:15] .tell tbrowder that code is under an MIT license, so using it should be fine (and using the minor alterations I made is also fine) [23:15] codesections, I'll pass your message to tbrowder [23:16] codesections: got it, thnx! [23:26] *** pecastro left [23:38] *** sftp left [23:44] *** BenGoldberg joined [23:48] *** BenGoldberg left [23:48] *** Ben_Goldberg joined [23:48] *** Ben_Goldberg is now known as BenGoldberg