Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running multiple expressions as one program #724

Open
Tloe opened this issue Nov 5, 2024 · 4 comments
Open

Running multiple expressions as one program #724

Tloe opened this issue Nov 5, 2024 · 4 comments

Comments

@Tloe
Copy link

Tloe commented Nov 5, 2024

I have a concept of an expr expression collection in my backend where I run the same collection of expressions. A collection can potentially get quiet large. Is there a way to compile this into one expressions instead of having a program for each of the expressions? I do have a pool of vm's running, but still having to get and run all the programs separately would probably be a overhead.

@antonmedv
Copy link
Member

Do you need outputs of those expressions?
You can do something like this: [expr1, expr2, ...].

@Tloe
Copy link
Author

Tloe commented Nov 6, 2024

I need a true/false response from each of the expressions only. So yes. An array response would work fine.

But what if expresssions programs are multiline and has variables.. can I just merge them like in your example and use semicolon between each \n?

@Tloe
Copy link
Author

Tloe commented Nov 6, 2024

Actually, in some cases I would need something like [expr1 || expr2, expr3, expr4 || expr5,...]

@antonmedv
Copy link
Member

It will work. As variables can be used inside arrays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants