🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
[Coke] I like the idea of a themed advent instead of 25 separate articles 00:04
00:11 swaggboi left
tbrowder__ yes! 00:13
(maybe, if broad enough) 00:14
00:18 lichtkind left 00:26 swaggboi joined
tbrowder__ what them ya thinkin of, LLM? also, we're running out of time... 00:28
to herd cats
antononcube Well, I am definitely doing LLM if succeed making an Advent article. 00:34
Geth ¦ raku.org: coke assigned to dontlaugh Issue add -dev site like for docs github.com/Raku/raku.org/issues/218 00:36
01:36 derpydoo joined 01:57 dogbert17 left, dogbert17 joined 02:13 kylese left 02:14 kylese joined
SmokeMachine m: gist.github.com/FCO/076855906b0af9...cddea9a52c 02:20
camelia ( no output )
02:27 dbonnafo_ left 02:35 dbonnafo joined 02:42 hythm joined
Geth ecosystem: dankogai++ created pull request #627:
rename branch from master to main
03:36 edr left 03:45 TieUpYourCamel left 03:46 TieUpYourCamel joined 04:05 derpydoo left 04:26 hythm left 04:47 japhb left 04:51 japhb joined 06:01 arkiuat joined
arkiuat I've been trying to figure out how to set up the same kind of behavior as the perl5 empty diamond operator (reading from files on command-line, if any, or STDIN if not). Learned a lot about sub MAIN and command-line arg processing, but not yet what I set out for. 06:11
oh, sorry, that's probably more appropriate for #raku-beginner 06:16
06:26 dogbert11 joined 06:29 dogbert17 left
Geth ecosystem/main: aa73b4a6e7 | (Dan Kogai)++ | META.list
rename branch from master to main
ecosystem/main: c4bb0a1c61 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #627 from dankogai/main

rename branch from master to main
06:39 xinming left 06:48 jtza8 joined, jtza8 left, jtza8 joined
ab5tract_ SmokeMachine: I’ve neglected to mention that I liked your presentation. Interesting stuff! I’m very curious about what you will come up with next :) 07:27
arkiuat: it’s a fine question for here as well. Can you share what you’ve come up with so far? 07:28
SmokeMachine ab5tract_: thank you very much. :) 07:33
07:36 jrjsmrtn left 07:37 perlbot left 07:38 perlbot joined 07:39 jrjsmrtn joined 07:46 abraxxa joined 07:52 dbonnafo left
SmokeMachine arkiuat: maybe you are searching for something like this? 08:04
m: sub MAIN($file = "-") { .say for $file.IO.lines }
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
08:13 abraxxa left 08:36 jtza8 left
nemokosch 🤣 08:43
arkiuat SmokeMachine, thank you. That works beautifully. I'd forgotten about the special - filename. 08:56
SmokeMachine :)
arkiuat ab5tract_ I'd been messing around with something like sub MAIN (:$f) { given $f { when Str { .say $f.IO.lines }; when Bool { .say $*IN.IO.lines if $f } } } thinking that a -f flag without a filename ought to make it read standard input 09:00
09:05 Sgeo left
patrickb Hi! Is there some convention which filename and format to use for a raku module changelog file? 09:08
A quick search revealed: metacpan.org/dist/CPAN-Changes/vie...s/Spec.pod and keepachangelog.com/ 09:09
They are sadly .... not the same thing.
09:09 jpn joined
lizmat patrickb: as I use App::Mi6, I follow whatever that uses :-) 09:14
tellable6 2023-11-09T21:10:38Z #raku-dev <vrurg> lizmat The only method is nqp::findmethod(HLL::Compiler, 'PERFOR-CHECL').(self). See command_eval in src/Perl6/Compiler.nqp.
arkiuat ab5tract_ left out the "for"s while typing. Should've pasted it 09:17
and it turns out that version even works when a filename is provided, once I finished correcting the last of my syntax errors. But the second when clause still doesn't work (because I don't yet understand how raku refers to STDIN internally yet, I guess), and using the - filename is much nicer anyway 09:21
patrickb lizmat: The App::Mi6 changelog looks like CPAN::Changes::Spec. I guess that's what I should go with now. Sooner or later we as a community should make a recommendation and doc it. 09:23
09:27 lichtkind joined 09:32 jtza8 joined 09:56 sena_kun joined 10:24 sena_kun left 10:32 bdju left 10:33 bdju joined 10:40 arkiuat left 11:46 teatwo left, teatwo joined 11:48 teatwo left, teatwo joined 11:49 dbonnafo joined 11:53 dbonnafo left
gfldex lolibloggedalittle: gfldex.wordpress.com/2023/11/10/mi...tuousness/ 12:44
tellable6 2023-10-29T02:15:00Z #raku <Xliff> gfldex That usually stems from when you try to serialize an object that isn't a @, % or Cool-based $
2023-10-29T02:15:46Z #raku <Xliff> gfldex You'll get that if you do something like: "unit package A; class B { has $.c }; our $c; BEGIN $c = B.new"
2023-10-29T02:16:38Z #raku <Xliff> gfldex That also extends to the contents of any @ or % value you are trying to cache at BEGIN time.
gfldex SmokeMachine: please note ^^^
13:05 edr joined 13:16 derpydoo joined 13:36 tbrowder__ left, tbrowder__ joined 13:42 mtj left, mtj joined 14:01 kjp left 14:22 jtza8 left 14:34 AlexDaniel joined 14:35 kjp joined 14:37 tbrowder_ left, tbrowder_ joined 14:41 xkr47 left 14:42 xkr47 joined
codesections I'm having trouble detecting a Mu value in NQP. nqp::isnull and nqp::isnull_s both return 0, but dump throws an error saying it's a VMNull. What am I missing here? 14:56
I'm trying to fix github.com/Raku/nqp/blob/b0bbc4d57...#L612-L619 14:57
which is currently calls tryfindmethod on Mu (i.e., unset) action objects 14:58
15:04 dustinm`_ left 15:05 dustinm` joined
codesections oops, ^^^ was intended for #raku-dev (though feel free to answer if you know :D ) 15:11
15:15 Sgeo joined
tonyo are you just looking for nqp::what($a) ? 15:16
codesections Maybe? I tried that, but still couldn't find a way to use it to detect a Mu 15:17
tonyo you're looking for the equiv of if Mu ~~ $a ?
codesections nqp::isnull(nqp::what($a)) still returns 0 for Mu 15:18
tonyo m: use nqp; my Mu $a; say nqp::who($a) eq 'Mu' 15:19
camelia True
codesections Yeah; something that returns True (or 1, I guess in NQP) for Mu 15:20
Oh, I thought that'd be too hacky :D
But maybe that's just how nqp rolls?
tonyo wonder what ~~ does for type checks under the hood 15:21
i'd figured it'd be nqp::who($something) eq nqp::who(Mu) 15:22
ugexe github.com/rakudo/rakudo/blob/a9da...od#L37-L44
checking for a string Mu is done in at least one other spot it looks like 15:23
lib/NativeCall.rakumod: if $r.returns.^name ne 'Mu' && !validnctype($r.returns) { # another one 15:24
although that one is from a module, not from core 15:25
tonyo github.com/Raku/nqp/blob/b0bbc4d57...lass.t#L29 15:27
looks like it might just be .isa
codesections but everything isa Mu, right? 15:28
tonyo only eventually 15:29
m: use nqp; my Mu $a = Nil; my Int $b; say nqp::callmethod(Mu, "isa", $a); say nqp::callmethod(Mu, "isa", $b)
camelia True
tonyo depends on what order you ask
a pebble is a rock but a rock is not necessarily a pebble
ugexe m: my int $a; say $a.^name; # why does ^name turn e.g. int to Int? 15:30
camelia Int
codesections I think because int doesn't have a HOW, so $a.HOW($a, name) auto-upgrades to an Int 15:32
ugexe m: my uint $a; my UInt $b; say $a.^name; say $b.^name 15:33
camelia Int
15:43 kjp left
tonyo oh yea, there was a bug with uint coercing from a long time ago 15:47
15:50 dbonnafo joined 15:55 dbonnafo left
codesections Hmm, neither of the ideas above seem to work either :( 15:55
nqp::callmethod(Mu, "isa", $a) returns 0 15:56
and nqp::who($actions) eq nqp::who(Mu) throws Cannot stringify object of type BOOTHash
16:07 kjp joined
codesections nqp::who($actions) eq 'Mu' works, though 16:14
I _guess_ I'll go with that, even though I feel slightly dirty having a hardcoded string there 16:15
16:22 derpydoo left 16:37 dogbert17 joined 16:39 dogbert11 left 17:11 irth left, irth joined
codesections Oh, wait, I shouldn't have been using nqp::callmethod with "isa" – I should've used nqp::istype(Mu, $a) 17:18
I think that might work
17:27 derpydoo joined 17:40 TieUpYourCamel left 18:03 dbonnafo joined 18:11 dbonnafo left, dbonnafo joined 18:23 dbonnafo left
[Coke] int isn't an object, so if you do object stuff to it, it has to upgrade it. 18:37
18:43 sena_kun joined 19:02 dbonnafo joined 19:16 dbonnafo_ joined 19:19 dbonnafo left 19:24 jpn left 19:34 MasterDuke joined 19:41 TieUpYourCamel joined 19:54 jpn joined 20:45 jpn left
thebb www.youtube.com/watch?v=XZ3w_jec1v8 21:07
[Coke] context, before we click on it? 21:12
thebb "The Economics of Programming Languages", talks about programming environments and how money flows impact them (corporate vs open source) 21:19
librasteve m: say dd <6_1/2> 21:54
evalable6 RatStr.new(30.5, "6_1/2")
Raku eval Nil RatStr.new(30.5, "6_1/2")
22:31 constxqt left 22:59 constxqt joined 23:07 constxqt left 23:15 slu left, slu joined 23:18 constxqt joined 23:32 constxqt left 23:37 derpydoo left 23:39 sena_kun left 23:43 constxqt joined 23:46 tea3po joined 23:50 teatwo left, constxqt left