🦋 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 inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:00 monkey_ left 00:03 reportable6 left 00:05 reportable6 joined 01:05 notable6 left, benchable6 left, linkable6 left, committable6 left, unicodable6 left, releasable6 left, nativecallable6 left, greppable6 left, squashable6 left, reportable6 left, tellable6 left, sourceable6 left, bisectable6 left, quotable6 left, statisfiable6 left, bloatable6 left, coverable6 left, evalable6 left, shareable6 left 01:06 evalable6 joined, benchable6 joined 01:07 unicodable6 joined, tellable6 joined, greppable6 joined, statisfiable6 joined 01:08 quotable6 joined, sourceable6 joined 01:11 Xliff left 01:22 monkey_ joined 01:46 keutoi joined 02:05 ad-absurdum joined 02:07 committable6 joined, reportable6 joined 02:08 releasable6 joined, shareable6 joined 03:08 committable6 left, reportable6 left, releasable6 left, evalable6 left, shareable6 left, benchable6 left, statisfiable6 left, unicodable6 left, tellable6 left, greppable6 left, quotable6 left, sourceable6 left, bloatable6 joined, committable6 joined, notable6 joined 03:09 statisfiable6 joined, unicodable6 joined 03:10 quotable6 joined, benchable6 joined, sourceable6 joined, tellable6 joined 03:11 evalable6 joined 03:15 randomHuman joined 03:16 randomHuman left 03:23 monkey_ left 04:06 coverable6 joined 04:07 squashable6 joined 04:08 releasable6 joined 04:10 shareable6 joined 04:11 greppable6 joined 04:29 dg left, DarthGandalf left, ptc_ left, Voldenet left, charsbar left, rba left 04:30 ptc joined, charsbar joined, dg joined, rba joined, Voldenet joined, DarthGandalf joined 04:41 skaji left, juanfra left, leedo left 04:42 leedo joined, skaji joined 04:45 juanfra joined 04:53 Sgeo joined 05:05 Woodi left 05:07 bisectable6 joined 05:08 nativecallable6 joined, linkable6 joined 05:47 abraxxa joined 05:52 abraxxa left 05:53 abraxxa joined 06:05 reportable6 joined 06:15 simcop2387_ joined 06:17 simcop2387 left 06:18 simcop2387_ is now known as simcop2387, Sgeo left 07:07 Manifest0 joined 07:09 Skarsnik_ joined 07:22 Skarsnik_ is now known as Skarsnik 07:57 keutoi left 08:09 DarthGandalf left 08:11 dakkar joined
Geth App-Rakubrew: 73055cc269 | (Patrick Böker)++ | 2 files
Fix version switching which broke in the previous release
08:11
App-Rakubrew: 5db0e5d4a5 | (Patrick Böker)++ | 3 files
Version 21
08:19 ad-absurdum left 08:21 DarthGandalf joined
xinming For a grammar, How can we get all the match? 08:36
lizmat doesn't $/ contain a tree of all matches ? 08:54
08:55 user51 joined
user51 where can i find information about the whys behind raku? i'm specifically interested in the grammars and lazy evaluation 08:56
Skarsnik It's probably in the apocalypse (or whatever the name of the draft documents for Perl 6) 09:02
lizmat design.raku.org
09:03 sena_kun left
SmokeMachine can anyone reproduce [this](github.com/rakudo/rakudo/issues/3959)? 09:06
Altreus markdown support in IRC when? 09:07
:D
xinming lizmat: I use my $match = MyGrammar.subparse($str); <--- It'll return the first matched result. 09:10
Skarsnik thanks lizmat :)
09:12 sena_kun joined
Altreus SmokeMachine: running your last comment in a fairly large dir and not seeing the issue 09:13
not hitting symlinks are you?
oh wait 09:14
... not oh wait, I thought it wasn't running but it is :D
SmokeMachine: oh! I got one!
SmokeMachine Altreus: It takes som tries...
*some 09:15
Altreus there's nothing special about the file either
SmokeMachine and, at least for me, the file giving the problem keeps changing... 09:16
Altreus I can reproduce it but I can't offer any further insights
SmokeMachine Altreus: Thanks, I just wanted to be sure that's not specific to my environment. 09:17
Altreus added a comment :) 09:19
SmokeMachine xinming: would `my $match = MyGrammar.parse($str);` do what you want?
Altreus: thanks!
xinming SmokeMachine: Nope, the Grammar.parse will need the whole string to match the grammar, But I want to extract only all interesting parts out of a string. 09:22
Altreus looks like I can get at least one file to go wrong each time through 09:30
SmokeMachine: does it only happen async?
lizmat abs2rel depends on $*SPEC, I wonder whether there's a race condition in start on dynamic var lookup somehow 09:31
SmokeMachine Altreus: I couldn't get it sync... 09:32
El_Che weekly: rakudo-pkgs up 09:33
notable6 El_Che, Noted! (weekly)
SmokeMachine lizmat: $*SPEC? I was trying to see if $*CWD was different on those errors... 09:34
lizmat that could also be the case 09:35
an IO path has both a local copy of $*CWD and $*SPEC on creation by default
El_Che: liz@DebianMini:~$ raku -v Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2021.09. :-) 09:36
El_Che :) 09:40
raydiak xinming: grammars aren't really meant to be used like that, a somewhat cleaner solution would be to change your TOP rule to accept strings of .*? between the relevant parts. that said, you could messily kinda force what you want like this: 09:49
m: grammar G { our token TOP { . } }; say "foo" ~~ m:g/<{G::<&TOP>}>/
camelia (「f」 「o」 「o」)
09:52 chenyf joined 09:54 chenyf left
raydiak seriously though, restructuring your TOP rule something like this would be a step up from that nonsense: 10:04
m: grammar G { regex TOP { .*? <relevant>+ %% .*? }; token relevant { \w } }; say G.parse(" f o o ")<relevant>
camelia [「f」 「o」 「o」]
10:54 test joined 10:57 test left
xinming raydiak: thanks for the example. :-) 11:02
11:05 Skarsnik left
Altreus SmokeMachine: I did « my $a = .relative ~ " $*CWD"; » and $*CWD was correct by the time it was evaluated 11:08
but .relative still contained a ..
I noticed also that you included .relative *again* in the die and it had become correct by then 11:10
11:41 keutoi joined 11:49 leah2 left 11:51 leah2 joined 12:03 reportable6 left 12:18 xinming left, xinming joined
SmokeMachine I've been running this with no luck: www.irccloud.com/pastebin/4KayT48W/ 12:36
raydiak xinming: you're welcome, glad I could help. :) someone backlogging in the next several hours might have a cleaner approach, but some approximation of those two are the only I can think of 12:38
sleep & 12:39
Altreus SmokeMachine: The implication is that evaluating $*CWD is always correct, and so maybe .relative doesn't use that but something underneath it 12:42
that is, maybe accessing $*CWD forces a sync or something, which .relative doesn't trigger
but hang on, why would .relative think the file is in ..
it would have to believe cwd is ./something 12:43
ugexe im pretty sure ive seen that .relative bug in bug reports to zef before fwiw, but i never knew it had been golfed and reported to rakudo 12:47
SmokeMachine Altreus: yes, that's why I thought $*CWD should be something different on the error cases... 12:50
Altreus hmm 12:52
I'm getting it to die if $*CWD is ever not my homedir, hard-coded 12:53
I expect it not to 12:54
yeah no dying 12:56
must be something that's not leaking out to the user level
12:59 Skarsnik joined 13:03 jmcgnh left, Skarsnik left 13:16 jmcgnh joined 13:24 MasterDuke joined 13:28 djerius left 13:30 djerius joined
[Coke] can we track github wiki changes with a bot? 13:59
14:05 reportable6 joined
lizmat I think changes are pushed to a webhook, yes 14:05
jdv y u want a firehose? 14:09
looks like its called a "GollumEvent" 14:13
[Coke] We don't update the rakudo/nqp/moarvm wikis often, actually 14:24
14:25 Sgeo joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/09/20/2021-...-feedback/ 14:36
Anton Antonov I am looking for ways to use a Java JAR file (the classes in it) within a Raku program. I did not succeed finding a module are discussion about that. Any pointers? Should I look into Perl5 modules for that? 14:42
MasterDuke Anton Antonov: i assume you mean using rakudo running on the jvm backend? i don't think that's possible, but bartolin_ would be a good person to ask 14:49
Anton Antonov: i just asked jonathan worthingon your question and he said "I thought something like that was implemented, but it's been years since I looked, so I've really no idea." 14:54
the jvm backend hasn't had a whole lot of development recently, you might try searching for older perl 6 blog posts 14:55
Anton Antonov #MasterDuke Thank you for response! I have to say, I am looking for any possible solution, e.g. (1) using JVM backend, (2) connecting to a Java server, or (3) using "native call" or something. From your answers -- at this point -- I will simply not look for using/connecting to Java from Raku. 15:18
MasterDuke github.com/rakudo/rakudo/blob/mast...terop.java looks like maybe something is possible? 15:22
15:25 linkable6 left, evalable6 left 15:26 evalable6 joined
Anton Antonov @MasterDuke -- yes, very promising! 🙂 This "old" discussion is what I found: stackoverflow.com/q/27156329 . 15:35
MasterDuke cool 15:36
user51 skaji: lizmat: thanks! 15:40
skaji: sorry, i meant skarsnik, seems like they left 15:41
15:45 keutoi left 15:47 leah2 left, leah2 joined 15:58 Maylay left 16:01 sena_kun left 16:04 user51 left 16:07 Maylay joined
xinming in .grep(...) Is there shorter way to write something like, .grep(* !~~ /^ \s+ '#' /); ?? 16:10
it's just use negative value of regex 16:11
Altreus according to the doc 16:15
say <a b c d e f>.grep(none /<[aeiou]>/); # OUTPUT: «(b c d f)␤»
not that one
say <a b c d e f>.grep({! /<[aeiou]>/}) # OUTPUT: «(b c d f)␤»
that one
but also the first one, I suppose!
16:22 Woodi joined 16:34 lichtkind joined 16:40 [Coke] left, dakkar left
xinming Got it, thanks. 16:42
17:51 rba left, rba joined 17:53 nine left 17:54 nine joined 17:56 immediate joined 18:02 reportable6 left 18:03 reportable6 joined 18:08 immediate left 18:10 clarjon1 left 18:11 clarjon1 joined 19:47 gabriel80546 joined
gabriel80546 Have you ever wanted to run raku on your phone? well that is totally possible. 19:48
the great guy named Max Kapusta on stackoverflow have figured that out.
all you need is to use the app UserLand and install rakudo with `sudo apt install rakudo`
stackoverflow.com/questions/690910...1#69247911
xinming I used that, but it's not the newest version of raku 19:56
hmm, Maybe my info is outdated, I tried it at the beginning of this year.
19:56 user51 joined
xinming I'll try userland the other day. ;-) 20:01
gabriel80546 try it. it really works 20:02
20:14 _73 joined, gabriel80546 left 20:20 tejr left 20:27 linkable6 joined 21:27 Manifest0 left 21:28 Manifest0 joined 21:39 [Coke] joined 21:53 user51 left 22:53 linkable6 left, evalable6 left 22:55 evalable6 joined 22:57 linkable6 joined 23:08 djerius left 23:13 djerius joined