MADR CLI interface: Febuary 3, 2026
Context and Problem Statement
The CLI needs a collection of command line arguments to be useful. We need to decide on what the shape of those arguments/options should be.
Decision Drivers
- Simplicity, the interface should favor simplicity over features.
- The interface has to be fast and flexible.
- The interface has to be obvious.
Decision Outcome
Multiple sets of options satisfy our needs. We will choose the following:
-c: Number of words to generate, default 10-s: A stack size to allocate, default 100- input on standard in
- output on standard out
Considered Options
-c: Number of words to generate, default 10-l: A path to a file-o: A path to an output file-s: A stack size to allocate, default 100- input on standard in
- output on standard out
Pros and Cons of the Options
-c
- Good, simple control of repetitions
- Good, "matches" DGL v1
-l
- Good, portable
- Good, doesn't need special termination
- Good, user friendly
- Bad, path manipulation can be annoying
- Bad, redundant with
cat <> | pdgl
-o
- Good, portable
- Good, user friendly
- Bad, redundant with
>
-s
- Good, simple control of repetitions
- Good, allows for system/run specific experimentation
stdin
- Good, simple
- Good, portable
- Bad, requires a special
EOFterminal char
stdout
- Good, simple
- Good, portable
- Good, no special memory management
- Bad, path handling can be challenging
More Information
N/A