Best of ZigOctober 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun

    After experiencing challenges with Rust, the author rewrote their keyboard firmware in the Zig programming language. Despite having no prior experience with Zig, they found it easier to use and more enjoyable compared to Rust. The author highlights the simpler conditional compilation and type handling mechanisms in Zig, which made their development process smoother. Zig's smaller and more consistent language design allowed the author to be more productive with less mental overhead. This shift provided a new perspective on Rust's complexity and raised appreciation for Zig's simplicity and efficiency.

  2. 2
    Article
    Avatar of lobstersLobsters·2y

    Introduction to Zig

    Pedro Duarte Faria introduces an open-source, project-based book on the Zig programming language, designed for both beginners and experienced developers. The book explores Zig through small projects like a Base64 encoder/decoder and an HTTP Server, covering syntax, data structures, memory management, error handling, and more. Readers can support the project through donations or by purchasing the book on Amazon.

  3. 3
    Video
    Avatar of primeagenThePrimeTime·2y

    so i tried ghostty...

    The author shares their initial thoughts on Ghosty, a terminal emulator currently in private beta. They highlight its easy configuration, the quality of its codebase (written in Zig), and the notable engineer behind it. Despite its benefits, the lack of session management requires continued use of tools like t-mux. The author encourages feedback for more tech content.

  4. 4
    Article
    Avatar of Karl Seguinopenmymind·2y

    TCP Server in Zig - Part 6 - Epoll

    This guide explores how to build a TCP server in Zig using the epoll system call, which is specific to Linux and offers various advantages over poll. The article introduces the three key epoll system calls (`epoll_create1`, `epoll_ctl`, and `epoll_wait`) and explains how to use them to manage socket events more efficiently. The guide also covers how to associate each epoll event with client-specific data, simplifying client management, and demonstrates how to implement edge-triggered notifications.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    mookums/zzz: A framework for writing performant and reliable networked services.

    zzz is a framework for writing performant and reliable networked services in Zig, currently supporting TCP with native TLS for secure connections. It's modular and portable, suitable for both standard servers and embedded systems. Though in early alpha, it boasts impressive speed and memory efficiency, beating competitors like zap and http.zig. Built on Tardy, it offers various asynchronous implementations and minimal memory usage options.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    gdonald/blackjack-zig: Console Blackjack written in Zig

    A Blackjack game implemented using the Zig programming language, runnable via Zig's command line interface.

  7. 7
    Article
    Avatar of lobstersLobsters·2y

    Migrating from AWS to Self-Hosting ⚡ Zig Programming Language

    Ziglang.org transitioned from AWS S3 + CloudFront to a more cost-effective self-hosting solution using a Hetzner instance. The motivation behind this move was to reduce high AWS costs, highlighting that 99% uptime is sufficient for their needs. By doing this, they aim to cut expenses and allocate more funds to pay contributors. Future plans include providing torrent files for releases to further optimize resource use.