[Puppet-users] Pupppet Ruby DSL

Jamie Wilkinson
Wed, 26 Jul 2006 16:18:20 -0000

On Wed Jul 26, 2006 at 14:13:52 -0700, Luke Kanies
wrote:
>I haven''t thought much about how this would look in real life, but
I
>figured I''d at least look at what a DSL in Ruby would look like and
>see if it was an incredibly bad idea.
>
>I still don''t know.  It feels like it''s basically as
restricted as
>the language, but certainly it''s a heckuva lot less code than
>Puppet''s parser is.
>
>Any comments?  Should I commit this to subversion, just to keep it
>around in case people want to mess with it?

Yeah.

This sounds like the DSL I started writing on top of Python to generate
cfengine inputs, so the concept isn''t foreign to me.

I''m still in two minds whether it''s a good thing; you can get
up to some
weird stuff and it''s confusing to other admins.

I *like* the idea of a domain specific language, but you''ve already got
one,
and it''s been designed already to be very expressive in the domain of
configuration management.  Trying to reimplement that DSL using the
constraints of Ruby, whilst worth it merely to explore the idea, I think is
probably going to be unproductive.

(Besides, if you did this, then I really would have to learn myself Ruby ;-)