What's everybody working on? (October edition)

My main hobby project, already presented here multiple times, is a ls style filemanager TUI called lui. I really like working on and with those tui applications.

However, so far I’ve always relied on external deps/libs for the lower level tui parts (alt screen, raw mode, cursor positioning, ansi escape seq, drawing). While I have a basic understanding how this works in general, digging into the libs never was necessary.

But now I decided at least to try to replace the tui lib I’m using for lui with my own handmade code.

Thus, I just started implementing a simple and (later hopefully) clean lib for building tui’s. So far I’ve terminal setup and event handling working. I also managed to set up the very basic printing to the raw terminal using a double buffer so on redraws only changed cells/chars are updated. Just now, I added a basic sectioning concept to render text to bounded areas of the screen.

Its still a long way to go to get this working and therefore the repo is still private. I got inspirations from other great repos like xitui and mibu (with references ofc). AI/LLMs are not and will never be used to write any loc, its all handmade.

I want to keep it simple, i.e. no extended widget system, focus system etc. That should be up to the user. The lib should mainly provide wrapper and workflows for the most low-level/cumbersome tui functionalities (see above).

I’m also still not sure if I get this to a point where anyone (including myself) is able to use this lib for real projects. Anyway, I’m learning a lot either way :grin:

7 Likes

I’m still working on my graphics experiments and managed to build a simple raytracer.
Now I’m working on a software rasterizer which is a bit harder, but I’m getting there!

Here’s a picture of the current status of my renderer:

I’m using tinyrenderer as a reference.
I hope to finish this by the end of the week!

17 Likes

This is very cool! I have been meaning to look into making something like this too.

I’d love to peek at the code if it’s public?

I created a script to translate the Kbuild files and embedded comments busybox uses into a KConfig.zon file

Is it specific to busybox? I have a dream I can one day replace kbuild for the kernel, would love to compare notes…

1 Like

Interesting question, actually. It certainly only implements the feaures used by Busybox, and i have not looked at the kernel source code to be honest.
My guess is at least the KBuild logic in the kernel is a lot more complex since in busybox every c file usually depend on a specific option (or its negation) and all files compile directly into one shared/static lib or the single exe.
Tristate variables are actually parsed but possibly not handled correctly since busybox does not use them at all.

But I guess the parsers for KConfig and KBuild files here could probably be reused or made more generic.
The executable doing the actual translation to zon also handles the c file comment extraction at the same time which i think is busybox specific, the tool turning the configuration into autoconf.h for sure is, too.

1 Like

I created a command-line passphrase generator. passphrases are very useful, so I especially encourage people who usually use passwords to give them a try.

4 Likes

For the past year I have been working on “something small”, a “professional fork” of FreeCAD with the name NextCAD.

Why NextCAD? Why do I went spending all my time to implement a new version of FreeCAD? Well, it’s because the community is stubborn and so am I. And believe me, I really tried.

The only thing that FreeCAD wants is new features, but serious refraction, they can’t do thanks to backwards compatibility and anyone who has ever looked inside one FCStd file (a normal Zip file) will probably cry, laugh, or both. Also, thanks to their C++, everything is linked into a gigantic web. They also use Boost and Eigen, even std::shared_ptr. The number of TODO and FIXME is high. In other words: It is unfixable!

It is clear that something needs to be done. The only question is how.

My entire career has been in CAD. I started out with AutoCAD, then Pro/ENGINEER and after that I regularly switched between SolidWorks and NX. I know how professional CAD feels. FreeCAD doesn’t feel like professional CAD at all. It is buggy and I haven’t even started a large assembly yet, since that is impossible.

I am not a professional programmer. I hate C++ and all its history, and also Rust. I kinda like Zig, mostly because they really try to improve the industry. So I am not an expert, I use ChatGPT to fix my problems, and there are plenty of them. The list goes on and on.

What are my solutions to fix FreeCAD? Fix them one for one!

Well, I also like the separation of concerns, which means that I don’t like unnecessary dependencies. Also I like to have separate file extensions. Then you see in the file manager exactly what is what. For instance, the NextCAD file extensions for files are ncprt, ncasm, ncdrw and ncfam.

The FCStd file format is crazy, but ncxxx files are neat! They are easy to inspect and has too many features to mention here. That is part of a next topic.

Also everything should be smoother than FreeCAD. Everything should work out of the box.

I did put many hours of work to make it work as I want it to work. And that is hard because FreeCAD is not an ordinary CAD program.

For instance, I replaced the ordinary CMake with build.zig and also the compile time is drastically improved and plenty of workbenches were eliminated, because they were in the way. And also introduced a more modern model tree. The Python dependencies are also probably on the way out, but I haven’t decided that yet.

The goal is to have a much simpler CAD, and we are on its way, but we are not there right now. That is the reason why it’s not open source yet. The core is completely in Zig, but the majority of NextCAD is still C++.

13 Likes

It’s nice when expert users of a tool take charge of and/or become primary stakeholders in its development :slight_smile:

Best of luck!

1 Like

It is a long way, but it needs to be done. Thanks!

Still working on the TUI lib. Its really fun and going better than expected. I already got stuff like lists, textfields, borders, resizing etc. working:

I’m confident that lui can use this lib sooner than expected (Ok still need to rewrite many internals when lib is in usable state… :grin:)

9 Likes

Making an experimental android apk runner. Not emulating an android os, but something similar architecturally to https://gitlab.com/android_translation_layer/android_translation_layer/. But theyre porting the entire android ART runtime to run on linux with a ton of patches, so i thought what if i convert the dex bytecode to java bytecode and load it with jvm instead? I finally got my first apk to render properly (the app im testing https://github.com/android/ndk-samples/tree/master/gles3jni) :relieved_face:


Everything is building via zig build with the exception of ANGLE. I tried converting that to use zig build like i did with dynarmic but gave up lol. So im just importing prebuilt libs.

8 Likes

I’m finally relatively free to continue working on this: What's everybody working on? (July Edition) - #66 by sohro_desu

I couldn’t participate in August and September topics because I got drowned in work for almost 3 months. I only had time for work and very little bit for sketching.

I got back to coding on September 22 and it took a month to port my app to native Android. Today I’ll be showing the results in this video (also an ASMR lol)

Not much to show, but I learned or at least tried to learn many things. Here, my build.zig creates an APK (177 kb in -Doptimize=small) and installs it, then launches it in split screen with Shizuku/Rish shell. I had a great time learning to do this all. Man, Zig Build is powerful and it’s very accessible that even I can read and tweak.

But some things/ideas/concepts (shamefully, admittedly, most basic things) still won’t stick or I can’t wrap my head around it, but I try to practice them outside the project with some books.

The 1 month development happened exclusively inside my tablet (S11 Ultra) in realm of termux + wireless keyboard. I took it to cafes and stuff, real comfy.

Still 100% Zig (no java/kotlin crap, no C glues) and no dependencies beside system deps. That’s why I need to implement shit ton of features myself and I’m willing to.

For example, these needs to be implemented:
— proper declarative UI API with hit tests
— focal zoom (as opposed to fixed zoom)
— tiling render and render reuse (currently bluntly rendering ~4 million pixels per frame if fullscreen)

The first one can unblock instant UI construction of any type, kinda. For example, I can build layers UI in just 2-3 hours (with actual hide/delete/add layer functions).

It’s all software rendering. I want to optimize the shit out of it so it runs on even 50$ crap phones, then add Vulkan hardware acceleration. I’d be learning rasterizing myself if I do SW first and I think that’s important.

That’s all for now!


I also noticed that my Telegram channel (where I post some devlogs and mostly sketches) was hidden outside of the app because of a toggle. I undid it and now anyone should be able to browse it without an account: Telegram: View @sono_rakugaki (with the sneaky Preview channel url)

12 Likes

Ported MiniFB to zig build system, currently only with linux support though.
Worked on a busybox like cli, just started implementing the basic applets.
Also started a graphics lib just for fun (done something similar using C, but stopped halfway), based on minifb.

Nothing impressive, literally. (and most projects not even halfway through v0.0.0)

3 Likes

Hey, I am creating Samatas analyzer - I hope to publish it by the end of this month.
It’s a spectral analyzer - shows how loud each frequency is over time.
The project is using C++ & Juce. Zig is used for building and embedding the fonts.
In v0.17 build times are improved - it is a joy to use - many thanks.


13 Likes

one day I was looking at ziglang.org s list of communities, looked at the #zig channel in Libera.Chat and thought if there were any irc clients in zig. there were, but all that i can find on the first page of searching “zig irc client” are outdated.
so I’ve been making a TUI IRC client in zig for the past week or two. TUI is done using termbox2.

6 Likes

This month I have some time to get back to our family spreadsheet — now I added a formula in-cell editor and formula bar editor with hints, powered by Zig comptime.

It’s time to prepare to 0.17.0 in November…

4 Likes

Started working on a HTTP/1.1 server. Suuuuuper primitive at this points but, the API is Express.js inspired.

1 Like

I’m a bit late for this month, but I’ve been working on a little 2D geometry drawing and constraint solver program, in hopes of making it a more fully featured CAD package. Some immediate mode GUI work has also popped out of it.


https://codeberg.org/Zandr0id/radCAD

8 Likes

I’m writing a Zig community mirror in Zig and going to host it.

In the meantime, I used AI to generate a ‘smoke-testing’ script to check the existing community mirrors for basic vital signs and try to probe their software. Already learned a lot while doing this (e.g. they are mostly functioning properly, after all​:sweat_smile:)

smoketest

Gist: smoketest.sh, asciinema usage recording

Still learning the basics here, so a very simple and small project. I’m porting one of my bash script to zig. Given a name, the bash script creates a tmux session (if it doesn’t exist yet) with the corresponding starting directory (based on a huge switch case, defaulting to home) and tmux-switches to it or tmux-attaches to it depending whether we are already in tmux.

The zig program does (well, it will soon, I hope) the same replacing the case switch by a configuration file.

  • Still getting familiar with the different ways of handling errors
  • Getting better at parsing compilation error messages and understanding what mistake I made :slight_smile:
  • Learned about the different hash-maps from the standard library
3 Likes