4 ms·
I'd love to see a little language which compiles to _readable_ bash. Could it be so hard? There's a dead project that comes up now and then called bish. https:
by robbywashere_ 3y ago
I'd love to see a little language which compiles to _readable_ bash. Could it be so hard? There's a dead project that comes up now and then called bish.
https://github.com/tdenniston/bish https://github.com/tdenniston/bish
- osmsucks 3y agoOne of my current hobby projects is a scripting language which compiles to POSIX sh (for maximum portability). However, it's far from complete, the output is not exactly readable and POSIX sh is so limited that I might need to change course and target something else. EDIT: I didn't know of Bish, but from its code samples we seem to have converged on similar syntax :)
- nerdponx 3y agoMaybe this is a bit of a silly question, but what's the point? I do think it would be a really fun project. But is there really a practical use for it? Bash is portable but not that portable if you want to care about version compatibility. I understand that it's not always possible to install a different interpreted language like Perl or Python. Maybe the use case is for platforms where you can't install other language interpreters and can't cross-compile a compiled language? It seems like a very specific situation.
- scns 3y agoNot what you asked for but there is Babashka for scripting in Clojure. https://github.com/babashka/babashka https://github.com/babashka/babashka
- Shawnj2 3y agoWrite the script in pseudo python and ask ChatGPT to convert it into bash but leave a lot of comments