Closed rssrcr closed 5 months ago
Interesting concept, but doesn't seem actually useful or beneficial. What is the case where someone would want a bash script that wasn't actually written in bash? Also, throws away most benefits of shell scripts, while lacking most benefits of compiled languages.
Package has some minor (non-blocking) defects and annoyances. Edit: defects are blocking; this package cannot be added in current state
@rssrcr Added a test build to the repo, in case you need a package to try and can't build yourself. Didn't add to package list because not convinced of benefit and metrics may be useful later.
How can using a higher level language to write bash scripts (that if wanted, compile down to bash itself!) more easily and effectively, not be useful? Perhaps you should have a look at:
https://news.itsfoss.com/amber-lang/
It's still in alpha phase, but including it as an installable package would make it easier to contribute to its evolution.
Well, I tried at least.
"more easily"
"and effectively"
I don't agree to a single word you've said, but I give up. Not worth it at this point.
I don't agree to a single word you've said, but I give up. Not worth it at this point.
There's nothing to give up. You didn't even attempt to provide a concrete use case, and I found none among the top search results.
I would be in favor of adding amber (non-git
) if it existed, but not from git unless it (unexpectedly) shot up in popularity. Unfortunately, there's only a -bin
version available: amber-bash-bin. As it currently stands, it feels like it wouldn't be a good use of resources to add right now. Not really sure that we're here to judge if a language itself is valid to code with 🙃
The problem is the request and responses look like attempted evangelism. Adding packages with zero utility wastes maintainer effort.
In closing, I would just like to point out the following:
Syntax Transformation: While it’s true that much of Amber is syntax transformation, this is actually a strength. It allows for a more modern and familiar syntax, which can make scripts easier to read and maintain.
Non-Standard Keywords: The use of non-standard keywords can initially increase the learning curve, but once learned, they can provide more expressive power and flexibility in your scripts.
Compilation Step: While adding a compilation step might seem like an extra hurdle, it actually provides a layer of safety by catching many bugs at compile time that would otherwise only surface at runtime.
Complexity to Run Commands: The added complexity can be seen as a trade-off for increased safety and expressiveness. It’s also worth noting that this complexity is often hidden away in the build process and doesn’t affect the day-to-day usage of the scripts.
Build Before Use: This is a common requirement for many programming languages and isn’t unique to Amber. The benefit is that you catch many errors at build time rather than at runtime.
Extra Runtime Requirements: While Amber does have extra runtime requirements compared to plain Bash, these requirements provide additional safety and expressiveness.
Output Efficiency: While the output might be less efficient than a hand-optimized Bash script, the difference is often negligible for most scripts. The benefits of using Amber, such as increased safety and readability, often outweigh the minor loss in efficiency.
Difficulty Compared to Plain Bash: While Amber might be more difficult to learn initially compared to plain Bash, it can lead to safer and more maintainable scripts in the long run.
Use Cases: While it’s true that Amber might not be suitable for all use cases, it excels in situations where safety and maintainability are important. It’s also worth noting that Amber is still a young language and its capabilities are likely to expand over time.
The goal is not to replace Bash entirely, but to provide a safer and more modern alternative for certain use cases.
... for certain use cases.
What use case? You still have not provided any actual case for which Amber is remotely useful. As far as I can tell, Amber is inherently unsuitable for any use case.
OK. Here are some potential use cases where Amber-bash can be particularly useful (just to to name a few):
Cloud Services: Amber's safety features and modern syntax can be beneficial for cloud services where reliability and maintainability are crucial. It can help prevent common errors and make scripts easier to read and maintain.
New Developers: Amber's modern syntax and type safety can make it easier for new developers to learn Bash scripting. It can help them write more reliable and maintainable scripts from the start.
Large-Scale Projects: Amber's safety features and runtime safety can be particularly useful for large-scale projects where reliability and maintainability are critical. It can help prevent common errors and make scripts easier to maintain.
Automated Tasks: Amber's expressiveness and flexibility can be beneficial for automated tasks that require a high degree of control. It can help automate complex tasks more efficiently and reliably.
Security-Critical Scripts: Amber's safety features and runtime safety can be particularly useful for security-critical scripts where reliability and maintainability are crucial. It can help prevent common errors and make scripts easier to maintain.
Scripting for Non-Technical Users: Amber's modern syntax and safety features can be beneficial for non-technical users who need to write Bash scripts. It can help them write reliable and maintainable scripts without requiring extensive knowledge of Bash scripting.
These are just a few examples of potential use cases where Amber-bash can be particularly useful.
But to be honest, I am under the impression that you are heavily biased against anything that might be employed (even in a complementary way!) alongside Bash itself, perhaps for some ideological reason (the purity and perfection of Bash?).
Those are broad classifications of general computing contexts, not use cases. Show an actual instance of Amber being used in each of those contexts, or provide actual use cases, as has already been requested multiple times.
I am biased against adding useless packages that I will later have to waste time fixing or dropping because they are broken. I made a build of the package available for you to use and to collect metrics. I am dropping it now because you seem to have no need for it, and I have now noticed blocking defects in the package. So even if you somehow convinced me that Amber useful, it cannot be added because of packaging defects.
OK. Got it. Thank you.
Package:
https://aur.archlinux.org/packages/amber-bash-git
Purpose:
A high-level programming language that gets compiled to BASH.
Benefits:
Makes it easier and more user-friendly to write scripts in BASH.
Building:
No response
Copyright:
GPL3
Expected Interest:
Many
Already available?
No
Unique request?
Yes
Banned package?
No
More information:
No response