It is no secret that we often use and abuse bash to write things that ought to be in a different language. But bash does have its attractions. In the modern world, it is practically everywhere. It can also be very expressive, but perhaps hard to read.
We’ve talked about Amber before, a language that is made to be easier to read and write, but transpiles to bash so it can run anywhere. The FOSDEM 2026 conference featured a paper by [Daniele Scasciafratte] that shows how to best use Amber. If you prefer slides to a video, you can read a copy of the presentation.
For an example, here’s a typical Amber script. It compiles fully to a somewhat longer bash script:
import * from "std/env"
fun example(value:Num = 1) {
if 1 > 0 {
let numbers = [value, value]
let sum = 0
loop i in numbers {
sum += numbers[i]
}
echo "it's " + "me"
return sum
}
fail 1
}
echo example(1) failed {
echo "What???"
is_command("echo")
}
The slides have even more examples. The language seems somewhat Python-like, and you can easily figure out most of it from reading the examples. While bash is nearly universal, the programs a script might use may not be. If you have it, the Amber code will employ bshchk to check dependencies before execution.
According to the slides, zsh support is on the way, too. Overall, it looks like it would be a great tool if you have to deploy with bash or even if you just want an easier way to script.
We’ve looked at Amber before. Besides, there are a ton of crazy things you can do with bash.

So, we have a transpiler to Bash and an assembler in Bash.. All we need is to write a C compiler in Amber to compile Bash with Bash.
We are working also on the Bash2Amber tool XD
There is a tool that convert from C to bash https://github.com/udem-dlteam/pnut
Does this always and reliably work directly with a hash bang?
#!/usr/bin/env amber
If not, it misses the whole point of using bash in the first place: a universal system wide source editable executable language.
I believe you transpile from Amber to bash and then you distribute and run those bash files. The amber file itself isn’t being executed
“Reliably” is redundant here if it “always” works.
Perfect the meaning of reliably is “accurately”, or “without (runtime) errors”.
So you can use Amber itself with the shebang that it will compile it in bash before executing.
It was part of the example shows various stuff that amber does
I’m still waiting for a Bash to POSIX shell transpiler.
Good point we are working a lot to be Posix compliant and we are investigating the support for the other shells, in a way that in the code you can define what is the target and compiles it specifically for that.
So slowly we can produce something different based on the needs.
When Python started to change base language syntax going to Python 3, I dropped Python as an interpreter. Now, all my interpreter needs are fulfilled by bash…everywhere there is a unix/linux machine running, bash is available, and I don’t have to spend my time continually adapting the same scripts over-and-over again to a language (or “std” library API) change, or worrying about the correct verion of the interpreter. I spend my time writing new functionality. When things start to get too complicated for a script, I switch to C or C++.
“if 1 > 0”? We’re just gonna let that slide? Useless test is useless.
Screenshot has a trust within a trusted block…
It was an example to show various features in few lines otherwise I needed more time for the talk.