Is there a interactive/ login shell for Raku available? I'm looking for a combination an interactive and scripting environment like the zoid (Zoidberg Shell) or Bash.
Asked
Active
Viewed 225 times
4
-
1Have you tried playing with the Raku REPL? Just type `raku` at your shell prompt: you might be pleasantly surprised. https://course.raku.org/essentials/running-programs/from-repl/ – jubilatious1 Nov 28 '21 at 09:36
-
»ö« .oO ( "Jan 1st 2025: Sysadmins discuss `trapezoid`, @huckfinn's `zoid` descendant as first released in its `zoidtoo` `0.1` form with the help of the Rakoon community 3 years ago today." `Inline::Perl5`/`Inline::Perl6` support `perl` in `raku` & vice-versa. Is/was `zoidtoo` `0.1` a `raku` prog that: uses `zoid`; defines a Raku function `z` that processes a block to map Raku to `zoid` features, passing some thru via `Inline::Perl`; and then calls `zoid`? Is `trapezoid` a descendant that uses the same approach to support PLs like Python via Raku's `Inline::Python`? ) – raiph Nov 28 '21 at 16:50
-
1@raiph Could you let us know what's missing? I can open the Raku REPL and peruse files on my local filesystem. I can execute Raku code on a regex-defined series of filenames (similar to globbing but more precise). I can store data in Raku arrays, etc., and then write them to files. Can you explain what more functionality is required? Thx! [ Ref: https://unix.stackexchange.com/a/675007/227738 https://unix.stackexchange.com/a/676629/227738 https://stackoverflow.com/a/69400187/7270649 – jubilatious1 Nov 29 '21 at 06:02
-
2Rakudoweekley did mention such a project [Weekly](https://rakudoweekly.blog/2020/04/20/2020-16-rash-in-progress/). – LuVa Nov 29 '21 at 19:42
-
@jubilatious1 Good comments! `zoid` README says "aspires to be a fully operational login shell". Here are some basic "litmus tests" and what I assume you mean: Set an env var for session: `%*ENV
=42`. List files: `q:x 'ls'`. Make/change dir: `mkdir 'bar'`/`chdir 'bar'`. Echo to file: `spurt 'foo', 'ls'`. chmod to exec: `chmod 0o755, 'foo'`. Right? `zoid` doc says "aimed at creating an easy to use interface". Would you say my litmus test examples, and other cases, are as easy as `zoid`? If not: Maybe a `trapezoid` along lines of `raku -Mzoid:from – raiph Nov 30 '21 at 14:15` etc would be good? -
@jubilatious1 I'd upvote an answer by you explaining your perspective. You could outline what vanilla `raku` REPL provides (eg command line history via readline/linenoise or whatever, and so on); show basic usage (eg my examples); mention creating a file of `sub`s and starting Raku with `raku -Mmyshellstuff` or whatever; briefly comment on the `rash` and `LREP` options mentioned in the current two answers; discuss/link highlights of [shell related `[raku]` SO Q+As](https://stackoverflow.com/search?q=%5Braku%5D+shell); discuss/link doc and articles (eg your SE unix answers). Make it a goldmine! – raiph Nov 30 '21 at 14:31
2 Answers
4
This may be of interest as a project for building on. https://raku-musings.com/rash-index.html

MorayJ
- 537
- 2
- 8