Zig by Example

(github.com)

79 points | by dariubs 1 hour ago

9 comments

  • code-blooded 1 hour ago
    I just looked this up yesterday so sharing some more up-to-date resources for those interested in Zig:

    - Learning Zig by Karl Seguin: https://www.openmymind.net/learning_zig/

    - https://zig.guide/

    - Free project-based online book Introduction to Zig by Pedro Park: https://pedropark99.github.io/zig-book.

    - Ziglings, almost working programs you need to fix: https://codeberg.org/ziglings/exercises

  • baalimago 0 minutes ago
    I'm missing the concurrency model.
  • shaftoe444 1 hour ago

      Examples target Zig 0.14.
    
    Been some significant changes since then, not least to printing and formatting (see writergate).
    • gren236 1 hour ago
      Also build system and c interop is outdated
  • pezgrande 39 minutes ago
    I like Zig but stopped learning it when I realized that all project based on it requires a specific version of the compiler to build.
    • eclectric 13 minutes ago
      I would be interested to learn why that is a problem. As a new Rust learner, I am curious.
      • loeg 11 minutes ago
        It might not be the version you have installed, or the same version as another project you want to glue together into a single application.
  • noelwelsh 38 minutes ago
    Very brief. I'm not sure what this adds over reading the language documentation (which itself is not great). As it's entirely organized by language features it doesn't really talk about any larger scale design decisions, which is where I think language proficiency is really found.
  • fallingmeat 45 minutes ago
    for those new, start with why: https://ziglang.org/learn/why_zig_rust_d_cpp
  • aselimov3 43 minutes ago
    Is this much different than ziglings?
  • fallingmeat 1 hour ago
    lots of people into zig this morning apparently!
    • dominotw 24 minutes ago
      I am really looking into zig now because founder seems like a cool dude.
  • miroljub 36 minutes ago
    Looking for a resource (MCP, CLI, Skill, ...) that would improve Zig support in LLMs.

    Currently, doing something with Zig as a target language would spend many more tokens and produce subpar results.