šŸ¦‹ 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.
00:00 reportable6 left 00:01 sena_kun left 00:02 reportable6 joined 00:12 abraxxa-home left
Geth doc: 057131fef5 | (Will Coleda)++ | xt/check-signatures.t
Fix error check

A successful run can still generate output to stderr, that's not a failure.
doc: coke self-assigned Remove 'Defined as:' github.com/Raku/doc/issues/4134
0779d68747 | (Will Coleda)++ | 112 files

Closes #4134
01:04 xinming left 01:06 xinming joined 01:15 lichtkind__ left
doc: 6d037720ad | (Will Coleda)++ | 2 files
fix routine declarations
01:38 linkable6 left 01:40 linkable6 joined
guifa okay I'm blanking but 01:40
01:42 Kaiepi left
guifa nm am idiot 01:44
Geth problem-solving: add472a844 | (Vadim Belman)++ | solutions/rakudo/Use-main-branch.md
Resolution for #298
problem-solving: e1a76d0ea0 | (Vadim Belman)++ (committed using GitHub Web editor) | solutions/rakudo/Use-main-branch.md
Merge pull request #356 from vrurg/issue_298

Resolution for issue 298
02:30 razetime joined 02:37 discord-raku-bot left, discord-raku-bot joined 02:40 razetime left
Geth doc: 94f2ae3c28 | (Will Coleda)++ | 4 files
pass check-signatures
03:02 euandreh left 03:04 euandreh joined 03:13 MasterDuke joined
lucs When I print $?FILE.IO.absolute from a module file, why does the module name get appended to the result, e.g., ļ½¢.../foo.rakumod (foo)ļ½£? 04:11
04:13 evalable6 left, linkable6 left 04:15 linkable6 joined, evalable6 joined
[Coke] (You can see it with just dd $?FILE - the IO and absolute don't change it) 04:32
04:34 razetime joined
lucs Well, I actually need the module's file name (to pass it to ļ½¢raku --doc the-module's-file-nameļ½£) 04:40
If you've got a minute, can you see if you get the same result as I do here?: 04:41
I'm using a directory of /tmp, because earlier, } 04:43
I'm using a directory of /tmp, because earlier I was placing my test files in /tmp, and there is so much stuff in there, that it took an eternity for the module to be found, and I thought the program was hanging. 04:44
A subdirectory, dammit I can't type. 04:45
Oh well, going to bed, I'll check back later. 04:55
05:30 holyghost joined 05:35 holyghost left 06:00 reportable6 left 06:02 reportable6 joined 06:27 Kaiepi joined 06:39 sarna left 07:10 hobbified joined
hobbified If I have a class with `has Int @.items is rw`, then I can `@.items = ()` in a method and it clears the array. With `has int @.items is rw` the same assignment throws "Cannot unbox a type object (Nil) to int". A) is that a bug? I'm not trying to nil an item, I'm trying to clear the whole array, and otherwise it seems to behave fine. B) is there something else I can do that won't error? 07:12
okay, found something while playing around: `@!items = ()` doesn't error. 07:19
xinming probably a bug, IMO, @.items = (); should work 07:27
when we have `has Int @.items is rw`; @.items = () should work.
08:10 evalable6 left, linkable6 left 08:11 evalable6 joined 08:13 linkable6 joined 08:30 euandreh left
hobbified it does work with Int, it doesn't work with int. 08:50
but yeah, I feel like it's a bug. But I'm not much of an expert :) 08:51
08:51 lichtkind__ joined
lizmat hobbified: feels like a bug, please make an issue :-) 08:59
09:04 ProperNoun left, ProperNoun joined
hobbified lizmat: where? 09:06
lizmat github.com/rakudo/rakudo/issues/new
hobbified okay, will do in the morning 09:07
lizmat ++hobbified 09:08
kjp I'm confusedā€”which happens frequently. Are you supposed to be able to access attributes using notation like @.items? Everything I can recall seeing in the documentation says the correct syntax is @!items. 09:11
09:11 Sgeo left, Sgeo_ joined 09:13 tejr left
lizmat $.foo is short for self.foo 09:15
hobbified or now, actually. github.com/rakudo/rakudo/issues/5126 09:16
lizmat @.foo is also short for self.foo, but expected to return a Positional
%.foo is also short for self.foo, but expected to return an Associative
kjp ^^
kjp Thanks 09:17
09:19 tejr joined
lizmat hobbified: is there a reason you used the @.foo version, instead of @!foo ? 09:19
as a workaround, @!items = () works ok 09:20
hobbified yeah, I noticed that. No, no specific reason. I'm new to this, and I wrote that, and it worked, until I typed it to int. :)
lizmat right, ok 09:22
meh, looks like defaults for native int arrays don't work either: 09:25
m: class A { has int @.a = 1,2 }; dd A.new.a
camelia array[int].new()
lizmat m: class A { has Int @.a = 1,2 }; dd A.new.a
camelia Array[Int @!a = Array[Int].new(1, 2)
lizmat m: class A { has int @.a = 1,2 }; use BUILDPLAN A 09:26
camelia class A BUILDPLAN:
0: nqp::getattr(obj,A,'@!a') = :$a if possible
1: nqp::getattr(obj,A,'@!a') = execute-code() if not set
lizmat I guess the "if not set" bit on native arrays is not working 09:27
09:32 sarna joined 09:52 sena_kun joined 10:03 jpn joined 10:32 Sgeo_ left 11:01 Kaiepi left
tbrowder [Coke]: i've tried to make a non-threaded version of aspell.t to see if i can get around the utf-8 error but not having much luck. i don't have time right now to spin up another *nix variant but it's real irritant. 11:05
Nemokosch It would be really good to get some crashcourse about Raku grammars as well, if there is anybody knowing it well enough and willing to explain 11:27
there seems to be demand for this kind of knowledge and not many people know this topic well
11:34 jpn left 11:35 discord-raku-bot left, discord-raku-bot joined 11:36 euandreh joined 11:40 euandreh left 11:42 euandreh1 joined 11:50 euandreh1 left
tbrowder can anyone help: i'm 11:58
geting make xtest errors from aspell.t when testing doc changes
12:00 reportable6 left
tbrowder i'm getting errors on both Debian and Ubuntu. if anyone is NOT getting those errors on any flavot of *nix (other that Mac OS) please tell me that flavor 12:00
of Linux
12:01 reportable6 joined 12:03 jpn joined 12:08 lichtkind_ joined 12:10 lichtkind__ left
Nemokosch what kind of errors are you getting? 12:33
12:35 jpn left
El_Che tbrowder: with tip? a released rakudo? 12:36
(rakudo-pkg builds on Debian and ubuntu and don't have the error)
Nemokosch how to even run named tests...
12:46 Kaiepi joined
lizmat you mean to run a specific spectest file ? 12:46
12:46 jpn joined 13:06 xinming left 13:07 xinming joined 13:08 jpn left
tbrowder see doc issue #4162 13:23
of the OSs i've tried (2), hosts (4), i get that error. 13:24
yes, a released rakudo on three of the hosts 13:25
but does the rakudo-pkg test the docs? 13:26
this occurs only in my clones of github.com/raku/doc.git 13:27
make xtest 13:28
on another topic: i have a module with, at the top: "use Text::Utils; enum FType <Index Sep Text>;" and i get a compile error something like: "symbol Text already defined". 13:31
lizmat does the module have module Text::Utils in it ? 13:32
does the module have "module Text::Utils" in it ?
tbrowder i thought you could use the same symbol for different object types.
lizmat an enum is a sorta class
well, the values of the enum are 13:33
tbrowder okay, makes sense. i'll change the enum. thnx
13:35 jpn joined
tbrowder but that doc make xtext error is weird. i've tried to make a non-threaded version of aspell.t but haven't yet had any luck 13:35
afk for a while... 13:37
FYI, [Coke]'s gonna ban me if i don't fix my doc testing and doc PRs 13:43
13:46 jpn left 13:48 jpn joined 13:52 euandreh joined 13:53 jpn left
lucs Problem with ļ½¢$?FILE.IO.absoluteļ½£? gist.github.com/lucs/f812bd3e70ea2...1cee4454f4 13:58
lizmat feels like it is getting something from a backtrace ? 14:02
14:06 jpn joined
SmokeMachine lizmat: Hi there! Can I have your opinion into something? 14:12
lizmat sure :-)
SmokeMachine lizmat: do you think this is better than my original post? gist.github.com/FCO/88c1ced4772f69...a81e65597b
(I didn't know how to end that...) 14:14
lizmat apart from some spello, looks tighter to me at first glance 14:15
SmokeMachine is it too small? 14:16
lizmat: thank you very much! I'll try to fix everything and replace the old one by this one 14:18
lizmat ok...
some spellos:
14:41 jpn left
lucs lizmat: So that IO.absolute problem, worth opening an issue? 14:41
lizmat yeah, feels like to me 14:42
lucs Okay, thanks.
ugexe $?FILE includes the module name on purpose. its how precompiled files know the module name along with its path or something like that. from this perspective $?FILE is a bad name or should have been considered an implementation detail 14:46
lizmat ah, ok... and that's why we see it in backtraces 14:47
so I had it backwards
wouldn't we be able to mix in a `.module` method into `$?FILE` ? which would return the module name (if any)? 14:48
hmmm... perhaps .name would be better
and perhaps also mix in .auth, .ver and .api as well ?
guifa gist.github.com/alabamenhu/7261845...fb4d945f58 14:49
I haven't edited day 2 yet, so it doesn't quite yet acknowledge day 1's existence, but comments on day 1 are appreciated
ugexe probably 14:52
lizmat s/Now he his two-item function/Now his two-item function 14:53
14:55 jpn joined
lizmat " In tomorrow's article" are you sure the articles will be published on consecutive days ? 14:55
s/even more safer manner/even more safe manner or even safer manner ?? or was that intentional ? 14:56
re "Elizabeth Mattijsen's 2014 Advent Calendar post " I was actually thinking of remastering that article this year 14:58
maybe I should :-)
guifa lizmat ty! 15:09
not sure they'd be on consecutive, I'll talk with JJ about that
lizmat oki
guifa but yeah, the article kind of ballooned, definitely needed two days for it 15:10
hopefully the length makes it easier to follow ā€”Ā I wanted to make sure that even folks without much Raku knowledge can follow and see some of the cooler features, without making it a "yeah I already know this" for mid-level experienced rakoons
15:37 jpn left 15:48 guifa left 15:49 guifa joined 15:57 mscha joined
mscha m: say &infix:<+>; # works, of course 15:59
camelia &infix:<+>
mscha m: my $oper = '+'; say &infix:Ā«$operĀ»; # does not work
camelia Use of uninitialized value $oper of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in code at <tmp> line 1
===SORRY!=== Error while compiling <tmp>
Undeclared rouā€¦
mscha :-(
m: BEGIN my $oper = '+'; say &infix:Ā«$operĀ»; # works, but is not helpful 16:01
camelia &infix:<+>
16:02 jpn joined 16:06 jpn left
lizmat m: my $oper = '+'; say "&infix:Ā«$operĀ»".EVAL; 16:07
camelia Use of uninitialized value $oper of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in code at <tmp> line 1
lizmat m: my $oper = '+'; say "&infix:Ā«$operĀ»";
camelia Use of uninitialized value $oper of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in code at <tmp> line 1
lizmat weird ? 16:08
mscha lizmat: looks like &infix:Ā«...Ā» is evaluated at compile time?
16:09 TieUpYourCamel left
lizmat m: my $oper = '+'; say '&infix:Ā«' ~ $oper ~ 'Ā»'; 16:12
camelia &infix:Ā«+Ā»
lizmat m: my $oper = '+'; say ('&infix:Ā«' ~ $oper ~ 'Ā»').EVAL
camelia &infix:<+>
lizmat m: my $oper = '+'; say qq:!c/&infix:Ā«$operĀ»/;
camelia Use of uninitialized value $oper of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in code at <tmp> line 1
lizmat m: my $oper = '+'; say qq:!f/&infix:Ā«$operĀ»/; 16:13
camelia &infix:Ā«+Ā»
lizmat ah, much better
m: my $oper = '+'; say qq:!f/&infix:Ā«$operĀ»/.EVAL;
camelia &infix:<+>
mscha Thanks, lizmat 16:14
16:14 sena_kun left
mscha Used in: github.com/mscha/aoc/blob/master/aoc2022/aoc11 16:17
lizmat that has a distinct jungle feel :-)
16:19 sena_kun joined 16:20 jpn joined 16:31 TieUpYourCamel joined 17:02 jpn left 17:29 jpn joined
mscha Quite a few Raku newbies in www.reddit.com/r/adventofcode/comm...solutions/ today! 17:31
lizmat nice! 17:34
17:41 razetime left
smol-hors oh yeah here's mine github.com/esnk86/aoc22/blob/main/11/main.raku 17:53
18:00 reportable6 left 18:02 reportable6 joined 18:06 jpn left 18:20 jpn joined 18:57 sena_kun left 19:00 sena_kun joined
hobbified github.com/arodland/Advent-of-Code.../master/11 19:27
(no grammars, no attempt at encapsulation. I tend to Q&D these. I only used a class at all because at a certain point it makes life easier :) 19:35
mscha I tend to use classes a _lot_ in my Raku AoC solutions, because they so quickly make life easier, and don't require any boilerplate. 19:39
hobbified I'm old school and I tend to buy into Raku and Perl's ability to sort of "stream-of-consciousness" program, so I just start out at file scope, read the input, make sure I know what I've got, accumulate it into whatever data structures seem right, go from there... and pretty shortly it's a solution 19:46
until things get complex enough that I need to put chunks into neat boxes to be able to keep focusing on the high-level
I one-lined day6 just for fun 19:48
lizmat :-) 19:55
20:00 evalable6 left, linkable6 left, linkable6 joined 20:01 evalable6 joined 20:13 Sgeo joined, jpn left 20:26 sena_kun left 20:40 squashable6 left, jpn joined, squashable6 joined 20:44 sena_kun joined 20:47 sena_kun left 20:58 mscha left 21:17 jpn left, deoac joined 21:44 jpn joined
lucs ugexe: "$?FILE includes the module name on purpose." Oh, hmm..., okay. I'll just have to strip it out for now I guess. 21:52
(Still feels like an issue to me though -- how do I get the absolute path to a file?) 22:03
22:10 deoac left 22:15 jpn left
[Coke] Yah, seems like a misfeature 22:22
22:28 jpn joined 22:37 deoac joined 22:40 jpn left 22:53 jpn joined
ugexe what even *is* the file? 23:01
usually its some precomp file thats being run, not the source code file
hobbified What *are* birds? We just don't know. 23:02
Nemokosch lol
[Coke] github.com/Raku/doc/issues/4162 - how to get the default values for race/hyper ? 23:04
23:07 lichtkind_ left, jpn left
Nemokosch what does that mean? 23:11
23:20 jpn joined 23:31 jpn left 23:43 deoac left 23:46 jpn joined 23:56 jpn left