-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can Dhall be used as a replacement for bash? #97
Comments
Could you clarify what you need that the existing dhall-to-bash tool doesn't do? I'm not familiar with these configuration languages |
The file you linked to is not a Bash script, though. It looks like a kakoune-specific configuration language, similar to vimscript |
I'll close this for now because the scope of this task is not clear. Feel free to reopen if you still have questions |
The title looked pretty clear to me! Even tho the linked example was totally not a bash example. I'm curious as well to know how much can dhall-to-bash do to reduce my necessity to write bash. I think that's one of the big problems with all the dhall-to-* tools out there: There is zero example that shows a non-trivial usage, only basic Sorry for the rant, I'm very interested in the promise behind dhall, but for now I struggle to use it to solve real life problems. |
@docteurklein: The answer is: not too much.
Those should give you some idea of what use cases that Dhall is focusing on. I only implemented |
thanks :) |
@docteurklein: You're welcome! 🙂 |
@docteurklein The purpose of the kubectl --namespace=<what goes here?> get pods you can use the namespace by something like: eval $(dhall-to-bash --declare kubernetes_namespace <<< '(./Config.dhall).path.to.namespace')
kubectl --namespace=${kubernetes_namespace} get pods You may note that you could replace The Hope this helps |
@Gabriel439 FWIW I kind of find On the other hand, if you wish to move out configuration out of bash scripts then in theory I fear the problem with Yaml in the context of Ops tools is the fact that most of these configurations are not plain Yaml anymore (Ansible, Terraform, ...) and for all of these Yaml++ DSLs there are currently no dhall bindings at all ;-) Anyway I have just written this because I still have hope that |
@PierreR: Actually, now that Dhall supports empty alternatives then that allows |
Also, I ran into another use case for |
... as mentioned here: #97 (comment) Similar to `dhall-json`, this translates empty alternatives to strings of the same name
Here is the pull request to add enum support to |
... as mentioned here: #97 (comment) Similar to `dhall-json`, this translates empty alternatives to strings of the same name
There is a Dhall to bash compiler. I know multiple tools that use bash as a configuration language : herbstluft window manager, kakoune text editor.
Is it possible to use Dhall to generate those
config.sh
files? Do you think it is a wise idea?The text was updated successfully, but these errors were encountered: