Randall Hansen
2011-May-20 20:24 UTC
[Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
http://projects.puppetlabs.com/issues/7612 The exported resources syntax: @@user { luke: ensure => present } Is concise and powerful, but very difficult to read. We should consider word-based syntax, e.g.: export @user { luke: ensure => present } And taking into account #7605, perhaps: export virtual user { luke: ensure => present } 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.
Russell Jackson
2011-May-20 20:41 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
On 05/20/2011 01:24 PM, Randall Hansen wrote:> http://projects.puppetlabs.com/issues/7612 > > The exported resources syntax: > > @@user { luke: ensure => present } > > Is concise and powerful, but very difficult to read. We should > consider word-based syntax, e.g.: > > export @user { luke: ensure => present } > > And taking into account #7605, perhaps: > > export virtual user { luke: ensure => present } >Yes on both counts. My coworkers have often commented on the cryptic nature of this construct, and googling for ''puppet @@'' doesn''t return anything immediately useful. Googling for ''puppet virtual export'', on the other hand, does. In fact, the first hit is the documentation on Exporting and Collecting Resources. -- Russell A Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield -- 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.
Brice Figureau
2011-May-21 08:42 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
On 20/05/11 22:24, Randall Hansen wrote:> http://projects.puppetlabs.com/issues/7612 > > The exported resources syntax: > > @@user { luke: ensure => present } > > Is concise and powerful, but very difficult to read. We should > consider word-based syntax, e.g.: > > export @user { luke: ensure => present } > > And taking into account #7605, perhaps: > > export virtual user { luke: ensure => present } > > Please comment on the ticket or reply here, whichever you prefer.I sincerely hope you''ll keep the old syntax around. I''m terribly sorry to be negative, but I really don''t like this kind of verbosity. This is a language, and every language has some idioms. IMHO, newcomers should better read the documentation than trying to infer what the language does by reading example of it. This feature is an advanced feature I don''t expect newcomers to grasp in its short or verbose form, they''ll have to read about it. One thing I like with the Puppet DSL is that it''s concise, you can express resources states with the less word possible, yet still be readable. If you really want to simplify people''s life, make those extra attributes become metaparameters (but please keep the old syntax): user { luke: ensure => present, virtual => [boolean] } That would even allow us to parametrize virtuality/exportability with the help of an expression (ie selectors, functions, boolean expressions ...) My $0.02 -- Brice Figureau My Blog: http://www.masterzen.fr/ -- 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:06 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
I would prefer the verbose form as it definitely is much easier to read. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, May 20, 2011 at 1:24 PM, Randall Hansen <randall@puppetlabs.com>wrote:> http://projects.puppetlabs.com/issues/7612 > > The exported resources syntax: > > @@user { luke: ensure => present } > > Is concise and powerful, but very difficult to read. We should > consider word-based syntax, e.g.: > > export @user { luke: ensure => present } > > And taking into account #7605, perhaps: > > export virtual user { luke: ensure => present } > > 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.
Henrik Lindberg
2011-May-21 15:08 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
On 5/21/11 10:42 AM, Brice Figureau wrote:> If you really want to simplify people''s life, make those extra > attributes become metaparameters : > > user { luke: ensure => present, virtual => [boolean] } > > That would even allow us to parametrize virtuality/exportability with > the help of an expression (ie selectors, functions, boolean expressions ...) > > My $0.02I think that was worth a lot more that $0.02! I like that a lot better - virtual and exported are just parameters. - henrik -- 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.
Nigel Kersten
2011-May-21 15:13 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
On Sat, May 21, 2011 at 1:42 AM, Brice Figureau < brice-puppet@daysofwonder.com> wrote:> On 20/05/11 22:24, Randall Hansen wrote: > > http://projects.puppetlabs.com/issues/7612 > > > > The exported resources syntax: > > > > @@user { luke: ensure => present } > > > > Is concise and powerful, but very difficult to read. We should > > consider word-based syntax, e.g.: > > > > export @user { luke: ensure => present } > > > > And taking into account #7605, perhaps: > > > > export virtual user { luke: ensure => present } > > > > Please comment on the ticket or reply here, whichever you prefer. > > I sincerely hope you''ll keep the old syntax around. > > I''m terribly sorry to be negative, but I really don''t like this kind of > verbosity. > > This is a language, and every language has some idioms. IMHO, newcomers > should better read the documentation than trying to infer what the > language does by reading example of it. This feature is an advanced > feature I don''t expect newcomers to grasp in its short or verbose form, > they''ll have to read about it. > > One thing I like with the Puppet DSL is that it''s concise, you can > express resources states with the less word possible, yet still be > readable. > > If you really want to simplify people''s life, make those extra > attributes become metaparameters (but please keep the old syntax): > > user { luke: ensure => present, virtual => [boolean] } > > That would even allow us to parametrize virtuality/exportability with > the help of an expression (ie selectors, functions, boolean expressions > ...) > >++ This would be great. Being able to filter on virtual/export status would be killer. -- Nigel Kersten Product, Puppet Labs @nigelkersten -- 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:06 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
Nigel Kersten:> On Sat, May 21, 2011 at 1:42 AM, Brice Figureau < > brice-puppet@daysofwonder.com> wrote: > > If you really want to simplify people''s life, make those extra > > attributes become metaparameters (but please keep the old syntax): > > > > user { luke: ensure => present, virtual => [boolean] } > > > > That would even allow us to parametrize virtuality/exportability with > > the help of an expression (ie selectors, functions, boolean expressions > > ...) > ++ > > This would be great. Being able to filter on virtual/export status would be > killer.Oh yes indeed! I can already think of ways to use this. -- "Man, if everything were object-oriented then rsync could do this already. Of course, if everything were object-oriented I''d have a bushy moustache and be wearing flares, which would suck." -- Sean Neakums -- 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.
Peter Meier
2011-May-24 22:38 UTC
Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> If you really want to simplify people''s life, make those extra > attributes become metaparameters (but please keep the old syntax): > > user { luke: ensure => present, virtual => [boolean] } > > That would even allow us to parametrize virtuality/exportability with > the help of an expression (ie selectors, functions, boolean expressions ...)awesome! +1 ~pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3cM2YACgkQbwltcAfKi38nlACfQZ7M5Lc9UoLruDr99VmEG21o vKAAoIeR39sgLeQO90Uu5qGRyVpWFyhc =nJQx -----END PGP SIGNATURE----- -- 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.