3 ms·
To me it seems like the REPL is the eventual solution. A shell is pretty much one already, you install programs in the same way one loads libraries in a repl. I
by wudangmonk 5y ago
To me it seems like the REPL is the eventual solution. A shell is pretty much one already, you install programs in the same way one loads libraries in a repl. It lacks a language to glue them together since bash is not up to the task. The reason people want structured data and not just text is to be able to glue programs in the same way you can with functions.
The glue should be structured data, none of that object bs. It should also have the option for plain text because sometimes that is all you need and you want simple tasks to remain simple. I'm guessing you'll use some sort of binary spec in order to help in the conversion of data structures between languages.
Once you have the communication between programs handled all you need is a decent language to handle the logic. The language doesn't really matter though since the core that allows all of this is not tied to any one language. I'm sure plenty of people would write their own wrapper for their favorite language.
- funnybeam 5y agoAgreed and you’ve just described PowerShell which I think is perfect for this. That said, I do also appreciate bash scripts which are cleaner if you just have a long list of commands to execute and no real logic involved
- stonewareslord 5y ago> since bash is not up to the task What do you mean by this? You can write safe shell scripts; it just takes discipline and learning how to correctly write them. There are a lot of pitfalls but it isn't that hard if people actually learned the language. Edit: to clarify discipline meaning always doing things correctly and never taking shortcuts. For example, you must use: while IFS= read -r || [[ "${REPLY}" ]]; do ((X++)); done < <(command) If you want to loop over lines in a file. Don't use for loops, don't pipe to while, etc. It may be verbose but it won't be buggy