@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)
Vladimir Keleshev
@keleshev.com
OCaml programmer, author of Compiling to Assembly from Scratch: https://keleshev.com/cas Copenhagen
Onfim was not the greatest artist, but why do you have to rub it in like that?!
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...
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?
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.
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.
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! 💯
+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
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 😝) 💯
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.
Every time I see a Bluesky notification, my first thought: Banksy followed me!
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
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