# Latest

**URL:** https://ziggit.dev/latest.md?page=4

[Latest](https://ziggit.dev/latest.md) · [Categories](https://ziggit.dev/categories.md) · [Tags](https://ziggit.dev/tags.md)

**Page:** 5

---

## [How to free allocated slice partially?](https://ziggit.dev/t/how-to-free-allocated-slice-partially/17930)

<div class="topic-metadata">

**Author:** [@hizani](https://ziggit.dev/u/hizani)\
**Replies:** 7\
**Last updated:** [October 13, 2026, 7:37pm UTC](https://ziggit.dev/t/how-to-free-allocated-slice-partially/17930 "2026-10-13T19:37:52Z")

</div>

test "example" { const buf = try std.heap.page\_allocator.alloc(u8, 10); std.heap.page\_allocator.free(buf\[5..\]); } This test panics with incorrect alignment error. I also tried rawFree with different alignments, …

---

## [How to handle simular funtcions](https://ziggit.dev/t/how-to-handle-simular-funtcions/17938)

<div class="topic-metadata">

**Author:** [@SquidBow](https://ziggit.dev/u/SquidBow)\
**Replies:** 6\
**Last updated:** [October 13, 2026, 11:46am UTC](https://ziggit.dev/t/how-to-handle-simular-funtcions/17938 "2026-10-13T11:46:58Z")

</div>

I am making a checkers game in Zig, and I have a function that checks if you can capture the enemies checker if you move in a direction from a position. fn checkCaptureDirection(board: \[8\]\[8\]u8, start\_pos: Position, col…

---

## [Unsure about how to handle function parameters](https://ziggit.dev/t/unsure-about-how-to-handle-function-parameters/17923)

<div class="topic-metadata">

**Author:** [@XandeCoding](https://ziggit.dev/u/XandeCoding)\
**Replies:** 5\
**Last updated:** [October 13, 2026, 11:28am UTC](https://ziggit.dev/t/unsure-about-how-to-handle-function-parameters/17923 "2026-10-13T11:28:03Z")

</div>

Hey everyone, I’m refactoring the API for my S3 client lib (zig-s3) and want to see what people prefer regarding ergonomics and Zig conventions. Initially, functions used plain positional arguments. As parameters start…

---

## [Error reporting feedback](https://ziggit.dev/t/error-reporting-feedback/17936)

<div class="topic-metadata">

**Author:** [@nrv30](https://ziggit.dev/u/nrv30)\
**Replies:** 2\
**Last updated:** [October 13, 2026, 7:05am UTC](https://ziggit.dev/t/error-reporting-feedback/17936 "2026-10-13T07:05:21Z")

</div>

Full Code: nrv30/int-base-converter: convert u64 between hex, octal, binary, decimal. My first zig project! I made a REPL program, so I print error messages to the user. if (stdout\_writer) |writer| { try writer.wri…

---

## [Why does \`printf\` work even though \`link\_libc = false\`?](https://ziggit.dev/t/why-does-printf-work-even-though-link-libc-false/17919)

<div class="topic-metadata">

**Author:** [@felixrabe](https://ziggit.dev/u/felixrabe)\
**Replies:** 6\
**Last updated:** [October 12, 2026, 11:35pm UTC](https://ziggit.dev/t/why-does-printf-work-even-though-link-libc-false/17919 "2026-10-12T23:35:39Z")

</div>

I’m trying to figure out what would prevent zig build from bringing in libc. (To satisfy my curiosity. Zig 0.17.0 on Macos from times past.) What do I have to change in build.zig to make zig build complain about either …

---

## [Zig Day Seattle #4](https://ziggit.dev/t/zig-day-seattle-4/12643)

<div class="topic-metadata">

**Author:** [@ScottRedig](https://ziggit.dev/u/ScottRedig)\
**Replies:** 12\
**Last updated:** [October 12, 2026, 8:05pm UTC](https://ziggit.dev/t/zig-day-seattle-4/12643 "2026-10-12T20:05:40Z")

</div>

Zig Day Seattle #4 is on Sunday, November 8th. Sign up for notifications for future events here: Zig Day

---

## [Using arena for complex and long lived allocations?](https://ziggit.dev/t/using-arena-for-complex-and-long-lived-allocations/17924)

<div class="topic-metadata">

**Author:** [@psznm](https://ziggit.dev/u/psznm)\
**Replies:** 4\
**Last updated:** [October 12, 2026, 2:19pm UTC](https://ziggit.dev/t/using-arena-for-complex-and-long-lived-allocations/17924 "2026-10-12T14:19:01Z")

</div>

So I am loading quite complex configuration where I don’t want to keep full configuration source loaded due to its size and lifetime (easily months or even years), so I need to copy some strings and construct some other …

---

## [Way to get current working directory in \`Io\`](https://ziggit.dev/t/way-to-get-current-working-directory-in-io/17921)

<div class="topic-metadata">

**Author:** [@zeeqeeng](https://ziggit.dev/u/zeeqeeng)\
**Replies:** 8\
**Last updated:** [October 12, 2026, 3:14am UTC](https://ziggit.dev/t/way-to-get-current-working-directory-in-io/17921 "2026-10-12T03:14:58Z")

</div>

I’m learning the Io interface and be trying to find some C function equivalents, for example, the getcwd(3) C function, to make a tiny program behaves like the pwd(1) utility. I tried two approaches, first std.c.getcwd(),…

---

## [Hum - TUI music player (local, rss, and youtube music)](https://ziggit.dev/t/hum-tui-music-player-local-rss-and-youtube-music/15865)

<div class="topic-metadata">

**Author:** [@selectedambient](https://ziggit.dev/u/selectedambient)\
**Replies:** 14\
**Last updated:** [October 11, 2026, 10:43pm UTC](https://ziggit.dev/t/hum-tui-music-player-local-rss-and-youtube-music/15865 "2026-10-11T22:43:03Z")

</div>

hum first off, thank you for taking the time to check out the project. posting because i genuinely thought people would find it useful and/or neat. it’s a free TUI player with the ability to play a wide range of local f…

---

## [Error when using \`discardRemaining()\`](https://ziggit.dev/t/error-when-using-discardremaining/17898)

<div class="topic-metadata">

**Author:** [@nrv30](https://ziggit.dev/u/nrv30)\
**Replies:** 3\
**Last updated:** [October 11, 2026, 9:56pm UTC](https://ziggit.dev/t/error-when-using-discardremaining/17898 "2026-10-11T21:56:44Z")

</div>

Hi I’m a complete beginner in zig. I’m trying to make a simple REPL program but I’m running into an error when I use the discardRemaining() function for the reader. I’m looking for some help to get it working, I have pro…

---

## [Std.mem.eql regression](https://ziggit.dev/t/std-mem-eql-regression/17916)

<div class="topic-metadata">

**Author:** [@pts](https://ziggit.dev/u/pts)\
**Replies:** 8\
**Last updated:** [October 11, 2026, 5:54pm UTC](https://ziggit.dev/t/std-mem-eql-regression/17916 "2026-10-11T17:54:24Z")

</div>

Is this a valid regression? I just forwarded the post.

---

## [How to Open a folder or file and if it doesn't exists create the folder/file](https://ziggit.dev/t/how-to-open-a-folder-or-file-and-if-it-doesnt-exists-create-the-folder-file/17922)

<div class="topic-metadata">

**Author:** [@vic1500](https://ziggit.dev/u/vic1500)\
**Replies:** 4\
**Last updated:** [October 11, 2026, 3:37pm UTC](https://ziggit.dev/t/how-to-open-a-folder-or-file-and-if-it-doesnt-exists-create-the-folder-file/17922 "2026-10-11T15:37:27Z")

</div>

So I’m working on a program that needs to open a folder and if the folder doesn’t exists it creates it, but I’m stuck as it is. this is my code. pub fn setProjectHome(io: std.Io, env: \*std.process.Environ.Map) !void { …

---

## [Hocon for zig](https://ziggit.dev/t/hocon-for-zig/17720)

<div class="topic-metadata">

**Author:** [@lejmr](https://ziggit.dev/u/lejmr)\
**Replies:** 3\
**Last updated:** [October 11, 2026, 9:40am UTC](https://ziggit.dev/t/hocon-for-zig/17720 "2026-10-11T09:40:52Z")

</div>

I would like to show you what I have been working on over summer and mostly during my evenings after work. A HOCON parser for Zig: GitHub - lejmr/zig-hocon: HOCON (Human-Optimized Config Object Notation) parser for Zig…

---

## [Why no builtin string type?](https://ziggit.dev/t/why-no-builtin-string-type/5326)

<div class="topic-metadata">

**Author:** [@Karim.MK](https://ziggit.dev/u/Karim.MK)\
**Replies:** 9\
**Last updated:** [October 11, 2026, 8:56am UTC](https://ziggit.dev/t/why-no-builtin-string-type/5326 "2026-10-11T08:56:29Z")

</div>

Hi, quick question. why zig doesn’t have a builtin with UTF-8 encoding? I know there is zig-string, but strings are one of the most basic types in a modern language. is it something that can be added later, or the zig …

---

## [How do I follow Zig development on Codeberg without searches/filters?](https://ziggit.dev/t/how-do-i-follow-zig-development-on-codeberg-without-searches-filters/17915)

<div class="topic-metadata">

**Author:** [@iceghost](https://ziggit.dev/u/iceghost)\
**Replies:** 5\
**Last updated:** [October 11, 2026, 7:48am UTC](https://ziggit.dev/t/how-do-i-follow-zig-development-on-codeberg-without-searches-filters/17915 "2026-10-11T07:48:48Z")

</div>

I remember watching Andrew talk about using milestones on the code forge to keep track of Zig development / roadmap (EDIT: it’s this one). I have been doing it since then. However, recently (around few weeks ago), Codeb…

---

## [State of networking in \`std.Io\`](https://ziggit.dev/t/state-of-networking-in-std-io/16553)

<div class="topic-metadata">

**Author:** [@lalinsky](https://ziggit.dev/u/lalinsky)\
**Replies:** 44\
**Last updated:** [October 11, 2026, 3:57am UTC](https://ziggit.dev/t/state-of-networking-in-std-io/16553 "2026-10-11T03:57:20Z")

</div>

I’ve been writing about this in the past, but after the 0.16 release, things already got worse. The interface is missing several key features, that people are hacking around, tying to a particular std.Io implementation, …

---

## [Heavy Duty Zig - a commercial truck diagnostics library for Zig](https://ziggit.dev/t/heavy-duty-zig-a-commercial-truck-diagnostics-library-for-zig/17914)

<div class="topic-metadata">

**Author:** [@dmckinney](https://ziggit.dev/u/dmckinney)\
**Replies:** 0\
**Last updated:** [October 11, 2026, 3:16am UTC](https://ziggit.dev/t/heavy-duty-zig-a-commercial-truck-diagnostics-library-for-zig/17914 "2026-10-11T03:16:51Z")

</div>

Heavy Duty Zig Heavy Duty Zig is a Zig library for observing and decoding diagnostic traffic from heavy-duty commercial vehicles. GitHub: https://github.com/f-drakeland/heavy-duty-zig The part I found most interesting…

---

## [Zgrid: a lightweight zig library for 2D overlap queries / broad-phase collision detection](https://ziggit.dev/t/zgrid-a-lightweight-zig-library-for-2d-overlap-queries-broad-phase-collision-detection/17913)

<div class="topic-metadata">

**Author:** [@cottonears](https://ziggit.dev/u/cottonears)\
**Replies:** 0\
**Last updated:** [October 11, 2026, 12:41am UTC](https://ziggit.dev/t/zgrid-a-lightweight-zig-library-for-2d-overlap-queries-broad-phase-collision-detection/17913 "2026-10-11T00:41:24Z")

</div>

PROJECT NAME: Zgrid Zgrid is a lightweight library for fast spatial queries in 2D scenes. I started working on it when dipping my toe into basic game development and wondering how best to handle collision detection. I w…

---

## [How to print a slice as a string in lldb?](https://ziggit.dev/t/how-to-print-a-slice-as-a-string-in-lldb/17853)

<div class="topic-metadata">

**Author:** [@nilsj](https://ziggit.dev/u/nilsj)\
**Replies:** 5\
**Last updated:** [October 10, 2026, 8:25pm UTC](https://ziggit.dev/t/how-to-print-a-slice-as-a-string-in-lldb/17853 "2026-10-10T20:25:46Z")

</div>

I want to be able to read it, currently i get: (lldb) print path (\[\]const u8) len=7 { \[0\] = 116 \[1\] = 101 \[2\] = 115 \[3\] = 116 \[4\] = 46 \[5\] = 109 \[6\] = 100 } I’m using Jacobs fork.

---

## ["attempt to use null value" when doing zig build run inside emacs compilation mode or shell command](https://ziggit.dev/t/attempt-to-use-null-value-when-doing-zig-build-run-inside-emacs-compilation-mode-or-shell-command/17908)

<div class="topic-metadata">

**Author:** [@Psimonk](https://ziggit.dev/u/Psimonk)\
**Replies:** 12\
**Last updated:** [October 10, 2026, 6:43pm UTC](https://ziggit.dev/t/attempt-to-use-null-value-when-doing-zig-build-run-inside-emacs-compilation-mode-or-shell-command/17908 "2026-10-10T18:43:52Z")

</div>

Hi, I use emacs when coding and frequently use the built in compilation mode for compiling and running my code. I recently ran into an issue when trying to build using this compilation mode on 0.17.0. When running zig bu…

---

## [Who’s ready (I AM) to break everything they built in 0.16?](https://ziggit.dev/t/who-s-ready-i-am-to-break-everything-they-built-in-0-16/17862)

<div class="topic-metadata">

**Author:** [@selectedambient](https://ziggit.dev/u/selectedambient)\
**Replies:** 17\
**Last updated:** [October 10, 2026, 5:01pm UTC](https://ziggit.dev/t/who-s-ready-i-am-to-break-everything-they-built-in-0-16/17862 "2026-10-10T17:01:45Z")

</div>

i UNIRONICALLY cannot wait to break my projects moving them to 0.17. this is not a dig on zig, this is just a fact of the matter when it comes to language that is still under 1.0. i’m happy to be building and breaking as…

---

## [Access b.install\_path after v0.17](https://ziggit.dev/t/access-b-install-path-after-v0-17/17906)

<div class="topic-metadata">

**Author:** [@n4chh](https://ziggit.dev/u/n4chh)\
**Replies:** 4\
**Last updated:** [October 10, 2026, 4:06pm UTC](https://ziggit.dev/t/access-b-install-path-after-v0-17/17906 "2026-10-10T16:06:04Z")

</div>

Hi, Previous to v0.17, I accessed zig-out (or the installed dir) using b.install\_path. This was useful because it let me create steps based on the produced files. Example where I used to add a flag to a Qemu command. b…

---

## [Kiesel Devlog #15: Release 0.4.0 — Linus Groh](https://ziggit.dev/t/kiesel-devlog-15-release-0-4-0-linus-groh/17911)

<div class="topic-metadata">

**Author:** [@sno2](https://ziggit.dev/u/sno2)\
**Replies:** 1\
**Last updated:** [October 10, 2026, 3:38pm UTC](https://ziggit.dev/t/kiesel-devlog-15-release-0-4-0-linus-groh/17911 "2026-10-10T15:38:35Z")

</div>

I haven’t seen Linus’s Kiesel devlogs on here yet, but they are always a fun read to me.

---

## [Pointer capture](https://ziggit.dev/t/pointer-capture/17907)

<div class="topic-metadata">

**Author:** [@zeeqeeng](https://ziggit.dev/u/zeeqeeng)\
**Replies:** 7\
**Last updated:** [October 10, 2026, 11:39am UTC](https://ziggit.dev/t/pointer-capture/17907 "2026-10-10T11:39:36Z")

</div>

What’s the relationship of the result type between capture expression and conditional expression? Will using pointer capture change that behavior? Say T is anyerror!?u32, and expression a has result type T. In a if expr…

---

## [A registry of call-sites](https://ziggit.dev/t/a-registry-of-call-sites/17789)

<div class="topic-metadata">

**Author:** [@matklad](https://ziggit.dev/u/matklad)\
**Replies:** 13\
**Last updated:** [October 10, 2026, 7:32am UTC](https://ziggit.dev/t/a-registry-of-call-sites/17789 "2026-10-10T07:32:10Z")

</div>

I want to collect all call-sites where a particular function is called. Roughly, I want to sprinkle mark(@src()); calls around my code, and get something like pub const mark\_locations: \[\]Location = ??? This is the sa…

---

## [How to implement doorbell x86 without race conditions](https://ziggit.dev/t/how-to-implement-doorbell-x86-without-race-conditions/17875)

<div class="topic-metadata">

**Author:** [@floresacton](https://ziggit.dev/u/floresacton)\
**Replies:** 7\
**Last updated:** [October 10, 2026, 6:37am UTC](https://ziggit.dev/t/how-to-implement-doorbell-x86-without-race-conditions/17875 "2026-10-10T06:37:56Z")

</div>

I’m trying to make a mini scheduler where processes can send a message over a ringbuffer, then call ring() to wake up the receiving core if it was asleep, then that core services whatever it needs in it’s state.update() …

---

## [What is the different between @This() and struct?](https://ziggit.dev/t/what-is-the-different-between-this-and-struct/17886)

<div class="topic-metadata">

**Author:** [@Wauuuu](https://ziggit.dev/u/Wauuuu)\
**Replies:** 12\
**Last updated:** [October 10, 2026, 1:22am UTC](https://ziggit.dev/t/what-is-the-different-between-this-and-struct/17886 "2026-10-10T01:22:47Z")

</div>

Hello, guys. So I starting to learn and read zig codebase in github/codeberg. I notice some of the projects/codebase use @This() with PascalCase.zig filenames and some of them are using struct with lowercase.zig filename…

---

## [Proper way to assign to \*anyopaque](https://ziggit.dev/t/proper-way-to-assign-to-anyopaque/17904)

<div class="topic-metadata">

**Author:** [@lfn1112](https://ziggit.dev/u/lfn1112)\
**Replies:** 5\
**Last updated:** [October 9, 2026, 9:24pm UTC](https://ziggit.dev/t/proper-way-to-assign-to-anyopaque/17904 "2026-10-09T21:24:19Z")

</div>

I’m trying to assign to a void \* handed to me from sdl. Assigning to the dereferenced pointer is a type mismatch. @memset expects dest to be a slice. Is there an idiomatic way to do this kind of assignment? Can I cast \*a…

---

## [Binary operator error](https://ziggit.dev/t/binary-operator-error/17850)

<div class="topic-metadata">

**Author:** [@ZViperSw](https://ziggit.dev/u/ZViperSw)\
**Replies:** 3\
**Last updated:** [October 9, 2026, 6:11pm UTC](https://ziggit.dev/t/binary-operator-error/17850 "2026-10-09T18:11:32Z")

</div>

I need help finding an ziglings error, I tried many solutions including googlling and use ai. However I still have not found a way to fix this error, all help appreciated! error: binary operator ‘\*’ has whitepace on one…

---

## [Artcraft and other first glance good-enough](https://ziggit.dev/t/artcraft-and-other-first-glance-good-enough/17893)

<div class="topic-metadata">

**Author:** [@nour](https://ziggit.dev/u/nour)\
**Replies:** 16\
**Last updated:** [October 9, 2026, 6:09pm UTC](https://ziggit.dev/t/artcraft-and-other-first-glance-good-enough/17893 "2026-10-09T18:09:05Z")

</div>

Hello, I guess you are all or did all hear about the artcraft suite by now. For those who don’t it’s an opensource clone of the adobe suite. Since I’m working on a painting app, I went directly to the photoshop clone:…

[Previous page](https://ziggit.dev/latest.md?page=3)

[Next page](https://ziggit.dev/latest.md?page=5)
