What are you working on in Zig?

A game (with custom game engine). Here is short write-up on the progress: Devlog #0
I also plan to implement https://craftinginterpreters.com/ in Zig for the virtual machine interpreter. But that’s less of a toy project and more to learn about building programming languages with the goal of improving Zig.

Things I appreciate with Zig:

  • simplicity
  • less choice paralysis (there is not many ways to implement something)
  • explicit allocators

Things I appreciate less:

  • explicit allocators (it’s uncomfortable because I’m not used to, but it’s great to really think about memory and when you allocate stuff)
  • documentation
2 Likes

My first trick was DOOM fire in zig as a proof-of-concept for a 3D ascii isometric rogue-like. Sadly, frame rate isn’t there in OSX terminal. Now mulling over SDL…trying to figure out if isometric-2d is worth the energy, or is it easier to wait until the Mach Engine is a bit further along!

1 Like

Terminal.app is notoriously bad. Have you tried Kitty?

Actually, yes! Ty for the recommend.

Kitty and the stock VS Code terminal both worked great (90+ fps). iTerm was ok (30+ fps). However, I was hoping for something that didn’t require a special install to use.

At some point, OSX Terminal appears to blocking on write, which slows down the FPS. However, it also is writing asynchronously, which causes it to drop / tear frames. Buffer size didn’t appear to make a difference.

There is likely some sort of secret-decoder ring ANSI sequence that would get it to bit-blast large sequences but a tix to APPL has sat idle!

2 Likes

Hi! In Zig I’m currently working on… Zig. I made some small contributions to the C backend and I intend to do more in the future, at least as soon as Real Life™ leaves me enough time/headspace to contribute.

I also started a bunch of personal, unreleased projects like a reimplementation of a subset of POSIX utilities, and I have a toy language project in its early stages which is mostly intended as a way to teach myself about building compilers from the ground up.

8 Likes

A game with a custom “game engine” with some of the data layout inspired by mach engine (the AECS article) and written in a somewhat literate programming style.

This is something I’ve attempted quite a few times in scheme, c, haskell, idris, &c but didn’t get as far as I’d hoped. Will see how it goes with zig.

5 Likes

Hello!

I have been writing mostly numerical code focused on signal process algorithms.

Recently implemented about 25 FFT algorithms (Stockham, Split-radix and friends) variants for benchmarking. (The clap arguments parser - thanks Hejsil! - has been critical, allowing the use of bash scripts to run the various benchmarkings.)

Also, piping to gnuplot with some rather nice (my opinion) wrappers that make visualization of the data simple to do.

Using both desktop computer as well as a Raspberry Pi, both running Devuan Linux.

Devuan is a favorite! Basically Debian WITHOUT SYSTEMD! Lovely!

4 Likes

I’m doing something probably unique! I’m building a small seed-starting greenhouse which is automated with an STM32 microcontroller which is programmed with zig. Right now I have the physical greenhouse built, and the microcontroller is reading the temperature and turning on a heat lamp to keep the temperature above freezing. I have lots of additional ideas and am working on them!

14 Likes

I’m working on my game in zig and sfml)

2 Likes

Currently working on a pure-zig library to create Terminal User Interface. Repo is currently private but soon i will release v0.1.0 :smiley:

2 Likes

Just some very simple programs here ~cgenie/zig - sourcehut git (hello world, SDL2 integration).

Hello, I’ve been on ZIG for 3 weeks, and I took as a subject to redo type->ncurses , I don’t leave empty and I’m inspired by what I found on github,
I do a lot of testing to understand the mechanisms of ZIG, and I read a lot of code on the ZIG repository, the documentation is nice, but not for a non-beginner, I’m not on my first try, I’m retirement and I am having fun with this new language…