Vasiliy Tereshkov
Vasiliy Tereshkov
``` fn main() { var x: int = 9483412322824321334 printf("%v", x) // -8963331750885230282 } ``` ``` fn main() { var x: uint = -1 printf("%v", x) // 18446744073709551615 } ```...
Unlikely to be related to the latest changes in the random number generator in Umka, as the same problem is seen in the example built for the Tophat website. Chrome:...
``` import "std.um" fn main() { printf("%llv\n", sizeof(std::Err)) // Type cast or composite literal or enumeration constant expected } ```
It calls `chunkChangeRefCnt` rather than `doChangeRefCntImpl`.
``` import "std.um" fn main() { a := []int{2, 4, 6} f, err := std::fopen("test.dat", "wb") std::exitif(err) n, err := std::fwrite(f, a) // Pointers cannot be read or written std::exitif(err)...
Spot the bug: ``` fn main() { n := 3 plt := umplot::init(4) plt.series[1].style.kind = .scatter plt.series[2].style.kind = .scatter plt.series[3].style.kind = .scatter plt.series[3].style.width = 5 f, err := std::fopen(sprintf("%drounds.log", n),...
The existing documentation is more of a specification than a tutorial. It's not well suited for learning, especially when dealing with the embedding API.
The generic `for` loop is very slow when simply iterating over a range of integers — see benchmarking results in https://github.com/vtereshkov/umka-lang/issues/163. Automatically analyzing the loop header for patterns like `for...
``` fn foo(): (int, bool) { return 42, true } fn main() { a := 9 b := [2]int{5, 7} //a, flag := foo() // OK b[0], flag := foo()...
In assignments: ``` var p: ^int fn foo(): int { p = null return 666 } fn main() { p = new(int, 42) p^ = foo() // Crash! printf("%llv\n", p)...