Best of C ProgrammingMarch 2026

  1. 1
    Article
    Avatar of antonzAnton Zhiyanov·9w

    Porting Go's io package to C

    A deep dive into porting Go's io package to C, covering the key design challenges: representing Go slices as C structs, handling multiple return values via result structs and unions, modeling sentinel errors as pointer-comparable structs, and implementing Go interfaces using fat structs with function pointers. The post also covers type assertion via function pointer comparison and uses alloca for stack-allocated buffers in the Copy function. The result is verbose but structurally faithful C code that mirrors Go's io.Reader, io.Writer, LimitedReader, and Copy semantics.

  2. 2
    Article
    Avatar of antonzAnton Zhiyanov·9w

    Solod: Go can be a better C

    Solod (So) is a new programming language that is a strict subset of Go and transpiles to readable C11 code. It features zero runtime overhead, no garbage collection, stack-allocated memory by default with opt-in heap allocation, and native C interop without CGO. So supports structs, methods, interfaces, slices, multiple returns, defer, and enums, while omitting goroutines, channels, closures, and generics. Since So is valid Go code, existing Go tooling (LSP, linting, go test) works out of the box. The post provides a comprehensive language tour showing side-by-side Go and generated C code for all supported features, along with design decisions emphasizing simplicity, readability of generated C, and seamless C interoperability.

  3. 3
    Article
    Avatar of danielhaxxsedaniel.haxx.se·11w

    Dependency tracking is hard

    curl and libcurl, written in C, exist outside standard package ecosystems like npm, Go, or Rust. This makes them invisible to SBOM generators, dependency scanners, and tools that rely on package managers to map software dependencies. PURLs (Package URLs) also can't represent curl since it belongs to no ecosystem. Because curl is often bundled with operating systems or distributed as source tarballs, automated tools typically stop tracking dependencies at the layer above curl, missing it entirely. GitHub's dependency graph illustrates this starkly: despite curl being installed in roughly 30 billion places, GitHub lists only one dependent repository — and that one appears to be a mistake.

  4. 4
    Video
    Avatar of youtubeYouTube·9w

    Linus Torvalds On Rust In Linux #shorts #linux #rust #knowledge #programmer

    Linus Torvalds shares his personal take on Rust in the Linux kernel. While he remains a C person at heart, he acknowledges that Rust hasn't done anything obnoxious enough to make him actively dislike it — a lukewarm but notable acceptance from the Linux creator.