3 comments

  • fuhsnn1 hour ago
    Looking at the repo, the author seemed a little fed up [1] with the nature of lower level language and quitted.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;asibahi&#x2F;paella&#x2F;blob&#x2F;main&#x2F;writeup&#x2F;c19.md#user-content-fn-month-f690d35c5c3bc8477be727677652c31f" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;asibahi&#x2F;paella&#x2F;blob&#x2F;main&#x2F;writeup&#x2F;c19.md#u...</a>
    • dwroberts39 minutes ago
      Feels like maybe something lost in translation with their explanation - they say they were fed up of data structures etc. but they returned to Rust? I’m assuming there’s something a bit more nuanced about what they got tired of with Zig
  • scatbot1 hour ago
    Cool project. Feels like writing a C compiler in Zig aligns nicely with the old &quot;maintain it in Zig&quot; idea that was part of Zig&#x27;s early value proposition. Is that still considered a relevant goal today?<p>Longer term it also makes me wonder whether something like this could eventually reduce reliance on Clang&#x2F;LLVM for the C frontend in zig&#x27;s toolchain.
    • spiffyk24 minutes ago
      There is actually another C compiler written in Zig, Aro[1], which Zig started using since 0.16 for its TranslateC module.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Vexu&#x2F;arocc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Vexu&#x2F;arocc</a>
  • flossly54 minutes ago
    I thought Zig has a C compiler built in? Or is it just the Zig build system that&#x27;s able to compile C, but uses an external compiler for that?<p>Still a proper programmer-flex to build another one.
    • spiffyk26 minutes ago
      Zig actually bundles LLVM&#x27;s Clang, which it uses to compile C with the `zig cc` command. But the long term goal seems to not be so tightly coupled to LLVM, so I&#x27;m expecting that to move elsewhere. They still do some clever stuff around compiler-rt, allowing it to be better at cross-compilation than raw Clang, but the bulk of it is mostly just Clang.<p>There is also another C compiler written in Zig, Aro[1], which seems to be much more complete than TFA. Zig started using that as a library for its TranslateC functionality (for translating C headers into Zig, not whole programs) in 0.16.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Vexu&#x2F;arocc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Vexu&#x2F;arocc</a>