Re:Amber – the programming language compiled to Bash
by ape4 on Wednesday May 22, 2024 @10:10AM
(#40441248)
And why is it using [ instead of bash native [[
[ Parent
| on HN ]
Re:Amber – the programming language compiled to Bash
by weaksauce on Wednesday May 22, 2024 @01:59PM
(#40443984)
I think it's targeting a really old bash for max compatibility... and also it's super early alpha software
Re:Amber – the programming language compiled to Bash
by pubg on Wednesday May 22, 2024 @04:14PM
(#40445834)
It's interesting Amber doesn't seem to be leveraging Bash-native Regexes via:
if [[ "${foo}" =~ ^someReg[e][x][p][r]$ ]]; then ...
What value exists in going to such great lengths to target super old and anqtiquated versions of Bash? It becomes very limiting for this poor new language :-sMaybe still just the earliest of early days? Javascript-style RegExs along the lines of:
if (s.match(/my[R]egex[H]ere/)) { ..
Would be pretty nice and handy.