Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    C

    Chad Austin

    chadaustin.me · Personal blog · on HN since 2009

    Chad Austin writes about systems programming, Rust, performance, terminals, and hardware tinkering, drawing on experience at Dropbox.

    Visit blogRSSHN submissions
    Systems & PerformanceLanguages & CompilersProgramming
    What HN says

    Commenters link his posts on performance, bitfields, CRTs and pixels, and unsafe Rust, and call his performance writing insightful.

    Stats for nerds
    53HN people shared it
    43linked in comments
    2.2Kstory points
    Jul 2026last shared
    2011people per year2026

    Top posts on HN

    1. 1
      I just wanted Emacs to look nice – Using 24-bit color in terminals
      2 people · 527 points · first shared 2024 · 179 comments on HN
    2. 2
      Writing a Fast JSON Parser
      2 people · 381 points · first shared 2017 · 50 comments on HN
    3. 3
      The Story of Haskell at IMVU
      2 people · 227 points · first shared 2016 · 165 comments on HN
    4. 4
      Unsafe Rust is harder than C
      9 people · 120 points · first shared 2024 · 125 comments on HN
    5. 5
      Sum Types Are Coming (2015)
      6 people · 119 points · first shared 2015 · 113 comments on HN
    6. 6
      Terminal Latency on Windows (2024)
      3 people · 113 points · first shared 2024 · 93 comments on HN
    7. 7
      Two Years Working at Dropbox
      3 people · 108 points · first shared 2019 · 76 comments on HN
    8. 8
      Your Version Control and Build Systems Don't Scale
      2 people · 94 points · first shared 2010 · 53 comments on HN
    9. 9
      How I Lost 20 Pounds in 20 Weeks With My iPhone (or: Data is King)
      1 person · 89 points · first shared 2009 · 53 comments on HN
    10. 10
      Microsoft Sculpt Wired Conversion Mod
      3 people · 88 points · first shared 2021 · 70 comments on HN

    What HN people wrote when they linked it

    • nextaccounticDec 2021

      Bitfields are hard! They are potentially unaligned, thus interact poorly with some language features, like pointers and references. And their size isn't a multiple of bytes, unlike any other value, which causes problems as well. They interact poorly with padding and the general idea of Rust ABIs that enables optimizations like reordering fields and using "niches" (invalid values) to find a more compact layout for structs and enums.

      I agree Rust should eventually have some native support for bitfields, but only if it's a high quality spec that addresses the outstanding concerns - Rust should specifically avoid the C mess, which isn't usable for most projects.

      But this doesn't mean bitfields can't be done in Rust; it's just not in the stdlib (yet). See this post[0] which contains a survey of various libraries (and their respective limitations), and this slightly older article [1]. Those articles somehow missed the modular-bitfield crate [2], which is perhaps the nicest to use, and is what I would recommend you.

      If you don't care about the specifics you can get any crate discussed in the above articles and use them.

      About interoperability with C (and C++), I really like bindgen, cbindgen and cxx. The bindgen book [3] is straighforward. This section of cxx documentation [4] also describes the tradeoffs between the different FFI approaches. I don't know Ada though, so I must ask: what does Ada do?

      About this,

      > I just don't see what Rust has to offer that Ada didn't already…

    • estebankOct 2020

      I do not have any non-Rust resources off the top of my head, but I can give you some quickly looked up resources and enough phrases to search for that should help you in this endeavor.

      ADTs are Abstract Data Types[1][2][3]:

      > ADT is implementation independent. For example, it only describes what a data type List consists (data) and what are the operations it can perform, but it has no information about how the List is actually implemented.

      In the context of Rust it means that the traits, structs and enums are ADTs, while the impls are Data Structures.

      Having structs and enums be the way they are in Rust (simplistic and with little extensibility beyond implementing traits) is that pattern matching[4][5] and destructuring is cheap and built in. Pattern matching becomes specially useful when combined with sum types/tagged unions/enums[6][7][8]. On the other corner you have Scala which lets you implement specific interfaces to allow structuring and destructuring for arbitrary types, but that has the same problems as overriding constructors in C++: the performance implications of pattern matching is impl dependent and hidden at the point of calling.

      [1]: https://softwareengineering.stackexchange.com/questions/148747/abstract-data-type-and-data-structure

      [2]: https://en.wikipedia.org/wiki/Abstract_data_type

      [3]: https://abrickshort.wordpress.com/2005/03/06/abstract-data-types-vs-data-structures/

      [4]: https://en.wikipedia.org/wiki/Pattern_matching

      [5]:…

    • redbeeswimmingDec 2025

      > The website prioritizes programs with 98% safe code over programs with 0% safe code.

      Please explain this section of the Rustonomicon.

      https://doc.rust-lang.org/nomicon/working-with-unsafe.html

      > This code is 100% Safe Rust but it is also completely unsound. Changing the capacity violates the invariants of Vec (that cap reflects the allocated space in the Vec). This is not something the rest of Vec can guard against. It has to trust the capacity field because there's no way to verify it.

      > Because it relies on invariants of a struct field, this unsafe code does more than pollute a whole function: it pollutes a whole module. Generally, the only bullet-proof way to limit the scope of unsafe code is at the module boundary with privacy.

      If 2% code means that, wildly spitballing, 50% code has to be manually reviewed, it's not quite as impressive.

      And it might be worse regarding memory safety than the "status quo" if one accepts the assumption that unsafe Rust is harder than C and C++, as many Rust developers do.

      https://www.reddit.com/r/rust/comments/1amlfdj/comment/kpmb2b8/

      > It may be even less safe because of the strong aliasing rules. That is, it may be harder to write correct unsafe {} Rust than correct C. Only use unsafe {} when absolutely needed.

      https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/

    • vlovich123Oct 2025

      https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/

      https://news.ycombinator.com/item?id=41944121

      The TLDR is that there’s all sorts of invariants that the Rust compiler internals assume about Rust code (eg pointers don’t alias). In C such assumptions can’t be made. Unsafe rust requires you to uphold all the same invariants that safe rust does without any guardrails and it has more such assumptions than C. C however is uniformly dangerous - there isn’t a safe subset to write your code in.

      One example would be that you could have something like:

      let x = 5; do_something(&x as *const _ as *mut _); Now do_something might dereference and write to the pointer. Now you have non-local safety to reason about because if the compiler realizes you’ve tried to dereference a mutable pointer to an immutable variable it’s free to declare that UB and do bad unsound things (the non-locality is because the unsafe is inside do_something but the problem is with the pointer cast in safe rust). There’s all sorts of subtle things like that.

    • trealiraMay 2025

      > Choosing references as your default is insane, honestly. Safe Rust is akin to writing formally verified software in the mental and ergonomic overhead it incurs. That's not coincidental. I've come to the conclusion one of the biggest mistakes of the community is not pushing pointer-only Rust harder, given they want it to be taken seriously as a systems language.

      That's an interesting perspective I hadn't heard before, but I think there are a couple problems. One, the culture is really against using unsafe unless it's impossible to write the code using safe Rust. This happened with the Actix web drama in 2020 [1]. And, there is the opinion that unsafe Rust is harder than C [2]. Not just that, but unsafe Rust is really ugly and annoying to use compared to safe Rust. I think that hinders the potential adoption of your idea, too.

      [1]: https://steveklabnik.com/writing/a-sad-day-for-rust/

      [2]: https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/

    • IshKebabJul 2026

      That's not quite true. I had a look into the Bun port and it's not like c2rust where it literally will convert every pointer access into `unsafe` and 50% of your code will be `unsafe`. It's a lot safer than that. They claim only 4% of lines are unsafe, and 78% of those are from C/C++ interop. That's more than a typical Rust project but it's still a lot less than C/C++ or Zig.

      > I could rewrite anything in unsafe Rust like right now, despite being a novice in the language.

      I really doubt that. Unsafe Rust is actually significantly more difficult to get right than C or C++. See e.g. https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/ or https://lucumr.pocoo.org/2022/1/30/unsafe-rust/

      It's not too big of a deal because in idiomatic Rust you pretty much never write unsafe code (except for FFI), but it would be nice if it was not quite so hard (or poorly defined).

    Related

    fasterthanli.mefasterthanli.me236 people

    A half-hour to learn Rust

    fasterthanli.me
    Personal · last shared 2026
    Herb Suttergotw.ca84 people

    Ritchie, Stroustrup, and Gosling interview

    Herb Sutter
    Personal · last shared 2026
    Graham Jenkinsdarkcoding.net44 people

    Facebook’s code quality problem (2015)

    Graham Jenkins
    Personal · last shared 2025
    Andrew Gallantblog.burntsushi.net141 people

    My FOSS Story

    Andrew Gallant
    Personal · last shared 2026
    Manish Goregaokarmanishearth.github.io97 people

    Picking Apart the Crashing iOS String

    Manish Goregaokar
    Personal · last shared 2026
    Cliff Bifflecliffle.com81 people

    Rewriting m4vgalib in Rust

    Cliff Biffle
    Personal · last shared 2026
    Bryan Cantrilldtrace.org240 people

    Rust After the Honeymoon

    Bryan Cantrill
    Personal · last shared 2026
    Bluish Coderbluishcoder.co.nz77 people

    Using Freenet

    Bluish Coder
    Personal · last shared 2025