Replies: 6 comments
-
also it could probably pull the runtime library from github if it is not installed |
Beta Was this translation helpful? Give feedback.
-
just to be clear, im not talking about the stdlib. im talking about language features, such as objects |
Beta Was this translation helpful? Give feedback.
-
I was thinking about exactly the same thing but to make the runtime compiled. The language could pull it from the github if not detected. The main advantage is that it would run fast. The main disadvantage is that we'd support only 4 targets for now probably - macOS x86 & ARM and Linux x86 & ARM. The binary would also enable us to setup some simple HTTP server in Amber if needed and other cool things. |
Beta Was this translation helpful? Give feedback.
-
I think extensions to Amber itself would be welcome if they did not affect compiled shell scripts. Assuming that such enhancements were not made, will there be any plans to add more architectures in the future? |
Beta Was this translation helpful? Give feedback.
-
Sure. We have 2 options here.
I'd honestly lean on the 2nd option. |
Beta Was this translation helpful? Give feedback.
-
I'm converting this issue to a discussion as this requires more explanations and details. |
Beta Was this translation helpful? Give feedback.
-
as the project grows, it will use more and more bash code to add more features.
obviously its not a very good thing to bundle everything into a single bash file, especially when its not necessary.
i propose this: by default, an amber program will check if amber runtime library is installed in
/usr/lib/amber/runtime.sh
and import everything from there to make the compiled script more readable and smaller in size.the problem with this approach is that amber becomes less portable by definition. i think it could be made portable by using some sort of bash bundler, heck we could probably even write our own, its not that complicated.
Beta Was this translation helpful? Give feedback.
All reactions