Easily write Bash with a transpiler

15 points by Mte90


quad

https://github.com/amber-lang/amber

fanf

slides (with unsettling animations)

kghose

TBH having something generate bash is not what I’ve ever wanted.

When I was too lazy to write a script I got an LLM to do it and it was very good.

Mostly I just write it by hand.

Also, irrelevantly, while looking at the slides I thought “Who is this Amber Lang? I thought the authors name was different.”

Relax

Cool! I always feel a little anxious when I need to write a non-trivial bash script; something safer that compiles to bash is a great idea. Does it compile to reasonably readable bash and preserve comments? I can't find an a <-> b comparison in the docs. Probably a hard requirement... I wouldn't want to do distribute something that looks like an obfuscated script.

abathur

How hard do you think it would be to use amber as a foundation for targeting more shell languages (especially if trimming back the features supported was viable?)

(One use case would be something that could support single-sourcing shell profile/rc hooks for projects that need them.)

sigmonsez

This is a nice start but no associative arrays hurts. Anyone know of what's planned or any roadmap of features?