Live data from Hacker News

Amber: Programming language compiled to Bash

amber-lang.com

121–130 of 330 posts

Re: Amber: Programming language compiled to Bash

#122
I love the concept of a language like this, though I haven't evaluated amber in detail.

I want to do more complex things using bash for devops stuff, because it's mostly working with other command line tools. You could directly use APIs and SDKs of cloud providers, but then things become an order of magnitude more complex than just writing the bash script.

However, when you do that you encounter bash's weaknesses, like not supporting a nested structure like Map> and so on. Having to wrangle tools like jq, sed and awk all together to work around the lack of proper data structures and string manipulation is no fun either.

Something like amber could bridge the gap while still being portable across systems.

Re: Amber: Programming language compiled to Bash

#123
Good stuff - always wanted to write bash but not really write bash or learn it deeply. It's amazing world seeing these tools come out.

Just built a CLI a couple days ago with golang and it was an incredible experience where these things have come.

Things - acute product dev tools. Tools to create peculiar or not soo common tools.

Re: Amber: Programming language compiled to Bash

#124
Good stuff - always wanted to write bash but not really write bash or learn it deeply. It's amazing world seeing these tools come out.

Just built a CLI a couple days ago with golang and it was an incredible experience where these things have come.

Things - acute product dev tools. Tools to create peculiar or not soo common tools.

Re: Amber: Programming language compiled to Bash

#125
post #115
post #69

Earlier quoted context omitted.

Have learned a bit of bash but that's what has kept me going on always. There's no point in learning million little inconsistencies all of which aren't even documented anywhere like a MDN or MSDN if you will.

That's about where I gave up too. You make it sound like you disagree with me when in reality you do. There is no real reason to write any production code in bash or any other shell language.

Bash is for automation, not building services. It's used heavily in sys admin and devops tasks

The reason to learn it is that it can make your dev experience better. Make falls into this category as well. Both are great ways to combine multiple tools together.

That being said, I'm using more Dagger for this purpose these days, which provides you SDKs for your fav langs.

Re: Amber: Programming language compiled to Bash

#126

Earlier quoted context omitted.

Bash is ubiquitous and stable, making bash scripts incredibly portable. All of the other languages you bring up are great for authoring code, but have a non-zero amount of friction when running code in the wild. Python may be omnipresent, but you can rarely count on a specific version or the presence of specific libraries. Go requires compiling platform-specific binaries. Even JVM- or JS-based software requires insta…

Why doesn’t Amber have equivalent issues? Such as depending on a specific version of bash, or specific executables to be installed. Also does bash run on windows outside of WSL? Amber seems to argue that it doesn’t support Windows because Windows doesn’t support bash. That would cut against the idea that bash can target more devices than Python, which runs natively on all platforms.

> Why doesn’t Amber have equivalent issues? Such as depending on a specific version of bash, or specific executables to be installed.

Because it's easy (for most cases) to write backwards-compatible or portable shell scripts and, since Amber is compiled, it can simply generate backwards-compatible code.

> That would cut against the idea that bash can target more devices than Python, which runs natively on all platforms.

The point is that Bash is more ubiquitously available, which is important if you write something like an install script.

Re: Amber: Programming language compiled to Bash

#127

Earlier quoted context omitted.

Bash is ubiquitous and stable, making bash scripts incredibly portable. All of the other languages you bring up are great for authoring code, but have a non-zero amount of friction when running code in the wild. Python may be omnipresent, but you can rarely count on a specific version or the presence of specific libraries. Go requires compiling platform-specific binaries. Even JVM- or JS-based software requires insta…

Why doesn’t Amber have equivalent issues? Such as depending on a specific version of bash, or specific executables to be installed. Also does bash run on windows outside of WSL? Amber seems to argue that it doesn’t support Windows because Windows doesn’t support bash. That would cut against the idea that bash can target more devices than Python, which runs natively on all platforms.

Amber doesn't have equivalent issues because bash and the utilities it uses like bc and sed are incredibly stable. I've found nontrivial shell scripts I wrote decades ago that still run entirely unchanged.

Re: Amber: Programming language compiled to Bash

#128
post #77

Earlier quoted context omitted.

The reality is that in disabling WebGL, you have an incredibly unusual configuration and the author didn’t test for it. Stop making this a philosophical argument. Why does the documentation need WebGL? It doesn’t, but the web has moved beyond just addressing “needs”. Why do you need to be on HN? You don’t. Yet here you are. I’m not arguing that the juice is worth the squeeze here, but your argument has a false premis…

I don't think it's incredibly unusual. On sensitive machines in corporate settings you commonly disable pretty much everything on every page that isn't in the 'trusted zone' or whatever. Personally, by default I shut down all the browser crap that might needlessly allocate RAM or allow memory leaks or slurp cycles without giving me some kind of value. I think this allows me to hold at least a few hundred extra tabs o…

If you mean block all network traffic that isn't in the trusted zone then sure. But disabling features you personally don't like isn't a good security practice.
Post reply on HN