Live data from Hacker News

Amber: Programming language compiled to Bash

amber-lang.com

131–140 of 330 posts

Re: Amber: Programming language compiled to Bash

#131
post #102
post #85

Earlier quoted context omitted.

"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

adblock/ublock/umatrix could get you out of that too.

Re: Amber: Programming language compiled to Bash

#133

> 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 useful in Rust where you might parse input as a string and then convert it to a number. It's better than having a variable named age and another one named age_num or the opposite, str_age and age.

I guess that's fair. I haven't seen that pattern in Rust before and I don't think I particularly like it, but I can see why some might.

Re: Amber: Programming language compiled to Bash

#134
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 guess I haven't read enough Rust code to come across this patterns, but I don't think I particularly like it. Perhaps I would get used to it though :)

Re: Amber: Programming language compiled to Bash

#135

> 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 pretty good way of preventing bugs actually. It prevents you from accidentally accessing the old value.

Re: Amber: Programming language compiled to Bash

#136
post #30

Rust, except using existing executables (or dynamic libraries) instead of downloading packages and waiting ages for it to compile? Seems like a great idea.

This is not even remotely an alternative to Rust, nor is it intended to be. It's a replacement for Bash.

Re: Amber: Programming language compiled to Bash

#137
post #102

Earlier quoted context omitted.

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

adblock/ublock/umatrix could get you out of that too.

Sites can tell if you’re running Adblock too.

You’re always leaking some kind of information that advertisers will pay for. The game is choosing what information you’re okay giving them

Re: Amber: Programming language compiled to Bash

#139
post #29

Earlier quoted context omitted.

I think the use case for this is where you need a bash script on a machine where you can't easily install and maintain a runtime.

On a machine where you can't easily install and maintain a runtime but you can install bash and amber and bc and sed?

No, because you don't need to install Amber, and bc and sed are pretty much guaranteed to be installed already if bash is.
Post reply on HN