equations in ports #22

Closed
forresto opened this Issue Aug 15, 2013 · 5 comments

Projects

None yet

3 participants

@forresto
Member

This is going to be useful in avoiding [x] -> [+ 2] -> [* 100] -> [% 5] graph complication https://npmjs.org/package/noflo-calc

On thing that I have been thinking about in Meemoo is the ability to put =(x+2)*100%5 in a number inport, just like a spreadsheet (spreadsheets being the widest-used and understood programming environment) ... the UI could automatically hide a noflo-calc component in the graph there.

Could we make some kind of pattern for "magic translations" like this?

@d4tocchini
Member

+1

Conventions like this that minimize number of nodes are critical.

Basic string templating should also be available in ports

@forresto
Member
forresto commented Sep 6, 2013

Here's what it would look like for the minute hand of the clock demo:
screen shot 2013-09-06 at 11 17 01 am

@bergie Ideas for how to make this work behind the scenes?

@forresto
Member
forresto commented Sep 6, 2013

http://mathjs.org/ might be a bit heavy (383.575 kb) vs http://silentmatt.com/javascript-expression-evaluator/ (21.56 kb)

@forresto
Member

Working in Meemoo: http://meemoo.org/iframework/#gist/6557339 (circle r is =x*50)

@bergie
Member
bergie commented Sep 25, 2013

This needs to be handled by more configurable ports in meemoo/dataflow#61 and supplied by data from noflo/noflo#84

In general more expressive packet syntax can be useful. From the FBP book:

The Select component has a median level of parametrization, and most of the components we will be talking about in this book are similar, but there are occasional components which have so many parameters that they can almost be thought of as mini-languages. If parameters are replaced by, say, rules held on a data set, or even a large IIP, then you really do have a mini-language.

@bergie bergie closed this Sep 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment