šŸ¦‹ 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.
wayland .tell SmokeMachine: Haha, I've been working on ideas for a Prolog/Raku crossover of a very similar sort. My direction was to have something like a proto with multis. You may also enjoy www.cwi.nl/~apt/alma.ps if you're heading in this direction. This was third on my list, after Table-Oriented Programming and Tree-Oriented Programming. 00:25
tellable6 wayland, I'll pass your message to SmokeMachine
wayland (for the record, the article I linked is about integrating Declarative structures into Imperative languages; in particular, Prolog-like structures into a Pascal-like language). 00:26
Is there a testing function/module that tests against $_ ? 00:38
coleman fancy PostScript <3 00:50
wayland The article was written in the 90s, but still useful. 00:57
.tell SmokeMachine You may also be interested in wayland.github.io/table-oriented-p...ueries.xml which is where I was starting to put together some ideas in this direction, and wayland.github.io/table-oriented-p...l-Flow.xml which is a raku-specific take on the Alma article I linked. 01:00
tellable6 wayland, I'll pass your message to SmokeMachine
tbrowder hi, is there any use space way to **validate** a rakudoc v1 file? 01:28
*user
[Coke] pretty sure there's a raku/doc test file doing that 01:33
tbrowder you mean in roast? 01:34
[Coke] github.com/Raku/doc/blob/main/t/02...d.rakutest - it's basically running 'raku -c --doc' on each file
no, I mean github.com/Raku/doc
tbrowder hm...thnx 01:35
yeah, the raku -c option ..l 01:45
i was using the --doc option, but i just tried the -c on my pod chunk and both opts pass my test chunk ok. i cannot believe my test pod is passing! 01:53
seems very loose...unbalanced <>, spaces every where... 01:55
oh, well, moving on...thnx [Coke] 01:57
02:01 hulk joined 02:03 kylese left 02:15 hulk left, kylese joined 03:19 jjido left 03:45 kylese left 03:46 kylese joined 04:02 Xliff joined
Xliff \o 04:02
What's the best way to add symbols to a Stash?
wayland looks up stash... 04:58
m: class Boring { our sub package_sub {} }; my $s = Boring.WHO; $s{"another_package"} = sub {}; say $s.raku 05:03
camelia ${"\&package_sub" => sub package_sub { #`(Sub|2329696143728) ... }, :another_package(sub { #`(Sub|2329696143864) ... })}
wayland Xliff: Does that help?
Xliff m: class Boring { our sub package_sub {} }; my $s = Boring.WHO; $s{"&another_package"} = sub { "Boo!" }; another_package 05:05
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
another_package used at line 1
Xliff wayland: Thanks! I actually got this far already. That bit should tell you where I am, now.
wayland: But yes, it helps. Want moar! :)
wayland Xliff: gist.github.com/wayland/f199612b1e...b52e134222 05:09
You had a number of problems: 1. The compile-time checks were blocking the code from running; the EVAL prevents that, but you could also probably put most of the code in a BEGIN block, and leave the last line outside (and get rid of the EVAL) 05:11
2. The sub needed to have the same name as the key.
(The number of problems you had was 2 :p )
Xliff m: class Boring { our sub package_sub {} }; my $s = Boring.WHO; $s{"&another_package"} = sub another_package { "Boo!" }; another_package 05:18
camelia ( no output )
Xliff m: class Boring { our sub package_sub {} }; my $s = Boring.WHO; $s{"&another_package"} = sub another_package { say "Boo!" }; another_package
camelia Boo!
Xliff \o/
wayland Oh, nice! The EVAL was unnecessary then :) . 05:22
Still, it gave me the power to debug it, so it wasn't wasted.
Unrelated: I'm getting the following error, and haven't managed to isolate it, but if anyone has any debugging tips, that'd be nice: Cannot find method 'set-statement-id' on object of type NQPMu 05:23
(I'm trying to dynamically load a library, and it's always worked until now) 05:24
m: my $skip = "a,b,c"; split(/\,/, $skip) ==> map({ $_ => 1 }) ==> my %skips; say %skips.raku 05:27
camelia {:a(1), :b(1), :c(1)}
05:27 Aedil joined
wayland OK, that works; on the one on my home machine, it also outputs the error "Useless use of ==> in sink context" -- is that a bug? 05:28
Also, does anyone have any tips on how to get the "RUN zef install" step in my dockerfile to cache for longer and not re-run every time? 05:32
Xliff Could you show the code for the NQPMu error? 05:43
wayland: When you get a chance, .tell me with a link to the error. I'm about to pass out. Ja-ne! 06:02
06:02 Xliff left
wayland Xliff: I haven't managed to isolate it (it's in a 7000 line codebase). I'm running it in a docker container now, and getting more sensible errors. 06:40
tellable6 wayland, I'll pass your message to Xliff
wayland Sleep well :) 06:41
08:12 wayland76 joined 08:13 wayland left 08:20 Sgeo left 08:22 Sgeo joined
nine coranila: I have found out *why* accessing that sub works on MoarVM when compiling the setting but doesn't in my reduced example: it's because when compiling the setting we're in precompilation mode. github.com/Raku/nqp/blob/main/src/...d.nqp#L281 08:29
09:56 jjido joined 11:36 Sgeo left 11:37 stanrifkin joined 11:49 jjido left
coranila nine: but that logic should be shared across the backends unless we're missing something on the JVM, right? 11:58
nine Yes, there's definitely some other factor still missing. 12:02
coranila any idea what i should try to look for? so far i've been trying to traverse up the stack trace to try and figure out what's going on, but i'm a bit out of practice with introspecting rakudo-j gut on that level, and havent really gotten a good grasp on what's happening yet 12:08
guts
nine Not really anything specific. I'd like to point out though that Rakudo's Perl6::Actions and World are clearly related to NQP's. The latter is a greatly simplified version and thus a lot easier to understand. 12:19
In this case this relationship also gives us the opportunity to compare Rakudo's working with NQP's broken version
coranila ah, true; that does seem to imply that nqp-j could be fine as-is, despite the fact that we're throwing from NQP's IndyBootstrap 12:21
as in, some aspect of the HLL instantiation for Perl6 or Raku doesnt have parity between moarvm and jvm - which is new i suppose, but nice to have confirmd
or at least reaffirmed...
12:28 clarkema2 left 12:29 clarkema2 joined 13:18 apac joined 13:22 apac left 14:07 stanrifkin left 14:18 stanrifkin joined
jubilatious1_98524 needs split( / \, /, ... backslashed comma on my machine. 14:20
14:29 apac joined
tbrowder hi, for App::Mi6 users, note it does not yet recognize =begin/=end rakudoc. i just filed issue #183 there. it would help if other users would add support for the issue at github.com/skaji/mi6/issues 14:32
14:41 clarkema2 left 14:43 clarkema joined
tbrowder well, skaji said it only uses ā€œraku —doc module.rakumodā€ so it should work. i’ll do some more checking. maybe i’m wrong about current raku recognizing rakudoc 😟 14:57
ok, closing the issue 15:53
16:04 apac left 16:26 lichtkind joined 17:00 apac joined 17:56 sdomi left 18:54 Sgeo joined 18:58 leah2 left 19:11 leah2 joined 19:13 jjido joined 20:05 librasteve_ joined 20:10 Aedil left
coleman rebooting the server that hosts cro.services 21:23
tbrowder m: raku -v 21:36
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routines:
raku used at line 1
v used at line 1
21:41 lichtkind left 22:48 dustinm`_ left 22:52 apac left 22:56 dustinm`_ joined 23:52 jjido left
leont Observing some weird result with Promise.anyof here: github.com/Raku/tap-harness6/blob/...umod#L1030 23:53
Basically, if I put those arguments in an array, and then call anyof with that array, it will die there, but if I use the arguments directly (like it currently does in the code) it lives. 23:54
Am I missing something?