Live data from Hacker News

Amber: Programming language compiled to Bash

amber-lang.com

101–110 of 330 posts

Re: Amber: Programming language compiled to Bash

#101

Assuming that these are typical outputs from Amber: https://github.com/Ph0enixKM/Amber/blob/master/setup/install... https://github.com/Ph0enixKM/Amber/blob/master/setup/uninsta... The inconsistent indents and decorated variable names made them less readable than hand-written Bash scripts. I understand that most compiler outputs are not meant to be human readable, but generally we would get minification and/or obfusca…

Nothing can be done about variable names, but format inconsistencies can be autofixed with shfmt. I've been using it for years and it's been solid.

https://github.com/mvdan/sh

Re: Amber: Programming language compiled to Bash

#102
post #85

Earlier quoted context omitted.

'WebGL disabled' is a pretty strong fingerprint anyways

"Disabled" is not metric among those who have disabled it, while WebGL enabled allows identifying different browsers with WebGL enabled. I know what you mean, but statistically, I don't think that it is easier to guess the person from those who have disabled it versus the list of all browser fingerprints where is that matching or very close unique fingerprint.

You just self select as someone who wants to see privacy focused ads

Re: Amber: Programming language compiled to Bash

#103
post #69
post #55

Earlier quoted context omitted.

> Just learn bash. There are many reasons why it is to be avoided. For me the deal breaker was that one time I spent 2h debugging a script only to find out there was an extra space character that made the whole thing break silently. I would be willing to learn a sane language, but bash isn't one. If you need to know of a million tiny gotchas to implement even the simplest task safely and portably, then there isn't an…

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.

Most are documented by shellcheck.

https://gist.github.com/nicerobot/53cee11ee0abbdc997661e65b3...

But you don't really need to spend any time learning them, just plug shellcheck itself into your editor and go write some scripts. I've written don't know how many thousands of lines of bash (and sh, depending on the task at hand) that work across five operating systems, and it's honestly a non-issue if you follow the warnings.

Re: Amber: Programming language compiled to Bash

#105
post #61

> Variable declarations can be overshadowed - this means that you can redeclare the existing variable with different data type in given scope if you need to. I'm having a hard time deciding why I would want this. It seems more likely to result in bugs than being a useful feature.

It's a common practice in Rust at least, where instead of having a mutable variable which you modify across several lines, you declare a new immutable variable with the same name on those lines. I like it, but I guess it really just comes down to preference and what you're used to.

I quite like that pattern, but I think 'with a different datatype' should result in a small gnome climbing out the back of the computer and hitting the developer with a mallet.

Re: Amber: Programming language compiled to Bash

#106

Quick note to the creators: the website looks almost exactly like every other "here try this cool command-line utility so we can hook you and start charging a service fee for it" startup website and I instantly distrusted it. The design communicates that you're selling a product , not providing an open-source utility. That said, very interesting syntax. I agree with others about the $...$ being kind of odd, but other…

I think the biggest issue is the image of the floating chunk of amber plugged into computers. It looks 100% like something you'd see from yet another Ethereum hustle.

Re: Amber: Programming language compiled to Bash

#107

To 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…

> Also, what's the point of having types in your language if you're not going to use native arithmetic when applicable:

I would expect it uses bc instead of relying on bash's environment/version-dependent 32/64bit integers.

Re: Amber: Programming language compiled to Bash

#108
post #55

To 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…

> Just learn bash. There are many reasons why it is to be avoided. For me the deal breaker was that one time I spent 2h debugging a script only to find out there was an extra space character that made the whole thing break silently. I would be willing to learn a sane language, but bash isn't one. If you need to know of a million tiny gotchas to implement even the simplest task safely and portably, then there isn't an…

You know that your shell environment is not forced on you, right? You can just switch to ZSH, fish, etc.

The only time this complaint is valid is if you're in a professional environment and you're not allowed to use alternate shells in your account, for some reason.

Re: Amber: Programming language compiled to Bash

#109

Quick note to the creators: the website looks almost exactly like every other "here try this cool command-line utility so we can hook you and start charging a service fee for it" startup website and I instantly distrusted it. The design communicates that you're selling a product , not providing an open-source utility. That said, very interesting syntax. I agree with others about the $...$ being kind of odd, but other…

I actually thought the UI was very nice, and more open source utilities need to have good UI on their websites.

Re: Amber: Programming language compiled to Bash

#110
This is interesting, but I don't see why I would use this instead of Python or Go? With those I'd get portability, modern features, etc but with the added bonus of a powerful standard library and ecosystem.

Don't get me wrong, I hate writing shell scripts, so this is definitely an improvement over that. It just doesn't seem like the most practical solution (unless I'm missing something).

Post reply on HN