Muscovy is a small programming language that I developed in Fall 2023 that is designed for literate programming. It is named after Muscovy ducks, which are hardy, easy to raise birds that look a bit ugly, which reminds me in spirit of the task that this tool is supposed to facilitate. The goal of Muscovy is to make it easy to work with external systems that require text (like source code or markup files) and duck tape them together under a single narrative thread. The interpreter is written in Perl. I expect to rewrite the interpreter as a literate program in Muscovy someday, but for now I will just share the Perl script and discuss the implementation and design.
point muscovy.pl
The syntax of Muscovy is line oriented and optimized for easily writing prose. By default, a line is treated as a line of prose. All lines that are treated as forms in the language are prefixed by the @ and > characters. At the top level, a Muscovy program is a collection of prose forms, pragmas, and statements. A prose form is just for documentation and has no effect on during evaluation of the program. A pragma is a form that is evaluated in a preprocessor step before the main evaluation step of the program. This preprocessor step is meant to simplify the job of the main evaluation for reasons having to do with static analysis and file inclusion. Finally, statements are things that perform desired effects, such as writing files to disk, appending text to phrases, and executing build steps.
note I need to document usage, write a reference for each of the syntactic
forms, and then have a small tutorial. This isn't necessarily for others
to use, but I think the design would be valuable to communicate in case
others want to design their own literate programming tool.