Notice that when executing a single expression, Amber automatically includes it's standard library for you.Amber: Programming language compiled to Bash
41–50 of 330 posts
Re: Amber: Programming language compiled to Bash
#42I guess I don't understand the point. Could someone summarize why I would use this rather than writing my utilities in something that doesn't compile to a quirky, limited programming language?
Because the runtime for those utilities is available on just about every Linuxy OS there is. Saves you having to install the runtime separately, eg in your CI pipeline.
Re: Amber: Programming language compiled to Bash
#43Maybe there are existing scripting langs that make this so? Ambers approach is not bad but I feel it could be even better.
Re: Amber: Programming language compiled to Bash
#44I also question the mindset that conflates programming with using a program. It seems until some philosopher explains the difference programming can't move forward.
Aside from that shell is the way many (most?) people interact with their computer, so some may find it offensive.
Re: Amber: Programming language compiled to Bash
#45It seems to generate very bad/odd shell so I won't use it. I also question the mindset that conflates programming with using a program. It seems until some philosopher explains the difference programming can't move forward. Aside from that shell is the way many (most?) people interact with their computer, so some may find it offensive.
Re: Amber: Programming language compiled to Bash
#46To my eye, this does not look good. I consider myself to be quite proficient in bash. I write a lot of bash professionally. I've written a compiler (transpiler?) for a strongly typed configuration language that outputs bash. There are three main problems I see here. (1) Pipelines, subshells, and external dependencies. The example on the website compiles a conditional `if age if [ $(echo ${__0_age} ' Pipelines and sub…
Re: Amber: Programming language compiled to Bash
#47What I really want for scripting usecases is a language that has modern language concepts (easy to use arrays and maps, text formatting strings, etc) but that allows me to call commands as easily as I could call functions. Maybe there are existing scripting langs that make this so? Ambers approach is not bad but I feel it could be even better.
Re: Amber: Programming language compiled to Bash
#48Re: Amber: Programming language compiled to Bash
#49What I really want for scripting usecases is a language that has modern language concepts (easy to use arrays and maps, text formatting strings, etc) but that allows me to call commands as easily as I could call functions. Maybe there are existing scripting langs that make this so? Ambers approach is not bad but I feel it could be even better.
The syntax is something like this:
text=@(ls -lh).replace('a','b').split('b')Re: Amber: Programming language compiled to Bash
#50Also: I don’t see mentioned how pipes affect the exit code propagation (i.e. pipefail).