🦋 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.
grondilu passes by to test his ERC auth 07:17
el why doesn’t fez have a web or gui interface 😭 07:23
Nemokosch What would it even do? 08:23
el allow you to manage your packages bruh 08:56
Anton Antonov Meh. (Or, more precisely — feh .) 09:01
Nemokosch how would a gui help with that? 09:03
el actually nvm 09:10
i wanted web fez so i don’t have to install lmao 09:21
Nemokosch xD 09:29
el web is the true cross platform 09:31
Nemokosch I don't mind the web but I definitely not like hosting stuff 09:58
ugexe hmmm github.com/ugexe/Raku-CompUnit--Re...ry--Github 12:51
you really don't want to do that though... the above is just proof you can 12:52
tbrowder hi, can anyone tell me the default branch of the raku/doc.git repo? 13:11
lizmat github thinks it's "main" 13:13
tbrowder ok, now i am trying to use it but can't get in synch from the former master branch. 13:14
i can change to the main branch in the web interface, but can't get the upstream and origin set to default to main 13:15
BTW, are all the repos now using main? 13:16
lizmat not all yet
tbrowder so how can i unmurfle my doc repo? delete master, rename master, or ? 13:18
lizmat do you have changes you want to keep? 13:19
tbrowder my own default for new repos is still master
no my doc master is clean
lizmat then I suggest to just do a fresh git clone 13:22
tbrowder ok, will do
Geth doc: tbrowder++ created pull request #4207:
Replace the 'Opener graphemes' table with 'Brackets'
13:40
rf good morning folks
tbrowder mornin' 13:41
"it's a beautiful day in my neighborhood" 13:42
rf I've been waking up to 10-15 deer in my yard, been quite nice :) Besides the 5 feet of snow.. 13:44
tbrowder brr 13:50
rf mind saying where you are? 13:51
rf Central Canada 13:54
tbrowder whoa! mucho snow! 13:57
rf Yeah, we normally get around 10 feet a year, but it was warm so a lot of it melted
Now its cold and snowy again
tbrowder we've been to western ca and eastern ca, great places to visit 13:58
rf Yeah when people think Canada they mostly think east and west coast :) 13:59
Tourists only really come where I am to go fishing or skiing
tbrowder though about train across the country but they stopped doing the whole country some time ago.
rf Yeah that sucks 14:00
tbrowder last time there we entered and left vIa the crossing near glacier nat'l park. 14:01
Nemokosch there is a little problem with fez
the optional metadata fields can't be actually optional because the types don't match between the callee and the caller (Any goes in, Str is expected) 14:03
seems fixable by deleting 3 lines of code 14:06
rf PR !
Nemokosch or so I thought - the supposedly updated metadata doesn't show up when running "fez meta" again 14:07
[Coke] If discord folks want to bridge #raku-doc, I'm OK with that. 14:14
melezhik .tell grondilu you can use Spa to upload modules via fez , here is an example code - raku.land/zef:melezhik/SparrowCI-SandBox 14:16
tellable6 melezhik, I'll pass your message to grondilu
melezhik Spa -> SparrowCI
Anton Antonov @Coke My Raku gherkins are bigger than yours! (Or just more.)
Nemokosch bridging #raku-doc would be nice 😛
kawaii Are there any tools for sigscanning external processes in Raku yet? 14:19
Anton Antonov @tbrowder Thanks for mentioning the Cucumber framework! (6-7 days ago.) 14:20
[Coke] Anton++_ 14:38
Thanks for jumping in. 14:39
Anton Antonov @Coke Welcome! I have to document the process more and / or make a few movies illustrating the workflow. Also, in all fairness, it was in my TODO list for at least 1.5 years to make a DSL parser-interpreter for testing workflows. I did not know about Cucumber/Gherkin framework and designs -- leveraging them makes lots of sense. 14:44
[Coke] Ugh. This bug with MAX_PATH - I can trigger it with a call to dir, but my actual use case is inside of File::Find, so I have no easy way to trap the error. :( 14:52
Nemokosch slightly offtopic: raku.land/cpan:LEONT/Path::Finder as a better File::Find? 14:54
leont I should be promoting it more, I'm very satisfied with how rakuish that module has become 14:54
Nemokosch to recite a classic: "if Leon likes it, fine by me" 😄 14:57
Anton Antonov @leont Speaking of self-promotion -- you might like this : github.com/antononcube/Raku-Gherki...n.rakutest . 14:58
[Coke] leont: it, obviously, suffers from the same MAX_PATH issue I'm facing here.
Anton Antonov @leont And the related ".feature" file : github.com/antononcube/Raku-Gherki...on.feature . 14:59
@leont I am filing an issue or two to "Path::Finder". 15:00
@leont Just submitted one issue -- basically a request for "Path::Finder" CLI. I realize that would "compete" with "App::Rak", at least to a point. 15:09
leont The tricky thing there is that there are some 50ish named arguments, and while the boolish ones are easy to map, the smartmatching ones are trickier. 15:24
Anton Antonov @leont Hmm… “App::Rak” has the same “problem.” My solution to that kind of problems is make a DSL.(Again, making a file finding DSL is something in my TODO list for at least a year.) 15:29
ugexe [Coke]: clone File::Find to e.g. C:\Foo\Bar, edit C:\Foo\Bar\lib\File\Find.rakumod to add debug output or whatever, then run your program `raku -I "C:\Foo\Bar" my-script.raku` 16:14
[Coke] Works fine for me, but not scalable for other work users. 16:17
ugexe i mean just for trapping the error
[Coke] Basically need either copy File::Find, or make my own module that can skip these folders and complain about them rather than die. 16:17
ugexe oh you dont want to know what the error is, you want to take action based on the error 16:18
[Coke] I can do an --ll-exception from the `dir` command to get the underlying error. 16:19
ugexe i suppose you can't catch the exception and then just .resume 16:20
in your program
[Coke] will that work if the error is in the guts of a File::Find callback somewhere? 16:21
`read from dirhandle failed: 3`, btw.
ugexe no idea lol 16:21
[Coke] where 3 is GetLastError 16:23
dakkar github.com/tadzik/File-Find/blob/m...akumod#L40 I guess the error is not the kind that `keep-going` helps with
[Coke] MVM_exception_throw_adhoc(tc, "read from dirhandle failed: %lu", GetLastError()); 16:24
It's not a typed exception, so no
ugexe you can grep on the message
$_.message.contains('read from dirhandle failed')
dakkar 😵‍💫
ugexe: the "not a typed exception" was in answer to my question about `keep-going` 16:25
[Coke] I'll probably end up (short term) making a very small module that does what I need to walk dirs and skip this error (rather than copying the module)
dakkar on the other hand, rakudo should throw a `X::IO::Dir`, not a adhoc, when that happens, right? 16:26
[Coke] I think ugexe is continuing his suggestion that I copy file:find and then I can update that keep-going check to the error *I* care about.
Ah. that's the moarvm exception. if I catch this in raku and print the ^name, it *IS* the right type. 16:28
let me try keep-going...
ugexe yeah sort of. i meant in your program you would catch the exception from File::Find, cept if it contains the message "read from dirhandle failed", and if so .resume the exception
[Coke] if this works, will submit a patch to File-Find to mention this may also help on windows with MAX_PATH. :) 16:30
dakkar so, windows has 2 different "maximum length of a full pathname", and it can be instructed to ignore the shorter one? 16:34
dakkar is a bit boggled
[Coke] there is a MAX_PATH; you can set a registry entry to ignore it. Raku ignores your ignore and fails anyway. 16:35
dakkar in linux, there's a maxpath, but that's the longest size the kernel will accept… there's no ignoring that 16:36
(correction, it's called PATH_MAX, and it's 4096 bytes) 16:38
ugexe from what I saw setting the long path in the Windows registry allowed me to create a directory with an absolute path beyond 256. however i could not create a file with an absolute path beyond 256, nor could i create a single directory beyond 256 16:44
dakkar 256… what's this, CP/M? (it probably is)
[Coke] windows isn't the problem here - even before I changed the registry, the files that raku can't touch are fine in explorer, cmd, powershell... 16:50
maybe I should say "verified" instead of changed, maybe I just set it to 1 a second time. :| 16:51
Looks like File::Find is happy (so far) with the keep-going setting, thank you very much for calling that to my attention 16:52
dakkar we like simple&effective solutions! 16:53
(well, work-arounds in this case, but still)
[Coke] With this, hopefully that buys me enough time to maybe figure out how to update moarvm's functions (which, as ugexe pointed out, I can mostly do on my non-windows dev box) 16:56
dakkar learn.microsoft.com/en-us/windows/...limitation oh gods it's all kinds of complicated
ugexe yeah, but we're really only worried about one thing: precompilation paths 17:05
those tend to be longish due to multiple sha1 directories deep
however, if long paths are enabled in Windows, and each directory part can be 256 characters, the sha1 paths shouldn't be an issue 17:06
yet we get these errors when the absolute path reaches a length around 256
dakkar now I'm thinking how did Java people deal with it… they tend to have very deep source trees 17:07
[Coke] ... I am worried about my paths, thank you. :)
[Coke] I am OK with setting this registry being part of the windows install recommendations, once we avoid the current bug. 17:07
ugexe i agree re: setting the registry thing. but it doesn't seem to help much 17:08
[Coke] (to reduce concern about the sha paths)
because moarvm is broken, yes.
ugexe rakudo-j: say 42
🤷 17:09
i guess it wouldnt be running on windows anyways heh
[Coke] rakudo-j?
I haven't tried that in some time.
ugexe if we had a bot that stil ran it, yeah
mainly just wanted to see if i could create a long path using Windows + jvm rakudo 17:10
but not bad enough to try and install all that
[Coke] heh 17:11
ugexe hmm maybe gdb can be installed on windows relatively easily 17:12
stackoverflow.com/questions/708301...ws-machine
dakkar (quick look at the nqp source hints that rakudo-j should work as well as the JRE itself does) 17:14
[Coke] ooh, MasterDuke is working on it!! 17:25
BarrOff Hello, I was wondering what kind of regex engine is used by the rakudo compiler? Is it a DFA or NFA (and in this case traditional or POSIX)? 17:30
moritz BarrOff: it basically builds a recursive-descend parser that uses an NFA for the declarative / "regular" parts 17:37
BarrOff <moritz> "BarrOff: it basically builds a..." <- Is that the reason you can't have regular backreferences inside a regex? What I mean is there is nothing like `\1` but you can use a code block '{$1}' instead 18:11
moritz yes; matching backrefs isn't part of regular languages, and this makes it kinda obvious 18:17
(though there are also non-regular features that are less obvious, like sequential alternation with ||, so maybe it's more about making common things easy and hard things possible) 18:18
BarrOff moritz: thank you very much for making that clear. 18:27
patrickb o/ 18:56
guifa: May I ping you again wrt github.com/alabamenhu/DateTimeTimezones/pull/7
tg57 Any suggestions on how to loop through a list of pairs and get both the key and value? 19:23
lizmat for @pairs { .key, .value } ? 19:24
jdv tg57: docs.raku.org/type/Pair ? not sure wut u mean. 19:25
tg57 Ok thanks. Was just making sure there wasn't a better way that didn't use for loop. 19:27
jdv there are many "loopy" constructs. depends on context and such. 19:28
maybe youre looking for hyper operator like stuff? 19:33
moritz tg57: you could also use signature unpacking 19:55
m: for (:a, :b) -> (:$key, :$value) { say "$key: $value" }
camelia a: True
b: True
rf m: for (:a(123), :b(456)) -> (:$key, :$value) { say $key, $value } 20:33
camelia a123
b456
rf m: my $x = do given([ 1, 2, 3]) { when ($a, $b, $c) { 'Worked?' } default { 'Not worked' } }; say $x; 20:39
camelia ===SORRY!===
The word 'given' is interpreted as a 'given()' function call. Please
use whitespace instead of parentheses.
at <tmp>:1
------> my $x = do given⏏([ 1, 2, 3]) { when ($a, $b, $c) { 'Work
Unexpected block in infix p…
rf m: my $x = do given([ 1, 2, 3]) { when ($a, $b, $c) { 'Worked?' } default { 'Not worked' } }; say $x; 20:40
camelia ===SORRY!===
The word 'given' is interpreted as a 'given()' function call. Please
use whitespace instead of parentheses.
at <tmp>:1
------> my $x = do given⏏([ 1, 2, 3]) { when ($a, $b, $c) { 'Work
Unexpected block in infix p…
rf m: my $x = do given([ 1, 2, 3]) { when ($a, $b, $c) { 'Worked?' }; default { 'Not worked' } }; say $x;
camelia ===SORRY!===
The word 'given' is interpreted as a 'given()' function call. Please
use whitespace instead of parentheses.
at <tmp>:1
------> my $x = do given⏏([ 1, 2, 3]) { when ($a, $b, $c) { 'Work
Unexpected block in infix p…
rf m: my $x = do given ([ 1, 2, 3]) { when ($a, $b, $c) { 'Worked?' }; default { 'Not worked' } }; say $x;
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$a' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> my $x = do given ([ 1, 2, 3]) { when (⏏$a, $b, $c) { 'Worked?'…
rf Doesn't work :(
Nemokosch m: my $x = do given ([ 1, 2, 3]) { when :($a, $b, $c) { 'Worked?' }; default { 'Not worked' } }; say $x; 20:45
Raku eval Worked?
Nemokosch m: my $x = do given ([ 1, 2 ]) { when :($a, $b, $c) { 'Worked?' }; default { 'Not worked' } }; say $x; 20:53
Raku eval Not worked
Nemokosch 😎
(sub)signatures are indicated with the colon 20:54
tbrowder leont: i appreciate yr new Path::Finder but File::Find still suits me just fine, thanks! 21:09
don't need all that horsepower 21:10
Nemokosch my concern is simply that File::Find is effectively unmaintained. If we even know better, that's just an extra reason to stay away from it 21:19
tbrowder well, it works fine for me 22:24
if it ever breaks, i file an issue 22:25
then see what happens 22:26
guifa patrickb: sorry, I did the approve but not the merge. 22:33
patrickb guifa: Now it's merged. All good. Thanks! 22:44
Geth ¦ doc: finanalyst self-assigned Numbered lists (and its alias #) are not documented github.com/Raku/doc/issues/3053 23:00