[00:26] <falsifian> baughb: Another option: I recently used something like this: loop { my $line = get() || last; say "before: $line"; } (then keep calling get to get the rest of the lines)

[00:35] <falsifian> Nemokosch: filed the bug: https://github.com/rakudo/rakudo/issues/5119

[01:03] *** Kaipei left
[01:16] *** razetime joined
[01:52] *** deoac joined
[01:55] *** razetime_ joined
[01:56] *** razetime_ left
[01:56] *** razetime left
[02:26] *** deoac left
[02:50] <jaguart> looking for a phaser to initialise a class-level hash once - INIT{ %h = {...} } or TWEAK{ if not %h.elems } - any comment?

[02:53] <MasterDuke> can you just make it 'my' scoped?

[02:53] <guifa> ^^ if it's in the class, it'll only get run once

[02:54] <MasterDuke> m: class A { my %h = :1a, :2b; method foo($k) { say %h{$k} } }; my $a = A.new; $a.foo("b")     # like this

[02:54] <camelia> rakudo-moar d52342eb0: OUTPUT: «2␤»

[02:54] <guifa> m: class A { say "assigned!' and my %h = :1a, :2b; method foo($k) { say %h{$k} } }; my $a = A.new; my $b = A.new;

[02:55] <camelia> rakudo-moar d52342eb0: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Variable '$k' is not declared.  Perhaps you forgot a 'sub' if this was␤intended to be part of a signature?␤at <tmp>:1␤------> gned!' and my %h = :1a, :2b; method foo(⏏$k) { say %h{$k} } };…»

[02:55] <guifa> errr

[02:56] <MasterDuke> m: class A { say "assigned!" and my %h = :1a, :2b; method foo($k) { say %h{$k} } }; my $a = A.new; my $b = A.new;   # you had a quoting typo

[02:56] <camelia> rakudo-moar d52342eb0: OUTPUT: «assigned!␤»

[02:56] <jaguart> the hash is a shared lookup that is slow to initialise, and once initialised is read-only. I was thinking an out %h that gets initialised only once...

[02:56] <jaguart> um s/out/our/

[02:57] <guifa> You could do BEGIN my %h = ……; 

[02:57] <guifa> That would evaluate it at compile time

[03:02] <jaguart> thanks - actually the INIT phaser seems closer to where I want it

[03:02] <jaguart> and seems to work :)

[03:03] <guifa> The only difference between INIT and BEGIN is that BEGIN happens at compile time

[03:03] <guifa> and INIT happens at execution

[03:03] <guifa> class Foo { INIT my %h = … } and class Foo { my %h = … } shouldn't be noticeably different in speed, tbh.

[03:04] <jaguart> oh interesting - no phaser at all... will play with that too, thanks

[03:20] <jaguart> so that looks and feels nice - seems that my %h works as well as our %h and just doing the work in the assignment only gets executed when an instance is created. 

[03:20] <jaguart> as in only when the first instance is created

[03:25] *** razetime joined
[04:03] *** MasterDuke left
[04:59] *** Heptite left
[05:26] *** frost joined
[06:06] *** razetime left
[06:08] *** Kaipei joined
[06:13] *** frost left
[06:29] *** frost joined
[08:36] *** frost left
[09:08] *** dakkar joined
[11:05] *** Kaipei left
[12:04] *** Kaipei joined
[12:40] *** discord-raku-bot left
[12:40] *** discord-raku-bot joined
[12:43] *** razetime joined
[13:54] *** frost joined
[14:47] *** Heptite joined
[15:30] *** ToddAndMargo joined
[15:31] <ToddAndMargo> Where do I go to report this bug?  http://vpaste.net/bQpz1

[15:33] <discord-raku-bot> <Nemokosch> did you check how $?FILE works?

[15:40] <ToddAndMargo> It works perfectly.  You will notice that I leave the .bat file on the drive after I run it (new calls just overwrite it).  This is so I can test the bat independently of raku, if need be.   And yes, checking the .bat file was the first thing I did.   What is really annoying is on my W11 machine, I have ,pm6 set in my registry to open with

[15:40] <ToddAndMargo> notepad for easy editing.   qqx starts notepad and loads it with the source code of the module.  I use this sub a lot, so I decided to put it into a module and that is where this qx bug surfaces.  Where is the appropriate place for me to post this bug?

[15:44] <discord-raku-bot> <Nemokosch> It's just I'm not convinced if this is a bug in the first place

[15:45] <ToddAndMargo> run the code and see for yourself

[15:46] <discord-raku-bot> <Nemokosch> first off, what you are dealing with is a .pm6.bat file because you concatenate a path string and ".bat"

[15:47] <ToddAndMargo> take out the comment marks before the prints and watch the sub do its thing.  Keep in mind, the issue is running the sub from a module,  Directly inside your pl6

[15:48] <ToddAndMargo> that is what it is support to do.  It takes the name of the program and tacks .bat at the end.  THis gets me around the %temp% file problem

[15:49] <ToddAndMargo> Directly inside your pl6, it runs perfectly and have now for me for about two years

[15:49] *** discord-raku-bot left
[15:49] *** discord-raku-bot joined
[15:49] <ToddAndMargo> Directly inside your pl6, it runs perfectly and have now for me for about two years

[15:52] <ToddAndMargo> This the proper place?  https://github.com/rakudo/rakudo/issues/new

[15:54] <discord-raku-bot> <Nemokosch> don't forget that even if you compile it, the file path would be burned into the compiled module

[15:54] <discord-raku-bot> <Nemokosch> that part is intended

[16:00] <ToddAndMargo> >raku -e "use lib '.'; use RunCmdModule :RunCmd; say RunCmd(Q[ls]);

[16:00] <ToddAndMargo> K:\Windows\NtUtil\RunCmdModule.pm6 (RunCmdModule).bat

[16:00] <ToddAndMargo> ls

[16:01] <ToddAndMargo> there is nothing wrong with the .bat fiel name and path

[16:02] <ToddAndMargo> got to go for now.  Thank you for the help

[16:02] *** ToddAndMargo left
[17:04] *** dakkar left
[17:05] *** dakkar joined
[17:39] *** dakkar left
[18:05] *** razetime left
[19:28] *** jgaz joined
[21:20] *** NemokoschKiwi joined
[21:50] *** lizmat joined
[21:57] *** Kaiepi joined
[22:03] *** NemokoschKiwi left
[22:36] *** Kaiepi left
[22:37] *** Kaiepi joined
[23:07] <jaguart> Does anyone have any good resources for keeping raku up-to-date in production? e.g. like Debian's unattended-upgrades - and this for both raku and the installed modules?

[23:08] <jaguart> Would also be interested in approach to bootstrapping Raku on a reasonable number of Linux hosts (say 10 - 20) ala ansible, puppet etc

[23:08] <lizmat> just Raku, or also modules ?

[23:13] <jaguart> looking for both :)

[23:15] <lizmat> raku comes in various Linux packages

[23:15] <jaguart> So far my best experience has been using rakubrew

[23:15] <lizmat> https://nxadm.github.io/rakudo-pkg/

[23:16] <jaguart> Oh - that is nice :)

[23:16] <lizmat> and I guess one could create a distribution with all of the top level modules one would need, and then do a zef install that-dist --/test

[23:17] <jaguart> I remember we chatted about that before

[23:19] <lizmat> could well be  :-)

[23:20] <lizmat> I wonder whether we could automate making a "manifest" for a given program

[23:21] <lizmat> perhaps something with RAKUDO_MODULE_DEBUG tweaking

[23:21] <jaguart> Sounds like something that should be part of fez publication

[23:24] <lizmat> I was more thinking along the line of something similar to %*ENV<RAKUDO_PRECOMPILATION_PROGRESS> in core

[23:24] <lizmat> but instead it would take a filename to write all loaded modules to, and use that as a base to create a META6.json from

[23:27] <jaguart> META6.json needs to become RAKU.json and it would def be great to auto-generate the "depends": [...] entry

[23:28] <jaguart> or even RAKU.meta -> legacy META6.json, because then we could support #include directives etc

[23:29] <jaguart> and RAKU.meta -> RAKU.json enables a mix of manual and auto properties

[23:30] <jaguart> So a question on rakubrew - how to completely remove - is it as simple as ``rm -rf ~/.rakubrew`` - what about ~.raku?

[23:35] <lizmat> that is slightly more complicated  :-)

[23:35] <lizmat> ugexe might have more ideas

[23:37] <jaguart> the installation is beautifully documented :)

[23:38] * lizmat has never used rakubrew, so wouldn't know

[23:38] <jaguart> I assume you just use a single version of raku for everything on the host?

[23:41] <jaguart> ~/.raku looks like a mix of repl and zef things

[23:43] <lizmat> yeah...

[23:44] * lizmat calls it a day  :-)

[23:45] <jaguart> Thanks for the pointer to nxadm-pkgs/rakudo-pkg - I do search before asking, but never seem to find the good raku stuff - didnt know about raku.land until I asked here

