5 ms·
Marelle: logic-based devops with Prolog
- nodata 13y agoThis looks like scripting to me, not describing the desired state of a system: % we can install by running apt-get in shell meet(python, linux(_)) :- % could also use: install_apt('python-dev') bash('sudo apt-get install -y python-dev').
- artificialidiot 13y agoGive them a break. It is not prolog had been hip for a long time. Using it more idiomatically will take some practice, maybe a few web frameworks and a couple of package managers.
- nodata 13y agoGive them a break? Why? They're trying to push this as a better way of managing a system.
- artificialidiot 13y agoAnother failure for getting my point across on my part. I don't see that we disagree that it is a feeble attempt at best. But consider this, who are we to judge the merits of that particular thing without more than a cursory examination? His project may as well be just a seed round away from becoming the next buzzword which people would wax poetic in the next few years. Also, logic programming is well positioned to be the next big thing discovered by the web developers because of its relative obscurity and functional programming losing its mystery. Give them a break. It is just one of the hundreds of hopeful toy projects posted here, of which only a handful that haven't been shot down within ten seconds.
- nodata 13y agoYou're right: it might be. But it also might not. And without him explaining the advantage of his approach, the project will be ignored by anyone who has used a system that shares his goal.
- mcguire 13y agoSo, how do you describe how to install a package without looking like "scripting"?
- nodata 13y agoPackage { "bash": ensure => installed }
- lars512 13y agoYou describe the desired state in your met block, or more properly, tests meant to indicate if your desired state is met. Your meet block is the scripting which is supposed to get you there, but which is considered fallible. The met block checks after to see if it actually worked.
- cfrss 13y agoBabushka not found
- peter-fogg 13y agohttps://github.com/benhoskings/babushka https://github.com/benhoskings/babushka Looks like the repo has moved to a new Github account.
- anonymous 13y ago> Quickstart > Run the bootstrap script: bash -c "`curl https://raw.github.com/larsyencken/marelle/master/bootstrap.sh`" PFHAHAHAHAHAHAHAHAHAHAHAHAHAHA no
- x1024 13y agoAhm, that's the way to install pretty much everything these days. I mean, I know it's a security risk. But it isn't any more (or less) of a risk than installing nvm or just running git clone.
- anonymous 13y agoNo, it's not. I only see it on the odd hip-n-cool project by people with less experience than my server's uptime. Everything I install is either from a distro's package, from a tarball or by compiling from source. I don't mind having a script that sets up the environment, there is a lot of software out there that does have these set up scripts in the tarball, or is distributed as a self-extracting archive, but you can always see it is marked as such. What I really balk at is "run this random script, trust me it installs". Would it kill them to write "download this script which will run apt-get pkg1 ... pkg10, then extract an inline tarball to ~/.local/lib"? I'm not going to run a random script that I have ZERO idea what it will do. It's not about security, it's about knowing that a good-intentioned non-compromised script won't crap all over my environment.
- p9idf 13y agoIf you want to know what the script does, reading the script would be the obvious solution. Why should this program's author hold your hand and explain the script in prose when the script clearly explains itself already in its own language? The guy isn't demanding that you run it blindly. Maybe he figured anyone smart enough to write Prolog programs is smart enough to understand the implications of downloading and running a shell script.
- viraptor 13y ago
- adient 13y agoNot relevant to devops. Please change the title.
- lars512 13y agoHi guys, I'm the author. I've been playing with this for a little while, and trying to work out an idiomatic style for it. Suggestions for improvement are most welcome. Some pleasant parts have been writing metapackage rules. For example, playing with Julia yesterday: % if P is a Julia package, it's also a general package pkg(P) :- julia_pkg(P). meet(P, _) :- julia_pkg(P), !, % install the package using the Julia interpreter ... met(P, _) :- julia_pkg(P), !, % try to import the package in Julia ... julia_pkg('PyCall'). julia_pkg('DataFrames'). The only potential problem (on the horizon) is namespacing, which IMHO Babushka does well, but which is less obvious with Prolog's fact system.
- e12e 13y agoInteresting project. The home page could use more contrast though, that grey on white is nearly unreadable.