🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
SmokeMachine Doesn’t `provides` accept version? I’ve been trying to do something like this: glot.io/snippets/gbh2j9z1kp 01:15
I’d live to provide many versions of the same file/class/module… 01:17
Xliff Today marks the 750,000 line of raku code amongst all of my projects. 08:12
Xliff Coming soon if I can ever get reasonable user interraction added to CURI. 08:13
jaguart @ugexe - you answered the question I was just thinking! mind-reader :o 11:42
Xliff .tell pmurias Hey there! Nice to see you around. Hope to catch up to you in the future! 11:51
tellable6 Xliff, I'll pass your message to pmurias
p6steve anton: yeah, the raku Jupyter kernel has become a bit flaky - if this happens you just need to click Kernel restart and clear all output in the menu 12:31
anton: or you can load Jupyter locally (see this Dockefile for the steps github.com/p6steve/raku-Dan-Jupyte...ockerfile) 12:49
anton: or you can just ```docker run p6steve/raku-dan:pandas-2022.02-amd64``` (or -arm64) if you want the Inline::Python etc without the Jupyter 12:50
```docker run -it p6steve/raku-dan:pandas-2022.02-amd64``` 12:53
Nemokosch docs.raku.org/language/enumeration 14:25
I'm pretty sure the code is wrong
About the way it is trying to use $dirs
guifa what would be a good escape string for calling other regex / methods in ECMA syntax (ala <foo> in Raku regex) 14:26
I *think* I can do (?<foo>)
Xliff Are Raku's macros mature enough to emit a set of need() statements inside of a given scope? 14:49
I would like to make a set of needs reusable.
So I don't have to keep typing them all over and over again. :)
Nemokosch: Howso? $dirs should just be a list of '/tmp', '/' and '~/tmp' 14:51
tellable6 Xliff, I'll pass your message to Nemokosch
Nemokosch 1. this is a scalar assignment so the last two values are dropped right away 15:42
2. If this weren't the case, $dirs would still iterate as one element
Xliff m: my $dirs = '/tmp', '/', '~/tmp'; $dirs.^name.say 15:55
camelia WARNINGS for <tmp>:
Str
Useless use of constant string "~/tmp" in sink context (lines 1, 1)
Useless use of constant string "/" in sink context (lines 1, 1)
Xliff m: my @dirs = '/tmp', '/', '~/tmp'; $dirs.^name.say
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$dirs' is not declared. Did you mean any of these: '@dirs',
'&dir'?
at <tmp>:1
------> my @dirs = '/tmp', '/', '~/tmp'; ⏏$dirs.^name.say
Xliff m: my @dirs = '/tmp', '/', '~/tmp'; @dirs.gist.say
camelia [/tmp / ~/tmp]
Xliff Scalar assignment should be able to take a List. 15:56
Huh! You might have a point. 15:57
So maybe better written as...
m: my $dirs = </tmp / ~/tmp>; $dirs.gist.say 15:58
camelia (/tmp / ~/tmp)
Nemokosch It can, if you put the parens around. But still, #2 applies: it will iterate as one element that contains the whole list.
Xliff m: my $dirs = </tmp / ~/tmp>; .say for $dirs;
camelia (/tmp / ~/tmp)
Xliff m: my $dirs = </tmp / ~/tmp>; .say for $dirs[];
camelia /tmp
/
~/tmp
Xliff So those 2 changes.
Which is the same as... 15:59
m: my $dirs = </tmp / ~/tmp>; .say for $dirs.List
camelia /tmp
/
~/tmp
Geth doc: 67b76cf554 | Xliff++ (committed using GitHub Web editor) | doc/Language/enumeration.pod6
Fixes assignment and iteration issues arising from the use of $dirs

Now changed to @dirs and a proper list assignment, which is more accessible to beginners.
16:03
linkable6 Link: docs.raku.org/language/enumeration
p6steve anyone know best way to return a CArray via NativeCall? (the docs say a lot about calling with a CArray as param) 16:46
p6steve right now I am trying via a callback ```sub se_get_data(SeriesC, &callback (CArray[num64] --> CArray[num64])) is native($n-path) { * }``` 16:47
this gets me this ```NativeCall::Types::CArray[num64].new 16:48
Array @da = [NativeCall::Types::CArray[num64].new]
```
but ```@da[0]``` => Any ;-( 16:49
Xliff p6steve: Are you trying to return the CArray in the callback? Is the callback in C or Raku? 17:04
Is there any code? 17:05
p6steve Xliff: there is quite a lot of code - don't worry for now, I will MRE and put on SO - appreciate the quick reply 18:03
coleman The devops folks who run the infra for the website: do you all have your own IRC channel? 18:14
the docs website, I mean.
tonyo guifa: I'm getting ready to revamp fez's packaging so it's consistent across platforms and doesn't really on external tar or gzip but need to find the time to work on some compression library 20:38
guifa working in NQP-Grammar world 20:54
how can I match against the contents of a variable?
if I just have token foo { $*blah } I get an error that INTERPOLATE isn't available
guifa m: use nqp; say QAST::WVal 21:09
camelia Could not find symbol '&WVal' in 'GLOBAL::QAST'
in block <unit> at <tmp> line 1
guifa ^^ is this new ? 21:10
guifa ah use nqp; use QAST:from<NQP>; 21:12
guifa grr nqp world is being annoying haha 21:21
guifa ah, there's a bunch of special work that needs to be done to return anything code like 21:43
boo
tonyo guifa: what are you writing? 23:34
SmokeMachine m: gist.github.com/FCO/9111d1d7a5149f...2232c2764e 23:37
camelia ===SORRY!=== Error while compiling <tmp>
Confused
at <tmp>:2
------> "name":⏏ "TestVersions",
expecting any of:
colon pair
SmokeMachine m: gist.github.com/FCO/9111d1d7a5149f...2232c2764e
camelia ===SORRY!=== Error while compiling <tmp>
Confused
at <tmp>:2
------> "name":⏏ "TestVersions",
expecting any of:
colon pair
SmokeMachine should something like this work? How should I do this? usercontent.irccloud-cdn.com/file/.../image.png 23:42
I'm trying to think a good way of doing migrations... 23:43