What's everybody working on? (October edition)

I like that this becomes something like a monthly tradition here. So I’ll have to do another one of those this month.

To cite Andrew Kelley:

Previous threads:

15 Likes

in-memory OLAP engine

5 Likes

I’ve been working on the side on a cool little utility in homage to Casey Muratori called Napkin. It’s still very much rough and not yet shaped or feature complete yet. But I intend it to be a small utility for doing napkin maths. Basically testing every crook and cranny of a system, and output a simple table with latency, reciprocal throughput, ops/cycles. etc etc. Basically giving you precise numbers from which you can roughly compute what the optimal performance would be for a given function/ops etc.

21 Likes

Hello, first time posting. For a past year I’ve been playing around with various graphics libs, until I found @castholm 's examples for sdl3, and especially OpenGL-Hexagon. Had great time, made stupid tank game with it, together with my kids.

Meanwhile, I had this idea of gpu-based code viewer. I came up with rather unorthodox text rendering tech: I convert each text file into texture, where each pixel is a character. Then decode it in pixel shader and draw a glyph with msdf texture atlas. That way I can draw whole source file with only two triangles one draw call No unicode support yet, and I prefer not to think about it :D.

Zooming out will turn text into minimap view, and add functions labels. Zooming even further will turn whole screen on the side and turn it into file list. I’m getting mixed opinions about this feature :).

Here is a video of it displaying whole source code of Mach engine:

38 Likes

Here is the link to the source code of code viewer if you want to try it:

And stupid tank game, playable in browser: Stupid Tank Game by Bananaft

4 Likes

Started exploring git servers the past weekend, I implemented cloning (using git http-backend). Not that impressive, but really fun to be back playing around with zig.

9 Likes

wanna make fast lua jit on zig, with at least x64 optimizations. you are welcome xd

2 Likes

Lots of random bits of work on flyt, enjoying experimenting, refactoring and learning.

Some key things in September:

  • Moved configs to .zon and implemented per-client config using envars
  • FUSE support, so dbus/systemd isn’t a required dependency
  • Simple automatic client detection
  • Path globbing in client filters
  • Better handling of clients that exec
  • Improved support for Wine clients
  • Refactored modules… three times?

Still following master and enjoying it with very little issue! Approaching a viable RC for 1.0, just need to finish up core pinning/parking support.

6 Likes

Still working on this damn universal dependency-free, libc-free x86_64 linux desktop app framework when I have enough free time.

Made some progress on the pipewire audio backend recently, and started working on some apps that use it. The most advanced is this one:

I suspect the current state will end up being the final one, since it is absolutely not the final goal of the project :slight_smile:

And still a single file static executable!

I want to tackle layout next.
Not gonna lie, things are rapidly becoming hard to organize…

24 Likes

I am making a linear algebra library for zig. Just started because I contemplate a lot of storing the matrix in row-major or column-major. I decided with row-major as it is more natural (at least for me) to read the code. This journey makes me wonder why widely used programming language like MATLAB decides to store it in column-major. The difference with the other linear algebra library written for zig is this one definitely requires allocator when making a matrix (still focusing on 2D matrix). I need to create the matrix in runtime for my program. Most of the time is wasted thinking about the ergonomics of using the functions. Also, thinking a lot on how to implement @Vector builtin for runtime functions :eyes:

I need this library as the first step for implementing to my control system projects. So far, it has been fun to review the properties of linear algebra.

7 Likes

trying to implement a radix-tree (I never implemented a data-structure)
and still working on my Quran app (since I’m the only user I can just use the first build)

7 Likes

Working my way through Ray Tracing In One Week (book 2!) I’ve just got the BVH implemented and I went from ~90 seconds to ~50 for a full-size render. Not bad!

The book uses a bunch of C++ features (make_shared, abstract class, etc.) so making something work was definitely a bit of a struggle! That said, I think my implementation turned out pretty good. I’d love feedback if anybody else has done this!

19 Likes

Working on a community application platform, a discourse alternative. The frontend is written with nano-jsx, tailwind+daisyui giving me absolutely minimal JS and CSS on the frontend.

I have 6 pillars to my app:

  • Forum (Full discourse url compatibility)
  • Chat (Basic chat) - Can replace discord for most part
  • Docs (Full blown documentation support)
  • Learn (Tutorials and Courses)
  • Events (For managing community events)
  • Marketplace (An e-commerce front for digital and physical goods)

Why?

Multitude of reasons.

  • Only 1 dependency on a JS library. I pulled the nano-jsx code into my repo, so that no npm i is needed.
  • No Node needed for development (qwind does the tailwind + daisyui part and esbuild for bundling JS)
  • SSR is simply a SEO front with display: none and is replaced by SPA (tiny: 30kb JS). Uses service workers to avoid pulling in the JS/CSS files again and again.
  • From a product perspective, I want a community maintainer to have everything in one place. The eco-system is fragmented
  • I am using dusty for my backend.
  • I hope to achieve a Zig backend framework that I can reuse with jobs, analytics, logging, object storage, SQL all baked into one codebase.
  • I wanted to improve my UI design skills maybe
  • Zig binary till now weighs around 2.3MB.
5 Likes

Most of my projects fizzle out because I just don’t have much time or motivation to actually use them once I have something working (can’t count how many times I’ve tried to make a game until it came to actually doing game design), so for my latest project I had the goal of making something I’d actually be motivated to use.

To that end, I made rlfilmroom.com, a Rocket League replay and analysis tool that runs in the browser. Two components are written in zig: The replay file parsing and analysis tool, and the replay player core, which targets wasm and webgpu. Here’s a direct link to a replay if you’re interested: RL Film Room. It works surprisingly well on mobile assuming you have a reasonably modern phone/browser.

With this tool, I can have data and statistics tell me how bad I am as opposed to (or I suppose in addition to) the opposing players in the lobby.

Also, fwiw, this project includes LLM authored code. I work full time and have two young kids, it simply wouldn’t exist if it didn’t!

2 Likes

I’ve been exclusively working on my talk for SYCL 2026. I only just now got it to MVP status (with 3 days until I talk) :). I think this is the earliest I have ever finished something though!

Its about how to write real time software on linux: Software You Can Love: Vancouver
which is what I do at my day job, after years of teaching myself software engineering.
I had originally wanted to do an in person demo during the talk but between getting married (yay!) and work stuff I had to settle for just the slides:/.

After this I look forward to doing something low stress, like a mini game or learn more about WASM GUIs.

13 Likes

I’ve decided to release an early alpha version of the media player I am working on, in the form of a web release… it is called plainview and you can find it here https://plainview.knotsui.com .

The UI experience is very much targeted towards cinephiles, but it does work as a general purpose media player. I am daily driving it at this point, and super nice to have it on the web as I don’t have to install or download anything, and can run it on all my computers within seconds, and roll out updates to all devices :slight_smile:

It is using libplacebo so visual quality should be on par with MPV (I did some side-by-side testing with VLC and it is remarkably better IMO). There is also a watch party feature which I told myself I wasn’t gonna add… it is done via p2p connections so only the host needs the media on their computer, no data goes to the server except watch party state management, which is completely done in memory (deploys wipe everything lol) as I have no intentions of monetizing this.

The wasm sits around ~14MB which is too high, the initial load can be painful if you are on slow internet. Some notes below

  • Runs terribly on Safari
  • You must have WebGPU enabled in your browser, the entire UI is GPU rendered (with Zig!), really, inspect the website, it’s just 2 canvas elements.
  • Expect bugs and some performance issues…

Try it out! Tell me if it sucks, or how it can be improved!


15 Likes

I really like this thread. Beside seeing many new interesting projects, it also keeps you updated on some projects already ongoing for some months. Now after the summer that really starts to become recognizable.

For my part, I’m still working on my tui file manager lui, like in the previous months.

Main focus was an revising the underlying architecture. Especially reducing/removing the long-lasting storage of nested arrays/lists of pointers and removing the dir cache. This makes the code base less verbose, more readable and more robust while not sacrificing much. Only loading of really large dirs (10.000+ items) is now recognizable a little bit slower (+/- 200ms), but thats fine for a blocking application and such large dirs are rather rare.

Furthermore, I added sorting of items. And right now I’m implementing the feature of running shell commands on the CWD from inside the TUI. If thats implemented together with two more features I’m going to tackle the upcoming week, I’ll describe it in detail in the corresponding showcase thread.

8 Likes

I’ve been working a numerical and classical ML library in zig.

So you can imagine numpy + scikit-learn, but a lot watered down… It’s still pre 0.1 tho cause I’m still implementing basic features and trying to get the architecture right from the beginning… All in all tho. it’s been fun working on it, I get to learn more about zig (especially the build system which gave me countless headaches :smiling_face_with_tear:) and really understand what goes on under the hood. Plus this project serves as a breath of fresh air from AI coding.

I post regular updates on my youtube channel just to keep me consistent and all, so you can check it out if you’re interested. :upside_down_face:

6 Likes

I am currently (slowly) making an OS for my custom RISC-V computer built with Factorio’s in-game Circuit Network system: frv32 (see screenshots in the repo). Still in the early stages of trying to wrap my head around the implementation of machine-mode to user-mode transitions, exception and syscall handling, etc.

Hardware TL;DR: a RV32IM CPU with some kB of ROM and RAM, a keyboard, a 20x4 ASCII character display and a 64x32 color display (with 24-bit color), and a custom extension which allows bulk memory access (load/store 8kB at once) and SIMD! Runs at 15Hz, but in the in-game editor mode the game may be sped up, up to 64x.

I have written Writer, Reader and Random implementations for my convenience (quick link). An advantage of using Zig for custom hardware like this is that you can bootstrap the standard library by implementing just the hardware interfaces (sometimes only a single function), so e.g. formatted printing is available for a very small effort. And cross-compilation being not-a-headache is a huge boon too.

P.S. a slow CPU like this one really shows the advantage of Zig’s buffered Reader/Writer approach. A non-trivial writer.print with a buffer is easily 2x as fast (or more) as unbuffered.

5 Likes

First time posting as well.

I had the thought a while back, noticing that the compiler is “really” an interpreter, that perhaps the entire language could be (crudely) interpreted at runtime, if you ignore the comptime keyword entirely?

So, I’ve been trying to implement a very basic Zig interpreter… in TypeScript. This is mostly just a weekend project, I’m only halfway through the parser and haven’t gotten anything running yet, but it might be an interesting experiment. My hope is that it can be functional enough to run the Zig compiler itself, and perhaps by extension, be another way to bootstrap the compiler? (JS is probably the wrong language for that, but I wanted something where I could be sloppy for a first proof of concept, lol)

Doing this entirely without LLMs, just for fun.

16 Likes