The Shar shell

The classic workstations of the early 1980s were based on Lisp and SmallTalk, and both exposed powerful REPLs in a way that made them useful as general-purpose interfaces. shar aims to recapture this glory by ditching the pipe semantics established by the Bourne shell in favor of true stream datatypes and return values. Thus, a Unix script like:

curl http://frogfind.com | cat

might become

print (read "/remote/http/frogfind.com")

in shar.

shar scripts are written in the Shell Dhar dialect. This is an interpreted variety of Dhar that nevertheless conforms to the same semantics and syntax as the rest of the system, giving the operator and developer a rare and much-needed consistency. Once you learn how to use the shell, you're already half way to programming the system. A shell script can be converted to an application binary by creating a main entrypoint, changing the file extension, and running the compiler.

Conciseness

Function names in Lisp have a tendency to be somewhat more verbose than Unix or DOS shell commands. One can imagine CLISP’s rename-file being less comfortable to use repeatedly than Unix mv. Consequently, shar comes with a large number of terse aliases that are expanded when executed. It also includes a function to standardize scripts for export, by running them through its own parser to expand aliases, and to return the 'unabridged' version with canonical names—most modern shells have some facility for doing this in situ, but not as a pipe filter to reprocess an entire script.