ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
71% Positive
Analyzed from 784 words in the discussion.
Trending Topics
#bash#language#shell#why#something#script#argument#another#ruby#amber

Discussion (63 Comments)Read Original on HackerNews
https://docs.amber-lang.com/0.6.0-alpha/basic_syntax/importi...
it seems like automatic `--help` + named args is still not a thing? if it were, I'd be all over this
Hmm...
2. Support Fish too. Having one language that can generate zsh (macOS default), Fish (power users default), and bash would be really nice!
If your script is complex enough to need a higher level language you might as well just switch to python
Second, just why?
Side note: the image of project founder cosplaying as Steve Jobs on front page had me dying.
Literally the worst of both worlds.
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.
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.
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.
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?