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
-
The Zig stdlib does not call out to C++ for binary search. The binary search is currently here: https://github.com/ziglang/zig/blob/b835fd90cef1447904d3b009... (edit: fixed link to not decay, thanks)
comment by anonymoushn · 2023-08-11 · in Fastest branchless binary search -
Not really: https://github.com/ziglang/zig/issues/16270#issuecomment-161...
comment by ttrei · 2023-08-11 · in A Modern C Development Environment -
…every time. [2] [1] e.g. https://github.com/ddovod/jet-live , https://github.com/crosire/blink , https://github.com/ziglang/zig/issues/68 [2] https://rr-project.org/
comment by kvemkon · 2023-08-11 · in A Modern C Development Environment -
Happens a lot with Zig's builtin functions: See https://github.com/ziglang/zig/issues?q=is%3Aissue+mentions%... for example
comment by quic5 · 2023-07-27 · in Super sorry to the guy with the username reset on GitHub -
Related: this pull request that was merged last night: https://github.com/ziglang/zig/pull/16558 Currently only enabled for debug builds of the compiler, but there's talk there about making it a more general purpose tool for finding where…
comment by AndyKelley · 2023-07-26 · in Memory Copy Hunting -
…provide the required guarantees with required ergonomics, but this is being actively worked on: - https://github.com/ziglang/zig/issues/2765 - https://github.com/ziglang/zig/issues/12251 - https://github.com/ziglang/zig/issues/5973 In the…
comment by matklad · 2023-07-26 · in Memory Copy Hunting -
…do not expect this to be a big problem once static analysis symbols can be enforced as unique (see https://github.com/ziglang/zig/issues/14656#issuecomment-143... and follow-up for the use cases of static analysis tooling). Also, since…
comment by matu3ba · 2023-07-19 · in Zig: Upcoming release postponed two more weeks and lacks async functions -
What I'm really waiting for is zig support for custom range ints https://github.com/ziglang/zig/issues/3806 Also minor nitpick I have is that the interval/range syntax in zig is pretty confusing as it can be both inclusive and exclusive…
comment by Cloudef · 2023-07-04 · in Problems of C, and how Zig addresses them -
Whoa, I haven't been keeping up to date about this, there seems to be good related discussion here: https://github.com/ziglang/zig/issues/7295 I'll hope for some future news of Zig having vector and complex number support! It will be a…
comment by pixelpoet · 2023-07-03 · in Problems of C, and how Zig addresses them -
There's a proposal for complex numbers: https://github.com/ziglang/zig/issues/16278 Vectors are already first-class types via @Vector, aren't they?
comment by defen · 2023-07-03 · in Problems of C, and how Zig addresses them -
…recommend you do this). [0] https://ziglang.org/documentation/master/#Doc-Comment-Guidan... [1] https://github.com/ziglang/zig/blob/0dffab7356685c7643aa6e3c...
comment by e4m2 · 2023-07-03 · in Problems of C, and how Zig addresses them -
…the new (k,v) pair? I can see that the difference between the two is in self.growIfNeeded() call, https://github.com/ziglang/zig/blob/0dffab7356685c7643aa6e3c... , which the one that doesn't allocate really doesn't have. Does it assume…
comment by menaerus · 2023-07-03 · in Problems of C, and how Zig addresses them -
Compare these two methods: https://github.com/ziglang/zig/blob/0dffab7356685c7643aa6e3c... https://github.com/ziglang/zig/blob/0dffab7356685c7643aa6e3c... One of them requires passing an allocator (and can allocate), the other doesn’t have…
comment by matklad · 2023-07-03 · in Problems of C, and how Zig addresses them -
…-% zero) *% mmmm); if (result > 9999) return error.CertificateTimeInvalid; return result; } source: https://github.com/ziglang/zig/blob/fc9ab5f0e838196e99d1706e... machine code example: https://godbolt.org/z/ezrPEdPx7
comment by AndyKelley · 2023-07-03 · in Parsing time stamps faster with SIMD instructions -
Here’s a list of rejected proposals made by the BDFL: https://github.com/ziglang/zig/issues?q=is%3Aissue+label%3Ap...
comment by somethingor · 2023-06-30 · in File for divorce from LLVM -
It’ll still output LLVM bitcode, but it won’t depend on LLVM libs anymore https://github.com/ziglang/zig/issues/13265
comment by cobbzilla · 2023-06-30 · in File for divorce from LLVM -
…the ability to opt out at the individual parameter level (and with safety checks in debug builds). https://github.com/ziglang/zig/issues/1108 Either way we can definitely thank Rust for blazing the trail. noalias in LLVM had never been…
comment by EscapeFromNY · 2023-06-17 · in Rust vs Zig Benchmarks -
…gs.debian.org/cgi-bin/bugreport.cgi?bug=995670 2. we don't tell you to "just use a snap.". Please see https://github.com/ziglang/zig/#installation 3. we tag releases soon after llvm tags releases for the convenience of package maintainers.…
comment by AndyKelley · 2023-06-01 · in Zig is hard but worth it -
…everything to and from C at the binary interface, and losing all ziggyness in the process. [1] https://github.com/ziglang/zig/issues/3786
comment by bitshiffed · 2023-06-01 · in Zig is hard but worth it -
This comment suggests otherwise: https://github.com/ziglang/zig/issues/89#issuecomment-122118... Although I'm not sure the "self hosted compiler" is the same as "llvm free backend".
comment by hsn915 · 2023-05-30 · in Why is Swift so slow (timeout) in compiling this code? (2022) -
looks like the project's now abandonned : https://github.com/ziglang/zig/projects/2
comment by bsaul · 2023-05-30 · in Why is Swift so slow (timeout) in compiling this code? (2022) -
My understanding is that it's there to allow for testing the client. Relevant issue: https://github.com/ziglang/zig/issues/910
comment by squeek502 · 2023-05-18 · in Zig now has built-in HTTP server and client in std -
https://github.com/ziglang/zig/issues/6966 was discussed
comment by nyberg · 2023-05-02 · in SIMD with Zig -
…can't guess Zig naming. It's supposed to be "indexOfScalar" which of course makes 100% sense. [1]: https://github.com/ziglang/zig/blob/master/lib/std/mem.zig#L...
comment by unwind · 2023-05-02 · in SIMD with Zig -
This is called [function multi-versioning]( https://github.com/ziglang/zig/issues/1018 ).
comment by AndyKelley · 2023-05-02 · in SIMD with Zig -
It's planned: https://github.com/ziglang/zig/issues/1018
comment by kristoff_it · 2023-05-02 · in SIMD with Zig -
This has been mentioned before: https://github.com/ziglang/zig/issues/7702 I don't think anyone disagrees about the need for intrinsics. In fact, I have actually taken a crack at implementing the AVX512 intrinsics into the Zig compiler as…
comment by 10000truths · 2023-05-02 · in SIMD with Zig -
…be hard to benchmark. [1]: https://learn.microsoft.com/en-us/windows/win32/api/synchapi... [2]: https://github.com/ziglang/zig/blob/295b8ca467da36cd1066395e...
comment by overthrow · 2023-04-26 · in You could have invented futexes -
…less than the latest 3 versions. https://ziglang.org/download/0.10.0/release-notes.html#macOS https://github.com/ziglang/zig/issues/14651#issuecomment-143...
comment by diimdeep · 2023-04-14 · in Zig build system -
…OS released just 3 years ago. So it is not possible to compile Zig for it. It is ridiculous. https://github.com/ziglang/zig/issues/13313#issuecomment-129...
comment by diimdeep · 2023-04-14 · in Zig build system -
…dot, while C++'s compound literals (for example) don't. The pros and cons of this are discussed in https://github.com/ziglang/zig/issues/5039 .
comment by mauricioc · 2023-04-14 · in Zig build system -
…struct item. This isn't a special compiler feature, but a regular usage of Zig's comptime stuff: https://github.com/ziglang/zig/blob/master/lib/std/multi_arr...
comment by flohofwoe · 2023-04-01 · in Decreasing the number of memory accesses -
…pull in dynamic libs. It finds static libs but alas the .tsk doesn't give expected behavior anyway: https://github.com/ziglang/zig/issues/14939 A. Kelly (head Zig dev), to his credit, seems to already be on top of in this through a related…
comment by scrubs · 2023-03-27 · in Zig Quirks -
…downsides. Andrew gave a while ago a good overview on the more "ziggy" perspective on the issue: https://github.com/ziglang/zig/issues/9909#issuecomment-9426...
comment by kristoff_it · 2023-03-27 · in Zig Quirks -
…a similar thing? I see that rationale for not having private struct members was given here: https://github.com/ziglang/zig/issues/9909#issuecomment-9426... > The idea of private fields and getter/setter methods was popularized by Java, but…
comment by haberman · 2023-03-27 · in Zig Quirks -
…your Zoloft because it looks like there's going to be one last big disruption before it's over. https://github.com/ziglang/zig/issues/1097#issuecomment-1404...
comment by overthrow · 2023-03-27 · in Zig Quirks -
…a minimalist language. Edit: Looks like they are already aware of the problem. That is good news. https://github.com/ziglang/zig/issues/1097#issuecomment-6142...
comment by nromiun · 2023-03-27 · in Zig Quirks -
https://github.com/ziglang/zig/issues/544 Maybe? They say their stage2 parser accepts them now.
comment by nromiun · 2023-03-27 · in Zig Quirks -
…I use relatively large fonts for medical reasons and tabs are much more accessible to me. (1) https://github.com/ziglang/zig/issues/544
comment by latch · 2023-03-27 · in Zig Quirks -
…rationale being there is no difference between snake_case and camelCase for one word identifiers: https://github.com/ziglang/zig/issues/1097
comment by ngrilly · 2023-03-27 · in Zig Quirks -
No, it won't work. It'll say "actual" is undeclared. https://github.com/ziglang/zig/issues/4437 is tracking the issue. I think std.testing is going to see some major changes, so it's possible this gets fixed. But going from the responses…
comment by latch · 2023-03-27 · in Zig Quirks -
…recognize this because they still have an old issue open for it which is still planned [0]. [0] https://github.com/ziglang/zig/issues/2647
comment by skywal_l · 2023-03-22 · in Errors and Zig -
…little documentation there is a are really helpful, and that looks to be a long-standing issue ( https://github.com/ziglang/zig/issues/3049 ). Seems to me like this allocator should be renamed something like "FixedBufferBumpAllocator",…
comment by masklinn · 2023-03-19 · in The curious case of a memory leak in a Zig program -
…to use a GeneralPurposeAllocator and setting "enable_memory_limit" and "requested_memory_limit": https://github.com/ziglang/zig/blob/8f481dfc3c4f12327499485e... . If the purpose is to "only use the stack", then "allocating a huge chunk and…
comment by judofyr · 2023-03-19 · in The curious case of a memory leak in a Zig program