I've been going through ziglearn and have made my way to ArrayList. I understand the example given there but when I try something a bit more complex I ...
I've been going through ziglearn and have made my way to ArrayList. I understand the example given there but when I try something a bit more complex I ...
How can I convert a i32 into a f32 in Zig Language? I want to count appearances of values in a for loop and afterwards get the percentages in a smoot ...
For educational reasons i'm trying to create the simple Option type in zig. This is my attempt, and it seems to work correctly: So, the map takes t ...
These days I'm curious about the cross-compile in Rust.As I know, it's very simple to do the same thing in Go or Zig.But in Rust, it's very difficult. ...
I'm trying to call SomeClass().call, but am running into compiler errors. Specifically, running tests for results in the error message How do I ...
Is there a nicer way of achieving the same result as the following code in a nicer way? if (window == @intToPtr(?*c.GLFWwindow, 0)) I want to check ...
The conventional way to make an object on the heap is to make a create fn: But what about if I want to put a std lib ArrayHashMap on the heap? For ...
Platform details macOS (Apple Silicon) zig versions (behavior identical on all) 0.10.0 aarch64 0.11-dev824 aarch64 Problem ...
I have been doing Advent of Code this year, to learn Zig, and I discovered something during Day 5 that really confused me. So: mild spoilers for Day 5 ...
I have a Zig codebase that I'm compiling to WebAssembly with a build.zig like this: Inside src/main.zig there's an extern that marks a function pro ...
I have a u8 buffer that stores a series of values including the RGB components from two u32 values (of which only 24 bits are used). I'm currently us ...
I wanted to write fizzbuzz, but instead of just printing, store it in an array. The problem is converting the numbers to strings. I first tried with ...
How can this const print variable behave like a function? I understand you can assign expressions to variables. But this seems to behave like a pre ...
While experimenting with the zig syntax, I noticed the type expression of string literals is omitted in all examples. Which is totally fine, I'm not s ...
For example how to add a breakpoint to function foo(true) in line 100, which is if (a) cat(), of src.zig in gdb? ...
https://github.com/bananaboy139/fractal/tree/OpenGL-shader https://github.com/bananaboy139/fractal/blob/OpenGL-shader/images/2.png?raw=true this is t ...
I'm a fresh new in Zig who test a few codes with "orelse". I tried to create 2 optional unsigned integer variables as following code and use orelse wi ...
In reading the documentation for zig, I was under the impression that zig could compile both C and C++ code. Consequently, I thought you could import ...
Nim turns its own code into C code and compiles that using C-compilers. Zig has its own compiler that has many nice features that would make you want ...
I'm trying to create a Trie structure in Zig using Zigs StringHashMap. I am able to get it to work a bit, but only by using a "inline" for loop which ...