| 2011-05-14 10:59:45 utc |
lbt |
ACTION likes the new docs index ... +1 |
| 2011-05-14 11:24:27 utc |
lbt |
phaeron: Yep - seems not to handle nested fields :( http://pastie.org/1899933 |
| 2011-05-14 11:25:50 utc |
lbt |
you could try set ${v:actions} == ${ev.actions} ?? |
| 2011-05-14 11:26:08 utc |
phaeron |
tried |
| 2011-05-14 11:26:14 utc |
lbt |
:( |
| 2011-05-14 11:26:27 utc |
phaeron |
you can try it as well , your example is clearer |
| 2011-05-14 11:29:25 utc |
lbt |
btw... you were trying to interpolate $ notation into a $value.... see http://ruote.rubyforge.org/exp/set.html for an approach |
| 2011-05-14 11:29:39 utc |
lbt |
set 'f:f_${v:v}' => 'val2' |
| 2011-05-14 11:30:47 utc |
lbt |
give var v=val1 makes field f_val1 == val2 |
| 2011-05-14 11:31:59 utc |
phaeron |
the idea was if I could iterate on the hash list , I would use the ii index to get at the currently iterated one |
| 2011-05-14 11:32:17 utc |
phaeron |
(instead of using to_) |
| 2011-05-14 11:32:29 utc |
phaeron |
but since iteration doesn't seem to work .. |
| 2011-05-14 11:34:02 utc |
lbt |
mmm and that pastie shows the side effect of interpolation .... the [] notation of a list gets put into a csv string .... oops |
| 2011-05-14 11:39:40 utc |
lbt |
-> drawing board |
| 2011-05-14 11:45:18 utc |
lbt |
oh hey jmettraux... we were just bumping into some ruote $ issues :) |
| 2011-05-14 11:45:32 utc |
jmettraux |
yes I saw that |
| 2011-05-14 11:46:00 utc |
lbt |
we're on git HEAD FYI |
| 2011-05-14 11:46:13 utc |
lbt |
well, close to it |
| 2011-05-14 11:46:34 utc |
jmettraux |
I'll fix that |
| 2011-05-14 11:46:51 utc |
phaeron |
thanks ! |
| 2011-05-14 11:48:07 utc |
lbt |
also ... inside an iterator... should set 'package' => '${ev:actions.${v:ii}.targetpackage}' work? |
| 2011-05-14 11:48:27 utc |
jmettraux |
iterator :on => "$ev.actions" should work on the box |
| 2011-05-14 11:48:40 utc |
jmettraux |
yes, nested dollars work |
| 2011-05-14 11:48:53 utc |
lbt |
OK - ta |
| 2011-05-14 11:48:54 utc |
jmettraux |
should work out of the box |
| 2011-05-14 11:49:33 utc |
lbt |
and... an aside.... would $field and @variable be worth thinking about.... |
| 2011-05-14 11:50:40 utc |
jmettraux |
would make my life miserable |
| 2011-05-14 11:51:18 utc |
lbt |
heh .... and ruote users? |
| 2011-05-14 11:52:02 utc |
phaeron |
the [ gets used in the on_ ? |
| 2011-05-14 11:52:14 utc |
jmettraux |
as number one user, it would still make my life miserable |
| 2011-05-14 11:52:30 utc |
jmettraux |
phaeron: sorry, I don't understand your question |
| 2011-05-14 11:52:42 utc |
phaeron |
lbt: can you pastie that test case please |
| 2011-05-14 11:53:00 utc |
lbt |
http://pastie.org/1899891 |
| 2011-05-14 11:53:27 utc |
jmettraux |
ah, it's iterating on the string "[0,2,5,8]" |
| 2011-05-14 11:53:36 utc |
jmettraux |
"[0,2,5,8]".split(",") |
| 2011-05-14 11:53:37 utc |
lbt |
jmettraux: yes, in my test ... |
| 2011-05-14 11:54:12 utc |
lbt |
:value => "${ev.list}" ... interesting side effect |
| 2011-05-14 11:54:34 utc |
jmettraux |
what you want is set "v:actions" => "$f:ev.list" |
| 2011-05-14 11:54:54 utc |
jmettraux |
guys, it's written in the documentation that the dollar notation does output strings |
| 2011-05-14 11:55:43 utc |
jmettraux |
lbt: your $ vs @ proposition is interesting but it's a one line proposition, it has to be thought out a bit more before being considered worth the effort |
| 2011-05-14 11:55:53 utc |
lbt |
for sure |
| 2011-05-14 11:56:11 utc |
lbt |
very much a spark of an idea |
| 2011-05-14 11:56:48 utc |
jmettraux |
${field} and @{variable} ? |
| 2011-05-14 11:56:53 utc |
lbt |
yes |
| 2011-05-14 11:57:19 utc |
jmettraux |
I prefer the ${prefix:whatever |
| 2011-05-14 11:57:22 utc |
jmettraux |
} thing |
| 2011-05-14 11:57:34 utc |
lbt |
${v:field} would still work |
| 2011-05-14 11:57:43 utc |
lbt |
as I say... a spark |
| 2011-05-14 11:57:51 utc |
jmettraux |
ok |
| 2011-05-14 11:58:19 utc |
lbt |
no other language I know of uses an f: prefix to specify global/local scope |
| 2011-05-14 11:58:35 utc |
lbt |
so really @field matches ruby better AIUI |
| 2011-05-14 11:58:42 utc |
lbt |
since field is kinda global |
| 2011-05-14 11:58:47 utc |
jmettraux |
of course because it's about global and local |
| 2011-05-14 11:58:47 utc |
lbt |
and var is kinda local |
| 2011-05-14 11:58:56 utc |
jmettraux |
it's field vs variable |
| 2011-05-14 11:59:02 utc |
jmettraux |
workitem field vs process variable |
| 2011-05-14 11:59:17 utc |
lbt |
indeed ... that's what I meant |
| 2011-05-14 11:59:28 utc |
jmettraux |
http://ruote.rubyforge.org/dollar.html#literally |
| 2011-05-14 11:59:40 utc |
jmettraux |
no other languages have workitems and processes |
| 2011-05-14 12:00:08 utc |
lbt |
so what I mean is that conceptually field == global |
| 2011-05-14 12:00:14 utc |
lbt |
and variable == local |
| 2011-05-14 12:00:47 utc |
jmettraux |
no at all |
| 2011-05-14 12:01:04 utc |
lbt |
a field is visible to all participants |
| 2011-05-14 12:01:18 utc |
lbt |
a variable is only in the scope of the process |
| 2011-05-14 12:01:48 utc |
jmettraux |
a field is visible to the participants that receive a workitem |
| 2011-05-14 12:01:58 utc |
lbt |
some don't ? |
| 2011-05-14 12:02:06 utc |
jmettraux |
there can be more than one workitem per process |
| 2011-05-14 12:02:10 utc |
jmettraux |
with different fields |
| 2011-05-14 12:02:50 utc |
lbt |
and yet these dramatically different storage slots are almost identically adressed :) |
| 2011-05-14 12:03:24 utc |
jmettraux |
yes |
| 2011-05-14 12:03:25 utc |
lbt |
it's not a big deal - just thinking about clarity |
| 2011-05-14 12:03:46 utc |
jmettraux |
thinking clearly |
| 2011-05-14 12:04:12 utc |
lbt |
when I explain this kind of thing it's hard to map to existing concepts.... global/local type scoping makes sense |
| 2011-05-14 12:04:28 utc |
lbt |
I know it's *not* global/local ... but it's *like* that |
| 2011-05-14 12:04:31 utc |
lbt |
:) |
| 2011-05-14 12:04:40 utc |
jmettraux |
it's dangerous to think like that |
| 2011-05-14 12:04:56 utc |
jmettraux |
well not dangerous, sorry, but confusing |
| 2011-05-14 12:05:21 utc |
jmettraux |
and sorry again, I plead guilty for most of the confusion |
| 2011-05-14 12:05:31 utc |
lbt |
:) |
| 2011-05-14 12:05:34 utc |
jmettraux |
I maintain the thing and its documentation |
| 2011-05-14 12:05:55 utc |
lbt |
just want to help clarify the concepts |
| 2011-05-14 12:06:10 utc |
lbt |
I'm pretty happy that var/field is a scope issue? |
| 2011-05-14 12:06:14 utc |
lbt |
do you agree |
| 2011-05-14 12:07:33 utc |
jmettraux |
field is local and variable is kind of global ? |
| 2011-05-14 12:07:52 utc |
jmettraux |
it doesn't map |
| 2011-05-14 12:08:05 utc |
lbt |
no it doesn't |
| 2011-05-14 12:08:28 utc |
lbt |
oh, wait |
| 2011-05-14 12:08:30 utc |
lbt |
invert that |
| 2011-05-14 12:08:44 utc |
lbt |
field is 'global' and variable is 'local' |
| 2011-05-14 12:08:55 utc |
lbt |
but that's a first approximation |
| 2011-05-14 12:09:20 utc |
lbt |
to be clarified that a process instance has it's own stack |
| 2011-05-14 12:09:41 utc |
lbt |
whereas a participant has the wi passed in and that provides ...what? a heap pointer? |
| 2011-05-14 12:09:52 utc |
lbt |
meh too far for the analogy |
| 2011-05-14 12:10:26 utc |
jmettraux |
there are variables bound now, bound at the process level and bound at the engine level |
| 2011-05-14 12:10:26 utc |
lbt |
but essentially field scope != variable scope |
| 2011-05-14 12:10:35 utc |
jmettraux |
fields are workitem fields |
| 2011-05-14 12:10:38 utc |
jmettraux |
yes ! |
| 2011-05-14 12:14:52 utc |
lbt |
I didn't realise some variables were bound at the engine level |
| 2011-05-14 12:19:31 utc |
lbt |
ACTION mumbles that ${} and @{} could have #{} added for code |
| 2011-05-14 12:19:36 utc |
jmettraux |
unfortunately I have no documentation about it |
| 2011-05-14 12:19:50 utc |
jmettraux |
#{} is already used by Ruby itself |
| 2011-05-14 12:20:22 utc |
lbt |
ah yes.... I forgot about how the parsers interact.... |
| 2011-05-14 12:20:37 utc |
lbt |
shame |
| 2011-05-14 12:22:06 utc |
jmettraux |
in ruby, you do #{xxx} |
| 2011-05-14 12:22:19 utc |
jmettraux |
#{$global} |
| 2011-05-14 12:22:37 utc |
jmettraux |
and not $global when you're doing string substitution |
| 2011-05-14 12:22:44 utc |
lbt |
that was why I suggested it mapped well to ${r:code} |
| 2011-05-14 12:23:14 utc |
jmettraux |
${...} is about substitution in strings |
| 2011-05-14 12:24:18 utc |
lbt |
well, it won't work for technical reasons ... even if it did make sense :) |
| 2011-05-14 12:25:04 utc |
jmettraux |
it made sense for you |
| 2011-05-14 12:25:46 utc |
lbt |
*g* |
| 2011-05-14 12:26:48 utc |
phaeron |
Is it possible to do : iterator :on_val => "$f:ev.list" |
| 2011-05-14 12:26:58 utc |
phaeron |
sorry if it is a stupid question |
| 2011-05-14 12:27:08 utc |
jmettraux |
phaeron: yes and no, it's not a stupid question |
| 2011-05-14 12:27:09 utc |
lbt |
yes |
| 2011-05-14 12:27:36 utc |
jmettraux |
just unlocked nested fields for :on_field => 'my.nested.field' : https://github.com/jmettraux/ruote/commit/7126daba854da5b411005631ed90381232c1167a |
| 2011-05-14 12:27:39 utc |
phaeron |
great ! :) |
| 2011-05-14 12:27:52 utc |
phaeron |
even better |
| 2011-05-14 12:28:30 utc |
lbt |
I think having the "" around :on_val => "$f:ev.list" is what makes me stumble into thinking I'm seeing string substitution |
| 2011-05-14 12:29:00 utc |
jmettraux |
understood, yes, it's confusing |
| 2011-05-14 12:29:00 utc |
lbt |
that may also be why I don't see a difference in ${} and $v: |
| 2011-05-14 12:29:13 utc |
lbt |
${} does substitution |
| 2011-05-14 12:29:21 utc |
lbt |
not variable reference |
| 2011-05-14 12:29:36 utc |
jmettraux |
exactly |
| 2011-05-14 12:29:36 utc |
lbt |
"" don't, by themselves, interpolate |
| 2011-05-14 12:29:40 utc |
lbt |
the parser does ? |
| 2011-05-14 12:29:52 utc |
jmettraux |
no, it's done at runtime |
| 2011-05-14 12:30:05 utc |
jmettraux |
else all your attributes would be computed at launch time |
| 2011-05-14 12:30:19 utc |
lbt |
yeah, was thinking runtime parser |
| 2011-05-14 12:30:29 utc |
lbt |
but that's wrong isn't it |
| 2011-05-14 12:30:39 utc |
jmettraux |
? |
| 2011-05-14 12:30:40 utc |
lbt |
runtime evaluation |
| 2011-05-14 12:30:49 utc |
lbt |
of assignment |
| 2011-05-14 12:31:33 utc |
jmettraux |
well, it's practical |
| 2011-05-14 12:32:06 utc |
lbt |
phaeron: nope... not like that ;) |
| 2011-05-14 12:32:53 utc |
lbt |
phaeron: you'll be pleased that jmettraux's promised to think about pointing out parsing errors |
| 2011-05-14 12:33:16 utc |
phaeron |
yeah instead of the huge backtrace |
| 2011-05-14 12:33:44 utc |
lbt |
jmettraux: FYI http://pastie.org/1900094 |
| 2011-05-14 12:33:53 utc |
lbt |
not so easy to debug ... :) |
| 2011-05-14 12:34:09 utc |
jmettraux |
the last line is very easy to read |
| 2011-05-14 12:34:16 utc |
lbt |
we like the last line! |
| 2011-05-14 12:34:44 utc |
lbt |
next steop .... 300 spaces and a ^ |
| 2011-05-14 12:34:52 utc |
jmettraux |
I've been thinking about that issue |
| 2011-05-14 12:35:21 utc |
jmettraux |
if you use always the same format, you could do pdef = Ruote::RadialReader.read(string) |
| 2011-05-14 12:35:33 utc |
jmettraux |
and it would emit an appropriate error message |
| 2011-05-14 12:35:56 utc |
lbt |
is the radial parser more informative ? |
| 2011-05-14 12:36:08 utc |
lbt |
we've not actually used it yet |
| 2011-05-14 12:36:33 utc |
lbt |
SF conference in a week and a demo to CTO next week.... |
| 2011-05-14 12:36:40 utc |
jmettraux |
when you do engine.launch(pdef) it has to do https://github.com/jmettraux/ruote/blob/7126daba854da5b411005631ed90381232c1167a/lib/ruote/reader.rb#L69-79 |
| 2011-05-14 12:36:44 utc |
lbt |
so we're really just "making it work" |
| 2011-05-14 12:36:57 utc |
jmettraux |
it tries every possibility |
| 2011-05-14 12:37:05 utc |
jmettraux |
ruby then radial then xml then json |
| 2011-05-14 12:37:24 utc |
lbt |
yes, I'd seen that ... I wrote a little syntax checker that at least allows pre-launch validation |
| 2011-05-14 12:37:44 utc |
lbt |
but I'll bear that in mind |
| 2011-05-14 12:37:49 utc |
jmettraux |
if all fail, it says "failed to read process definition of class..." |
| 2011-05-14 12:37:58 utc |
jmettraux |
so I could do something smart |
| 2011-05-14 12:38:09 utc |
phaeron |
was missing a "do" after iterator |
| 2011-05-14 12:38:29 utc |
jmettraux |
"if it looks like ruby but it failed in the end, lets emit the ruby error message" |
| 2011-05-14 12:38:49 utc |
jmettraux |
because in case of a parse failed, in the end, I have 4 error messages to show |
| 2011-05-14 12:38:53 utc |
jmettraux |
well |
| 2011-05-14 12:38:56 utc |
lbt |
ah... so you're saying the error message is in there but that snip hides them |
| 2011-05-14 12:38:59 utc |
lbt |
I see |
| 2011-05-14 12:39:20 utc |
jmettraux |
(thanks for listening I'm polishing the idea as I go) |
| 2011-05-14 12:39:34 utc |
jmettraux |
OK, I've got an idea |
| 2011-05-14 12:39:35 utc |
lbt |
ACTION offers #! |
| 2011-05-14 12:39:39 utc |
lbt |
as an idea |
| 2011-05-14 12:39:43 utc |
lbt |
#!radial |
| 2011-05-14 12:39:58 utc |
lbt |
if it's there you have a strong clue |
| 2011-05-14 12:40:17 utc |
lbt |
XML could have the too |
| 2011-05-14 12:40:36 utc |
jmettraux |
I could simply present the 4 error messages compounded 1 one |
| 2011-05-14 12:40:51 utc |
jmettraux |
a dozen line is better than the current orgy |
| 2011-05-14 12:41:15 utc |
lbt |
ACTION likes the idea of using #!radial as a top line to specify the pdef type |
| 2011-05-14 12:41:23 utc |
jmettraux |
and I don't have to write anything too smart to try to determine which is the right thing to emit |
| 2011-05-14 12:41:25 utc |
lbt |
if it's there, strip it and pass to the class parser |
| 2011-05-14 12:41:39 utc |
lbt |
and that way I get a single, targetted error |
| 2011-05-14 12:41:46 utc |
lbt |
if not present ... all 4 |
| 2011-05-14 12:42:03 utc |
lbt |
you don't have to do a "looks like" analysis |
| 2011-05-14 12:42:03 utc |
jmettraux |
#!radial has a strong unix connotation |
| 2011-05-14 12:42:09 utc |
lbt |
yup |
| 2011-05-14 12:42:23 utc |
lbt |
but it's well defines |
| 2011-05-14 12:42:23 utc |
jmettraux |
ok, let's get it done |
| 2011-05-14 12:42:25 utc |
lbt |
d |
| 2011-05-14 12:43:20 utc |
lbt |
I suggest you allow the
|
| 2011-05-14 12:43:45 utc |
jmettraux |
:-) |
| 2011-05-14 14:51:17 utc |
jmettraux |
lbt, phaeron: I've pushed a modification for when reading process definitions out of string : https://github.com/jmettraux/ruote/commit/29f50b5a6ffe12d765f0ea81fcd454219502ae04 |
| 2011-05-14 14:51:45 utc |
jmettraux |
the error is now using a dedicated error class, which has a #cause method |
| 2011-05-14 14:52:12 utc |
jmettraux |
begin; engine.launch(pdef); rescue => err; p err.cause; end |
| 2011-05-14 14:52:18 utc |
jmettraux |
I have to go now |
| 2011-05-14 14:52:43 utc |
jmettraux |
if there is something unclear mail me at http://groups.google.com/group/openwferu-users |
| 2011-05-14 14:52:48 utc |
lbt |
jmettraux: thanks ... will look |
| 2011-05-14 14:52:56 utc |
lbt |
I'll update our pkg |
| 2011-05-14 14:53:11 utc |
lbt |
are we still on for a release in the near future |
| 2011-05-14 14:53:12 utc |
jmettraux |
if the thing doesn't work, please re-open https://github.com/jmettraux/ruote/issues/26 |
| 2011-05-14 14:53:16 utc |
lbt |
OK |
| 2011-05-14 14:53:35 utc |
jmettraux |
I have to check my work schedule |
| 2011-05-14 14:53:41 utc |
lbt |
np |
| 2011-05-14 14:54:07 utc |
jmettraux |
there is an issue with Ruby 1.9.x that I need to tackle before releasing |
| 2011-05-14 14:54:12 utc |
lbt |
ah, OK |
| 2011-05-14 14:54:41 utc |
jmettraux |
I've already spent 5 hours on it, but couldn't find anything |
| 2011-05-14 14:54:52 utc |
lbt |
ouch |
| 2011-05-14 14:55:07 utc |
lbt |
I know the feeling though |
| 2011-05-14 14:55:19 utc |
jmettraux |
:-) have a nice evening |