News for hackers. Stuff that matters.
Re:SHCL – An unholy union of Posix shell and Common Lisp by bitwize on Tuesday May 22, 2018 @04:28PM (#17129135)
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).
Re:SHCL – An unholy union of Posix shell and Common Lisp by JackCh on Tuesday May 22, 2018 @04:30PM (#17129158)
There is also rash, with Racket: https://github.com/willghatch/racket-rash
Re:SHCL – An unholy union of Posix shell and Common Lisp by ziotom78 on Wednesday May 23, 2018 @01:06AM (#17131585)
Yes, 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.

Re:SHCL – An unholy union of Posix shell and Common Lisp by ebzzry on Wednesday May 23, 2018 @03:43AM (#17132074)
Scsh is not practical when used as an interactive shell. Where it shines, however, is with non-interactive scripting use. I use it everyday.
Re:SHCL – An unholy union of Posix shell and Common Lisp by zeveb on Tuesday May 22, 2018 @04:51PM (#17129317)
scsh 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

Re:SHCL – An unholy union of Posix shell and Common Lisp by EdwardCoffin on Tuesday May 22, 2018 @06:45PM (#17130059)
You 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

[2] http://www.cs.utexas.edu/users/mfkb/km.html

Re:SHCL – An unholy union of Posix shell and Common Lisp by sedachv on Tuesday May 22, 2018 @11:18PM (#17131259)
In 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-li...

[2] https://common-lisp.net/project/parenscript/reference.html#s...

Re:SHCL – An unholy union of Posix shell and Common Lisp by zeveb on Wednesday May 23, 2018 @10:40AM (#17134538)
I think using all-caps is ugly-as-hell:

    (DEFUN hello-world ()
       (FORMAT T "Hello, world!~%"))
Re:SHCL – An unholy union of Posix shell and Common Lisp by fiddlerwoaroof on Wednesday May 23, 2018 @12:12AM (#17131439)
Yeah, 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.
Re:SHCL – An unholy union of Posix shell and Common Lisp by groovy2shoes on Wednesday May 23, 2018 @08:07AM (#17133417)
Yes. 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
Re:SHCL – An unholy union of Posix shell and Common Lisp by rurban on Tuesday May 22, 2018 @11:55PM (#17131372)
It never got readline/libedit support AFAIK. I started once but it never got ready.
Re:SHCL – An unholy union of Posix shell and Common Lisp by groovy2shoes on Wednesday May 23, 2018 @08:14AM (#17133458)
If 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 ;)
Re:SHCL – An unholy union of Posix shell and Common Lisp by cat199 on Tuesday May 22, 2018 @06:37PM (#17129999)
There is a 64bit port of scsh which installs against scheme48 available on github, fwiw.
Re:SHCL – An unholy union of Posix shell and Common Lisp by hossbeast on Tuesday May 22, 2018 @09:25PM (#17130866)
Most entertaining readme I've read in awhile. Nice job!
Re:SHCL – An unholy union of Posix shell and Common Lisp by chrisweekly on Tuesday May 22, 2018 @08:36PM (#17130635)
My cousin's a core contrib on [xonsh](https://xonsh.org) which is a posix-compliant python shell. I remember him cackling about making his env completely unusable to anyone else in the world (while giving himself amazing powers)...
Re:SHCL – An unholy union of Posix shell and Common Lisp by euske on Tuesday May 22, 2018 @08:05PM (#17130510)
Now only if there was a Haskell shell (Hashell?) with monads as UNIX pipes...
Re:SHCL – An unholy union of Posix shell and Common Lisp by yorwba on Wednesday May 23, 2018 @04:10AM (#17132208)
Re:SHCL – An unholy union of Posix shell and Common Lisp by eddieh on Tuesday May 22, 2018 @08:33PM (#17130621)
Idk about “unholy”. I wish I could make eshell (in Emacs) my full time shell, but certain things like nvm don’t work, etc.
Re:SHCL – An unholy union of Posix shell and Common Lisp by chrisweekly on Tuesday May 22, 2018 @08:38PM (#17130645)
nvm sucks! try n!

https://github.com/tj/n/

seriously, it's so much tidier!

Re:SHCL – An unholy union of Posix shell and Common Lisp by adisbladis on Wednesday May 23, 2018 @12:24AM (#17131466)
Imho all these tools like nvm, rvm etc are deeply flawed and doesn't really do their jobs all that well.

Where I work we use the nix package manager. Making sure your team is using the same version of node is just a few lines of config away:

  with (import <nixpkgs> {});
  
  mkShell {
    buildInputs [ nodejs-8_x ];
  }
Pinning the whole package tree is just a few more lines away and offers you full reproducibility but I omitted it for brevity.

Another upside is that this approach is language agnostic and works for all tools packaged in the nix package repository.

Re:SHCL – An unholy union of Posix shell and Common Lisp by jacquesm on Tuesday May 22, 2018 @04:23PM (#17129103)
Unix? Unity?
Re:SHCL – An unholy union of Posix shell and Common Lisp by mattnewton on Tuesday May 22, 2018 @04:35PM (#17129204)
Pun for “union” most likely. It’s punny because it is part of a Unix. The original title is union I think though.
Re:SHCL – An unholy union of Posix shell and Common Lisp by sctb on Tuesday May 22, 2018 @04:42PM (#17129256)
We've s/unix/union/'d the title.
Re:SHCL – An unholy union of Posix shell and Common Lisp by jacquesm on Tuesday May 22, 2018 @06:12PM (#17129842)
Thank you!
Re:SHCL – An unholy union of Posix shell and Common Lisp by AdieuToLogic on Tuesday May 22, 2018 @04:38PM (#17129230)

  It’s punny because it is part of a Unix.
I see what you did there. Nice :-).
Re:SHCL – An unholy union of Posix shell and Common Lisp by eslaught on Tuesday May 22, 2018 @04:28PM (#17129142)
I think that's a typo from bullet 2 in the README: "an unholy union of POSIX Shell and Common Lisp"
Re:SHCL – An unholy union of Posix shell and Common Lisp by nur0n on Tuesday May 22, 2018 @04:29PM (#17129149)
readme says "an unholy union of POSIX Shell and Common Lisp"