Conversion and evaluation of Raku files

This post proclaims a presentation in which we do Raku files conversion and evaluation. Those procedures facilitate Literate programming with Raku.

Presentation plan

Mermaid diagram

Jupyter notebook


Raku setup

In order to use Raku in Mathematica we have to:

  • Load a “Raku mode” package
  • Covert the notebook into “Raku mode”
  • Start a Raku session.

Remark: If no Raku session is started then every Raku cell evaluation is “on its own”, i.e. independent from the rest.

StartRakuProcess["Raku" -> $HomeDirectory <> "/.rakubrew/shims/raku"]

(* KillRakuProcess[]
   KillRakuSockets[] *) 

Here convert the “hosting” notebook into “Raku mode”;


Raku cell example:


All shell commands

 1048  git pull
 1049  cat dont-fear-the-grepper-* >
 1050  open
 1051  file-code-chunks-eval
 1052  open
 1053  from-markdown
 1054  from-markdown -t=pod6 -o=dont-fear-the-grepper-all.pod6
 1055  open dont-fear-the-grepper-all.pod6
 1056  file-code-chunks-eval dont-fear-the-grepper-all.pod6
 1057  open dont-fear-the-grepper-all_woven.pod6
 1058  from-markdown | pbcopy
 1059  open
 1060  from-markdown --help
 1061  from-markdown --raku-code-cell-name=RakuInputExecute --l=raku | pbcopy
 1064  jupytext --help
 1066  jupytext --from=md --to=ipynb -o=dont-fear-the-grepper-all.ipynb
 1067  open dont-fear-the-grepper-all.ipynb
 1068  open
 1069  jupytext --from=md --to=ipynb -o=dont-fear-the-grepper-all.ipynb
 1070  open http://localhost:8888/tree/GitHub/lizmat/articles 



[AA1] Anton Antonov, “Raku Text::CodeProcessing”, (2021), RakuForPrediction at WordPress.

[AA2] Anton Antonov, “Connecting Mathematica and Raku”, (2021), RakuForPrediction at WordPress.

[EM1] Elizabeth Mattijsen, “Don’t fear the grepper” series of articles at

Packages and programs

[AAp1] Anton Antonov, “Text::CodeProcessing” Raku package, (2021), GitHub/antononcube.

[AAp2] Anton Antonov, “Markdown::Grammar” Raku package, (2022), GitHub/antononcube.

[BDp1] Brian Duggan, Jupyter::Kernel Raku package, (2017), GitHub/bduggan.

[JTp1] jupytext , “Jupyter Notebooks as Markdown Documents, Julia, Python or R Scripts”,


3 thoughts on “Conversion and evaluation of Raku files

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s