🦋 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,
reportable6 joined
00:07
jpn joined
00:09
freeside left
00:15
jpn left
00:18
rf joined
|
|||
rf | Evening, folks. | 00:19 | |
00:21
Nemokosch left
00:27
xinming left
00:28
xinming joined
00:29
jpn joined
|
|||
guifa | o/ | 00:32 | |
00:34
jpn left
00:39
freeside joined
00:43
freeside left
00:45
jpn joined
00:48
Manifest0 left
|
|||
pingu | /g says use :g but when I do it says unsupported modifier | 00:49 | |
00:50
jpn left
|
|||
rf | Show code | 00:50 | |
00:57
bigdata left
00:59
freeside joined
|
|||
pingu | ok | 01:01 | |
pastebin.com/p2u3tkfm | 01:03 | ||
01:03
xinming left
|
|||
rf | That is simply a syntax error, try $data ~~ :g /\r?\n/ | 01:04 | |
01:05
xinming joined
01:09
jpn joined
01:15
jpn left
|
|||
pingu | still isnt working | 01:18 | |
pastebin.com/A4WyYWGD | 01:19 | ||
if @data_ldr ~~ :g /\r?\n/ does : Missing block at C:\Users\kris\Desktop\CommaProjects\test\testing.raku:6 ------> if @data_ldr ~~ :g /\r<HERE>?\n/ | 01:21 | ||
rf | try m:g/blah blah. | 01:22 | |
pingu | that works on the short regex but if I do it here I get: Quantifier quantifies nothing at C:\Users\kris\Desktop\CommaProjects\test\testing.raku:6 ------> if (@data_ldr ~~ m:gmx /(?<HERE>P<color_codes>(?:\d+[ ]){13}\d+)[ ] (?P< | 01:27 | |
raku is probably better at handling the exeptions so ill just use the first (shorter) regex then | 01:29 | ||
01:30
jpn joined
|
|||
rf | I think there is a syntax error in your second regex, not because m:g | 01:31 | |
MasterDuke | (?:) i.e., a non-capturing group, is just [] in raku | 01:35 | |
01:38
jpn left
01:42
razetime joined
|
|||
pingu | ok how do I assign the data that the regex matches, so a variable? | 01:46 | |
rf | Captures, I recommend you read this whole thing docs.raku.org/language/regexes | 01:50 | |
01:50
jpn joined
|
|||
pingu | ah crud I forgot its just the built in $/ | 01:56 | |
01:58
jpn left
02:01
freeside left
|
|||
pingu | ok all this does is print the newlines lol. I wanted to print the newlines | 02:03 | |
02:03
ircuser left
|
|||
pingu | ok i got it thx bbl | 02:04 | |
02:04
ircuser joined
02:07
rf left
02:10
rf joined
02:13
jpn joined
02:18
jpn left
02:19
lichtkind left
|
|||
Geth | rakudoc/main: 744e7a2be2 | (Will Coleda)++ | 2 files Fix Deprecated warning Use correct version with fallback if needed. Closes #20 |
02:22 | |
02:25
jjatria left
02:27
Scotteh left
02:28
freeside joined
|
|||
Geth | rakudoc/main: 79f8dc0c66 | (Will Coleda)++ | 2 files Updating Changelog Revert version change until we're ready to publish |
02:28 | |
02:29
Scotteh joined
02:36
jjatria joined
03:06
rf_ joined
03:07
jpn joined
03:08
Some-body_ joined
03:09
freeside_ joined,
perlbot_ joined
03:11
jpn left
03:13
Maylay_ joined
03:15
freeside left,
rf left,
ircuser left,
razetime left,
coverable6 left,
saint- left,
Maylay left,
gabiruh left,
japhb left,
perlbot left,
DarthGandalf left,
ProperNoun left,
a3r0 left,
Some-body_ is now known as DarthGandalf,
perlbot_ is now known as perlbot
03:16
a3r0 joined
03:20
lichtkind joined
03:27
ircuser joined,
razetime joined,
coverable6 joined,
saint- joined,
gabiruh joined,
japhb joined,
ProperNoun joined
03:28
ProperNoun left,
cokebot9000 joined,
ProperNoun joined
03:42
lichtkind left
03:46
cokebot9000 left
03:54
jpn joined
03:58
jpn left
04:14
razetime left
04:46
razetime joined
04:48
jpn joined
04:52
jpn left
05:30
freeside_ left
05:52
pingu left
05:59
freeside joined
06:00
reportable6 left
06:03
reportable6 joined
06:36
jpn joined
06:41
jpn left
07:17
Sauvin left
07:30
razetime left
07:32
jpn joined
07:37
jpn left
07:42
Sgeo left
07:46
Sauvin joined
07:53
saraaa joined
|
|||
saraaa | hi Earn Money by Playing Games With APP t.co/gINw00dVFI | 07:54 | |
08:04
saraaa left
|
|||
el saraaa: no | 08:06 | ||
Voldenet | You can earn some money by working on raku | ||
08:24
jpn joined
|
|||
Zephyr | should I delete that on the Discord side just in case | 08:28 | |
p6steve | yes ^^ | 08:31 | |
08:31
jpn left
08:38
jpn joined
08:42
jpn left
08:55
Manifest0 joined
09:07
dakkar joined
09:15
Nemokosch joined
09:25
human-blip joined
|
|||
Nemokosch | hello | 09:30 | |
tellable6 | 2023-02-08T11:21:06Z #raku-dev <nine> Nemokosch: appending is ok | ||
2023-02-08T12:31:21Z #raku-dev <ab5tract> Nemokosch: There's the answer of whether you can actually descend from it or not | |||
Nemokosch | :D | 09:31 | |
10:02
jpn joined
10:04
lichtkind joined
10:22
Nemokosch left,
Nemokosch joined
10:33
jpn left
10:55
Nemokosch left,
Nemokosch joined
10:57
Ava joined
10:58
jpn joined
11:03
jpn left
11:06
Ava left
11:17
jpn joined
11:18
sena_kun joined
11:23
jpn left
11:34
jpn joined
11:36
Matthew|m left
11:37
CIAvash left,
tadzik left,
bigtestaccount[m left,
tiziodcaio left,
BarrOff left
11:38
epony left,
epony joined
11:41
CIAvash joined
11:42
jpn left
11:44
Nemokosch left
11:45
Nemokosch joined
11:48
Nemokosch left
11:56
jpn joined
12:00
Matthew|m joined,
bigtestaccount[m joined,
tadzik joined,
tiziodcaio joined,
BarrOff joined,
reportable6 left
12:01
reportable6 joined
12:02
jpn left
12:03
freeside left
12:07
jpn joined
12:12
jpn left
12:14
CIAvash left,
bigtestaccount[m left,
tadzik left,
BarrOff left,
Matthew|m left
12:15
tiziodcaio left
12:21
freeside joined
12:28
jpn joined
12:32
jpn left
12:37
rf_ left,
rf joined
12:43
justache is now known as deliriumt,
deliriumt is now known as justache
12:47
jpn joined
12:48
CIAvash joined
12:53
BarrOff joined,
jpn left
13:00
jpn joined
13:05
jpn left
13:09
tadzik joined
13:19
Matthew|m joined
13:22
tiziodcaio joined
13:23
bigtestaccount[m joined
|
|||
leont | m: sub foo is trailing_docs("Foo!") {}; say &foo.WHY | 13:36 | |
camelia | No such method 'set_docee' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
leont | I guess That doesn't work as expected… | ||
I guess it's expecting a POD entry, which almost makes sense but makes it rather hard to use | 13:38 | ||
And giving the error on fetching instead of on setting makes it confusing | |||
13:40
freeside left
13:41
jpn joined
13:46
jpn left
13:58
jpn joined,
El_Che left
14:00
El_Che joined
14:02
razetime joined
14:05
freeside joined
14:07
jpn left
|
|||
Nemokosch | you could open an issue for it | 14:29 | |
I get more optimistic about the resolution of issues, once there are more issues I can actually solve 😄 | 14:30 | ||
El_Che | on other news, telemetry is bad: github.com/golang/go/discussions/58409 | ||
tonyo | sad | 14:31 | |
shmup | yuck | 14:32 | |
tonyo | "opt-out" by default is on brand for go, though | ||
El_Che | not go | ||
googl | |||
tonyo | huh? is that discussion not adding telemetry to the go compiler? | ||
El_Che | by people employed by google :) | ||
tonyo: yes, it is | 14:33 | ||
Nemokosch | Remember when Audacity had a telemetry "incident"? | ||
tonyo | guess i won't go past whatever version they're on now | 14:35 | |
El_Che | GOOGLE_DO_NOT_SPY_ON_ME=1 go get some.pkg | 14:36 | |
how to install a go pkg :) | |||
14:37
jpn joined
|
|||
tonyo | i hope that dies before it grows legs | 14:39 | |
El_Che | on the other hand, it may be an incentive to finally learn rust :) | 14:40 | |
or get more libs into raku :) | |||
tonyo | write a go generator to transpile to raku | 14:41 | |
El_Che | and sends data to Microsoft | 14:42 | |
tonyo | bingpt | ||
El_Che | bingo | ||
14:42
jpn left
|
|||
Nemokosch | 🤣 | 14:45 | |
15:16
human-blip left,
human-blip joined
|
|||
ab5tract | Does anyone know where the code for tellable6 lives? | 15:19 | |
shmup | <google> El_Che, you forgot to say please. | ||
Nemokosch | ab5tract yes, it's hidden somewhere in Whateverable, I think under xbin | 15:23 | |
github.com/Raku/whateverable/blob/...ellable.p6 right | |||
15:26
Sgeo joined
|
|||
ab5tract | thanks | 15:28 | |
15:32
jpn joined
15:39
jpn left
15:58
razetime1 joined,
razetime left,
razetime1 is now known as razetime
16:05
jpn joined,
sena_kun left
16:06
codesections left
16:07
codesections joined
16:10
jpn left
16:14
razetime left,
razetime joined
16:22
zashi joined
16:34
sena_kun joined
|
|||
zashi | Hi. How can I include/use/require another raku file that is just sitting besides my current running raku script in the same folder? I've managed to build a module but this is not what I want.. | 16:35 | |
ugexe | use lib $*PROGRAM.parent; use my_other_filename_minus_extension; | 16:37 | |
Nemokosch | are .raku files good to go? iirc there was some extension-sensitivity involved | 16:39 | |
zashi | I tried .raku and .p6 and nogo | ||
ugexe | if its a module then it should be .rakumod | 16:40 | |
zashi | its not a module. its just a plain script | ||
raku script | |||
tonyo | when you say include/use/require are you meaning run the script or embed its source in the parent, then? | 16:41 | |
ugexe | require "{$*PROGRAM.parent.absolute}/my-file.raku"; | 16:42 | |
16:44
razetime1 joined,
razetime left,
razetime1 is now known as razetime
|
|||
zashi | ok, both forms seems to work, I just had to use quotes. any idea what is the namespace everything is imported into? can't seem to access subs from that file | 16:45 | |
Nemokosch | simple: if they aren't marked for exporting, nor our-scoped, then they won't | ||
if they are our-scoped, hm, tbh I'm not sure but I guess you could somehow refer to the compunit? | 16:46 | ||
zashi | well, the content of the file is : sub hello is export {say "hello"} | 16:48 | |
but now I noticed that whatever I put as file in require, I get no error, but I dont think it does anything | |||
tonyo | zashi: if you want it to export into a namespace, you should have a file called `META6.json` that lists that file in the provides and at the top of your file you can do `unit module <Some Name>;`, in the script you want to say hello, `use <Some Name>; hello;` | 16:49 | |
zashi | than I actually cant have a project that is multiple files? I have to split it into modules? | 16:50 | |
if I want to split a project by function = file then I would have a huge amount of modules? | 16:51 | ||
tonyo | you want one function per file? | ||
Nemokosch | iirc require doesn't do importing on itself, import would. And use is a combination of them. | 16:53 | |
16:53
donaldh joined
|
|||
you can import a module and a module is supposed to have a certain file extension | 16:53 | ||
tonyo | m: '/tmp/xxx.rakumod'.IO.spurt: 'sub hello is export { "hello".say; }'; require "/tmp/xxx.rakumod" <&hello>; hello; | 16:54 | |
camelia | hello | ||
tonyo | ^ | ||
zashi: ^ you can import named exports that way | 16:55 | ||
Nemokosch | oh okay, require is apparently the runtime version of use. I mixed it up with need | 16:56 | |
16:56
razetime1 joined,
jpn joined
|
|||
(perhaps because these words mean the same...) | 16:56 | ||
16:56
razetime left,
razetime1 is now known as razetime
17:00
jpn left
|
|||
zashi | ok, it works. having a file with .rakumod is acceptable. having a META6.json would not be, because that means I'd have equally count of folders :) | 17:09 | |
tonyo | module name and folders don't need to align | 17:12 | |
ugexe | require "{$*PROGRAM.parent.absolute}/lib/Zef/Utils/FileSystem.rakumod" <&list-paths>; say list-paths($*CWD) | ||
you have to declare what you want to import when requiring | 17:13 | ||
tonyo | you could just put `Mod::Fn1` in `lib/fn1.rakumod` | ||
17:15
freeside left
17:16
freeside joined
17:20
razetime left
17:21
freeside left
17:22
donaldh left,
freeside joined
|
|||
zashi | tonyo: | 17:22 | |
> module name and folders don't need to align | |||
no, Im just saying IF I would have been required to have a META6.json individually for each module | |||
17:22
pingu joined
|
|||
zashi | but apparently I dont need to | 17:22 | |
pingu | how do I make this perl 5 regex into valid per 6: my $regex = qr/1[ *\t].[ *\t]0/p; | 17:23 | |
17:26
freeside left
17:28
freeside joined
17:30
NemokoschKiwi joined
|
|||
Nemokosch | what does it do? Not gonna lie, I'm not used to these regexes anymore 😄 | 17:33 | |
lizmat neither :-) | |||
moritz | rx{ 1 <[\ * \t]> . <[\ * \t]> 0 } | 17:35 | |
Nemokosch | when moritz is around, he either changes directory or casually translates plain old PCRE to Raku regexes 😛 | 17:38 | |
pingu | infact can I do something like this: my $linetype = qr/^^[ \t]+?[1-6][ \t]+/p; | 17:40 | |
my $color = $linetype~qr/[ \t]+[[:digit:]][ \t]+/p; | |||
if I just did two if's or one if with an && it would still start from the beginning of each line so I decided to put $linetype inside of $color | 17:42 | ||
since raku doesn't like long complex perl 5 regexes | 17:43 | ||
it seems to understand short ones, so I made each paramater a regex | |||
17:43
dakkar left
|
|||
pingu | so it should be, any spaces or tabs (or nothing) followed by 0,1,2,3,4,5 or 6 followed by any spaces or tabs, followed by any whole number followed by any spaces or tabs | 17:54 | |
and yes that means any positive integer only | 17:56 | ||
18:00
reportable6 left
18:01
reportable6 joined
|
|||
pingu | oh great it doesnt even understand the first regex, in $linetype | 18:05 | |
18:10
saint- left
18:12
Guest244 joined
18:15
ab5tract left
|
|||
Nemokosch | you made that one up, right? | 18:16 | |
18:16
NemokoschKiwi left
18:18
Guest244 left
|
|||
pingu | I get them from regex101 | 18:19 | |
i.e as pcre , before that I write and test it as PCRE<PHP>7.3 | 18:21 | ||
lizmat | / \s* <[0123456]> \s* \d+ / | 18:32 | |
/ \s* <[0123456]> \s* \d+ \s* / | |||
m: " 1 456 " ~~ / \s* (<[0123456]>) \s* (\d+) \s* /; say ~$0; say ~$1 | 18:34 | ||
camelia | 1 456 |
||
Nemokosch | ok sorry missed a couple of messages | 18:35 | |
18:48
freeside left
18:54
freeside joined
19:29
Bebo35 joined
|
|||
pingu | back | 19:38 | |
19:48
Bebo35 left
19:59
Guest5607 joined
|
|||
pingu | it works if its one regex but not if its two: pastebin.com/vWf1UBSJ | 20:37 | |
if I do $linetype ~ $color it says im trying to coerce it into a string | |||
if (@data_ldr[$i}[] ~~ $linetype ~ $color) { . . . } | 20:38 | ||
if (@data_ldr[$i][] ~~ $linetype ~ $color) { . . . } | |||
would $\(if the above code worked) therefore be the matches of $linetype and $color contatenated? | 20:39 | ||
20:41
Simerax joined
20:47
jpn joined
20:53
jpn left
20:54
jpn joined
21:00
NemokoschKiwi joined
21:01
NemokoschKiwi left
21:02
jpn left
21:03
jpn joined
21:04
freeside left
21:08
jpn left
|
|||
pingu | unless I need & or && (conjunction) | 21:14 | |
21:15
systems joined
|
|||
pingu | named regexes are clearer | 21:17 | |
21:21
freeside joined
21:40
Guest5607 left
22:20
melezhik joined
|
|||
melezhik | o/ | 22:20 | |
tellable6 | 2023-02-08T20:25:06Z #raku <tonyo> melezhik: that unattended flag onlyh works in that specific function - working off the dist branch which is introducing dist management stuff and i'll integrate that there if you want to do some pre-testing on that branch | ||
melezhik | .tell tonyo - that's ok, I can wait till the issue is fixed, anyway I have already renewed my fez token, so it's not possible to reproduce the bug now | 22:21 | |
tellable6 | melezhik, I'll pass your message to tonyo | ||
melezhik | if someone is interested in running docker tasks inside SparrowCI pipelines - now this is possible - github.com/melezhik/sparrowci-dock...arrow.yaml | 22:22 | |
ci.sparrowhub.io/report/2985 | 22:25 | ||
ci.sparrowhub.io/report/2986 | 22:27 | ||
22:27
melezhik left
|
|||
Nemokosch | do you know a simple way to trace down warnings? | 22:32 | |
22:49
sena_kun left
|
|||
rf | .tell melezhik I have a large JVM based code base I want to run in CI, does Sparrow support JVM images? | 22:50 | |
tellable6 | rf, I'll pass your message to melezhik | ||
pingu | ok here is the full parser regex, now I need someone to convert it into raku regex101.com/r/HCK9jC/4 | 22:51 | |
22:51
jpn joined
22:56
jpn left
23:00
zashi left
23:03
tonytheraku joined
|
|||
Nemokosch | looks full cursed tbh | 23:06 | |
btw found the answer to my own question: CX::Warn control exception, CONTROL phaser can catch it | 23:07 | ||
tonytheraku | Installed rakudo star from source this afternoon on aarch64 (Pi), seems to be working OK but the logs say that several modules failed to install, some flagged as [CRIT]. Is this a significant issue? Should I just try to zef them into place from the repos? | ||
El_Che | rakuthetony: I would go the zef router. If I understand correctly, there is no magic in the modules in star: not pinned for stability etc. So updating sound ok | 23:09 | |
2c | |||
tonytheraku | El_Che Thanks, will do, but wonder why the modules didn't install? Is I was missing something important enough to cause this, maybe the compiler installation would have flunked (but it didn't)? | 23:11 | |
El_Che | tonytheraku: no idea actually | 23:12 | |
tonytheraku | It's a minor mystery, but I've got enough working for now, I'll dig into the zef repos see what I can cobble together | 23:13 | |
23:16
tonytheraku left
|
|||
rf | Is there a very idiomatic way to check if a positional is empty? | 23:21 | |
if @list.elems | |||
I thought but it doesnt feel right | |||
Nemokosch | especially since this can fail on lazy stuff - remember? | 23:24 | |
"cannot call .elems on a lazy list", bool context, bang, suddenly it's "empty", although it's just lazy | 23:25 | ||
a plain if @list is actually better for an empty-check | 23:26 | ||
because that only tries to fetch one element to decide | |||
23:28
Simerax left
|
|||
guifa | Agreed, `if @list` | 23:31 | |
or you can also prefix with ? to force boolean context (like if passing as an argument) | 23:33 | ||
foo( ?@list, arg2, arg3) | |||
rf | I like if @list | 23:39 | |
23:39
epony left
|
|||
elcaro | Call me crazy, but for code I plan to maintain, I like if @list.elems == 0 or @list ~~ Empty, because they're more explicit. | 23:55 | |
23:55
systems left
23:59
lichtkind left
|