🦋 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.
guifa .tell jmerelo I'll have my article converted and ready for posting within 24 hrs. Sorry things have been a bit crazy. In an absolute pinch, can grab them from gist.github.com/alabamenhu/7261845...fb4d945f58 but will need some light editing 03:10
tellable6 guifa, I'll pass your message to jmerelo
Geth ecosystem/main: a6c5d6bea2 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Moved to zef ecosystem
08:07
Voldenet that is a nice post raku-advent.blog/2022/12/20/sigils/ 15:56
Nemokosch codesections has arrived 16:00
Voldenet In apl when I see the symbol I don't know, I don't know how to google it 16:02
and I think that's beautiful :) 16:03
Nemokosch hot take: Raku's sigils *could* be great if they were backed up by (nearly) equally useful semantics
there was no Google in APL times and no APL in Google times 😛
Voldenet but APL is still alive! :D
Nemokosch or so they say 🤌 16:04
grondilu I have a module for which the dynamic variables might be useful. Example : 16:57
tellable6 2022-12-19T16:03:46Z #raku <melezhik> grondilu - I guess this is already fixed - ci.sparrowhub.io/report/2220 ?
grondilu m: package foo { our sub bar { $*bar } }; my $*bar = "bar"; say foo::bar
camelia bar
grondilu that works fine, but what if I need that at compile time? 16:58
m: package foo { our sub bar { $*bar } }; my $*bar = "bar"; BEGIN say foo::bar
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Dynamic variable $*bar not found
in sub bar at <tmp> line 1
in code at <tmp> line 1
grondilu here I get an error, which is understandable, but what about that :
m: package foo { our sub bar { $*bar } }; BEGIAN my $*bar = "bar"; BEGIN say foo::bar
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Dynamic variable $*bar not found
in sub bar at <tmp> line 1
in code at <tmp> line 1
grondilu why do I get that same error here too? $*bar was declared at compile time too, and before the call to foo::bar 16:59
spoiler: it's for github.com/grondilu/finite-fields-raku 17:00
I want to use it in github.com/grondilu/elliptic-curves-raku, and it works, but I have to set the $*modulus variable for each import. I tried to set it just once at the beginning, but it fails because further down there is a constant defined with a constructor calling the finite fields module. 17:03
thus the foo bar example above which replicates the problem, I think 17:04
oh wait there was a typo above 17:05
m: package foo { our sub bar { $*bar } }; BEGIN my $*bar = "bar"; BEGIN say foo::bar
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Dynamic variable $*bar not found
in code at <tmp> line 1
grondilu well, same
(kind of weird that it didn't complain about BEGIAN) 17:06
m: BEGIAN say "hi"
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared name:
BEGIAN used at line 1
Xliff \o 18:34
When I have the following line in code:
$O = try require ::($ot<name>) if $O ~~ Failure;
I get this error at COMPILE time; 18:35
===SORRY!===
lang-call cannot invoke object of type 'VMNull' belonging to no language
Is there something I am doing wrong?
Xliff m: try require::("NativeHelpers::Blob"); 18:35
camelia ( no output )
Xliff m: my $O = try require::("NativeHelpers::Blob"); say $O.^name
camelia Any
[Coke] Why ~~ Failure and not === Nil? 19:14
[Coke] github.com/coke/raku-zef-deps/blob...od#L87-L93 is what I ended up with 19:15
Geth rakubrew.org: 952e1a7381 | (Patrick Böker)++ | lib/Homepage.rakumod
Work around a severe memory leak

Also be faster.
19:26
[Coke] www.reddit.com/r/rakulang/comments...end_fails/ needs some jvm backend build help 20:12
tonyo m: package foo { our sub bar { $*bar } }; BEGIN { our $*bar = "bar"; say foo::bar }; # grondilu 20:16
camelia bar
Voldenet hmm 20:18
m: package foo { our sub bar { $*bar } }; BEGIN { my $*bar = "bar"; say foo::bar }
camelia bar
Voldenet doesn't matter if it's my/our
tonyo m: package foo { our sub bar { $*bar } }; BEGIN { our $*bar = "bar"; } BEGIN { say foo::bar }; 20:31
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> $*bar } }; BEGIN { our $*bar = "bar"; }⏏ BEGIN { say foo::bar };
expecting any of:
infix
tonyo m: package foo { our sub bar { $*bar } }; BEGIN { our $*bar = "bar"; }; BEGIN { say foo::bar };
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Dynamic variable $*bar not found
in sub bar at <tmp> line 1
in block at <tmp> line 1
tonyo less about my vs our and about multiple BEGINs breaking their assumption
Voldenet m: BEGIN my $x = 42; BEGIN say $x; 21:45
camelia 42
Voldenet It would be consistent if that also worked 21:46
m: BEGIN my $*x = 42; BEGIN say $*x;
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Dynamic variable $*x not found
in code at <tmp> line 1
Voldenet I suppose