🦋 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:22 MasterDuke left 00:44 jpn joined 00:49 jpn left 01:05 teatwo left 02:13 sdomi left 02:21 hulk joined 02:23 kylese left 03:15 hulk left, kylese joined 03:33 epony left 03:34 epony joined 04:10 derpydoo left 04:27 epony left
Util m: { my @s = 1..2; for 1 { @s Z+= 5..6; }; say @s; } 05:33
camelia [6 8]
Util m: { my @s = 1..2; for 1 -> $j { @s Z+= 5..6; $++ }; say @s; }
camelia [6 8]
Util m: { my @s = 1..2; for 1 -> $j { @s Z+= 5..6; }; say @s; }
camelia [1 2]
Util [6 8] is the expected output. [1 2] is wrong. 05:34
Why would the effect of the Z+= operation be changed by the combination of binding the loop variable and not having a second line of code in the loop?
05:37 CIAvash joined 05:38 Vushu joined, Vushu left 06:03 jpn joined 06:07 jpn left 06:31 swaggboi left 07:25 oodani_ left 07:26 oodani joined 07:41 lucerne left 07:54 jpn joined 08:09 jpn left 08:19 Sgeo left 08:53 abraxxa joined 09:08 dakkar joined 09:09 mrlo joined 09:16 epony joined
librasteve m: my @s = 1..2; do { @s Z+= 5..6; }; say @s; 09:17
evalable6 [6 8]
Raku eval [6 8]
librasteve Util: it's a bug
suggest you file a bug report
09:26 sena_kun joined 10:18 Summer joined 10:23 jpn joined 11:09 jpn left
SmokeMachine lizmat: thanks for your suggestion on Configuration! 11:15
lizmat you're welcome!
SmokeMachine I agree that will be better to do that that way than needing to create an EXPORT function... 11:16
lizmat yeah, it wasn't until I was creating Slangify that I realized you can export an EXPORT sub 11:17
11:17 hudo__ left
SmokeMachine I have played with something like that when discussing about this module (raku.land/zef:elcaro/Exportable#addendum (not my module))... but I hadn't realised Configuration could be beneficed by that until you mentioned... thank you 11:22
is there any other suggestion? My intention there was to have ide completitions on configuration files... but I wasn't able to do that... it seems Comma will not autocomplete attributes/methods from the class I'm exporting... :( any idea? 11:25
lizmat work on Comma when it is open sourced ?
SmokeMachine lizmat: Thats a good suggestion... but I don't think I'll have time for that... :( 11:26
and I'm more inclined to write Raku on my free time than Java (Comma is written in java, right?) 11:27
lizmat I understand it's a mix of many things
SmokeMachine and current I think I'm going to spend some time on Configuration and on App::RakuCron... 11:28
and even not autocompleting, et least giving errors when calling wrong methods seem to be good enough for now... 11:29
11:50 CIAvash left 12:00 sena_kun left 12:03 sena_kun joined 12:09 jpn joined 12:17 jpn left 12:18 lucerne joined 12:19 jpn joined 12:30 jpn left, jpn joined 12:35 jpn left 12:42 jpn joined 12:46 jpn left 12:47 jpn joined
tbrowder__ m: use Test; class A { has UInt $.etype:}; my $o = A.new: :etype(100); is $o.etype, 100; 13:25
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> use Test; class A { has UInt $.etype:⏏}; my $o = A.new: :etype(100); is $o.ety
tbrowder__ m: use Test; class A { has UInt $.e }; my $o = A.new: :e(100); is $e, 100 13:28
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$e' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> UInt $.e }; my $o = A.new: :e(100); is ⏏$e, 100
tbrowder__ m: use Test; class A { has UInt $.e }; my $o = A.new: :e(100); is $o.e, 100; 13:32
camelia ok 1 -
14:25 abraxxa left 15:14 vlad joined 15:33 gabiruh joined 15:45 jpn left 15:50 jpn joined 16:03 kironia joined 16:14 kironia left 16:20 Summer left 16:27 El_Che left 16:29 El_Che joined 17:00 epony left 17:04 jpn left 17:09 epony joined 17:35 vlad left, vlad joined, dakkar left 17:49 derpydoo joined 17:51 human-blip left 17:53 human-blip joined
ugexe SmokeMachine: I use VSCode + Raku Navigator extension (marketplace.visualstudio.com/items...navigator) which does some of what you want 18:03
it doesn't work well for doing core work though - it gets confused at how to resolve the core files and whatnot 18:04
aruniecrisps @SmokeMachine I'm currently working on a tree-sitter implementation which you can kind of think of as just the syntax highlighting part of it: github.com/arunvickram/tree-sitter-raku. I also wanna see what I can do with raku-navigator 18:21
18:35 jpn joined 18:41 jpn left 18:45 epony left 19:26 jpn joined
leont SmokeMachine: that Exportable looks useful 19:27
SmokeMachine leont: I agree! Just to make it clear: that module is not mine. 19:29
ugexe: I have tested Raku Navigator with neovim... 19:30
19:30 jpn left
SmokeMachine aruniecrisps: that's interesting... 19:32
antononcube @ugexe I am using @bscan 's plugin to VS Code a lot via "Jupyter::Chatbook". 19:46
19:53 vlad left
bscan If anyone wants to improve on the Raku Navigator, I'd love pull requests. The Perl version does autocomplete on all imports, and I'm sure we could make it work in Raku as well. 19:59
aruniecrisps @bscan how exactly does the perl version get information for autocomplete on imports? 20:05
bscan For imported modules, it has a list of all modules available on the path and then is able to go-to-definition, display docs, etc. For implicitly imported functions, it's a bit trickier. It compiles the file using perl -c and then inspects the symbol table to see what was populated. 20:07
aruniecrisps Do you have a link to the code that does this? @bscan 20:14
bscan Sure. Here's the Raku version that compiles a file and dumps only the local symbols such as subs and variables (no imports) github.com/bscan/RakuNavigator/blo...gator.raku And here's the perl version that dumps local symbols and all imported functions. The structure is quite different, but similar concept. github.com/bscan/PerlNavigator/blo...uisitor.pm 20:17
aruniecrisps Looking at it I have a vague idea of how to go about it, but I'd have to figure out how to grab the package names and compile them and dump them in the current namespace 20:26
bscan For the Raku version, the script is entirely self-contained. Pipe in code over stdin and then get back a list of as many things as the script can figure out. If you can get package names, functions, or whatever else, let me know. I'm happy to help how I can. 20:31
20:33 jpn joined
aruniecrisps So wait if I were to just run cat test.raku > raku navigator.raku it would give me stuff? 20:35
20:38 jpn left
SmokeMachine lizmat: just committed your suggestion, thanks! 20:43
21:24 jpn joined 21:38 jpn left 21:50 jpn joined 22:10 DarthGandalf left 22:12 DarthGandalf joined
bscan Yes, exactly. All I need is that script to dump out a list of everything in the file, and then the language server sorts through it and exposes it to vscode for goto definition, autocompletion, etc. 22:17
22:24 itaipu left 22:25 jpn left 22:39 itaipu joined 22:44 gfldex left 23:06 xinming joined
aruniecrisps okay i'm gonna play around with this @bscan 23:18
23:31 gfldex joined