Vladimir Keleshev

keleshev.com · Personal blog · on HN since 2014

Vladimir Keleshev, a programmer and author of "Compiling to Assembly from Scratch", writes about compilers, ARM, OCaml, and writing tools.

What HN saysCommenters repeatedly recommend his book on compiling to assembly, noting its TypeScript compiler makes it accessible, and praise his abstract syntax tree article.
25HN people shared it
12linked it in comments
34stories submitted
1.4Kstory points
8 months agolast shared
2014people per year2026

Most-shared posts

  1. 1
    Compiling to Assembly from Scratch
    9 people · 157 points · first shared 2020 · 49 comments on HN
  2. 2
    Composable Error Handling in OCaml (2018)
    6 people · 8 points · first shared 2018 · discussion on HN
  3. 3
    LDM: My Favorite ARM Instruction
    4 people · 152 points · first shared 2020 · 127 comments on HN
  4. 4
    Why the EAX register of x86 is called that
    3 people · 280 points · first shared 2020 · 116 comments on HN
  5. 5
    Abstract Syntax Tree: An Example in C
    3 people · 12 points · first shared 2022 · 1 comments on HN
  6. 6
    Writing a Book with Pandoc, Make, and Vim
    2 people · 428 points · first shared 2020 · 60 comments on HN
  7. 7
    Upcoming Book: Compiling to Assembly from Scratch
    2 people · 45 points · first shared 2020 · 5 comments on HN
  8. 8
    AI=true is an Anti-Pattern
    2 people · 4 points · first shared 2026 · 1 comments on HN
  9. 9
    Parsing Ambiguity: Type Argument vs. Less Than
    2 people · 1 points · first shared 2020 · discussion on HN
  10. 10
    One-pass Compiler
    1 people · 163 points · first shared 2020 · 43 comments on HN
  11. 11
    Compiling to Assembly from Scratch: the book, released
    1 people · 87 points · first shared 2020 · 10 comments on HN
  12. 12
    Namespacing Variants in ML
    1 people · 59 points · first shared 2015 · 5 comments on HN
  13. 13
    ARM Assembly Programming (2024)
    1 people · 5 points · first shared 2025 · discussion on HN
  14. 14
    Advanced Error Handling in OCaml
    1 people · 3 points · first shared 2021 · discussion on HN
  15. 15
    Against Human-AI Workflow Separation
    1 people · 2 points · first shared 2026 · discussion on HN

What HN people wrote when they linked it

dna_polymerase · 2023-11-08
I keep recommending “Compiling to Assembly”, by Vladimir Keleshev: https://keleshev.com/compiling-to-assembly-from-scratch/ The author chose TypeScript for the Compiler, which makes it somewhat more accessible to these days programmers.
kcartlidge · 2022-04-24
As very much a non-expert in compiler design, I found two books to be helpful introductory reads (neither are free though). I'm not sure whether someone proficient in the field would recommend them as my knowledge in the area is small, but I enjoyed them. - Writing An Interpreter In Go by Thorsten Ball (https://interpreterbook.com) - Compiling to Assembly from Scratch by Vladimir Keleshev (https://keleshev.com/compiling-to-assembly-from-scratch) The first produces an interpreter in Go for a custom language, but as simscitizen says there's a lot of crossover with compilers. The second creates a compiler written in Typescript that compiles from a minimal form of Typescript into ARM assembly. It's not cheap but is good.
DylanSp · 2020-10-05
Always cool to see people experimenting with languages! I'm doing a similar thing with wheel-lang [0], which started as pretty purely imperative, but is starting to grow some object-oriented features. Nystrom's Crafting Interpreters is a great resource; I've also liked Compiling to Assembly From Scratch [1] and Write You a Haskell [2]. [0] https://github.com/DylanSp/wheel-lang/ [1] https://keleshev.com/compiling-to-assembly-from-scratch/ [2] http://dev.stephendiehl.com/fun/
samsquire · 2022-12-04
Thank you Eatonphil for writing this. I agree that I would love to see more of this kind and quality this kind of article of technical subjects. https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ https://keleshev.com/abstract-syntax-tree-an-example-in-c/ I don't want to add more work to people who are already working more than everyone else. But when you write software or code that is truly good, I want people to write lots of examples and descriptions of their mental model and how to think of the software. I'm still trying to understand what the difference between a poller and an awaiter in Rust async. I use Flask because I find Flask easier to understand than Django. There's even a simple example on the Flask homepage. But Django has a very large tutorial which still doesn't really explain how each component fits together. I don't understand the mental model behind Django but I do with Flask. For example, I'm still trying to understand C++ coroutines. And I have some code that kind of works and some code someone provided on Stackoverflow I cannot get to work with GCC. There's not large amounts of documentation on C++ coroutines. I see people post fascinating awesome GitHub projects and have sparse README.md and no screenshots The code doesnt speak for itself. You can write the perfect code at a company and that code never flourishes because nobody wrote about it. Or you can write the perfect code at home but it doesn't get used. I would rather…
NukedOne · 2023-12-30
Building git https://shop.jcoglan.com/building-git/ Build a blockchain from scratch in go https://web3coach.gumroad.com/l/build-a-blockchain-from-scratch-in-go Compiling to assembly from scratch https://keleshev.com/compiling-to-assembly-from-scratch/ If anyone knows of similar books, don't hesitate to comment below.
daoistChuckle · 2020-12-02
https://keleshev.com/compiling-to-assembly-from-scratch/ I have been going through this book and it is really good so far.
tekknolagi · 2020-10-29
I think that would be a lot of fun! I'm vaguely planning to target RISC-V eventually, because I bought a couple of dev boards. But for now you should check out Vladimir Keleshev's book! His book targets ARM. Book: https://keleshev.com/compiling-to-assembly-from-scratch/
AlexeyBrin · 2020-05-23
Tangential - in your work in progress compiler book https://keleshev.com/compiling-to-assembly-from-scratch-the-book are you going to write yourself the lexer and parser or use Flex and Bison like in the article ?
twic · 2020-05-20
In case anyone ever stumbles across this thread, a couple of posts about this: https://keleshev.com/parsing-ambiguity-type-argument-v-less-than https://soc.me/languages/stop-using-for-generics
ernst_klim · 2019-06-28
IMHO the worst part of Go errors is that they are strings, so if you propagate them, you can't do anything but print them. You can't handle them properly, since you can't match them in a robust way. Just compare how good the error handling is in OCaml: http://keleshev.com/composable-error-handling-in-ocaml
a-saleh · 2018-11-26
Man! I actually like half of Golang's error handling practice. Returning errors and dealing with them in a simple case sounds nice, there is no magic required, no need to think "am I forgetting to catch an exception here?" On the other hand, the fact that we are returning a tuple of (result, err) where by convention err should be nil if everything worked screams as a terrible design to me. But I might be influenced by reading too much Haskell/ML inspired languages :D Once you understand applicative validation [1] or exhaustive pattern matching on row-polymorphic sum types [2], other error handling methods just seem so crude :) [1] https://leanpub.com/purescript/read#leanpub-auto-applicative-validatio… [2] http://keleshev.com/composable-error-handling-in-ocaml

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close