4 ms·
Assuming that these are typical outputs from Amber: https://github.com/Ph0enixKM/Amber/blob/master/setup/install.sh https://github.com/Ph0enixKM/Amber/blob/mas
by omoikane 2y ago
Assuming that these are typical outputs from Amber:
https://github.com/Ph0enixKM/Amber/blob/master/setup/install.sh https://github.com/Ph0enixKM/Amber/blob/master/setup/install...
https://github.com/Ph0enixKM/Amber/blob/master/setup/uninstall.sh 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 get minification and/or obfuscation in exchange for losing readability, and Amber doesn't seem to offer those yet.
- 5e92cb50239222b 2y agoNothing 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 https://github.com/mvdan/sh
- ape4 2y agoAnd why is it using [ instead of bash native [[
- weaksauce 2y agoI think it's targeting a really old bash for max compatibility... and also it's super early alpha software
- pubg 2y agoIt'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 :-s Maybe 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.
- 1oooqooq 2y agoi think they do this since there's no source map or symbol mapping support on the debugger (which is just bash errors lol) would be nice if it was the source and script at the same time. as in a comment at the bottom or top is the source or something.