I know I’m in my own little corner, but stringing process together is the shell/unix superpower.
The “Unix way” stands on the shoulders of stdin, stdout, pipe, and fork.
And the shells make that a first class concept. Breaking up the command line and linking processes together is the #1 job of a shell, everything else is gravy.
The scheme and lisp shell takes fail here, just because you have to go through the gymnastics of syntax.
My fantasy would be to have something like this:
(! ls | (myfunc) | sort -r -n | >list)
(“100 x.txt” “200 y.txt”)
Piping system commands into my own functions within the environment.Sure, I could do:
ls | myfunc.scm | sort -r -n
But then I can do that with anything, not just scheme (there’s that Unix superpower again).
So basically using the shell of something like Xerox's PARC Interlisp-D and threading macros.
I would be something like this,
Followed by "Select => Execute" with the mouse, or "Execute last form" with keyboard shorcut.You also have to go through gymnastics of syntax to write a shell program that anyone could reliably use on any data, with any file names.
How about we parse digit sequences out of the path names and combine them with the originals, then sort on those digit sequences turned into integers: csort is caching sort: it caches the result of the key function through which the elements are projected to form the argument of the comparison. In other words, so we don't wastefully call get-nums multiple times for the same path.