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
    K

    Keegan McAllister

    mainisusuallyafunction.blogspot.com · Personal blog · on HN since 2010

    Keegan McAllister writes technical posts on Rust, low-level Linux and x86 tricks, and kernel exploitation, plus some essays on depression and online activism.

    Visit blogHN submissions
    Languages & CompilersSystems & PerformanceSecurity
    What HN says

    HN links it for the tiny Rust binary and the x86 no-registers Turing-completeness posts, and commenters cite its kernel JIT spraying write-up.

    Stats for nerds
    52HN people shared it
    40linked in comments
    859story points
    Jan 2023last shared
    2012people per year2023

    Top posts on HN

    1. 1
      151-byte static Linux binary in Rust
      10 people · 192 points · first shared 2015 · 57 comments on HN
    2. 2
      A taste of Rust for C/C++ programmers
      1 person · 155 points · first shared 2014 · 93 comments on HN
    3. 3
      Attacking hardened Linux systems with kernel JIT spraying
      3 people · 123 points · first shared 2012 · 17 comments on HN
    4. 4
      x86 is Turing-complete with no registers
      4 people · 90 points · first shared 2014 · 23 comments on HN
    5. 5
      Animating quasicrystals in parallel Haskell
      1 person · 73 points · first shared 2011 · 13 comments on HN
    6. 6
      Self-modifying code for debug tracing in quasi-C
      1 person · 55 points · first shared 2011 · 6 comments on HN
    7. 7
      On depression, privilege, and online activism
      2 people · 42 points · first shared 2014 · 13 comments on HN
    8. 8
      Tour of a real toy Haskell program
      1 person · 35 points · first shared 2010 · 6 comments on HN
    9. 9
      Scheme without special forms
      5 people · 28 points · first shared 2012 · 1 comments on HN
    10. 10
      Raw system calls for Rust
      3 people · 11 points · first shared 2014 · Discussion on HN

    What HN people wrote when they linked it

    • CyberShadowAug 2015

      > Being pragmatic is a very questionable claim. Its exact meaning varies from time to time, and a property that a certain people consider to be pragmatic can be considered to be not pragmatic by another people. It's mostly meaningless.

      I disagree that it is meaningless. It's simply subjective. I've used D since 2006 and tried most new programming languages that appeared since, and it seems like they all tried to solve a specific problem (e.g. Go - concurrency, Rust - memory safety) while giving less attention to everything else.

      > For example, for embedded devices D is a no-go from the beginning.

      Existing D projects contradict that. They simply don't use the standard D runtime when it's not appropriate. Alternative runtimes exist. Rust users do the same thing:
      http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-static-linux-binary-in-rust.html

      > D and Rust have different kinds of expressiveness. While D has much better compile-time metaprogramming, how do you express affine type in D? In Rust affine type is very fundamental and we can utilize it to define the exact meaning of our programs.

      Can you provide a good example of affine types and how they help with expressiveness?

      My view of expressiveness in D does not stop at compile-time metaprogramming. For example, here's an excerpt from one of my programs:

      http://dump.thecybershadow.net/fb6c5a080c7a42ecd8d1f062b58a540d/000000CF.txt

      > How can a GC'ed language be faster than a non-GC'ed language?

      It is entirely…

    • geofftJan 2015

      > UNIX is married with C, so any attempt to replace C, means breaking with the UNIX mindset, which has proven very hard to do.

      I don't believe this is particularly true, although I haven't explored it very far. UNIX is married with the API/ABI exposed by the so-called "C" library. So far, there have been no languages that offer native interoperability with C and have gained significant popularity, other than C++, and C++ is certainly pretty popular on UNIX (Qt, gcc, etc.). Rust does offer that and is (evidently) picking up a ton of steam, and you can get to the point where stupid tricks that previously required a C derivative can be done in Rust.

      http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-static-linux-binary-in-rust.html

      In fairness, this often also requires things like "C" strings, the "C" locale, etc. But those things can either be done smoothly enough from Rust, or are wrong anyway, that I think there's a chance to break the C stranglehold here.

    • parennoobMar 2015

      "To complicate matters, most of the people in the industry are young men, a cohort not good at acknowledging their own problems, or understanding other people’s."

      Does this not seem like oversimplification and rampant stereotyping?

      I am a "young man" (well, below 30 anyway, though in SV I'm probably a bit long in the tooth), and it hurts to be constantly and systematically belittled in this manner. I have problems, and other people in the industry do too. Singling out one particular gender and age group and making them the bad party doesn't help anyone.

      A great related article: (http://mainisusuallyafunction.blogspot.com/2014/06/on-depression-privilege-and-online.html)

    • sophaclesMay 2014

      As with everything, there are tradeoffs - For instance this from a few years ago:

      http://mainisusuallyafunction.blogspot.com/2012/11/attacking-hardened-linux-systems-with.html

      Which allows bpf-jit to be part of a larger privilege escalation scheme. (To properly use this attack you need to gain control of an applicaion first, then you can maybe use this attack, and if successful you own the box).

      I haven't kept up with this at all, so I don't know if it has been fixed (or even is fixable) but it is interesting.

    • dbauppOct 2016

      A direct comparison like that is somewhat comparing apples to oranges. Don't get me wrong, defaults matter, but Rust still does offer the control required to get small binaries, and, those defaults are not nearly as bad for low-level domains where one isn't using the standard library, which is where binary size is most critical. See also https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html and even http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-static-linux-binary-in-rust.html .

    • szemetSep 2019

      I guess the examples use the default std libs, and runtimes of the languages. So in this sense your D example is the misrepresentation, by directly calling libc.

      If these kinds of low level size optimizations are enabled then both Nim and Rust can be more than 50 times smaller than your D example ;) :

      150 byte Nim: https://hookrace.net/blog/nim-binary-size/

      151 byte Rust: http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-static-linux-binary-in-rust.html

    Related

    Rust Blogblog.rust-lang.org533 people

    Announcing Rust 1.0

    Rust Blog
    Company · last shared 2026
    fdiv.netfdiv.net16 people

    Objectivist C

    fdiv.net
    Personal · last shared 2026
    Sean McArthurseanmonstar.com31 people

    Intel - nodejs logging that plays nice with console.log

    Sean McArthur
    Personal · last shared 2025
    Aaron Turonaturon.github.io49 people

    Zero-cost futures in Rust

    Aaron Turon
    Personal · last shared 2025
    The Incredible Holkblog.theincredibleholk.org23 people

    Booting to Rust

    The Incredible Holk
    Personal · last shared 2022
    Patrick Waltonpcwalton.github.io53 people

    Pathfinder, a fast GPU-based font rasterizer in Rust

    Patrick Walton
    Personal · last shared 2025
    Alexis Beingessnercglab.ca/~abeinges61 people

    Rust, Generics, and Collections

    Alexis Beingessner
    Personal · last shared 2024
    Kang Seonghoonlifthrasiir.github.io16 people

    Why is a Rust executable large?

    Kang Seonghoon
    Personal · last shared 2023