daniel

Results 34 comments of daniel

Maybe you want to look at [Compiled](https://pkg.go.dev/github.com/d5/tengo/v2#Compiled). You can compile the script code once ([Script.Compile](https://pkg.go.dev/github.com/d5/tengo/v2#Script.Compile)) and use `Compiled` instance to run it multiple times. Between runs, you can access global...

I don't know about the module function implementations, but structure-wise, they look good to me. Once the script is compiled into bytecode, it's just a VM code loop that runs...

Hello! Thanks for opening a PR. I really like the idea of adding some concurrency constructs to Tengo. I think this is a good start. But, there's one thing that...

Hard to guarantee anything without knowing what kind of untrusted code you want to run, but, Tengo is "relatively" more secure because the script is compiled into bytecode and run...

If you're going to write your own packages (to interact with external services for example), I think Tengo is fairly safe to run the user code. See https://github.com/d5/tengo/blob/master/docs/interoperability.md#sandbox-environments.

> * Do not rely on allocation limits as mentioned before, e.g. `copy` built-in function can easily exceeds the limits in a loop. Haha. That's a good one. There's no...

Hi @iFrozenPhoenix. We can certainly look into this if you open a PR. But, please understand that we may not accept it if it would involve a significant maintenance cost...

This is the current code: ```golang func fmtPrintln(args ...tengo.Object) (ret tengo.Object, err error) { printArgs, err := getPrintArgs(args...) if err != nil { return nil, err } printArgs = append(printArgs,...

Thanks for opening a PR. Can you update `Length()` to return `int` instead of `*Int`? It can be easily wrapped as `Int` inside VM code.

Why did you change Bool value? It's intentionally non-public. https://github.com/d5/tengo/blob/master/objects.go#L270-L272