> Typescript to bash Literally the worst of both worlds.
Amber the programming language compiled to Bash/Ksh/Zsh
11–20 of 72 posts
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#12Re: Amber the programming language compiled to Bash/Ksh/Zsh
#13If your script is complex enough to need a higher level language you might as well just switch to python
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#14On the other hand, we're at a point for a binary language (or standard / framework) that one AI/LLM creates and another one validates.
What are we missing?
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#15Re: Amber the programming language compiled to Bash/Ksh/Zsh
#16Thank you, but... why not just write in Bash, or the shell you prefer? Why learn a yet another opinionated wrapper? Yes, Bash or any shell is a very complex and utterly environment dependent language to approach with all due care for security and compatibility, yet hence the lack of wrapper that may not even be aware of these crucial cases at all.
bash is really painful to use for anything beyond the most rudimentary logic. Bourne and Mashey were terrible language designers. (By contrast, Thompson's V6 shell is very elegant, if limited.) That said, this should just be a shell itself and not something that generates into other shell dialects. Otherwise, why not use Ruby or something like it that has actual expressive power?
I'm guessing the advantage here would be that the compiled "bytecode" (the resulting bash) can be distributed to systems that would then not need to have Amber installed. (And vs. a real binary from, e.g., Go/Rust/etc., it isn't tied to the platform, either.)
Vs. a Ruby script would require Ruby as a run-time dependency; Amber here is effectively a compile-time dependency.
Python 3 is available basically everywhere these days though, so I think there's still a lot of merit to just using a higher level language like you suggest. Even Ruby, while not available out of the box, is not exactly hard to get on most OSes.
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#17In a world where AI can generate any code for any environment, is there a need for another language? On the other hand, we're at a point for a binary language (or standard / framework) that one AI/LLM creates and another one validates. What are we missing?
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#18This looks great. We have a lot of bash tools because it's the only stable interpreter that we have readily available on all our systems. But bash is a pain to write so this might actually make things easier.
Re: Amber the programming language compiled to Bash/Ksh/Zsh
#19Any language is a shell script if you're brave enough: https://en.wikipedia.org/wiki/Shebang_%28Unix%29
#!/usr/bin/tcc -run
#include
int main(int argc, char **argv)
{
printf("Hello from C!\n");
for (int i = 1; i
And ready is your cscript :) $ chmod u+x cscript && ./cscript hello world
Hello from C!
argument 1: hello
argument 2: world
(I can't even articulate why I love it so much that this works)Re: Amber the programming language compiled to Bash/Ksh/Zsh
#20Hmm...
2. Support Fish too. Having one language that can generate zsh (macOS default), Fish (power users default), and bash would be really nice!