-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
gorun
gorun is a tool enabling one to put a "bang line" in the source code of a Go program to run it, or to run such a source code file explicitly. It was created in an attempt to make experimenting with Go more appealing to people used to Python and similar languages which operate most visibly with source code.
-
amber
A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
As carlinigraphy points out, shellcheck [0] exists, and can easily be put into pre-commits, a CI pipeline, etc. This would have almost certainly flagged your problem immediately.
> 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.
[0]: https://www.shellcheck.net/
This looks similar to a tool I discovered a while back called Batsh. But Amber looks a lot more polished.
https://github.com/batsh-dev-team/Batsh
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 also get minification and/or obfuscation in exchange for losing readability, and Amber doesn't seem to offer those yet.
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
If you disable WebGL you're putting yourself in the 2% of devices that don't support it.
That's not fantastic, but if you enable it, just your WebGL extension list can be used to narrow you down way further than that - according to https://amiunique.org/ just my extensions narrow me down to 0.35%. In my
Rash (https://rash-lang.org/) and Oil (https://www.oilshell.org/release/latest/doc/ysh-tour.html) come to mind. Xonsh, too, as mentioned. Powershell too.
Most high-level languages have packages that implement DSLs for running and connecting subprocesses. Python has both `subprocess` in stdlib and things like plumbum (https://plumbum.readthedocs.io/en/latest/index.html) or fabric as 3rd party packages. Scala has a little DSL ("echo 1" #| "cat" !) for this in stdlib. How lightweight the syntax is depends on how DSL-friendly the language is, so things like Ruby or Raku might be your best bets.
> need to know of a million tiny gotchas to implement even the simplest task safely and portably
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
You can use a tool like gorun (https://wiki.ubuntu.com/gorun) to run Go source code as if it were a shell script, by putting gorun in the shebang line.
Of course the disadvantage is that you need to Go toolchain everywhere you want to use the Go script so it's definitely not as portable as using a regular shell script.
https://github.com/amberframework/amber
I had a brief idea for transpiling bash here: https://github.com/rbren/baml
The thing I'm most proud of is the installation--you just put a single base64 encoded line at the top of your script, and everything works magically.
Neat! We did something in the similar spirit after having too many beers once : https://github.com/LinusU/monofile