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
    A

    Adrian Sampson

    cs.cornell.edu/~asampson · Personal blog · on HN since 2016

    Adrian Sampson, a Cornell computer science professor, writes about compilers, LLVM, program synthesis, and programming language tools.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters recommend his LLVM for Grad Students post as a strong get-started tutorial and as a good intro to writing compilers.

    Stats for nerds
    33HN people shared it
    37linked in comments
    1.5Kstory points
    Dec 2025last shared
    2017people per year2025

    Top posts on HN

    1. 1
      Statistical Mistakes and How to Avoid Them
      1 person · 292 points · first shared 2016 · 76 comments on HN
    2. 2
      LLVM for Grad Students (2015)
      8 people · 272 points · first shared 2018 · 28 comments on HN
    3. 3
      FPGAs Have the Wrong Abstraction for Computing
      1 person · 253 points · first shared 2019 · 135 comments on HN
    4. 4
      Bril: An Intermediate Language for Teaching Compilers
      2 people · 182 points · first shared 2024 · 28 comments on HN
    5. 5
      Flattening ASTs and other compiler data structures (2023)
      10 people · 173 points · first shared 2023 · 49 comments on HN
    6. 6
      Let's Fix OpenGL [pdf]
      3 people · 106 points · first shared 2017 · 51 comments on HN
    7. 7
      Program Synthesis is Possible (2018)
      4 people · 102 points · first shared 2018 · 14 comments on HN
    8. 8
      Automated Test-Case Reduction
      1 person · 102 points · first shared 2024 · 29 comments on HN
    9. 9
      Reticle: A Virtual Machine for Programming Modern FPGAs [pdf]
      2 people · 17 points · first shared 2021 · Discussion on HN
    10. 10
      Geometry types for graphics programming [pdf]
      2 people · 6 points · first shared 2020 · Discussion on HN

    What HN people wrote when they linked it

    • RendelloOct 2025

      TL;DR: I'm trying to Forth a Lisp.

      This is long winded, but maybe you have some thoughts here.

      I've been building a DOM-builder API recently in Rust. The existing options (there are many) tend to use textual templating, which can't reason well about anything, or basic macros, which never support indentation. I wanted something that was just code, where I'd be in full control on the indentation (or lack thereof) programmatically. The closest equivalent is Python's Dominate [1], though its indentation mechanisms are buggy.

      So I built a system using the traditional tree where Nodes own other Nodes at random addresses, and I built a renderer that renders those nodes and concatenates their strings recursively. It ended up working but it was hacky and very slow for the large inputs. In release mode, it was taking almost a minute to render 70 files, and I want about two orders of magnitude lower.

      I ran it through profilers and optimized it a bit, but wanted to see if I could simplify the architecture and reduce the amount of work the computer could do. I read about flattening ASTs [2] and how through optimizing that format, you can end up with a sort of bytecode [3]. I also looked into Data-Oriented Design, watching Mike Acton's famous talk [4], Andrew Kelley's talk about DoD in Zig [5], and reading through the DoD book by Richard Fabian [6].

      I ended up with something that works quite well for traversing and rendering, which is a stack that can be traversed and rendered in…

    • Ethan_BarryJun 2024

      You got it! By approximate category and in no particular order:

      ## MISCELLANEOUS

      - [Low Tech Magazine](https://solar.lowtechmagazine.com), a solar-powered website showcasing the amazing low-tech things you can do with a little ingenuity,

      - [Stephen Wolfram's Blog](https://writings.stephenwolfram.com) on math, compsci, and everything else,

      - [Cool Macrophotography](https://www.barrywebbimages.co.uk/Images/Macro/Slime-Moulds-Myxomycetes) for amazing pictures of tiny things (WARNING: Time Sink!),

      ## COMPUTER SCIENCE

      - [While-True-Do](https://blog.while-true-do.io) has lots of stuff on Linux administration and self-hosting,

      - [Backend Banter](https://www.backendbanter.fm) for a great podcast on backend development,

      - [Two Wrongs](https://two-wrongs.com) for statistics and functional programming,

      - [Math ∩ Programming](https://www.jeremykun.com/) where math and programming intersect! Written by a Googler...

      - [Paul Bourke's site](https://paulbourke.net/) where you can get happily lost exploring old pages on every topic CS touches,

      - [Jason Punyon's blog](https://jasonpunyon.com) for some fun algorithms and things,

      - [Yossi Kreinin's blog](https://yosefk.com/blog) for C, Python, and plenty of non-technical topics,

      - [Adrian Sampson's academic blog](https://www.cs.cornell.edu/~asampson/blog) for an academic's perspective,

      - [Cool polyhedra viewer project](https://georgehart.com/virtual-polyhedra/vp.html) if you like geometry,

      - [Another academic blog on…

    • pjmlpSep 2020

      Well, I find this even more ironic, giving how wannabe game developers just blindly following Carmack's advises.

      > Speaking to bit-tech for a forthcoming Custom PC feature about the future of OpenGL in PC gaming, Carmack said 'I actually think that Direct3D is a rather better API today.' He also added that 'Microsoft had the courage to continue making significant incompatible changes to improve the API, while OpenGL has been held back by compatibility concerns. Direct3D handles multi-threading better, and newer versions manage state better.'

      A few paragraphs below

      > 'It is really just inertia that keeps us on OpenGL at this point,' Carmack told us. He also explained that the developer has no plans to move over to Direct3D, despite its advantages.

      https://www.bit-tech.net/news/gaming/pc/carmack-directx-better-opengl/1/

      And for a more up to date remarks

      > "Lets fix OpenGL" http://cs.cornell.edu/~asampson/media/papers/opengl-snapl2017-preprint.pdf some interesting thoughts, but the shading language is the least broken part of OpenGL.

      > For everyone saying "Vulkan!", the conclusion is that there is an opportunity for an API between Vulkan and the game engines. I agree.

      https://twitter.com/id_aa_carmack/status/851397231320150017?lang=en

      So I can definitely feel the irony.

    • moyixJan 2018

      It's interesting to pair this with Adrian Sampson's (an academic who works on hardware architecture) thoughts, particularly his musings about other vectors:

      > The second thing is that it’s not just about speculation. We now live in a world with side channels in microarchitectures that leave no real trace in the machine’s architectural state. There is already work on leaks through prefetching, where someone learns about your activity by observing how it affected a reverse-engineered prefetcher. You can imagine similar attacks on TLB state, store buffer coalescing, coherence protocols, or even replacement policies. Suddenly, the SMT side channel doesn’t look so bad.

      http://www.cs.cornell.edu/~asampson/blog/spectacular.html

    • cvwrightJul 2017

      Ivy looks great. That said, every time I see a new SSG in Python, I get all excited about it for a minute. Then I remember this bit of advice: "Just use Jekyll".

      > Jekyll is not better than the rest for any fundamental design reason; it’s better because it’s enormously popular and therefore excels in the long tail of details.

      > ...

      > If, like me, you secretly believe that everything is better if it’s written in Python, I still suggest you start with Jekyll (which is done in Ruby). In my experience, using Jekyll does not require writing or reading a single line of Ruby.

      http://www.cs.cornell.edu/~asampson/blog/jekyll.html

      This matches my own experience pretty well.

    • dylukesSep 2023

      AoVA lacking its own total ordering on indices might be a problem for some use cases, but not for the one that is suggested here: AST nodes.

      In these cases, the arrays can be just one component (could think of it as an arena) of a heap-ish structure. [1]

      The cost is that your indices now need to be two dimensional (tag_idx, va_for_tag_idx). But the number of tags is known at compile time and you can optimize storage by packing so that tag_idx is the upper 4-5 bits and va_for_tag_idx uses the rest.

      See: [1] https://www.cs.cornell.edu/~asampson/blog/flattening.html

    Related

    John Regehrblog.regehr.org401 people

    Teaching C

    John Regehr
    Personal · last shared 2026
    Jonathan Goodwinpling.jondgoodwin.com18 people

    Compiler Performance and LLVM

    Jonathan Goodwin
    Personal · last shared 2024
    SIGPLAN Blogblog.sigplan.org61 people

    My First Fifteen Compilers

    SIGPLAN Blog
    Publication · last shared 2026
    composition.alcomposition.al45 people

    My first fifteen compilers

    composition.al
    Personal · last shared 2022
    Stephen Diehlstephendiehl.com209 people

    What I Wish I Knew When Learning Haskell

    Stephen Diehl
    Personal · last shared 2026
    Lambda the Ultimatelambda-the-ultimate.org615 people

    Simon Peyton Jones Elected into the Royal Society Fellowship

    Lambda the Ultimate
    Publication · last shared 2026
    LLVM Blogblog.llvm.org226 people

    Clang Is Now Used to Build Chrome for Windows

    LLVM Blog
    Company · last shared 2026
    The Morning Paperblog.acolyer.org606 people

    Local-first software: you own your data, in spite of the cloud

    The Morning Paper
    Personal · last shared 2026