![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/170721ad-9010-470f-a4a4-ead95f51f13b.png)
I’m not totally clear on why signals are used here in the first place. Arguably most C code doesn’t “need” to use signals in complex ways, either.
I’m not totally clear on why signals are used here in the first place. Arguably most C code doesn’t “need” to use signals in complex ways, either.
The trope will be “old” once the mainstream view is no longer that C-style memory management is “good enough”.
That said, this particular vulnerability was primarily due to how signals work, which I understand to be kind of unavoidably terrible in any language.
…did you just completely forget about Macs? That’s about 18% of the desktop market.
But they also are prioritizing mobile development (though they don’t have anything working there yet) prior to Windows development. That’s a much, much larger market share.
Additionally:
Why do you think most early adopters use Windows exclusively?
The logo and “join our Discord” text are more than half cut off for me. Is that the original cropping, or is it a client (Jerboa) issue?
What…? That is a terrible idea.
How is await
like comefrom
, any more than threading is like comefrom
? The variable context is preserved and you have no control over what is executed before the await
returns.
Does the catchphrase “blazing fast” ring any bells? Some people care.
(Arguably that’s just the pendulum swinging the other way; Ruby, Python, and Java ruled the software world for a while, and I think that’s a large part of why the Go and Rust communities make such a big deal about speed.)
Honestly, wouldn’t it be great if POSIX eventually specified a WASM runtime?
It’s relevant because there are still platforms that don’t have actual Bash (e.g. containers using Busybox).
sh
is not just a symlink: when invoked using the symlink, the target binary must run in POSIX compliant mode. So it’s effectively a sub-dialect.
Amber compiles to a language, not to a binary. So “why doesn’t it compile to sh
” is a perfectly reasonable question, and refers to the POSIX shell dialect, not to the /bin/sh
symlink itself.
A language being compiled should be able to support higher-level language concepts than what the target supports natively. That’s how compiling works in the first place.
Compiled code is already effectively write-only. But I can imagine there being some efficiency gains in not always shelling out for arithmetic, so possibly that’s a future improvement for the project.
That said, my reaction to this project overall is to wonder whether there are really very many situations in which it’s more convenient to run a compiled Bash script than to run a compiled binary. I suppose the Bash has the advantage of being truly “compile once, run anywhere”.
No, I mean, analyzing the Amber expression to determine if Bash has a native construct that supports it is unnecessary if all arithmetic is implemented using bc
. bc
is strictly more powerful than the arithmetic implemented in native Bash, so just rendering all arithmetic as bc
invocations is simpler than rendering some with bc
and some without.
Note, too, that in order to support Macs, the generated Bash code needs to be compatible with Bash v3.
Yes, I agree package managers are much safer than curl-bash. But do you really only install from your platform’s package manager, and only from its central, vetted repo? Including, say, your browser? Moreover, even if you personally only install pre-vetted software, it’s reasonable for new software to be distributed via a standalone binary or install script prior to being added to the package manager for every platform.
No, I agree that a package manager or app store is indeed safer than either curl-bash or a random binary. But a lot of software is indeed installed via standalone binaries that have not been vetted by package manager teams, and most people don’t use Nix. Even with a package manager like apt, there are still ways to distribute packages that aren’t vetted by the central authority owning the package repo (e.g. for apt, that mechanism is PPAs). And when introducing a new piece of software, it’s a lot easier to distribute to a wide audience by providing a standalone binary or an install script than to get it added to every platform’s package manager.
But…“just execute this .exe
, bro” is generally the alternative to pipe-to-Bash. Have you personally compiled the majority of software running on your devices?
It’s probably just easier to do all arithmetic in bc
so that there’s no need to analyze expressions for Bash support and have two separate arithmetic codegen paths.
Seconded. Wezterm seems to have a similar level of features and customizability as Kitty, but with Lua as its config/extension language. I migrated from Alacritty rather than Kitty, so I don’t know how Kitty’s speed compares, but I haven’t missed Alacritty, which is honestly saying something.
Yeah, agreed.
Sorry, why would you be “boned” if you have UTC time? Are you thinking of the case where the desired behavior is to preserve the local time, rather than the absolute time?