Hacker News new | past | comments | ask | show | jobs | submit login

CLASH: CLisp As SHell http://clisp.org/clash.html



I've never used it as a shell per se, but another little tweak I do sometimes for shell script type things in Lisp is install a read macro like

    (set-macro-character
     #\$ #'(lambda (stream char)
             (declare (ignore char))
             `(uiop:getenv ,(symbol-name (read stream)))))
This lets you read environment variables like $home, and write to them like ordinary variables, eg (setf $message "hello"). It reads the variable name as a Lisp symbol, so by default it will be upcased; this happens to be convenient for environment variables, but as with any symbols in Lisp, you can escape lowercase characters using either \ before the character or |'s around the whole symbol, or you could change the readtable case, or just preserve case initially in the read macro.


suprised no one has posted the venerable https://en.wikipedia.org/wiki/Scsh


The most memorable thing about Scsh for me is its acknowledgments rant, which starts:

"Who should I thank? My so-called "colleagues," who laugh at me behind my back, all the while becoming famous on my work? My worthless graduate students, whose computer skills appear to be limited to downloading bitmaps off of netnews? My parents, who are still waiting for me to quit "fooling around with computers," go to med school, and become a radiologist? My department chairman, a manager who gives one new insight into and sympathy for disgruntled postal workers?"

and concludes:

"Oh yes, the acknowledgements. I think not. I did it. I did it all, by myself."

http://philip.greenspun.com/wtr/dead-trees/acknowledgments.h...


Scsh home page here: https://scsh.net/




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: