🦋 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.
guifa Nemokosch: i didnt entirely, which is why I asked for a bit more information. And they just gave it to me! 00:25
tbrowder__ revisiting @arr: the 3 needs to be 4 because we want to skip the last 3 lines so we stop iterating at the 4th line from the end 01:31
m: my @arr = 5, 4, 3, 2, 1; say $_ for @arr[^(*-4)] 01:33
camelia 5
tbrowder__ arg my bad, i have to check on my host again... 01:34
i had an empty line at the end, ugh 01:42
guifa Maybe do a .lines.grep(?*) to clear your empty lines first? 02:40
lizmat m: say (^10).head(*-3) 08:13
camelia (0 1 2 3 4 5 6)
lizmat tbrowder_ ^^ 08:14
nemokosch This was the first thing 😛 10:00
lizmat clickbaits rakudoweekly.blog/2023/09/04/2023-...september/ 12:32
tbrowder__ lizmat++ cool! 12:41
cleaner, clearer, but more chars than antononcube’s solution by my count (8 vs 10 12:46
Geth setup-raku/node20: 0c9a1896d5 | (Shoichi Kaji)++ | 6 files
node20
14:02
setup-raku: skaji++ created pull request #29:
node20
14:03
vendethiel The point is the statement is too vague to begin with 14:17
nemokosch I wouldn't say it's "too" vague 14:30
it does have a clear point
the approach Rust took is basically "easy, we just won't allow you to make mistakes", of course in this context the question isn't if your code is safe but if you can even do all the things required 14:32
and it seems like there are people who say "no" to that question. I wouldn't know but it is indeed suspicious 14:35
tonyo m: say (^10)[0..*-3] 14:37
camelia (0 1 2 3 4 5 6 7)
tonyo m: say (^10)[0..^*-3]
camelia (0 1 2 3 4 5 6)
tbrowder__ tony-o: nice try, 9 chars 14:44
[Coke] m: say (^10)[^(*-3)] 14:58
camelia (0 1 2 3 4 5 6)
tbrowder__ antononcube still the winner 14:59
tonyo what was anton's? 16:25
[Coke] I'm also not sure how you're getting 9 characters there. 16:26
(I guess we could use unicode for the .. and save a char, but not a byte, btw) 16:27
pelevesque Is there a way to call Raku/Rakudo from node.js? I'm using a language that has a node.js integration inside of it, but not raku, so I'm trying to figure out how I could run a raku script and bring the results inside node.js 17:17
[Coke] There is a JS backend for rakudo, but it is not actively maintained. 17:21
pelevesque I heard about that ya... I figured it would be too rudimentary since it was kind of abandonned a long time ago no? I could be wrong. 17:23
nemokosch you are basically right 17:25
frankly, the simplest thing would be to just invoke the process 17:26
now that there are unix domain sockets, you can do some async IPC hopefully
it's kind of a bleeding edge thing but I don't think it will magically mature without users
pelevesque Thanks Nemokosch. I will research that. 17:27
nemokosch of course if it's overkill for your task, you don't have to do it, surely Node.js can launch processes and obtain their output 17:29
[Coke] I just tried to build it, missing a dep locally. 17:31
librasteve o/ 18:07
pelevesque: you can also consider ffi which raku/moarvm supports via Nativecall 18:08
here - github.com/node-ffi/node-ffi/wiki/...I-Tutorial
and here - docs.raku.org/language/nativecall 18:09
antononcube @tonyo I think tbrowder is refering to this code @arr[^(*-3)] . 18:11
librasteve @antononcube we need to lower you code golf handicap 18:13
btw - ++ on the Jupyter::ChatBook - I am working hard at getting a basic Dan::Polars to Jupyter and aim to "meet" you there soon 18:16
antononcube @librasteve Thanks. I am not sure what part of "Jupyter::Chatbook" should go into "Jupyter::Kernel", but I think there is a certain room for obscure but very useful extensions of "Jupyter::Kernel". For example: 1) Having meta cells that allow access to different data structures of the kernel 2) Ability to specify a list of package that loaded with each session. (E.g. "Dan::Polars".) 3) Always being able to connect 18:22
to Mermaid-Ink and be able to render the obtained images.
guessed hi if tokens are not backtracking why is this saying True 18:26
m: grammar { token TOP { .+ "z"? } }.parse("no").so.put
camelia True
guessed misunderstood, ignore please 18:28
librasteve guessed: have you tried use Grammar::Tracer; ? 18:29
m: use Grammar::Tracer; grammar { token TOP { .+ "z"? } }.parse("no").so.put;
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Could not find Grammar::Tracer in: inst#/home/glot/.raku inst#/nix/store/paigpapymi5rpv51zjnpv7xlgcym4752-rakudo-2022.02/share/perl6/site inst#/nix/store/paigpapymi5rpv51zjnpv7xlgcym4752-rakudo-2022.02/share/perl6/vendor inst#/nix/store/paigpapymi5rpv51zjnpv7xlgcym4752-rakudo-2022.02/share/perl6/core ap# nqp# perl5# at
/home/glot/main.raku:1
guessed Thank you 18:50
nemokosch token composition is not backtracking, not the quantifier inside, I suppose 19:37
antononcube Video "Jupyter Chatbook LLM cells demo (Raku)" : www.youtube.com/watch?v=cICgnzYmQZg 22:09
Geth setup-raku: 0c9a1896d5 | (Shoichi Kaji)++ | 6 files
node20
22:10
setup-raku: dcbe26668e | (Shoichi Kaji)++ (committed using GitHub Web editor) | 6 files
Merge pull request #29 from Raku/node20

node20
Geth setup-raku: 52a6e9a58a | (Shoichi Kaji)++ | CHANGELOG.md
add CHANGELOG.md
22:28