Live data from Hacker News

Ansible is a Lisp?

astrid.tech

1–10 of 45 posts

Re: Ansible is a Lisp?

#4
This is quite a stretch to call Ansible, which consists of YAML files with syntactic sugar and some light Python evaluation, 'Lisp'.

I thought reading the article would make less inflammatory but it didn't.

Re: Ansible is a Lisp?

#5
post #2

Not everything that can be represented with s-expressions is a lisp. For example: (html (body (h1 "Hello, World!"))) This does not mean that HTML is a lisp.

Also, more than Lisp, clips would be a really good choice there. Defining constraints to configure a system? That's basically what literally Clips does.

https://www.clipsrules.net/

Re: Ansible is a Lisp?

#6
post #2

Not everything that can be represented with s-expressions is a lisp. For example: (html (body (h1 "Hello, World!"))) This does not mean that HTML is a lisp.

OK, but what about the homoiconicity and syntax macros?

Re: Ansible is a Lisp?

#9

See also https://en.m.wikipedia.org/wiki/Greenspun%27s_tenth_rule "Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."

Yes, that’s what I think off when I see ansible, not that it actually is a lisp. It’s a poor hack for something you can trivially do with lisp since forever. Like most of these things and indeed Greenspuns rule says we will find that; you need the solution for something complicated so you start building something simple, add more features and end up with something you should’ve done in lisp from the start. And of course now you miss most (all) of the benefits.

Re: Ansible is a Lisp?

#10
post #6
post #2

Not everything that can be represented with s-expressions is a lisp. For example: (html (body (h1 "Hello, World!"))) This does not mean that HTML is a lisp.

OK, but what about the homoiconicity and syntax macros?

I don't know Ansible well enough to say for sure, but the macro example seems like more of a C preprocessor style "macro." I don't see how it's doing anything more than filling in a template.
Post reply on HN