News for hackers. Stuff that matters.
Re:Common Lisp for Shell Scripting by sneed_chucker on Thursday May 23, 2024 @11:32AM (#40455977)
I feel like I've written this comment a million times but here it is again.

Shell scripts are mainly written in order to automate subprocess-heavy tasks or to take advantage of the general availability of bash or bourne-compatible shells on most modern Unix based systems.

If you want things like reasonable variable scoping, real functions, loops, libraries for path and string manipulation, or a sane separation between what is and isn't a string, then Python is the obvious choice.

Yes, Python's subprocess module is less convenient than doing a subprocess call in Unix shell, but you can replace grep, sed, awk, find, and similar common subprocess calls in shell scripts with library and built-in functions in Python. The end result tends to be more a readable, maintainable, and testable script.

Python 3 also gets installed by default on nearly all non-minimal Linux distros these days. SBCL gets installed by default nowhere.

Re:Common Lisp for Shell Scripting by neilyio on Thursday May 23, 2024 @11:54AM (#40456299)
I use shell scripts left and right for all kinds of things in my regular dev workflow. Running tests with various configurations. Complex tmux layouts. Syncing non-got data. I could go on and on. Common Lisp would be an incredible asset for this, as Babashka already is in the Clojure world. The REPL alone makes writing/maintaining these scripts very efficient. Why do you feel like Python must be the choice for everyone?
Re:Common Lisp for Shell Scripting by Jtsummers on Thursday May 23, 2024 @11:55AM (#40456314)
> Python 3 also gets installed by default on nearly all non-minimal Linux distros these days. SBCL gets installed by default nowhere.

By that rationale we should only use languages which are installed by default on most systems. That's a severe reduction in the number of languages available for people to use.

Re:Common Lisp for Shell Scripting by phlakaton on Thursday May 23, 2024 @12:11PM (#40456529)
laughing in m4
Re:Common Lisp for Shell Scripting by hatmatrix on Thursday May 23, 2024 @11:48AM (#40456205)
The downside of this is that Python is not a Lisp.
Re:Common Lisp for Shell Scripting by vindarel on Thursday May 23, 2024 @11:46AM (#40456177)
> SBCL gets installed by default nowhere.

for this, it's easy to build a binary.

Re:Common Lisp for Shell Scripting by p_l on Thursday May 23, 2024 @11:53AM (#40456285)
The way I see it, the last time I could rely on Python being reasonably available, the version was 2.4