Randall Hansen
2011-May-20 20:20 UTC
[Puppet Users] PC EU feedback: spaceship operator too magical, hard to read
http://projects.puppetlabs.com/issues/7606 The spaceship operator: User <| group == sysadmin or title == luke |> Is relatively easy to type but, if you don’t know it, very hard to read. We should consider a word-based syntax, e.g.: collect User { group == sysadmin or title == luke } User search { group == sysadmin or title == luke } Please comment on the ticket or reply here, whichever you prefer. Thanks! r P.S. This is in response to feedback from my "Improving the Puppet DSL" session at Puppet Camp EU, 2011. This ticket isn''t a promise we will take action, but we could very much like comment and discussion from you good people. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nathan Clemons
2011-May-21 11:10 UTC
Re: [Puppet Users] PC EU feedback: spaceship operator too magical, hard to read
I am very much in favor of this. The current spaceship operator is just confusing, hands down. collect and search would be much nicer. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, May 20, 2011 at 1:20 PM, Randall Hansen <randall@puppetlabs.com>wrote:> http://projects.puppetlabs.com/issues/7606 > > The spaceship operator: > > User <| group == sysadmin or title == luke |> > > Is relatively easy to type but, if you don’t know it, very hard to > read. We should consider a word-based syntax, e.g.: > > collect User { group == sysadmin or title == luke } > User search { group == sysadmin or title == luke } > > Please comment on the ticket or reply here, whichever you prefer. > > Thanks! > > r > > P.S. This is in response to feedback from my "Improving the Puppet > DSL" session at Puppet Camp EU, 2011. This ticket isn''t a promise we > will take action, but we could very much like comment and discussion > from you good people. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Aaron Grewell
2011-May-21 14:02 UTC
Re: [Puppet Users] PC EU feedback: spaceship operator too magical, hard to read
+1 from me also, from a newbie''s perspective having a verbose syntax available lowers the barrier to entry. On May 21, 2011 4:10 AM, "Nathan Clemons" <nathan@livemocha.com> wrote:> I am very much in favor of this. The current spaceship operator is just > confusing, hands down. collect and search would be much nicer. > > -- > Nathan Clemons > http://www.livemocha.com > The worlds largest online language learning community > > > > On Fri, May 20, 2011 at 1:20 PM, Randall Hansen <randall@puppetlabs.com >wrote: > >> http://projects.puppetlabs.com/issues/7606 >> >> The spaceship operator: >> >> User <| group == sysadmin or title == luke |> >> >> Is relatively easy to type but, if you don’t know it, very hard to >> read. We should consider a word-based syntax, e.g.: >> >> collect User { group == sysadmin or title == luke } >> User search { group == sysadmin or title == luke } >> >> Please comment on the ticket or reply here, whichever you prefer. >> >> Thanks! >> >> r >> >> P.S. This is in response to feedback from my "Improving the Puppet >> DSL" session at Puppet Camp EU, 2011. This ticket isn''t a promise we >> will take action, but we could very much like comment and discussion >> from you good people. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups"Puppet Users" group.> To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nan Liu
2011-May-21 15:52 UTC
Re: [Puppet Users] PC EU feedback: spaceship operator too magical, hard to read
On Fri, May 20, 2011 at 8:20 PM, Randall Hansen <randall@puppetlabs.com> wrote:> http://projects.puppetlabs.com/issues/7606 > > The spaceship operator: > > User <| group == sysadmin or title == luke |> > > Is relatively easy to type but, if you don’t know it, very hard to > read. We should consider a word-based syntax, e.g.: > > collect User { group == sysadmin or title == luke } > User search { group == sysadmin or title == luke } > > Please comment on the ticket or reply here, whichever you prefer.I actually prefer the old syntax because we currently we support the usage of: User <| title == puppet |> { noop => true } Would the new syntax deprecate this feature? It seems rather confusing to read: collect User { group == sysadmin or title == luke } { noop => true } On this subject, should we support regular expression? User <| title =~ /*adm/ |> Should we allow referencing of resources using this syntax? require => User[ group == sysadmin ] Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nick Moffitt
2011-May-23 08:04 UTC
Re: [Puppet Users] PC EU feedback: spaceship operator too magical, hard to read
Nan Liu:> On this subject, should we support regular expression? > User <| title =~ /*adm/ |>If you''re going down this road, it''s probably worthwhile to add the full set of comparison operators such as <= and so forth. -- "There should be a homonym exam before people are issued keyboards." -- George Moffitt -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Cody
2011-Jun-07 21:40 UTC
[Puppet Users] Re: PC EU feedback: spaceship operator too magical, hard to read
On May 21, 8:52 am, Nan Liu <n...@puppetlabs.com> wrote:> On Fri, May 20, 2011 at 8:20 PM, Randall Hansen <rand...@puppetlabs.com> wrote: > >http://projects.puppetlabs.com/issues/7606 > > > The spaceship operator: > > > User <| group == sysadmin or title == luke |> > > > Is relatively easy to type but, if you don’t know it, very hard to > > read. We should consider a word-based syntax, e.g.: > > > collect User { group == sysadmin or title == luke } > > User search { group == sysadmin or title == luke } > > > Please comment on the ticket or reply here, whichever you prefer. > > I actually prefer the old syntax because we currently we support the usage of: > User <| title == puppet |> { > noop => true > > } > > Would the new syntax deprecate this feature? It seems rather confusing to read: > collect User { group == sysadmin or title == luke } { noop => true } > > On this subject, should we support regular expression? > User <| title =~ /*adm/ |> > > Should we allow referencing of resources using this syntax? > require => User[ group == sysadmin ]My agreement is here with Nan. I think the ability to override at collection time is a required feature. I feel mixing two sets of {} in this situation to be a bad idea. I am fine with the word based collect and search syntax but the first set {} need to be different. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.