Libuv describes itself as a multi-platform support library with a focus on asynchronous I/O. It is widely used in many web servers (e.g., Kestrel) and runtimes such as Node.js and Python (via uvloop). As of Zig 0.14.0, there is no native async I/O, s...
When most people start programming, they're drawn to languages that make things easy. Python, JavaScript, and other high-level languages abstract away the messy details of memory management, system calls, and hardware interaction. This abstraction is...
There are many cases where maintaining a priority-based queue is essential. For instance, it may be required to rebalance a financial portfolio by reallocating assets with the highest deviation first. Another example is ranking updates when processin...
Zig & Go can be a convenient combination of programming languages. Zig provides fine-grained control over memory and performance, making it ideal to solve low-level tasks (similar to C), while Go excels in simplicity, easy of development, and built-i...
first of all i am low level systems engineer came from web development background and i tried golang, rust,c,c++ and zig Golang Go is a high level half staticlly typed and half dynmically typed compiled languge programming lnguage. And remember, in t...
C function take a function as parameter Take stb image library as example: int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes); int stbi_write_bmp_to_func(stbi_wri...
(Tested in Zig 0.13.0) Don’t use addCSourceFile to add a same C libraries that your dependent Zig libraries uses, it will produce an error like ld.lld: duplicate symbol: stbi_failure_reason. Only include the C header path using addIncludePath. For c...
Efficiently Reading Directory Contents in Zig with a Page Allocator Hey there welcome back to my Zig series, the language that I've been using a lot lately for my hobby projects. It's a language that keeps evolving and I'm excited to share more about...
In a bid to understand how the memory pool works, I dug into the Zig memory pool source code. I plan to read the code for the allocator in the heap folder of the std library. Let’s look at what it does and how it does—starting from the first error me...
I like to think of AI models as what you get when you moosh all content creator in a single entity (including the bad ones). But I watch enough House MD to know that even bad idea can detonate good ones. Instead of a little army of resident, I have G...