News for hackers. Stuff that matters.
Re:Hush, a modern shell scripting language by da39a3ee on Monday April 25, 2022 @10:29PM (#31163342)
The point is that you can do things like create external processes, pipe them together, redirect output to files, with the same ultra-lightweight syntax of bash etc. Compare that to all the nonsense you have to do in Node or Python to pipe two processes together!
Re:Hush, a modern shell scripting language by feanaro on Tuesday April 26, 2022 @02:10AM (#31164505)
Re:Hush, a modern shell scripting language by mypalmike on Tuesday April 26, 2022 @02:39AM (#31164658)
Wow that's clever. Scary and clever. I might try it out.
Re:Hush, a modern shell scripting language by geophile on Tuesday April 26, 2022 @10:43AM (#31168082)
Re:Hush, a modern shell scripting language by gorgoiler on Tuesday April 26, 2022 @12:35AM (#31163963)
You’re right in that writing Python using shell paradigms is awful.

Writing Python that shells out to do stuff — but using Python paradigms — isn’t so bad. Particularly if you are used to calving off your shell stuff into shell functions that run something and massage the output. In Python you end up doing something pretty similar: yield the text you want and use that as arguments to the next call to subprocess.run.

Basically “| xargs command” but nicer.