This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
greenfork Can I execute a file and start a REPL after that, so that I have all the variables available? 16:10
I tried --repl-mode=interactive, doesn't seem to work 16:11
antononcube @greenfork There are/were recently a couple of discussions with similar requests / wants in the main IRC channel. 16:27
greenfork @antononcube thank you!
antononcube @greenfork Basically, the conlcusion I got is to have a small Raku module with those variables and import it with require. 16:28
BTW, I have a very similar request or wanted feature for the Jupyter kernel -- to have cells that automatically evaluated. 16:29
@greenfork Here is a relevant answer by @ugexe: > <ugexe> require WHATEVER:file</Users/nlogan/repos/Foo.rakumod> <$x>; say $x > <ugexe> you can use something like that too which might be better for you since you don't need to add a library path 16:31
greenfork Interesting, thank you! 16:32
lizmat_ greenfork: there's a repl sub since 2022.x I believe 17:32
lizmat m: repl 17:32
camelia You may want to `zef install Readline`, `zef install Linenoise`, or `zef install Terminal::LineEditor` or use rlwrap for a line editor

Type 'exit' to leave
[0] > ===SORRY!=== Error while compiling <tmp>
Missing infix inside hyper
at <…
lizmat heh 17:33
greenfork lizmat: Oh wow! I didn't know it exists, it is a perfect debugging tool too!
lizmat yeah, it was intended as such :-) 17:34
docs.raku.org/type/independent-rou...s#sub_repl
greenfork @antononcube ^^^ this is awesome 17:40
antononcube @greenfork Well, I cannot make that advice by ugexe work for me. How did you apply it? 20:53
.ohnowendigo m: say (/[\w\d]+/, /[\w\d]*/).map: {"xa5".match($_)} 21:41
Raku eval (「a5」 「」)
.ohnowendigo Why is the + able to match the a5 while * cannot? Aren't both supposed to be greedy? 21:42
antononcube Because matching nothing with * is a match. 21:45
@.ohnowendigo Try it with the adverb :ex . 21:46
say (/[\w\d]+/, /[\w\d]*/).map: {"xa5".match($_):ex} # ((「a5」) (「」 「a5」 「」 「」 「」)) 21:47