6 ms·
from TFA: > Perhaps the only language I've used which translates well both for terse REPLs and lengthier scripts is LISP. Why not just use a lisp then?
by satyanash 5y ago
from TFA:
> Perhaps the only language I've used which translates well both for terse REPLs and lengthier scripts is LISP.
Why not just use a lisp then?
- LanternLight83 5y agoMurex comes across kinda lisp-y with the keyword-less, prefix-notation #'if statement. Emacs also offers a unique (and very lisp-y) shell syntax within #'eshell.
- adrian_b 5y agoActually there exists a shell, "scsh", which uses the Scheme language, i.e. a LISP variant. "scsh" is less convenient for interactive use than bash or zsh, because it is more verbose, but it was quite good for scripts, certainly more convenient as a replacement for shell scripts than Python or the like (because it had a better syntax for the equivalent of a POSIX command list, with pipes, and/or lists, redirections and parameter expansions). Many years ago, I have written and used with good results a lot of "scsh" scripts, for things deemed to be too complex for POSIX shell scripts. However, AFAIK, "scsh" has not been updated in recent years, so I do not know how good it would still be today.
- isr 5y agoGauche scheme is a very "scripting-focussed" implementation, with some niceties inspired from scsh. I've used it's repl as a shell of sorts for a short while, just to see if I could. Janet is a new lisp (heavily inspired by Lua, not surprising given its author had previously started fennel, a lisp which compiles to Lua) which fits a smiliar "scripting" niche. An extension has been made for it (janetsh) to make it suitable as a shell replacement. In a similar vein, racket has rash. And if you consider tcl as a "lisp for strings", then it's almost a shell right out of the box. I've used jimtcl (again, like gauche, with a heavily customised shell-focussed lib of my own) as an interactive shell. Lot's of choices out there, if one is willing to roll one's sleeves up ;-)