Do you like my watch? Its a family heirloom. My grandfather sold it to me on his death bed. Woody Allen
executes the system command in the workspace and reads the result into the workspace
(july 2025: not implemented yet)
clear; add "echo $PATH"; system; print; clear;
The nom fragment below responds to the sentence
# fragment
# read the input word-by-word
while [:space:]; clear;
whilenot [:space:]; put;
"this","that","it" {
"that","it" { clear; add "this"; }
put; clear; add "this*"; push; .reparse
}
"print","type","show","delete","del","remove","rm" {
# make the actions canonical
"type","show" { clear; add "print"; }
"del","remove","rm" { clear; add "delete"; }
put; clear; add "action*"; push; .reparse
}
!"" {
clear; add "unknown word: "; get; add "\n"; print; quit;
# trigger the error/help system here.
}
parse>
pop; pop;
"action*this*" {
clear; get; "print" {
clear; add "sed -n '/^ *this:/{s/^ *this://;p}' state.txt";
system; put; clear;
add "cat "; get; put; clear;
}
clear; add "command*"; .reparse
}
(eof) {
"command*" {
}
}
push; push;
This command is very powerful, and I hesitated before adding it to the pep-nom system because I wanted to keep pep and nom as simple as possible, adhering to it’s core tenet of being a language parser. But I think this command does not deviate from nom's “core mission” because it only reads text into the machine. It also should allow nom to be used in my “Tiny Language Model” experiments, which is to create scripts that accept simple plain English queries and actions and then execute them.