20 comments

[ 4.7 ms ] story [ 43.7 ms ] thread
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.

Much needed. I have hard time understanding bash.
> Typescript to bash

Literally the worst of both worlds.

Just wanted to say that I think you did a great job with your examples showing why someone might be interested in this language.
Another alternative for writing Bash is Babashka, which is a Clojure dialect.
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

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?

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.
1. From the docs: "In the the project it is production ready because it is already used in this context because the shell code generated is tested and confirmed that works, the language is evolving with the tooling set."

Hmm...

2. Support Fish too. Having one language that can generate zsh (macOS default), Fish (power users default), and bash would be really nice!

Hi, I am one of the project maintainers :-)

About Fish we are planning to support more bash subset but we aren't so much in the team to focus in everything. Right now the priority is to adds more stuff to the language in a way we can stabilize it and implement the other "output" target later.

About the production ready the Bash code is tested, shellchecked tested (we are not at 100% yet) and works but is an alpha because we are working in the syntax.

I’ll give it a shot.

Side note: the image of project founder cosplaying as Steve Jobs on front page had me dying.

I'm a fan of this project. Great work!
Hi, I am one of the project maintainers :-)

And I can say only Thanks :-D

How does it achieve memory safety? Via garbage collection? Via runtime checks? Via some clever compile-time analysis?
Hi, I am one of the project maintainers :-)

Right now we check the bash output with Shellcheck but we are not yet full valid and we test it for performances.

About security right now we are just avoiding evail and this kind of things, we are focusing right now on stabilizing the language itself.

First of it's not compiled, it's transpiled

Second, just why?

Hi, I am one of the project maintainers :-)

As I said in other similar answers, there are some context where you can't use other languages or install packages but bash is everywhere (as example).