D
Donald Ball
I'm interesting in providing my clients the ability to upload
expressions that I can evaluate to determine the values of various
components of some business calculations. Eval'ing the expressions is
the simplest solution, but it's of course unsafe. Can anyone help me
flesh out my list of options:
1. Why's sandbox, which has been forked on github but doesn't seem to
be undergoing ongoing maintenance:
http://github.com/Sophrinix/sandbox, and thus will probably be a
problem once ruby-1.9 rolls around
2. Write my own parser and interpreter - any ruby libraries that would
be particularly helpful in this regard?
3. Marshal the binding and the expression out to a javascript or other
safe interpreter for evaluation
4. Require the expressions to be blessed by trustees before being evaluated
Any other suggestions?
- donald
expressions that I can evaluate to determine the values of various
components of some business calculations. Eval'ing the expressions is
the simplest solution, but it's of course unsafe. Can anyone help me
flesh out my list of options:
1. Why's sandbox, which has been forked on github but doesn't seem to
be undergoing ongoing maintenance:
http://github.com/Sophrinix/sandbox, and thus will probably be a
problem once ruby-1.9 rolls around
2. Write my own parser and interpreter - any ruby libraries that would
be particularly helpful in this regard?
3. Marshal the binding and the expression out to a javascript or other
safe interpreter for evaluation
4. Require the expressions to be blessed by trustees before being evaluated
Any other suggestions?
- donald