We all know that Puppet and Chef are the superstars of the IT automation area, and they are developed in Ruby (though Chef 11 server was rewritten in Erlang).
我们都知道Puppet和Chef是IT自动化领域的超级明星,它们是用Ruby开发的(尽管Chef 11服务器是在Erlang中重写的)。
In my working environment, a very large group of the operations team uses Python as the primary language to develop operation tools or basic system applications.
在我的工作环境中,一大群运营团队使用Python作为主要语言来开发操作工具或基本系统应用程序。
I want to find why both Puppet and Chef were written in Ruby? What are the advantages? Ruby supports DSLs well. Can Python do such thing?
我想找到为什么Puppet和Chef都是用Ruby编写的?有什么好处? Ruby很好地支持DSL。 Python可以做这样的事吗?
1 个解决方案
#1
16
From Luke Kanies, Puppet’s author:
来自Luke Kanies,Puppet的作者:
I was a sysadmin by trade and had mostly developed in perl, but when I tried to write the prototype I had in mind, I couldn’t get the class relationships I wanted in perl. I tried Python, because this was around 2003 and Python was the next new thing and everyone was saying how great it is, but I just can’t seem to write in Python at all. A friend had said he’d heard Ruby was cool, so I gave it a try, and in four hours I went from never having seen a line of it to having a working prototype. I haven’t looked back since then, and haven’t regretted the choice.
我是一个系统管理员,主要是用perl开发的,但是当我试着编写我想到的原型时,我无法获得我想要的perl类关系。我试过Python,因为这是在2003年左右,Python是下一个新事物,每个人都说它有多棒,但我似乎根本无法用Python编写。一位朋友说他听说Ruby太酷了,所以我试了一下,四个小时后我从没见过它就有了原型。从那以后我没有回头,并没有后悔这个选择。
#1
16
From Luke Kanies, Puppet’s author:
来自Luke Kanies,Puppet的作者:
I was a sysadmin by trade and had mostly developed in perl, but when I tried to write the prototype I had in mind, I couldn’t get the class relationships I wanted in perl. I tried Python, because this was around 2003 and Python was the next new thing and everyone was saying how great it is, but I just can’t seem to write in Python at all. A friend had said he’d heard Ruby was cool, so I gave it a try, and in four hours I went from never having seen a line of it to having a working prototype. I haven’t looked back since then, and haven’t regretted the choice.
我是一个系统管理员,主要是用perl开发的,但是当我试着编写我想到的原型时,我无法获得我想要的perl类关系。我试过Python,因为这是在2003年左右,Python是下一个新事物,每个人都说它有多棒,但我似乎根本无法用Python编写。一位朋友说他听说Ruby太酷了,所以我试了一下,四个小时后我从没见过它就有了原型。从那以后我没有回头,并没有后悔这个选择。