Vladimir Keleshev
banner
keleshev.com
Vladimir Keleshev
@keleshev.com
OCaml programmer, author of Compiling to Assembly from Scratch: https://keleshev.com/cas

Copenhagen
Reposted by Vladimir Keleshev
@keleshev.com not sure whether you already saw, but Compiling to Assembly from Scratch got a review in c't 9/25 (the largest German IT magazine)
May 21, 2025 at 4:10 PM
Onfim was not the greatest artist, but why do you have to rub it in like that?!
May 15, 2025 at 9:09 PM
Glad to see that Python finally got more dedicated syntax for type annotations in 3.12. Now it looks quite decent. So I updated the Python version of the book's compiler to use the new syntax: github.com/keleshev/com...
May 2, 2025 at 7:52 PM
In original docopt, square brackets mean each item is optional. For example, `prog [<x> <y>]` is the same as `prog [<x>] [<y>]`. Weird or not? To make both-or-nothing you need to group them like `prog [(<x> <y>)]`. You know why this was the design decision?
January 4, 2025 at 10:18 PM
😲
I designed a small device for this which takes uses a PD supply and gives the 5v at 5A for a pi 5.
January 2, 2025 at 11:11 AM
Power new Raspberry Pis is tricky nowadays, isn't it?

Pi 4 needs 15W at 5V, but normally hubs/screens/power supplies advertise their max power delivery at a higher voltage, so there's no way to know without trying.
January 1, 2025 at 8:17 PM
Not going to upgrade kids to Raspberry Pi 500 (from their Pi 400). Waiting for the next Pi X00 series for four years, of course it's a disappointment.
December 22, 2024 at 3:46 PM
Killer feature! In OCaml you would have to opam install ppx_deriving first.

But I know where this is going… type classes… that’s where OCaml really lacks.

But if I had (and I had) to pick type classes vs. error handling using polymorphic variants, I’d choose the latter.
Same code, but in #Haskell, you get all the extra functions for free! 💯
November 22, 2024 at 7:43 PM
Reposted by Vladimir Keleshev
+600 of you are following me! It's amazing! 🌱 Let's do a little introduction.

Hi! 👋 I'm Katiuska, I'm Venezuelan and I like to draw kids and sometimes write my own stories.

I'm available for freelance work and also looking for representation.

🖍️ Portfolio
WIP's and Tips
November 22, 2024 at 4:56 PM
rec is my favorite in OCaml—lets me find out that the function is recursive before reading it—super important, I think. Even better—mutually recursive functions with let rec…and—you see mutual recursion at birds eye view.
Same code but in #Haskell, I always appreciated the conciseness of this language (and also little details like not having to use `rec` on recursive functions 😝) 💯
November 20, 2024 at 10:08 AM
Excellent! Now use fold.

gist.github.com/keleshev/36e...
November 20, 2024 at 9:56 AM
Making parser combinators in OCaml that do not allocate (except when you explicitly do so, e.g. constructing an AST) is tricky. The usual advice I'm hearing is to use CPS in order to "return" multiple arguments. But in practice, even sequencing two parser creates closures that capture variables.
November 18, 2024 at 8:05 PM
Every time I see a Bluesky notification, my first thought: Banksy followed me!
November 13, 2024 at 5:24 PM
Reposted by Vladimir Keleshev
It's not a #kidlit book but the print version of Compiling to Assembly is available!

I worked on this book a couple of years ago and you can finally get the printed book which includes 15 chapter illustrations.

Thank you Vladimir for asking me to be part of this project!

#STEM #TypeScript
September 22, 2024 at 2:54 PM
The grammar. The parser. I love doing this.
November 1, 2024 at 9:20 PM
Hello Bsky! I like OCaml and Compilers. You might know me from docopt or the book Compiling to Assembly from Scratch.

github.com/docopt/docopt
keleshev.com/cas
November 1, 2024 at 9:12 PM