9 comments

  • BadBadJellyBean 28 minutes ago
    This looks great. We have a lot of bash tools because it's the only stable interpreter that we have readily available on all our systems. But bash is a pain to write so this might actually make things easier.
  • ivanjermakov 44 minutes ago
    Any language is a shell script if you're brave enough: https://en.wikipedia.org/wiki/Shebang_%28Unix%29
  • gdevenyi 1 hour ago
    > Typescript to bash

    Literally the worst of both worlds.

    • classified 47 minutes ago
      Bash is great for orchestrating other Unix tools into an automated workflow. Only when that workflow requires stuff that Bash doesn't have is it time to break out Python. Integrate Shellcheck into your editor, and you get automated help for writing more reliable Bash.
  • namegulf 29 minutes ago
    In a world where AI can generate any code for any environment, is there a need for another language?

    On the other hand, we're at a point for a binary language (or standard / framework) that one AI/LLM creates and another one validates.

    What are we missing?

    • AlecSchueler 4 minutes ago
      We're missing AI that doesn't still its hand held every step of the way.
  • karma_daemon 36 minutes ago
    unclear use case imo - this sacrifices the ergonomics of actual bash scripting, and hides it behind another language

    If your script is complex enough to need a higher level language you might as well just switch to python

  • onlyrealcuzzo 55 minutes ago
    Just wanted to say that I think you did a great job with your examples showing why someone might be interested in this language.
  • wg0 1 hour ago
    Much needed. I have hard time understanding bash.
  • Hammershaft 50 minutes ago
    Another alternative for writing Bash is Babashka, which is a Clojure dialect.
  • serious_angel 1 hour ago
    Thank you, but... why not just write in Bash, or the shell you prefer? Why learn a yet another opinionated wrapper?

    Yes, Bash or any shell is a very complex and utterly environment dependent language to approach with all due care for security and compatibility, yet hence the lack of wrapper that may not even be aware of these crucial cases at all.

    • threatofrain 1 hour ago
      Your argument is down to the weights.

      There are other communities where movement in the language came from outside tooling that built extensions on top of the language, such as Sass or TypeScript.

      • nicce 56 minutes ago
        It always comes to be a social problem. Sort of. I want to use X instead of Y, but maybe everyone does not want the same, or adaption of X is harder in technology wise. So I use wrapper Z that compiles to Y, and avoid some problems, but bring new problems. Maybe these problems are smaller ones than just keeping to use Y directly.
    • greekrich92 1 hour ago
      If you don't want to use it, don't use it
    • KerrAvon 1 hour ago
      bash is really painful to use for anything beyond the most rudimentary logic. Bourne and Mashey were terrible language designers. (By contrast, Thompson's V6 shell is very elegant, if limited.)

      That said, this should just be a shell itself and not something that generates into other shell dialects. Otherwise, why not use Ruby or something like it that has actual expressive power?

      • deathanatos 15 minutes ago
        > That said, this should just be a shell itself and not something that generates into other shell dialects. Otherwise, why not use Ruby or something like it that has actual expressive power?

        I'm guessing the advantage here would be that the compiled "bytecode" (the resulting bash) can be distributed to systems that would then not need to have Amber installed. (And vs. a real binary from, e.g., Go/Rust/etc., it isn't tied to the platform, either.)

        Vs. a Ruby script would require Ruby as a run-time dependency; Amber here is effectively a compile-time dependency.

        Python 3 is available basically everywhere these days though, so I think there's still a lot of merit to just using a higher level language like you suggest. Even Ruby, while not available out of the box, is not exactly hard to get on most OSes.