Vasiliy Tereshkov
Vasiliy Tereshkov
@skejeton In your code, you are trying to construct a `const` dynamic array literal (`[]Prs`). That means that the program must allocate 1) a control block (possibly in the static...
@skejeton No, that's not just syntax. In Go, `[3]int{1, 2, 3}` is an array literal, `[...]int{1, 2, 3}` is an array literal with an inferred length, and `[]int{1, 2, 3}`...
@hiperiondev The Umka compiler/interpreter has never been targeted at such low-resource platforms. Even though it's a feasible task, additional efforts are needed to complete it. - The VM is hard...
@skejeton That's right. However, I already have one WASM target, the Umka playground.
Beware of extremely perverse cases like the following one taken from _Crafting Interpreters_. ``` fun outer() { var x = "value"; fun middle() { fun inner() { print x; }...
What is the exact difference between `sprintf()` and `format()`? Returning the string as the function result rather than an output parameter?
@marekmaskarinec @skejeton My current idea is to change the `sprintf` signature from ``` fn sprintf(buf, format: str, a1: T1, a2: T2...): int ``` to ``` fn sprintf(format: str, a1: T1,...
@marekmaskarinec It would not be easy, but I'll consider implementing it.
@yuriv Although you cannot access a variable directly, there are a couple of ways: * You can write getter/setter functions in Umka and call them from C. * You can...
@skejeton As a workaround, you can now use `append()`: ``` type T = int fn insert(a: []T, i: int, v: T): []T { return append(append(slice(a, 0, i), v), slice(a, i))...