I think Zig is hard but worth it

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

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

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

    I love this part about zig too. It definitely makes interop with, or gradual migration from, C, much easier.

    It's also the source of my major problem with zig. It doesn't have its own ABI [1].

    So, if for example, you want to write a library in zig, to be used by others from zig, they must build your library with their project. That may not be an issue for smaller things; but for a large library I'd really like consumers to be able to pull in a binary with just a definition (header) file. Since zig uses the C ABI, that would currently mean translating everything to and from C at the binary interface, and losing all ziggyness in the process.

    [1] https://github.com/ziglang/zig/issues/3786

  • tigerbeetle

    The distributed financial transactions database designed for mission critical safety and performance.

    This is basically what I've come to do in the Zig scripts I write at work.

    It took a bit of getting used to when I joined but we agreed as a team to have all meaningful scripts written in Zig not bash (for one, bash doesn't work on Windows without WSL and we need to support Windows builds/testing/etc.).

    It makes about as much sense as any other cross-platform scripting option once I got used to it!

    Some examples:

    Docs generation: https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/c...

    Integration testing sample code: https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/c...

    Running a command wrapped in a TigerBeetle server run: https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/c...

  • 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.

  • debug-trace-var

    You do not have to write variable names twice in Debug.Trace

    > Can you give me an example of a Haskell expression which isn't reverentially transparent (without unsafePerformIO)?

    Yes: https://github.com/ncaq/debug-trace-var The trick, however, is not unsafePerformIO (destructive mutability has nothing to do with referential transparency in general) but with TemplateHaskell, as quoting has everything to do with referential transparency.

    > But the bog standard FP definition is a real and useful concept.

    Actually, it's rather tautological. It defines FP circularly (see my comment here: https://news.ycombinator.com/item?id=36152488). It says nothing more than the far more useful explanation: "the meaning of every expression is a value".

  • emmy

    The Emmy Computer Algebra System.

    > You can get a feel for how unergonomic this is by avoiding the use of all arithmetic operators in your code and instead forcing yourself to use user defined plus(a,b), minus(a,b), assign(a,b), etc, or programming directly with the C blas api.

    You've dramatically overstated your case, since that's true of every Lisp-like language.

    Lisp is a perfectly suitable language for developing mathematics in, see SICM [0] for details.

    If you want to see SICM in action, Emmy [1] is a Clojure project that ported SICM to both Clojure and Clerk notebooks (like Jupyter notebooks, but better for programmers).

    [0] https://mitpress.mit.edu/9780262028967/structure-and-interpr...

    [1] https://emmy.mentat.org/

  • papers-we-love

    Papers from the computer science community to read and discuss.

    However, f and g are interchangeable anywhere else (this is not actually true because their addresses can be obtained and compared; showing that a C-like language retains its referential transparency despite the existence of so-called l-values was the point of what I think is the first paper to introduce the notion referential transparency to the study of programming languages: https://github.com/papers-we-love/papers-we-love/blob/main/l...)

  • sokol-odin

    Odin bindings for the sokol headers (https://github.com/floooh/sokol)

    I'm actually dabbling with Odin a bit in the scope of language bindings for the sokol headers:

    https://github.com/floooh/sokol-odin

    It's a very enjoyable language!

  • proposal-operator-overloading

    There's a not-very-active proposal to add operator overloading to JS which takes a similar scoped approach:

    https://github.com/tc39/proposal-operator-overloading

  • 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.

  • Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

    This is not actually true for Nim - almost all Nim Discord channels are bridged to different IRC channels, see https://github.com/nim-lang/Nim/wiki#bridged-real-time-chats

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