Hacker GitHub

← All repos

ityonemo/clr

View on GitHub ↗ ★ 278 Zig

Checker for Lifetimes and other Refinement types

40 mentions on Hacker News by 10 people: 3 stories, 37 comments · first 2025-02-03 · latest 2026-10-05

Mentions per year 40 mentions · busiest year 2026 (24)
20082026
  1. …language. It’s not part of mainline Zig yet but this seems to be the direction Andrew wants to go. https://github.com/ityonemo/clr
  2. …other Refinement types. Then we can start the Rust vs Zig Debate again. Hopefully not too late. [1] https://github.com/ityonemo/clr/
    comment by ksec · 2026-10-03 · in Zig v0.17.0
  3. …add-in. It's still WIP but in my side project I haven't found cases that can't be handled yet. https://github.com/ityonemo/clr
    comment by dnautics · 2026-09-12 · in A few good ideas in programming languages
  4. (wip) https://github.com/ityonemo/clr
    comment by dnautics · 2026-07-28 · in Zig's Incremental Compilation Internals
  5. …zig compiler and subject it to analysis to prove memory safety parameters: (my wip experiment: ) https://github.com/ityonemo/clr
  6. …all the hard cases (aliasing, pointers used as first class values, cross function analysis): https://github.com/ityonemo/clr/blob/main/LIMITATIONS.md#mem... Obviously if you rewrite the zig world to obey rust like rules and include rust…
  7. …patterns and ban them as unsafe, and have a"safety checked alternative. clr does this currently: https://github.com/ityonemo/clr#safety-oriented-architecture
    comment by dnautics · 2026-07-16 · in How Our Rust-to-Zig Rewrite Is Going
  8. …get Rust's safety with all of Zig's features i periodically throw my unused codex tokens at this: https://github.com/ityonemo/clr
    comment by dnautics · 2026-07-16 · in How Our Rust-to-Zig Rewrite Is Going
  9. …that they will be making this sort of thing a supported operation once the IR stabilizes post-1.0. https://github.com/ityonemo/clr/
  10. > Everything you do in Zig can be done almost in the same way in C or C++. Can you do this in C? https://github.com/ityonemo/clr
    comment by dnautics · 2026-06-08 · in Zig by Example
  11. …everything else? this can be addressed by third parties in the reasonable near-term. for example: https://github.com/ityonemo/clr the zig team says that in the future stabilizing the IR and providing an API will happen. fwiw in the process…
    comment by dnautics · 2026-06-07 · in My Software North Star
  12. …that high. tdd has been invaluable for this project (almost entirely llm written, but i review it) https://github.com/ityonemo/clr
    comment by dnautics · 2026-06-06 · in My Agent Skill for Test-Driven Development
  13. In principle static analysis is possible. (Note: WIP) https://github.com/ityonemo/clr
    comment by dnautics · 2026-05-14 · in Rewrite Bun in Rust has been merged
  14. …it could be. could probably even take this (WIP) idea and bolt on a formal verifier pretty easily. https://github.com/ityonemo/clr
  15. …to memory safety analysis, as long as you don't sneakily implement allocations outside of that api. https://github.com/ityonemo/clr
  16. I mean, I'm the author of this? https://github.com/ityonemo/clr so yes, I understand that it's important. It doesn't need to be in the compiler though? I think it's likely the case that you also don't need to have annotations littering the…
  17. …designed you could probably bolt on memory safety relatively easily as a 3rd party static checker https://github.com/ityonemo/clr
  18. …using ~"refinement types". In principle one could build a more formal version of what I'm doing. https://github.com/ityonemo/clr
    comment by dnautics · 2026-03-08 · in My “grand vision” for Rust
  19. …a list! all of these are statically analyzable using a slightly hacked zig compiler and a library! https://github.com/ityonemo/clr (Btw: you can't null pointer dereference in zig without using the navigation operator which will panic on…
  20. …safety analysis for zig. I think you could pretty easily add a noalias checker on top of this: https://github.com/ityonemo/clr
  21. …claude, and it's an incredibly complicated codebase [0] (which is why i am not doing it by hand): https://github.com/ityonemo/clr [0] generates a dynamically loaded library which does sketchy shit to access the binary representation of…
    comment by dnautics · 2026-02-03 · in Zig Libc
  22. 1. Zig-clr. "Borrow checking and other safety analyzer for zig" https://github.com/ityonemo/clr 2. Molecular biology editing software. Will plug in to agentic ai workflows
  23. …the code, bad stuff stands out or is easy to grep. here's my current project, judge for yourself: https://github.com/ityonemo/clr
    comment by dnautics · 2025-12-30 · in LLMs Are Not Fun
  24. There's active work towards that (which could run as part of CI) and it looks very promising: https://github.com/ityonemo/clr
    comment by bnolsen · 2025-12-18 · in Show HN: I built a fast RSS reader in Zig
  25. and for big teams you can run a checker: (wip) http://github.com/ityonemo/clr
    comment by dnautics · 2025-12-06 · in Why we built Lightpanda in Zig
  26. clarifying: It's just an experiment for zig PL, not affiliated with zsf: http://github.com/ityonemo/clr was where i got last year. this december im doing a "prototype" which means its going to be done in zig and im going to clear sone…
    comment by dnautics · 2025-12-06 · in Why we built Lightpanda in Zig
  27. …to something like C. But it is not impossible and there have been demos of refinement type checkers https://github.com/ityonemo/clr Beyond that, tools like antithesis https://antithesis.com/ exist that can be used for checking bugs. [ I…
  28. …scratch an itch I tried to build one for Zig. It's not complete nor do I have plans to complete it. https://github.com/ityonemo/clr If zig locks down the AIR (intermediate representation at the function level) it would be ideal for running…
    comment by dnautics · 2025-05-14 · in How (memory) safe is Zig? (2021)
  29. …be doable, possibly not in the language/compiler itself, there was this POC a few months ago: https://github.com/ityonemo/clr
    comment by throwawaymaths · 2025-04-20 · in Things Zig comptime won't do
  30. It sounds like you haven't seen projects like this yet: https://github.com/ityonemo/clr They're popping up all over. For some reason, Zig folk want Rust things and Rust folk want Zig things.
    comment by rc00 · 2025-03-23 · in Crabtime: Zig’s Comptime in Rust
  31. probably zig air is a better target: https://github.com/ityonemo/clr https://m.youtube.com/watch?v=ZY_Z-aGbYm8
    comment by throwawaymaths · 2025-03-18 · in Coq-of-rust: Formal verification tool for Rust
  32. …of the room". however, its clearly not impossible , for example this authors incomplete example: https://github.com/ityonemo/clr > That would mean waiting at least 10 years, what if it's not ten years, what if it could be six months? is or…
  33. …yet. The type-system analysis of Rust is smart, but not restricted to the language per se, see https://github.com/ityonemo/clr . One merely has to have proper namespacing and necessary type info from generic code to do annotations and…
  34. …static checking of memory safety in zig could be a thing, but there are some minor obstacles: https://github.com/ityonemo/clr
    comment by throwawaymaths · 2025-02-05 · in Zig Guide
  35. …miri, why not just run zig with a separate static checker that does all the memory safety parts? https://github.com/ityonemo/clr
    comment by throwawaymaths · 2025-02-05 · in Zig; what I think after months of using it
  36. protection from returning stack pointers seems to be detectable with static analysis of zig AIR. https://github.com/ityonemo/clr
    comment by throwawaymaths · 2025-02-05 · in Roc rewrites the compiler in Zig
  37. …it would eventually be possible to do more safety analysis for zig, if not in the compiler itself: https://github.com/ityonemo/clr
    comment by throwawaymaths · 2025-02-04 · in Roc rewrites the compiler in Zig