News for hackers. Stuff that matters.
Re:Bashible: An Ansible-inspired deployment/automation tool ... by swiley on Monday March 23, 2020 @09:04PM (#22670706)
At that point you should at least use something elegant like s-expressions.

There are so many things I hate about ansible.

Re:Bashible: An Ansible-inspired deployment/automation tool ... by cfgmaster2 on Sunday March 29, 2020 @06:06AM (#22717713)
Re:Bashible: An Ansible-inspired deployment/automation tool ... by bogomipz on Monday March 23, 2020 @09:28PM (#22670867)
Could you elaborate on how and why s-expression solve address the issues of yaml-based DSL? Thanks
Re:Bashible: An Ansible-inspired deployment/automation tool ... by nightfly on Tuesday March 24, 2020 @02:19AM (#22672469)
S-expressions have keywords, and don't require commas between list elements. That alone goes a _long_ways towards making s-expression based languages way more readable/writable than a similar datastructure encoded in something like JSON or YAML.

Here's an example of a JSON coded query taken from a PuppetDB tutorial (PuppetDB uses a very lispy query language):

  ["and",
    ["=", "type", "User"],
    ["=", "title", "nick"]]
And the same code as you could write it in native s-expressions:

  (and
    (= :type "user")
    (= :title "nick"))
...and one way you could encode it in yaml...

  - and:                                                                                                                      
      - =:                                                                                                                    
          - type                                                                                                              
          - user                                                                                                              
      - title:                                                                                                                
          - title                                                                                                             
          - nick
Re:Bashible: An Ansible-inspired deployment/automation tool ... by 411111111111111 on Tuesday March 24, 2020 @03:29AM (#22672806)
why are you encapsulating everything in lists for your yaml example? you arent in your other examples either?

    - filters:
        - operant: =
          type: user
        - operant: =
          title: nick
if the module author wants to, he could even remove the secondary list because its the same operator, making this

      - filters:
        - operant: =
          type: user
          title: nick
thats just as readable as your other examples imo. yaml doesnt have to be an unreadable mess. its just possible to make bad apis, which remains true for yaml just as for any other format.
Re:Bashible: An Ansible-inspired deployment/automation tool ... by bogomipz on Tuesday March 24, 2020 @07:45AM (#22674022)
Thanks for example and explanation, this makes good sense. I apologize if this is a naive question but is there a reason we don't see configuration management taking advantage of S-expressions?