announcements

leifericf 2026-06-24T11:29:57.774819Z

https://github.com/leifericf/clj-zig - An Experiment to Bring Low-Level Systems Programming into Clojure As some of you might know, I'm a professional video game developer, and I also dabble in real-time audio processing in my spare time. I've always wanted a way to do native, high-performance systems programming from Clojure to create applications with real-time 3D graphics rendering and audio processing. The idea is to keep the data model and domain logic in Clojure, and use Zig from Clojure for the things that require low-level systems programming. I wanted to explore whether Project Panama could be used to create a "bridge" from Clojure to Zig, which in turn includes C and Assembly, for such use cases. clj-zig is the result of that. Think "Zig as a Clojure library." It lets you write Clojure functions implemented in Zig, with the full REPL-driven, interactive experience. It's a bit rough and clunky, but it sorta' works. I've already used it "in anger" to reimplement https://eido.leifericf.com/'s EDN-to-graphics rendering engine, making it way faster and more flexible, and independent of the JVM/Java 2D. This allows Eido to be used also from any programming language that can produce EDN. I will also share that engine soon (although that engine is a pure Zig project, so I don't know if I'll share it in this channel, or only in the Zig community). This also proved to be a useful tool for Zig programmers who want an interactive development experience. That was just a happy accident.

πŸ†’ 3
πŸš€ 8
πŸŽ‰ 30
fricze 2026-06-24T12:22:37.683269Z

share in this channel pls πŸ™‚ or somewhere on this slack

πŸ‘Œ 2
fricze 2026-06-24T12:22:48.777239Z

it's consuming EDN so it is Clojure!

leifericf 2026-06-24T12:23:25.317519Z

That's what I was wondering. "Does a purely Zig project whose interface is EDN qualify as a Clojure project?" πŸ˜…

fricze 2026-06-24T12:24:08.256299Z

any project that is of interest for clojurians is a Clojure project πŸ˜„

leifericf 2026-06-24T12:24:25.541649Z

I've also implemented a pretty good EDN parser in Zig now. I'm considering pulling that out as a separate Zig library.

πŸ™Œ 3
Kirill Chernyshov 2026-06-24T14:39:51.604419Z

> a pretty good EDN parser in Zig now. I'm considering pulling that out as a separate Zig library. > amazing! and since zig can easily use c libraries it would be interesting to compare with edn.c

leifericf 2026-06-24T16:30:25.977659Z

Doh! I wasnt aware of edn.c Had I know, I would probably have imported that into Zig instead πŸ˜…

πŸ˜… 3
ag 2026-06-26T00:36:09.796389Z

> Had I know Oh, god, we're turning into javascript community cerca 2015 - "accidentally" making parsing libraries. πŸ˜„

πŸ˜‚ 2
leifericf 2026-06-26T06:50:37.741709Z

Nawh, I just suck at knowing things about stuff.

whilo 2026-06-26T08:18:48.870249Z

@leif.eric.fredheim Nice work! I am exploring different compilation techniques to target GPU kernels/WASM/SIMD for game/simulation dev as well as a cross-platform Vulkan/WebGL runtime for clj/cljs in https://github.com/replikativ/raster. I am curious about what I am missing from Zig for game devs. Raster (or in general this compilation based approach) gives a fairly tight control over memory locality and computation including transparent IR inspection.

πŸ‘€ 1
😎 1
2026-06-26T19:58:45.524709Z

Cool project congrats on the release! The integration with eido sounds really promising, can’t wait to try it. Curious if you looked at Odin before going w Zig? I couldn’t have an opinion about it (never worked in either lang), but I’ve heard/read about Odin as more purpose-built for game dev and graphics.

πŸ™‡β€β™‚οΈ 1
leifericf 2026-06-26T20:10:42.497269Z

Thanks! Yeah, I looked into and tried C3, Odin, and Hare in addition to Zig. They're all pretty cool projects. Jai also looks pretty interesting, but it's not publicly available yet.

2026-06-27T00:09:40.961349Z

That’s cool ! So was the tooling/installation/distribution aspect the deciding factor?

leifericf 2026-06-27T06:40:46.832349Z

The tooling around Zig and its reach are far beyond anything else in the same space. But perhaps more important is the principles and philosophy behind it, the grand long-term vision of Zig’s creator, and the way it's structured as a 501(c)(3) nonprofit corporation as opposed to a 501(c)(6). Odin is narrowly focused and, arguably, offers a better developer experience because of that, but it also has fewer affordances. Zig appears to be the most serious and well-organized, and thus the safer bet for the long run.

leifericf 2026-06-27T06:47:06.712649Z

That said, I don't think Zig or anything else will β€œkill” C any time soon for certain use cases. For example, I kept https://mino-lang.org in C99 so that it can be embedded anywhere with zero dependencies. But I've adopted the Zig compiler and tooling stand-alone and gotten a lot of value from that, even without using the Zig language.

leifericf 2026-06-27T06:51:31.682749Z

For any stand-alone low-level library or application that doesn't need to be compiled into a host application, I’d likely opt for Zig over C. It depends. But it seems the problem space in which C is the β€œbetter” option will shrink slowly but considerably as Zig matures.