On Thu, Feb 19, 2015 at 12:24:14PM +0600, Renat Akhmerov wrote:
Guys,
I really appreciate the input of you all.
We decided that ideally we need to agree on that syntax within days, not
weeks or months. But anyway, since we started this discussion yesterday I
just want to give
Hi !
From those three I'd choose only { ... }, it looks better for YAML while
'%' sign looks foreign for YAML. Moreover, it needs extra spaces for
writing expressions:
Compare:
1. %$.var + 1%
2. % $.var + 1 %
3. {$.var + 1}
One more point from me: We can't do things just beacuse it is familiar
Folks, one more thing to consider: the next big release of yaql (1.0,
coming really soon) will get support of curly braces (by default - to
initialise dictionaries in the following way:
v0.2/v0.3 syntax: dict(key1=value1, key2=value2)
v1 syntax: {key1=value1, key2=value2} (the old syntax
large expressions.
If the opening and closing delimiters don't match, it gets quite difficult to
read.
From: Anastasia Kuznetsova akuznets...@mirantis.com
mailto:akuznets...@mirantis.com
Subject: Re: [openstack-dev] [Mistral] Changing expression delimiters in
Mistral DSL
Date
On Tue, Feb 17, 2015 at 7:06 AM, Dmitri Zimine dzim...@stackstorm.com
wrote:
SUMMARY:
We are changing the syntax for inlining YAQL expressions in Mistral YAML
from {1+$.my.var} (or “{1+$.my.var}”) to % 1+$.my.var %
Below I explain the rationale and the criteria for the
Zane, Angus, thanks for your input!
This functional based syntax is consisted for dev use. The trouble is it ITSELF
needs to be delimited. Without pissing off the users :) Consider two key usage:
input parameters and shorthand syntax for action input. That’s why we are
looking for two-char
: [openstack-dev] [Mistral] Changing expression delimiters
in Mistral DSL
Date: February 17, 2015 at 8:28:27 AM PST
To: OpenStack Development Mailing List (not for usage questions)
openstack-dev@lists.openstack.org
mailto:openstack-dev@lists.openstack.org
Reply-To: OpenStack Development Mailing
match, it gets quite difficult to read.
From: Anastasia Kuznetsova akuznets...@mirantis.com
Subject: Re: [openstack-dev] [Mistral] Changing expression delimiters
in Mistral DSL
Date: February 17, 2015 at 8:28:27 AM PST
To: OpenStack Development Mailing List (not for usage questions
On 16/02/15 16:06, Dmitri Zimine wrote:
2) Use functions, like Heat HOT or TOSCA:
HOT templates and TOSCA doesn’t seem to have a concept of typed
variables to borrow from (please correct me if I missed it). But they
have functions: function: { function_name: {foo: [parameter1, parameter
2],
fairly large
expressions. If the opening and closing delimiters don't match, it gets
quite difficult to read.
From: Anastasia Kuznetsova akuznets...@mirantis.com
Subject: Re: [openstack-dev] [Mistral] Changing expression delimiters in
Mistral DSL
Date: February 17, 2015 at 8:28:27 AM
As a user of Mistral pretty regularly these days, I certainly prefers %
%. I agree with the other comments on devops familiarity. And looking
this from another angle, it's certainly easier to type % % then the other
options, especially if you have to do this over and over again. LOL
Although, I
fairly large expressions. If the opening and closing delimiters don't
match, it gets quite difficult to read.
*From: *Anastasia Kuznetsova akuznets...@mirantis.com
*Subject: **Re: [openstack-dev] [Mistral] Changing expression
delimiters in Mistral DSL*
*Date: *February 17, 2015 at 8:28:27 AM
that we have written or seen in the wild tend to have some
fairly large expressions. If the opening and closing delimiters don't
match, it gets quite difficult to read.
*From: *Anastasia Kuznetsova akuznets...@mirantis.com
*Subject: **Re: [openstack-dev] [Mistral] Changing expression
delimiters
As for me, I think that % ... % is not an elegant solution and looks
massive because of '%' sign. Also I agree with Renat, that % ... %
reminds HTML/Jinja2 syntax.
I am not sure that similarity with something should be one of the main
criteria, because we don't know who will use Mistral.
I like:
One more:
p9: \{1 + $.var}# That’s pretty much what
https://review.openstack.org/#/c/155348/
https://review.openstack.org/#/c/155348/ addresses but it’s not exactly that.
Note that we don’t have to put it in quotes in this case to deal with YAML {}
semantics, it’s just a string
Some suggestions from me:
1. y 1 + $.var # (short from yaql).
2. { 1 + $.var } # as for me, looks more elegant than % %. And
visually it is more strong
A also like p7 and p8 suggested by Renat.
On Tue, Feb 17, 2015 at 11:43 AM, Renat Akhmerov rakhme...@mirantis.com
wrote:
One more:
p9:
Along with % % syntax here are some other alternatives that I checked for
YAML friendliness with my short comments:
p1: ${1 + $.var}# Here it’s bad that $ sign is used for two different
things
p2: ~{1 + $.var}# ~ is easy to miss in a text
p3: ^{1 + $.var}# For someone
SUMMARY:
We are changing the syntax for inlining YAQL expressions in Mistral YAML from
{1+$.my.var} (or “{1+$.my.var}”) to % 1+$.my.var %
Below I explain the rationale and the criteria for the choice. Comments and
suggestions welcome.
DETAILS:
-
We faced a
Dmitri,
I agree with all your reasonings and fully support the idea of changing the
syntax now as well as changing system’s API a little bit due to recently found
issues in the current engine design that don’t allow us, for example, to fully
implement ‘with-items’ (although that’s a little bit
19 matches
Mail list logo