108 reputation
2
bio website
location
age
visits member for 2 years, 4 months
seen Feb 13 at 2:52

Jan
27
comment Allow user to enter DSL, rules or code?
@whatsisname that would be dangerous (or would require sandboxing)
Jan
27
comment Allow user to enter DSL, rules or code?
Blocky is very interesting as input. I don't want to execute code directly though. I need to either parse the generated code or sandbox it.
Jan
27
awarded  Scholar
Jan
27
accepted Allow user to enter DSL, rules or code?
Jan
27
comment Allow user to enter DSL, rules or code?
The intended audience could even code python statements. I only need a way to express a pipeline (like a bash command <file sort | uniq | wc -l or something like open().realines().sort().othermethod() but also with splits). The problem is going from a string "sort | uniq" to real objects in memory of class sort and uniq. I guess there are known best practices, I don't want to reinvent the wheel, but also no just eval() user input because that would be dangerous.
Jan
27
comment Allow user to enter DSL, rules or code?
The DSL is (or can be) python. And it would be limited to describing graphs of callable objects. Yes, I know what they are, I'm looking for views on how to implement them. BPM editors are a case where the input to the runtime is a DSL (in XML) and that instantiates a graph of related objects, properties and conditions in runtime. Sort of that is what I want to build.
Jan
26
awarded  Student
Jan
26
asked Allow user to enter DSL, rules or code?