ziglang/zig
View on GitHub ↗ ★ 43,260 Zig
Moved to Codeberg
680 mentions on Hacker News by 373 people: 46 stories, 634 comments · first 2016-01-08 · latest 2026-09-19
20082026
-
…but I think you could wrap it pretty easily in a struct of your own if you needed that. [0] https://github.com/ziglang/zig/blob/master/lib/std/unicode.z...
comment by losvedir · 2021-09-08 · in Maintain It with Zig -
Probably related to the following: https://github.com/ziglang/zig/issues/3180
comment by sigzero · 2021-09-08 · in Maintain It with Zig -
…been using Zig for a month and I am still positively surprised so he must be onto something. [0]: https://github.com/ziglang/zig/blob/master/lib/std/json.zig#...
comment by skywal_l · 2021-09-08 · in Maintain It with Zig -
There's a discussion about this here: https://github.com/ziglang/zig/issues/2647
comment by dralley · 2021-09-07 · in Looking into Odin and Zig -
“Adding everything” is definitely not a part of Zig’s philosophy. https://github.com/ziglang/zig/issues/130#issuecomment-70601... > However, at this point the plan is to not add an additional dynamic dispatch language feature.
comment by judofyr · 2021-08-28 · in Weird Languages -
…safe languages Zig is a nice improvement over C, but it is not safe. There is work in progress ( https://github.com/ziglang/zig/issues/2301 ), but from what I can tell, key details are still to be decided, including the classes of errors…
comment by ojeda · 2021-08-21 · in The Janet Programming Language -
…C/C++ easier we might see a Zig package manager making C/C++ packaging easier too. [0] https://github.com/ziglang/zig/issues/943
comment by skywal_l · 2021-08-19 · in C++20 Modules with GCC11 -
…and Zig is very much opposed to both. Non-capturing anonymous functions expressions will be added ( https://github.com/ziglang/zig/issues/1717 ), while a limited form of closure is being considered ( https://github.com/ziglang/zig/issues/69…
comment by pron · 2021-08-10 · in Zig Pathtracer -
…similar to this earlier - there is actually a quite cool proposal for something like this here now: https://github.com/ziglang/zig/issues/8973
comment by slimsag · 2021-08-08 · in Bringing NetBSD to Zig's Continuous Integration -
They're discussing this in https://github.com/ziglang/zig/issues/910 (server) and https://github.com/ziglang/zig/issues/2007 (client).
comment by jks · 2021-08-07 · in Looking into Zig -
…the error set of the current function to not include the handled ones. Here are a couple examples: https://github.com/ziglang/zig/blob/7d0de54ad44832589379a4bc... You get compile errors if you try to handle an impossible error, or don't…
comment by AndyKelley · 2021-08-07 · in Looking into Zig -
> Can it be used for c++ code? Yup! https://github.com/ziglang/zig/commit/db17c0d88c44183b306099... > Also we build LLVM tip of tree from scratch... I would have also thought it would be non-trivial (Julia uses LLVM and has some…
comment by O_H_E · 2021-07-18 · in Zig cc: A drop-in replacement for GCC/Clang (2020) -
…etc) for for the target, then set them in the current env ("CC=zig-cc", "CXX=zig-c++") [1]. [0]: https://github.com/ziglang/zig/issues/8716 [1]: https://github.com/ziglang/zig/issues/8973
comment by Andoryuuta · 2021-07-18 · in Zig cc: A drop-in replacement for GCC/Clang (2020) -
…https://github.com/Hejsil/zig-clap Also this pattern was also mentioned in the issue you mentioned: https://github.com/ziglang/zig/issues/2647#issuecomment-5898... The advantage of this system is that the caller can decide whether error…
comment by kristoff_it · 2021-07-18 · in Zig cc: A drop-in replacement for GCC/Clang (2020) -
…an allocation for errors, especially given that error handling is generally not the hot path. [0]: https://github.com/ziglang/zig/issues/2647 (among other issues)
comment by coder543 · 2021-07-18 · in Zig cc: A drop-in replacement for GCC/Clang (2020) -
…vectors and there has been discussion to rename it to something that reflects this more clearly. https://github.com/ziglang/zig/issues/7305
comment by Hoppetosse · 2021-07-15 · in Zig, Skia, Clojure, Geometry and the Japanese TV Show: ICFP Contest 2021 -
…you will have fewer cache misses. future languages will be able to suss this out at compile-time: https://github.com/ziglang/zig/blob/2ac769eab9b7dba4cd38e5de...
comment by dnautics · 2021-06-26 · in Understanding thread stack sizes and how Alpine is different -
…creates instances of the type. EDIT: Aaand shockingly, I'm not the first to come up with this idea: https://github.com/ziglang/zig/issues/782
comment by PoignardAzur · 2021-06-05 · in Zig 0.8.0 Release Notes -
I think GP means RAII, which is still an open area of discussion in Zig: https://github.com/ziglang/zig/issues/782 I'd love to see it if it can be implemented in a way that fits the language, but that remains to be seen.
comment by slimsag · 2021-06-05 · in Zig 0.8.0 Release Notes -
…Well, I guess I will admire the language from a distance but I am unlikely to use it practically. https://github.com/ziglang/zig/issues/782
comment by lenkite · 2021-06-05 · in Zig 0.8.0 Release Notes -
Re: strings, this is a thread about that topic: https://github.com/ziglang/zig/issues/234 It strikes me as a difference in opinion wrt at which level should strings be handled (zig folks saying it should be a userspace/stdlib concern,…
comment by lhorie · 2021-05-25 · in Advances of the Hare programming language compared to C -
…have a single leader. Zig on the other hand does have a single main contributor/maintainer/creator: https://github.com/ziglang/zig/graphs/contributors?from=2015...
comment by est31 · 2021-05-22 · in Rust heads into the kernel? -
…It is worth looking at all the serious bugs in deficiencies in the upcoming 0.8 milestone: https://github.com/ziglang/zig/milestone/10 This is not a criticism of Zig, nor is it an insinuation that Zig is unable to write correct software.…
comment by nicklecompte · 2021-05-22 · in Rust heads into the kernel? -
…investment either way (I had one use case, where I would slightly prefer the infix operation). https://github.com/ziglang/zig/issues/8204
comment by dnautics · 2021-05-13 · in Building an efficient and portable programming language with Zig -
…to be explicit. There's more at [0]. Side note: the proposal at [0] seems very close to [1]. [0]: https://github.com/ziglang/zig/issues/782 [1]: https://www.haskellforall.com/2013/06/the-resource-applicati...
comment by creata · 2021-05-13 · in Building an efficient and portable programming language with Zig -
…can be disabled with `-fno-sanitize=undefined` or by enabling optimizations with `-O2` or `-O3`. https://github.com/ziglang/zig/issues/4830#issuecomment-6054...
comment by ifreund · 2021-05-10 · in Adding ANSI C11 C compiler to D so it can import and compile C files directly -
…and first-class capability of zig (you can run it now, the issue isn't closed because it's an epic) https://github.com/ziglang/zig/issues/2457
comment by dnautics · 2021-05-07 · in Modern C and What We Can Learn from It [video] -
Sad but true. This is why I'm hopeful that Zig will add support for "constant time" blocks: https://github.com/ziglang/zig/issues/1776
comment by nemo1618 · 2021-05-05 · in Branchless Coding in Go -
…its stdlib? In any case, they have been refactoring the language parser to use SOA to great effect: https://github.com/ziglang/zig/pull/7920
comment by dnautics · 2021-05-03 · in The compiler will optimize that away -
Here's a related Zig proposal: https://github.com/ziglang/zig/issues/8220 Relevant section pasted here: > Other Possible Solution: Tail Calls > Tail calls solve this problem. Each switch prong would return foo() (tail call) and foo() at…
comment by AndyKelley · 2021-04-25 · in Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Calls in C -
Is LLD on Mach-O considered stable? https://github.com/ziglang/zig/pull/8282 https://chromium.googlesource.com/chromium/src/+/refs/heads/...
comment by fomine3 · 2021-04-12 · in Initial M1 support merged into Linux SoC tree -
> no REPL Personally I don't find it necessary, but the proposal for REPL has been accepted: https://github.com/ziglang/zig/issues/596
comment by ttt0 · 2021-03-31 · in Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust -
…is a very hard problem but it is in the Zig issues list and it will probably be worked on: https://github.com/ziglang/zig/issues/5725
comment by dnautics · 2021-03-27 · in A “Better C” Benchmark -
…reading them, they are both interesting): ------- "Improved handling of strings and unicode", https://github.com/ziglang/zig/issues/234 Andrew answer: > I'm not convinced that this is a language change rather than a standard library…
comment by dgellow · 2021-03-27 · in A “Better C” Benchmark -
…It's like some bizarro alternative universe, where ASCII or a bag of bytes is good enough... [1] https://github.com/ziglang/zig/issues/234
comment by coldtea · 2021-03-25 · in A “Better C” Benchmark -
…and obscured. Oh, don't worry about that :) [1] https://www.youtube.com/watch?v=NQgju_2mX-8 [2] https://github.com/ziglang/zig/wiki/Community [3] https://ziglang.org/documentation/master/std/ [4] https://kristoff.it/blog/zig-new-relationshi…
comment by kristoff_it · 2021-03-24 · in A “Better C” Benchmark -
…without automatic resource cleanup. A lot of people forget cleanup and destroy safety without RAII. https://github.com/ziglang/zig/issues/782 Zig is apparently a PL for folks with perfect memory who never make mistakes like those described…
comment by lenkite · 2021-03-23 · in How Safe Is Zig? -
https://github.com/ziglang/zig/pull/4929#issuecomment-649191... The bulk of the conversation happened in Discord around that time. Initial attempts to bring this up were met with "zig is perfect"-type conversation, none of which was very…
comment by _u9xp · 2021-03-22 · in How Safe Is Zig? -
…safety, hands down. I do want to note that the safety story in zig is [under active development]( https://github.com/ziglang/zig/projects/3 ) and will be worth checking back in on in a year or two and see what has changed :)
comment by AndyKelley · 2021-03-22 · in How Safe Is Zig? -
…to not have a computed goto language feature. More details here, with lots of fun godbolt links: https://github.com/ziglang/zig/issues/8220 [1]: https://godbolt.org/z/T3v881
comment by AndyKelley · 2021-03-13 · in Speed of Rust vs. C -
You can read more about it here: https://github.com/ziglang/zig/issues/2765
comment by lhorie · 2021-03-11 · in Zig, parser combinators, and why they're awesome -
…upfront in the other. Presumably this would not be an issue anymore once [0] is implemented. [0] https://github.com/ziglang/zig/issues/1006
comment by lhorie · 2021-03-11 · in Rust’s async isn’t colored -
…a ComptimeStringMap type for this use case which is used by the self hosted tokenizer for example. https://github.com/ziglang/zig/blob/master/lib/std/comptime_...
comment by ifreund · 2021-03-10 · in Zig, parser combinators, and why they're awesome -
…has been expanded into a full fledged implementation in the standard library! std.ComptimeStringMap https://github.com/ziglang/zig/blob/master/lib/std/comptime_...
comment by kristoff_it · 2021-03-10 · in Zig, parser combinators, and why they're awesome -
…computed at comptime since we already know the search space ahead of time! Really neat stuff. [0] https://github.com/ziglang/zig/issues/2647 [1] https://andrewkelley.me/post/string-matching-comptime-perfec...
comment by lhorie · 2021-03-10 · in Zig, parser combinators, and why they're awesome -
…will be left for loop unrolling and possibly in use with `inline switch` where it matters. [1]: https://github.com/ziglang/zig/issues/7224
comment by nyberg · 2021-03-07 · in Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun -
…you say. (But shows great promise, I think!) [0] https://ziglang.org/documentation/0.7.1/#call [1] https://github.com/ziglang/zig/issues/1006
comment by losvedir · 2021-03-07 · in Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun -
…a lot since its first iterations. There are still some breaking changes coming that you can find at https://github.com/ziglang/zig/issues . One of the cooler aspects of Zig's breaking changes is that its formatting tool can automatically…
comment by Hoppetosse · 2021-03-07 · in Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun -
…of the pinned keyword proposed here should fix most if not all @fieldParentPtr() footguns https://github.com/ziglang/zig/issues/7769
comment by ifreund · 2021-03-07 · in Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun -
Here's another example of the coolness of Zig's comptime code execution: https://github.com/ziglang/zig/commit/0808d98e10c5fea27cebf9... That's a generic container class (similar to vector in C++ or List in C#). But! With a twist! It…
comment by dilap · 2021-03-07 · in Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun