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…
Amber: Programming language compiled to Bash
241–250 of 330 posts
Re: Amber: Programming language compiled to Bash
#242I haven't seen a mention of the Oil Shell ( https://oilshell.org ) project's OSH/YSH yet and I'm quite surprised. Oils goal is that OSH is just a new Bash implementation (although not bug-for-bug) but with an upgrade-path to the more modern YSH for real programming with type safety etc, but still as a shell language. One of their exciting ideas is using code as data in a somewhat lisp-like manner to allow function in…
Re: Amber: Programming language compiled to Bash
#243Earlier quoted context omitted.
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
#244Cool idea. In practice: they already did this and it's called PERL! Why would I ever use this instead of just using perl5, which solves all these problems already and is preinstalled on every Unix machine I've ever seen (and I've seen a lot from HPUX to AIX) since there's always some ancient innards component that depends on it, so it's basically impossible to remove... And even if you don't know perl, you're better…
Meanwhile, Amber looks perfectly readable, despite the fact that I've never used it. Maybe this is because Amber looks closer to languages that I'm used to. But I'd have a much easier time with it than any Perl script I've ever looked at. This is regarding personal, on-my-computer use cases.
Professionally, I think most of my coworkers would also have an easier time with this than Perl scripts, but of course, I could be wrong.
Re: Amber: Programming language compiled to Bash
#245Earlier quoted context omitted.
I find all the "Why should I use this when X exist" nonsensical. If you can't see any use for it then it's not for you. There are a whole lot of people who will find this more attractive than Perl.
I'm trying to help people here. I know some young people may not even be aware of older options and not realize this problem has already been solved repeatedly. They are free to disregard my advice, so I find your objection more nonsensical
It just starts a lame language war thread while being dismissive of and incurious about the thing being discussed. Things the site docs ask you to avoid as they reliably generate more noise than interesting conversation.
Re: Amber: Programming language compiled to Bash
#246To 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…
I suspect some people have trouble with the syntax used by Bash, and languages like Perl. But I can't pinpoint what causes it.
Re: Amber: Programming language compiled to Bash
#247To 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…
While this is clearly exaggeration, I'm not sure I find much merit in the argument.
C is full of gotchas, footguns, and a tremendous threat vector. But it is also the standard for many uses.
Yes, bash has legacy cruft, and potentially confusing ways of doing things. But for the realm in which it operates, it is extremely effective. We can make an argument for what we believe the perfect shell scripting language would be--but that doesn't exist. Bash is the current tool for addressing this category of problems.
The intention of this bullet point was to illustrate that just as I wouldn't work in an industry/role requiring C tools, and instead turn to some weird, novel, riddled-with-problems transpiler... I'd just learn C.
(P.S., bats[0] and shellcheck[1] address many problems noted in this thread.)
[0] https://github.com/bats-core/bats-core
[1] https://www.shellcheck.net/Re: Amber: Programming language compiled to Bash
#248Earlier quoted context omitted.
> Even if you're convinced you need the fancy animation, why not gracefully fallback to not showing it and still make the docs usable? Yeah, it's not like adding a try/catch block around the webGL invocation was hard anyway… But I agree with the sibling comment about disabling WebGL likely being a fingerprinting liability more than a win.
If you disable WebGL you're putting yourself in the 2% of devices that don't support it. That's not fantastic, but with WebGL enabled just the extension list can be used to narrow you down way further than that - according to https://amiunique.org/ 0.35% of users share my exact supported extensions list. My `gl.getParameter(gl.RENDERER)` seems to be unique to me, for some ungodly reason. The output from rendering a s…
Re: Amber: Programming language compiled to Bash
#249To 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…
> I would be willing to learn a sane language, but bash isn't one.
It's a general language that has to be both an interactive interpreter and script executor, and it needs to support a huge variety of architectures and kernel versions, as well as historical decisions. It's going to have some cruft.
Re: Amber: Programming language compiled to Bash
#250Assuming 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…
And why is it using [ instead of bash native [[