News for hackers. Stuff that matters.
Re:Writing Small CLI Programs in Common Lisp by bmitc on Wednesday March 17, 2021 @05:38PM (#26497088)
A quote from that link:

> Life's too short to remember how to write Bash code.

Hard agree.

Re:Writing Small CLI Programs in Common Lisp by JasonFruit on Wednesday March 17, 2021 @07:29PM (#26498082)
I really feel bad that I don't write more Bash, but every time I learn some, it's gone. I cannot retain that language, and I don't understand why: I'm a language gourmand, in general. But I throw Python, Scheme, or even Nim at little scripts every time, because I have to look everything up if I do it in Bash.
Re:Writing Small CLI Programs in Common Lisp by azalemeth on Wednesday March 17, 2021 @07:48PM (#26498215)
I've always internally thought that there are some languages that our brains just _don't_ like.

I used to think that there was "something wrong" with me for finding C++ verbose and C expressively dangerous, or to find myself reaching for multi-line awk, sed, and bash scripts that did _stupid_ things when I "knew" that a better solution existed but I didn't know how to _express_ that solution concisely.

Perhaps a more concrete example would be this: I don't use python often and some of its syntactical quirks get me every time -- like, for example, None as a method to insert a new axis by convention in numpy (so much so that numpy define np.newaxis as an alias to it). It makes total sense but at the same time, the fact that the language likes having what almost looks like a C NULL as a method to insert a dimension seems...wrong, like it should be a syntax error.

I've now just come to realise that hey: if you can't express this concept well in one language, and you _can_ in another, it's well worth prototyping the solution in the right domain and one could always write something in a "sensible" language later if it turns out to work.

Re:Writing Small CLI Programs in Common Lisp by aidenn0 on Wednesday March 17, 2021 @10:22PM (#26499141)
I realized at one point that I was writing an awful lot of shell code despite never really learning shell.

The only way I found to learn it that was fun was too write a shell implementation myself. Just POSIX, though so I never learned ksh/bash features.

Re:Writing Small CLI Programs in Common Lisp by JasonFruit on Thursday March 18, 2021 @08:05AM (#26501781)
That's a really great idea, and I expect to get nothing done for the next week thanks to you.
Re:Writing Small CLI Programs in Common Lisp by aidenn0 on Thursday March 18, 2021 @03:46PM (#26506753)
Re:Writing Small CLI Programs in Common Lisp by closeparen on Wednesday March 17, 2021 @10:55PM (#26499306)
Every time I've started to write a shell script, I've finished it in Python.
Re:Writing Small CLI Programs in Common Lisp by fctorial on Thursday March 18, 2021 @07:27AM (#26501564)
Or nodejs. It's python, but better.
Re:Writing Small CLI Programs in Common Lisp by idolaspecus on Wednesday March 17, 2021 @05:47PM (#26497178)
Life’s too short to not learn how to write bash code.
Re:Writing Small CLI Programs in Common Lisp by fctorial on Wednesday March 17, 2021 @06:47PM (#26497748)
I'm astonished that we haven't moved past bash.
Re:Writing Small CLI Programs in Common Lisp by blacktriangle on Friday March 19, 2021 @11:20AM (#26514316)
I'm not. "Everything is a string" is an incredibly powerful worldview for tying systems together where those systems never put any thought into interoperability. Any realistic bash alternative would either need to rewrite the entire user land with a more structured exchange format like JSON or .NET objects, or ship with adapters for most every command line tool we use.
Re:Writing Small CLI Programs in Common Lisp by exdsq on Wednesday March 17, 2021 @06:44PM (#26497710)
I love writing bash!