Goodbye to the C++ Implementation of Zig

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

    from only a glance and without having ever used nim, it seems to be more abstracted from the machine, whereas zig is closer. nim code should be shorter, nicer, closer to ideal pseudocode. safer too, i imagine. zig code should be more explicit, and if you do it right, more efficient in time and memory.

    zig also has a philosophy of, quoted from https://ziglang.org: "No hidden control flow. No hidden memory allocations. No preprocessor, no macros.". this also should make zig code more explicit, but probably more verbose too.

  • stage0

    A set of minimal dependency bootstrap binaries

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • meetings

    WebAssembly meetings (VC or in-person), agendas, and notes

    > Whereas the later has only been around since 2015 and was created by a company that subsists off an agreement with a deviant online advertising company.

    Mozilla created a precursor technology, but I thought Wasm was developed via the W3C standards process from the start. From the notes of the first meeting, you can see attendees from Adobe, Apple, ARM, Autodesk, Google, Intel, Mozilla, Stanford, and more.

    https://github.com/WebAssembly/meetings/blob/main/main/2017/...

    Additionally, Wasm has been a W3C standard since 2019.

  • zig-gamedev

    Main monorepo for @zig-gamedev libs and example applications

    Language-level guarantees of memory safety are not critical to all low-level programmers, and sometimes this is fine!

    Developers of games, compilers, digital audio workstations, video editors, and live performance software (such as openFrameworks) likely don't rank memory safety as their top concern.

    Zig is already an attractive choice for those domains because it offers:

    - Great compile times compared to C++/Rust, and future plans to implement hot reloading as a core part of the tooling: https://www.jakubkonka.com/2022/03/16/hcs-zig.html

    - The ability to reason about where data exists in memory: https://ziglang.org/documentation/master/#Where-are-the-byte...

    - Good readability and learnability, especially if you have a C/C++ background.

    - Comptime that enables clean generics, compile-time reflection and general metaprogramming as a happy side-effect: https://kristoff.it/blog/what-is-zig-comptime/

    - Better tooling than C/C++. The ability to cross-compile Zig and C/C++ from one machine lets you set up much more stable and reproducible build environments already. You can clone zig-gamedev and have the demos working with just three commands on Windows/macOS/Linux, for example, and two of those three are cloning the repo and changing to the directory: https://github.com/michal-z/zig-gamedev (to build you will need the latest copy of Zig from the 'masters' section for your platform at https://ziglang.org/download/ )

    We should all be careful about insinuating that memory unsafe languages should not exist. I see “friends don't let friends use memory-unsafe languages” on social media and feel sick. It's much healthier to embrace the melting pot of Zig, Odin, D, Beef, Vale, Hare, Lobster, Jai, C3, Val, Roc and all the rest and see what new ideas and trade-offs they bring.

    Also worth noting that new languages tend to take time to develop their own philosophies to memory safety (Vale's approach is only just now emerging, for example: https://verdagon.dev/blog/making-regions-part-1-human-factor ). Zig's story might not be great now ( https://www.scattered-thoughts.net/writing/how-safe-is-zig/ ), but then it's not Zig's priorty at the moment, and Zig's full story is not yet written.

  • zvm

    zvm (Zig Version Manager) lets you easily install/upgrade between different versions of Zig.

    If you’re interested in trying Zig out and want an easy way to update/use multiple versions I’ve been working on a Zig Version Manager for the past few weeks.

    It works on Windows, Mac, Linux, a smattering of BSD’s and Plan 9. Arm and x86.

    https://github.com/tristanisham/zvm

  • Scoop

    A command-line installer for Windows.

    On Windows one can use https://scoop.sh too. There's a "zig" package for numbered releases, and a "zig-dev" package for nightly releases.

  • Git

    Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • cargo-bisect-rustc

    Bisects rustc, either nightlies or CI artifacts

    > One big downside is losing the ability to build any commit from source without meta-complexity creeping in. For example, let’s say that you are trying to do git bisect. At some point, git checks out an older commit, but the script fails to build from source because the binary that is being used to build the compiler is now the wrong version. Sure, this can be addressed, but this introduces unwanted complexity that contributors would rather not deal with.

    If it's the main concern of using a prior build of the compiler, an alternative solution is to develop a tool for contributors to automate and ease the process. For example, Rust has this: https://github.com/rust-lang/cargo-bisect-rustc

  • nix-zig-stdenv

    Discontinued cross-compile nixpkgs with zig

  • live-bootstrap

    Use of a Linux initramfs to fully automate the bootstrapping process

  • camlboot

    Experiment on how to bootstrap the OCaml compiler

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts