HN user

piroux

22 karma
Posts2
Comments9
View on HN

To define something as declarative or imperative, it is important to compare the definition model to the execution model.

So I would rather say that Ansible is much less declarative than Terraform, because Ansible tasks (the different steps of an Ansible Playbook) are executed sequentially.

The tasks of Ansible are its statements, so yeah we would say that each Ansible task is declarative. And still, a requirement for that would be for the task to use a module/role which is idempotent, right? Another proof, Ansible natively offers loop, blocks, and conditional to control the execution flow throughout its tasks.

(This is not a critic of Ansible. I am happy to use it as is, as a high-level scripting mechanism.)

Yes, that is exactly what I wanted to convey by "lack of efforts".

2000 years ago, as a civilization, even if we failed to care enough for the Works stored in the Library, their loss would not have happened if access was not limited, which would have helped in their dissemination and issuing of copies.

Today, as a civilization, if we fail to implement to right process to backup on time what matters to us, we will repeat the same errors as our ancestors.

I guess many historians today would prefer to see those non-existent backups of the Alexandria Library rather than those of Yahoo Groups, but who knows what is more important after all ;)

I had the same feeling about LLVM until a few weeks ago, when I started tinkering with it during a school project. It let me the time to implement a simple array which can be sliced and copied, through the functions I created :

https://gist.github.com/piroux/a856aa31525ca23238be

It can directly run with lli:

$ lli basics_array.ll

Note: I called it DynArray because I wanted it to grow itself when its nominal capacity would have been reached, but I never took the time to implement this feature ...

For instance, the prototype of the function adding an element could be :

define void @DynArrayI__add(%DynArrayI* %dynarray, i64 %elt)

You might need to add a capacity field to the type of DynArrayI and update others functions, to take it into account.

But according to me it is doable, even for a beginner, because the code is entirely written in LLVM.

So feel free to try !

Here is a first one : What are the best ways to detect changes in html sources with scrapy, thus giving missing data in automatic systems that need to be fed ?