🦋 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.
Geth doc/main: 1775237659 | (Will Coleda)++ | xt/braces.t
Ironically don't check Brackets file

Closes #4212
00:21
rf Found a decent workaround using state and a block 00:28
[Coke] folks, we're getting close to release; please review docs-dev.raku.org, feedback to #raku-doc or issues on raku/doc-website (or raku/doc for just content) 00:38
rf [Coke]++ 00:41
[Coke] do we something in the ecosystem that gives me a regex for URLs? 00:44
thought we had a regexp common or something alreasy but couldn't find it 00:48
ugexe URI module? 00:51
guifa would suggest Token::URI if anyone wants to make it haha 01:01
Geth doc/main: 01f0952ac9 | (Will Coleda)++ | doc/Language/traps.pod6
Partial revert of 542729c22027d95d623a2a6d6b478907666104a1

debug URL added?
found with updated links test.
02:33
doc/main: 68b3c2040a | (Will Coleda)++ | doc/Language/pod.pod6
Pass updated link test

URLs need to be L<>, not C<>
doc/main: 502a0e3ed0 | (Will Coleda)++ | 2 files
Examine pod directly instead of using pod2html
rf Anyone know how to get around Missing serialize REPR function for REPR MVMContext (BOOTContext), I fixed it once but I can't remember 02:50
Geth doc/main: 576063a7a7 | (Will Coleda)++ | 4 files
Remove more ™
03:11
[Coke] can we get raku/doc-website commits tracked here and in #raku-doc? 04:26
shmup [Coke]++ 04:31
[Coke] oh, right, I have the keys. Done. 04:37
Guest79 what is the command line to compile a raku code to JVM ? 08:55
$ cat t.raku
my $a =1;
say $a;
$ raku -target=jar -o t.jar t.raku
1
Use of Nil in string context
  in any print at gen/moar/stage2/NQPCORE.setting line 1594
this one generates a zero length jar file 08:56
Nemokosch I don't think you can compile to JVM 09:06
el wdym 09:09
Nemokosch What I just said, lol 09:10
el wdym by “cannot compile to jvm” raku can be compiled into jvm bytecode 09:25
Guest79 documentation explicitly says it can be done 09:28
Nemokosch I have asked it a while ago and found no sufficient evidence that it can 09:42
and checking out the so-called "JVM backend", that's mostly a bytecode interpreter running in JVM 09:43
it consumes QAST, like the other backends
so I'm curious now what the documentation says explicitly 09:44
Geth doc-website/main: a9d0ccaa2d | (Will Coleda)++ (committed using GitHub Web editor) | 3 files
add more ™ (#141)
09:48
Nemokosch remove more tm, add more tm... argh 09:49
on a different note: > gen/moar/stage2/NQPCORE.setting it says "moar" so I guess the compiler used was wrong (built with MoarVM, not JVM) 09:50
el so its not like clojure 09:53
also using java to interpret raku feels cursed lmao 09:54
Guest79 www.raku.org/compilers/ says: Rakudo runs on MoarVM and the Java Virtual Machine (JVM). 09:56
Nemokosch so from what I know, it's rather "it runs on something that runs on the Java Virtual Machine" 09:57
and hence saying that it runs in the JVM is a bit like saying for MoarVM that it runs natively, since MoarVM is written in C compiled to native code 09:58
NemokoschKiwi bartolin: are you around, good sir, by any chance? 10:01
Guest79 at least MoarVM could be written in Rust... this way Raku is just the good old Perl ... a newer language.. but... 10:02
does it run on WebAssembly ?
Nemokosch When MoarVM was started, there was no Rust around, basically 10:06
and also, I suppose the argument that the language barrier should be kept low, still stands 10:07
If your possible contributors don't know Rust, you end up with a "weird flex" situation
Also, the important difference is that it could be, indeed, written in Rust, while Perl couldn't, because Perl is fixated on providing a C ABI basically 10:08
oh I found this old issue, by the way github.com/Raku/old-issue-tracker/issues/5756 10:17
> The feature you're asking for does not exist at the moment. > > You can get the precompiled compilation unit of a Perl 6 program as a .jar with C<--target=jar>, but that doesn't help you, because it a compilation unit that can be understood by a Rakudo executable, not a jar file that can be understood by any JVM.
guifa definitely needs to make a flow chart for this number formatting. so many different options with random little bits of code 12:55
Geth ecosystem/main: 2bcb932eda | (Elizabeth Mattijsen)++ | META.list
Remove GTK::Simple

It now lives in the zef ecosystem
13:04
ab5tract guifa: which number formatting is this? 13:16
guifa ab5tract: Intl::Format::Number 13:17
I've got it currently supporting percent/permille with max/min int/frac digits
Currently working on adding support for scientific (aka exponential) number, which also mostly gets me significant digits for free
Currently working on adding support for scientific (aka exponential) number, which also mostly gets me significant digits for free 13:18
ab5tract nice! 13:22
guifa But piecing it all together is … interesting haha 13:26
i could make one mega sub but I'd rather optimize and hard code values where they can be, remove code that won't be used, etc 13:31
ab5tract guifa: torment the implementor :) 14:55
guifa oh absolutely 14:56
guifa I think what I'll ultimately do is spin off the number formatter code into a separate module, and then have the Intl::Format::Number just reference it 14:58
I could enable a bit more optimization by allowing people to make formatting options static (e.g. set the maximum digits once, and not allow any changes) 14:59
rf Morning 15:35
guifa o/ 15:43
cfa morning rf, guifa 15:53
Geth doc-website/alter_more_dropdown: 2730af21d1 | finanalyst++ | 2 files
remove extended search and error-report, add website issue reporting
15:57
Geth doc-website: finanalyst++ created pull request #142:
remove extended search and error-report, add website issue reporting
16:00
doc-website/main: 6d36781923 | (Richard Hainsworth)++ (committed using GitHub Web editor) | 2 files
remove extended search and error-report, add website issue reporting (#142)
16:01
Anton Antonov @guifa Just installed "Intl::Format::Number" without problems / complains on moar-2023.02 . 16:13
guifa yay! 16:14
I'm almost done with scientific numbers haha. I just have to write the digit loop the exponential (which honestly feels like overkill, I mean, how many people are going to have more than like 3 or 4 digits in it? But I'd rather not spit out an error because a number is too big) 16:15
Anton Antonov @guifa I haven't tried "Intl::Format::Number" itself yet. So, do not go into relaxation mode too much... 16:16
@guifa The package "Lingua::NumericWordForms" deals with cardinals (integers) only at this point. I have to make it deal with ordinals (e.g. "1st", "3rd", etc.) After that scientific numbers and percentages. 16:18
guifa Are you using CLDR to source those?
Word based formatting is my next thing -- only because it's also needed for handling some other non-numeric (but also non-digit) number formatting 16:19
(I just need to write the parser for RBNF "rule based number formats", which I had been waiting on RakuAST to do ha) 16:21
once I finish the Intl::Format::Number, though, i'm going to do Intl::Format::Currency and revisit Intl::Format::Unit, both of which will use the number formatting at their core. I'm scared to jump into date formatting LOL 16:23
Anton Antonov @guifa "Are you using CLDR to source those?" No, and I do not want to introduce a dependency to other packages in "Lingua::NumericWordForms". But I want "Lingua::NumericWordForms" to play nicely with "Intl::Format::Number". For example, "Intl::Format::Number" could used to "decorate" the results of "Lingua::NumericWordForms". 16:27
eseyman perl -E 'say chr(97)' 16:29
lizmat eseyman: why perl? 16:30
el is :: in the package name just a simple separator or is it actual namespace operator (like . in java packages)
lizmat it's a separator 16:31
el me when 16:32
Anton Antonov Probably this was discussed already -- I cannot do uploads with "fez:ver<40>" when using moar-2022.12 and moar-2023.02. Is "the cure" to edit ".gitignore" file(s) ? 16:39
rf Can you do union types in Raku, like my Foo | Bar $baz = f(); 16:42
el you can use where constraint for that 16:44
rf Yeah that's what I use right now, I thought maybe there was some subset magic or something I could do
lizmat or a subset:
m: subset StrInt where * ~~ Str | Int; my StrInt $baz = "foo"
camelia ( no output )
lizmat m: subset StrInt where * ~~ Str | Int; my StrInt $baz = 42 16:44
camelia ( no output )
lizmat m: subset StrInt where * ~~ Str | Int; my StrInt $baz = 42e0
camelia Type check failed in assignment to $baz; expected StrInt but got Num (42e0)
in block <unit> at <tmp> line 1
rf Makes sense cool 16:45
lizmat I guess it's just a matter of creating an anonymous subset to allow my Str | Int $a
but then we'd want to cache that somehow... 16:46
so I guess for now, being explicit is better :-)
Nemokosch It's the contrary - :: itself is a namespace 😛
lizmat ah?
guifa I guess they aren't true union types though, at least not inasmuch as how they work in C. (that would be cool, but I couldn't figure out how to play with the is-repr to maybe have two different types backed by, e.g., a list) 16:47
Anton Antonov Extraordinary claims require evidence!
Nemokosch For dist lookup, it's just an arbitrary sequence of characters I guess
lizmat indeed
dinner&
Nemokosch :: stands for .WHO
And by itself, for MY.WHO iirc 16:48
rf @Anton about your comments with fez upload, there are some issues with .gitignore make sure it doesn't have a ~ character or it blows up
el given raku's history of funny nonconformist names why doesn't it refer to the double colon as paamayim nekudotayim lmao 16:49
Anton Antonov @rf So, I gathered -- thanks! 16:51
Nemokosch fez really needs more testing...
With some mocked backend at least 16:52
rf Sounds like you just volunteered :)
Nemokosch Not until there is interest in taking those changes, which has been a serious problem 16:52
Geth ecosystem: zhouzhen1++ created pull request #616:
handover perl6-Inline-Scheme-Gambit to iynehz
17:04
guifa rf: also if you have a comment line. I submitted a PR to fix that bit, which tonyo said he'll integrate in once he's back from a trip 17:20
rf Yeah I fixed the ~ recently in a PR as well just not yet live 17:23
rf It would be neat to have a Perl humble bundle book sale 17:53
Perl+Raku of course.
shmup i bet you can make that happen 17:55
rf I think it's on the publishers to contact humble, but not sure. 17:56
shmup i'm sure it'd be something like that. i'm sure you'd have to first contact the publishers ;) 17:57
rf I'll look into it :^) 17:58
Nemokosch Humble bundle? So is that not game only? 18:09
rf They do programming book sales 18:10
lucs What can I expect to happen if I 'use' the same module more than once in a file? (I didn't find the answer in the docs, maybe I missed it...)
rf I think you may see some errors about functions overlapping 18:11
lucs I (kind of) accidentally did it, and it appears that my EXPORT sub is run again, but I'm not sure what else might be happening. 18:12
tonyo rf: guifa: just pushed your PRs as fez v41 (still not back, just had a few minutes) 18:25
tellable6 2023-02-18T21:53:19Z #raku <rf> tonyo Will do!
rf tonyo++ 18:26
Geth doc-website/revised_about_page: 7106290dd9 | finanalyst++ | Website/structure-sources/about.rakudoc
New about page
18:27
doc-website: finanalyst++ created pull request #143:
New about page
18:28
shmup rf: it'll be cool if someone publishes a raku book on no starch press 21:50
tellable6 shmup, I'll pass your message to rf