Hi all,
So, last week, I announced my new behavior tree library. Since them,
I’ve
started trying to apply them to ruby-warrior, for fun, and to improve
the
library. I’m quickly realizing that I need an even easier front end for
it.
So, I’m thinking something like this would be useful:
select make_empty:
- empty: <%= lambda {|e| e.empty? } %>
- sequence:
- pop: <%= lambda {|e| e.pop? } %>
- make_empty
Yup, that’s YAML, with ERB embedded in it. How hard would it be to take
a
structure like this and turn it into a sensible hash/array structure?
Would
I be better off just leaving the lambdas as strings, and eval’ing them?