🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
nine Got some super weird issue with make test: in the rakuast branch the 11-cpp.t and 13-cpp-mangling.t pass (just like all other NativeCall tests), but the harness reports exit code 1 for both files. But it only does so if run via make test, not when run individually. And it happens only if the make test run includes other test files that really do fail. 09:52
lizmat meh 10:26
nine At least the latter means that once all other tests pass, these two will, too :) 10:53
vrurg_: is there any chance you could take a look at smartmatch in RakuAST? There is already some special handling in github.com/rakudo/rakudo/blob/raku...kumod#L219 However I get test failures because "foo" ~~ $regex returns a Bool instead of Match. I can "fix" that by disabling that special handling and let it generate a chain &infix<~~> like master. But that clearly 11:03
cannot be the way forward?
lizmat nine: you're aware of a recent discussion re smartmatch and regexes ? 11:26
nine yes 11:37
Geth rakudo/rakuast: 46d8c1ac38 | (Stefan Seifert)++ | src/core.c/RakuAST/Deparse.pm6
RakuAST: Implement deparse of Regex::SequentialConjunction

Includes a fix for deparse of Regex::Conjuction - that one should generate &, not &&
11:45
guifa So I think I may have found a bug in NativeCall, but wanted to check in before reporting it. 15:24
I've got a compiled library in `resources/foo.dll`, and list it in the resources of META6. Signature is `sub foo is native(%?RESOURCES<foo.dll> {*}` 15:26
Doing the equivalent on my Mac, this works great
On Windows, though, it errors saying "Cannot locate native library '…\path\to\proj\resources/foo.dll'" (notice flip flopped slashes) 15:28
That slash isn't the issue though, because I can resolve the path before passing it, and it still errors. My only guess is that NativeCall doesn't understand absolute paths on Windows, or I'm just calling it totally wrong 15:29
[TuxCM] Rakudo v2022.07-95-g17062c32f (v6.d) on MoarVM 2022.07-20-g757524899
csv-ip5xs0.812 - 0.856
csv-ip5xs-205.082 - 5.439
csv-parser3.557 - 3.573
csv-test-xs-200.411 - 0.424
test6.469 - 6.591
test-t1.372 - 1.418
test-t --race0.840 - 0.861
test-t-2020.135 - 20.736
test-t-20 --race6.131 - 6.898
15:30
ugexe guifa: there are certainly nativecall modules that work on windows, i.e. openssl 15:35
probably something worth getting inspiration from
ugexe oh also... is this failing after installation? 15:36
on windows renaming dlls sometimes breaks them
so when they get renamed to <some-sha1>.dll it doesnt work
see my comment here: github.com/sergot/openssl/blob/5b8...od#L23-L30 15:37
guifa this is running with -Ilib inside Comma at the moment
ugexe ah, then that won't be your problem then
not yet at least 15:38
guifa has already C&Ped the OpenSSL code for when he fixes this first part haha
ugexe also a bit of an aside, are you compiling in like Build.rakumod? or before it reaches e.g. fez? 15:40
if so you can compile into `resources/libraries/` and list it in the META6.json as `resources/libraries/foo` 15:41
on windows that will be `resources/libraries/foo.dll`, macos `resources/libraries/libfoo.dynlib`, linux `resources/libraries/libfoo.so`
"that will be" meaning thats what `resources/libraries/foo` will resolve to 15:43
m: say $*VM.platform-library-name("xxx".IO) 15:44
camelia "libxxx.so".IO
guifa_ ugexe: hmm, I'm still getting the error. Have to head out but I'll keep working on it or else post somewhere because the error just seems so weird. (OTOH, I'm not a Windows guy at all, so) 15:49
ugexe i need to solicit a new vmware fusion and windows 11 arm license, otherwise id look at it a bit more 15:50
guifa_ That's basically what I did yesterday, except my old Windows 10 license I had from a while back still worked with 11 16:45
nine resources/foo.dll won't work, has to be resources/libraries/foo.dll 16:57
ugexe nine: resources/foo.dll can actually work 17:19
but i mention that more as a technicality. i agree its better to put it in resources/libraries
examples can be seen grepping for .dll in raw.githubusercontent.com/ugexe/Pe...e/p6c.json 17:20
(examples of not using libraries/ 17:21
vrurg_ .tell nine I plan to look at RakuAST when done with github.com/rakudo/rakudo/issues/5043. I think I have a feasible solution for it. 19:49
tellable6 vrurg_, I'll pass your message to nine
guifa_ My understanding though is also `is native()` should be able to take an absolute path though, right? 19:52
ugexe yes 19:53
nine vrurg: you...could just make sure that this will be corrent in rakuast ;) That's not entirely in jest. After all the rakuast branch will replace whatever fix you do and the part that may need fixing is completely different there. So while the time you invest in a fix will not be entirely wasted, it will not be used very efficiently either. 20:03
tellable6 2022-11-20T19:49:11Z #raku-dev <vrurg_> nine I plan to look at RakuAST when done with github.com/rakudo/rakudo/issues/5043. I think I have a feasible solution for it.
guifa_ Okay, seems this is a case of LTA error 20:28
stackoverflow.com/questions/665107...th-nativec
The lib is found, but for some reason my copy of VS was defaulting to building for the wrong architecture. Just gets reported back as a file not found 20:29
vrurg nine: the reason I stuck with that PR is to get better understanding of mechanics and problems related to BEGIN. In particular, that issue is caused by us not having a ready to use surrounding lexpad at the time BEGIN gets executed. Therefore I expect a similar approach with a mockup of the outers to be used in RakuAST, thus – same problem with natives/lexicalrefs 21:05
nine vrurg: not at all! That's probably the area that's most changed and the only thing that actually got new commits in the VM 22:24
BEGIN time lexical lookup in RakuAST does away with those generated outers and instead uses the VM's new lexical fallback resolver: github.com/rakudo/rakudo/blob/raku...kumod#L223 22:25
vrurg git reset --hard – done! :D 22:31
vrurg nine: the way it is implemented now the only way we can get a Bool is incorrect ACCEPTS implementation somewhere. Do you have a particular test failing? Because currently the most basic form of `$str ~~ /\w+/` give a Match as expected. 22:46
*gives
Ok, found t/12-rakuast/regexes.t 23:05
nine: the problem is not in smartmatch but in $_, actually. It looks like temporarization takes over too early and ACCEPTS receives not the topic from `for` but the LHS. 23:14