5 ms·
Anybody remember scsh? Seems a better integration of the shell and Lisp bits if you ask me (although this is a neat hack, don't get me wrong).
by bitwize 9y ago
Anybody remember scsh? Seems a better integration of the shell and Lisp bits if you ask me (although this is a neat hack, don't get me wrong).
- JackCh 9y agoThere is also rash, with Racket: https://github.com/willghatch/racket-rash https://github.com/willghatch/racket-rash
- zeveb 9y agoscsh was definitely awesome, and it's not really practical in Common Lisp[0], due to Lisp's unfortunate choice to upcase all symbols. Made sense at the time, but in retrospect I think it was a mistake. It's a real pity that Franz's modern mode[1] didn't become more popular. [0]: it's possible, just ugly as hell because either one would have stuff like (|ls| |etc|) or one would have stuff like (|LENGTH| …). [1]: https://franz.com/support/tech_corner/modern.mode.lhtml https://franz.com/support/tech_corner/modern.mode.lhtml
- EdwardCoffin 9y agoYou can use Readtable case :preserve to avoid the ugly-as-hell stuff [1]. Some libraries do this, for example KM [2] [1] http://clhs.lisp.se/Body/23_ab.htm http://clhs.lisp.se/Body/23_ab.htm [2] http://www.cs.utexas.edu/users/mfkb/km.html http://www.cs.utexas.edu/users/mfkb/km.html
- sedachv 9y agoIn fact you can have case-sensitive Common Lisp packages that are completely backwards compatible with case-insensitive CL code by settings readtable-case to :invert[1], and this works without any problems for interfacing with external case-sensitive environments.[2] Allegro's modern mode is what you would get if you assume case sensitivity as a default, but portable Common Lisp can handle case sensitivity perfectly fine without breaking backwards compatibility. [1] https://oneofus.la/have-emacs-will-hack/2011-09-20-common-lisp-is-case-sensitive.html https://oneofus.la/have-emacs-will-hack/2011-09-20-common-li... [2] https://common-lisp.net/project/parenscript/reference.html#section-symbolconv https://common-lisp.net/project/parenscript/reference.html#s...
- zeveb 8y agoI think using all-caps is ugly-as-hell: (DEFUN hello-world () (FORMAT T "Hello, world!~%"))
- fiddlerwoaroof 9y agoYeah, as others are saying, the CL spec foresees this with the way readtables work. But, honestly, the default behavior is pretty nice for normal programming tasks.
- cat199 9y agoThere is a 64bit port of scsh which installs against scheme48 available on github, fwiw.
- rurban 9y agoIt never got readline/libedit support AFAIK. I started once but it never got ready.
- groovy2shoes 8y agoIf you haven't already, I recommend checking out rlwrap, which you can use to run any ol' program that takes input on stdin and give it readline support. I use it quite a lot, and I have aliases in my .bashrc for wrapping various interpreters (like tclsh, sbcl, ocaml, and my own interpreters), but you can even use it to wrap /bin/cat and have a rudimentary line editor ;)
- ziotom78 9y agoYes, and it was AWESOME! I never used it as a replacement for bash (no readline support), but a lot of shell scripts were much easier to write and to read in Scheme: full support for mathematical expression, elegant iteration, support for lists, etc., and this very well integrated with shell constructs like pipes and redirections. I used it a lot and saved me lots of headhaches. It's a pity that the project was abandoned.
- ebzzry 9y agoScsh is not practical when used as an interactive shell. Where it shines, however, is with non-interactive scripting use. I use it everyday.
- groovy2shoes 8y agoYes. As a bonus, the acknowledgements in the scsh manual also features some of the finest writing I've ever read in a technical document: https://scsh.net/docu/html/man.html https://scsh.net/docu/html/man.html