Intro/how did you discover Zig?

As a way to better know each other, maybe we can share a little bit about how we discovered Zig?

The first time I heard about Zig was with the “How Zig is a better C compiler than C compilers” blog post. That definitely caught my attention. I quickly gave it a spin, and thought that yeah, that was indeed a really nice tool for cross-compiling C code.

But I didn’t look much at the language itself.

Months later, I stumbled upon a “zig” folder on my laptop by accident, and decided to take a closer look at the language itself. I immediately loved its simplicity and clean design. This is a language that makes me happy :slight_smile:

18 Likes

Junior (mostly) embedded developer here!

I heard about Zig for the first time in this article, and it captured my attention because in that period I was often thinking about how Rust was surely going to dominate the future of embedded development as a successor to C.

The article itself did not make a particular impression on me, but since I am a huge nerd for programming languages I added Zig to my long list of stuff to study. One month later I ate trough the documentation and was positively impressed by some features (seamless C interop, Generic Duck Typing, Comptime, Types as (comptime) values).
Then I found out that it basically supports collaborative coroutines out of the box at the language level. When I first read it I couldn’t believe it, I had to immediately try it out on a microcontroller to really appreciate it. To me being able to work with pseudo threads without an operating system seems huge, and everything else in the language looks very positive as well. My next objective is now to use Zig in my job as soon as possible - which is not now yet, but hopefully Soon™.

7 Likes

I heard about Zig some time around mid 2018, but made my first contribution in April 2020, and incidentally, it was @jedisct1 whose feedback about my blog post on stubbing out WASI manually in Rust made me try it out and start contributing (for some more context, @jedisct1 rightly pointed out that Wasm/WASI tooling is very much skewed towards the Rust language and its ecosystem making it extremely clunky to integrate in other languages/ecosystems).

Fast forward 10 months and Zig sucked me in for good, enjoying every minute of my time spent on improving macOS support and enabling seamless cross-compilation of C/Zig to the hot Apple Silicon platform.

9 Likes

Was almost a year back now from GNU/Programmers Unite on Telegram. I got hooked to the enthusiasm some of them had regarding Zig and it got fuelled with some curiosity on my side. Novice programmer so I just want to observe and learn things here and hopefully contribute some soon, that be fun! :grin:

5 Likes

I found it in a post talking about using zig to compile Nim.

3 Likes

I discovered zig through drew’s hello world comparison/benchmark blog post. It was pretty cool to see a modern language actually beat C at simplicity and binary size in this (admittedly flawed) benchmark.

A few months later when I was starting work on my wayland compositor I ruled out Rust due to complexity and friction working with wlroots and was going to just use C but decided to give Zig a chance first. Needless to say, I quite liked Zig and stuck with it for the project.

I think it speaks volumes that I was able to pick up Zig fast enough that my first ever project in it is non-trivial and still going strong :slight_smile:

11 Likes

“Hobby x86 kernel written with Zig” in r/osdev believe, though it took months for me to see it somewhere again before taking a proper look. It’s a blur to me. What then was almost at the top of the site, passing around a pointer for an allocator rather than the function defining the allocator, already trapped me.

4 Likes

The first time I seriously looked into it was after reading news about that Zen fork controversy. I might have heard of it before that (can’t remember), but that’s when I actually bothered to try it out.

3 Likes

I fist herd about it while reading the disassembly from Compiler Explorer (https://godbolt.org/) of a C code. And check what other languages the site supports. The last on the list is of course Zig.

I that time I was a c++ developer and I was searching for better language for my personal projects, because I hated c++. I when I read the Zig intro, I though this solves all of the things I hate about c++.

4 Likes

While studying bioinformatics I got close to high performance libraries for dealing with sequences and other derivative data, but always from the perspective of the application level programmer using a C FFI. One day I tried my hand at a Cuckoo Filter implementation in C and found the programming experience to be reasonable but not thoroughly enjoyable. C had a few footguns and I ended up writing a companion Python version of the library that I would use to test (by comparing the memory state) the C one.

Fast forward a year later and everything was rewritten in Zig in a more clear way and without the need for a Python version to sanity check the implementation.

8 Likes

I had heard about Zig off and on… didn’t pay much attention to it though. Then I saw that @jedisct1 was working on crypto stuff for the stdlib! This sparked deeper interest as I feel good crypto libs should be part of any languages stdlib (lookin at you rust!).

Then I saw the " Zig Makes Go Cross Compilation Just Work" post. Coming from Go my first though was “Wat, Go has the best cross compilation I have ever used!!??”. Glad I gave the post a read!

As I started poking more, I found a welcoming community and a language that is headed in a direction that I think makes sense!

As of this post, I haven’t written much Zig, but the tiny bit I have has been very fun and remarkably easy to write!

4 Likes

Believe it or not, I got to know zig through quotes in the brazilian rust group. There they discussed some related topics of comparison involving advantages and disadvantages from a very technical perspective. That, by the way, was the reason that led me to create the brazilian group about this language.
Here is an addendum to my interest in Zig. First of all, I have seen a certain convenience in the lightweight compiler which allows me to use cross-compiling even in C/C++ projects, but has also offered a new language with the most up-to-date perspectives in a very simplified way compared to the popularly known languages.

4 Likes

I am an old hand C programmer. I enjoy C for its simplicity, speed and closeness to the way I like to design and develop. However, I always found a few things in C annoying, and wished for a language that would just fix these. As a simple example, I usually write ADTs in my code; say I create a Buffer type, using that in C would look like:

Buffer* b = buffer_create();
buffer_format(b, "Hello %s", "world");
buffer_append_int(b, 17);
buffer_output(b, stdout);
buffer_destroy(b);

But I hate that I cannot simply say

b->append(...);
b->output(...);

and, of course, chain calls:

b->format(...)->append(33)->output();

Advent of Code came around in 2018, and I decided to give Rust a try. Long story short, I could not stomach the language; it was too complex and I found myself always fighting the compiler, so I quit around day 12 or 13. When AoC 2019 came around, I had already heard about Zig, so I decided to give that a try instead. It fit like a glove, and I found myself putting tick marks next to all of my petty grievances against C.

So yeah, syntactic sugar made me look into Zig initially. But of course, then I found all the goodies, and here I am, looking forward to more Zig!

4 Likes

I heard about ZIg when learning systems and game programming and diving into its language sphere. Said rabbit hole quickly led me to C, C++, Rust, and eventually Zig through following the development of Jai by Jonathan Blow.

To this day, I love Rust, but sometime feel like the borrow-checked is overly restrictive (though it has good reasons to be). C is too out date to be of any practical use for larger software development, and C++ is too complex for its own good.

What really sold me on Zig was a combination of awesome features, like explicit allocators and allocation, small footprint, cross-compilation, defers, etc. Though all of these features appear orthogonal, they work surprisingly well in tandem, and even make writing code fun.

4 Likes

I discovered Zig via HackerNews. I got curious when I read it was about having a “better C”.
I find it nice to have a language that keeps a low complexity level but still many convenient features (generics, comptime, optionals/errors, working with types as easily as with values…) and I admire that Zig seems to be able to achieve that (saying that after having touched too much C++).
Currently mainly observing what’s going on in the community and trying to get familiar with Zig programming.

Looks like my toy projects which used to be in C will be in Zig. I won’t regret C macros and can already feel how productive one can be in Zig.

4 Likes

I first heard of Zig in video on the Context-Free YouTube channel. It compared assembly instruction output on Compiler Explorer from several languages, and Zig totally blew everything else out of the water! After a couple of weeks getting to know Zig more in depth, I like it more and more. My latest 2 languages were Go and Rust. I really like Go for its simplicity but, although faster than many other languages, it still has performance compromises that bothered me. That’s when I turned to Rust, where high performance can be reached, but at some steep learning curve costs due to a massive, complex language. Now in Zig, it’s like the best of both worlds. :slight_smile: It’s also kind of funny how in many other languages we’ve been told for years that this and that feature is missing because it’s really hard to implement, it’s too dangerous, or it can’t be done. Then it’s like Zig whispers in your ear: “Oh really? Check this out…”

10 Likes

I’d always been interested in compilers and robust code and one day I got a recommendation for The Road to Zig 1.0.

I’ve been radicalised to Zig ever since :grinning_face_with_smiling_eyes:

7 Likes

recurse

4 Likes

Road to Zig 1.0 for me as well. I like fast and resource efficient things. A language rivaling and beating C at a decent benchmark was interesting.

After coming from Ponylang, I was trying to fit into other “C/C++ replacements” like Rust and Nim but was continuously let down by either the community, goals of the language, or what it allowed you to do resource efficiency wise. Zig felt like the first language/ecosystem that actually focused on and considered the latter so I’ve been integrating more since.

7 Likes

I heard about Zig almost 2 years ago when I was looking for a new programming language to learn. I tried Go – I don’t like dealing with GC. I tried Rust – love the memory safety, hate the complexity, and hate how you include one crate as your dependency, and then you have to build 70 other crates that your dependency depends on. I actually spent quite a bit of time with Rust and wrote a (medium-sized?) program with it, but I’ve recently been getting tired of its complexity.

Despite this, I’ve been watching Zig’s development, reading all the blog posts about it, and watching Zig Showtime. I’m getting so excited to use Zig that I’m finding myself daydreaming about using it…(what a nerd)… I’m definitely going to use Zig for my next project, as soon as I figure out what that is – hopefully in the gamedev space.

6 Likes