Top all-time · #3040
Vladimir Keleshev
Personal blog · keleshev.comprogramming
Vladimir Keleshev's personal blog at keleshev.com covers programming. Since 2014, 25 different Hacker News readers have linked it 50 times, most often “Composable Error Handling in OCaml”. No feed was found, so read it on the site itself.
Too few sampled comments (16) to say how often HN recommends it.?
Why HN links it
HN readers link Vladimir Keleshev's compiler book, Compiling to Assembly from Scratch, which uses a TypeScript subset to build an ARM compiler, plus his posts on parsing, OCaml error handling and ASTs in C.
Summarised by Claude from a sample of 16 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- /compiling-to-assembly-from-scratch/6 people · 7 mentions · first linked 2020-10-05
- Composable Error Handling in OCaml5 people · 6 mentions · first linked 2018-02-12
- LDM: My Favorite ARM Instruction4 people · 4 mentions · first linked 2020-10-14
- Abstract Syntax Tree: An Example in C3 people · 4 mentions · first linked 2022-12-02
- Composable Error Handling in OCaml (2018)3 people · 3 mentions · first linked 2019-09-11
- Why the EAX register of x86 is called that3 people · 3 mentions · first linked 2020-03-20
- Compiling to Assembly from Scratch3 people · 3 mentions · first linked 2020-07-13
- AI=true is an Anti-Pattern2 people · 2 mentions · first linked 2026-02-26
- Parsing Ambiguity: Type Argument vs. Less Than2 people · 2 mentions · first linked 2020-04-06
- Upcoming Book: Compiling to Assembly from Scratch2 people · 2 mentions · first linked 2020-03-13
What Hacker News says?
Building git https://shop.jcoglan.com/building-git/ Build a blockchain from scratch in go https://web3coach.gumroad.com/l/build-a-blockchain-from-scra... 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.
Comment linking /compiling-to-assembly-from-scratch/
on “Ask HN: Programming Courses for Experienced Coders?”Submitted Writing a Book with Pandoc, Make, and Vim as a story · 423 points
HN discussionAs 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/co…
Comment linking /compiling-to-assembly-from-scratch
on “Chris Lattner on garbage collection vs. Automatic Reference Counting (2017)”Submitted Why the EAX register of x86 is called that as a story · 274 points
HN discussion> This is hardly possible. The whole idea of exceptions is that each function only deals with a subset. Why? It's totally possible to infer the most general type for all the functions in the program, hence to infer the type of the needed handler. Any language with subtyping and powerful type inference can do this, here is the toy ocaml example with typed algebraic effects (you can think of them as of exceptions): va…
Comment linking /composable-error-handling-in-ocaml
on “Why Ada Is the Language You Want to Be Programming Your Systems With”Submitted One-pass Compiler as a story · 163 points
HN discussionIn case anyone ever stumbles across this thread, a couple of posts about this: https://keleshev.com/parsing-ambiguity-type-argument-v-less-... https://soc.me/languages/stop-using-for-generics
Comment linking /parsing-ambiguity-type-argument-v-less-than
on “Five Years of Rust”Submitted LDM: My Favorite ARM Instruction as a story · 145 points
HN discussionModules and parametric modules, subtyping (polymorphic variants [1] and objects), proper records, classes making bindings to OOP APIs natural, strict evaluation, ppx extensions [2]. [1] http://keleshev.com/composable-error-handling-in-ocaml [2] https://victor.darvariu.me/jekyll/update/2018/06/19/ppx-tuto...
Comment linking /composable-error-handling-in-ocaml
on “Functional Programming in OCaml”Submitted Compiling to Assembly from Scratch as a story · 133 points
HN discussionMan! 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…
Comment linking /composable-error-handling-in-ocaml
on “Errors in Go: From denial to acceptance”Submitted Compiling to Assembly from Scratch: the book, released as a story · 87 points
HN discussionTangential - in your work in progress compiler book https://keleshev.com/compiling-to-assembly-from-scratch-the-... are you going to write yourself the lexer and parser or use Flex and Bison like in the article ?
Comment linking /compiling-to-assembly-from-scratch-the-book
on “One-pass Compiler”Submitted Namespacing Variants in ML as a story · 59 points
HN discussionIMHO 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
Comment linking /composable-error-handling-in-ocaml
on “Go proposal: Leave “if err != nil” alone?”Submitted Upcoming Book: Compiling to Assembly from Scratch as a story · 45 points
HN discussionI 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/
Comment linking /compiling-to-assembly-from-scratch/
on “Compiling a Lisp to x86-64: Labelled procedure calls”Submitted Compiling to Assembly from Scratch as a story · 24 points
HN discussionAlways 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-…
Comment linking /compiling-to-assembly-from-scratch/
on “Show HN: Learning Project: building an imperative language”Submitted Abstract Syntax Tree: An Example in C as a story · 8 points
HN discussionhttps://keleshev.com/compiling-to-assembly-from-scratch/ I have been going through this book and it is really good so far.
Comment linking /compiling-to-assembly-from-scratch/
on “Ask HN: Best Resources for Compiler Construction”Submitted ARM Assembly Programming (2024) as a story · 5 points
HN discussionI 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.
Comment linking /compiling-to-assembly-from-scratch/
on “Writing a Compiler is Surprisingly Easy (part 1)”Submitted My Book-Writing Setup as a story · 5 points
HN discussionIt sure is. For anyone looking into Compilers and just starting out, I recommend this book: https://keleshev.com/compiling-to-assembly-from-scratch/ The author uses a TypeScript subset to write a compiler to 32bit ARM assembly and explains that it almost looks like Pseudocode, so it is very accessible. A sentiment I can get behind, despite avoiding it in any case possible.
Comment linking /compiling-to-assembly-from-scratch/
on “TypeScript Is Surprisingly OK for Compilers”Submitted Abstract Syntax Tree: An Example in C (2022) as a story · 4 points
HN discussionHave a look at https://keleshev.com/compiling-to-assembly-from-scratch/
Comment linking /compiling-to-assembly-from-scratch/
on “CS 6120: Advanced Compilers: The Self-Guided Online Course”Submitted LDM: My Favorite ARM Instruction as a story · 4 points
HN discussionThank 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... 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…
Comment linking /abstract-syntax-tree-an-example-in-c/
on “Is it worth writing about?”Submitted EAX Register Meaning and History as a story · 4 points
HN discussion