2 ms·
I found that starting with something simple and useful helped me lot's unerstanding how these things work. So I started writing a JSON parser. The JSON spec i
by yoo1I 10y ago
I found that starting with something simple and useful helped me lot's unerstanding how these things work.
So I started writing a JSON parser.
The JSON spec is relatively simple, while still retaining enough complexity to learn from some edge cases, and you get to start learning about parsing without having to define what you are parsing at the same time.
That's just the parsing part of course, but it already contains lots of interesting bits, and you end up with something that is already useful.
Then I wrote a small templating library, similar to jinja. That's already more complicated than just parsing, given that you have to make loops and expressions and so on in it.
... so now I trying to write a JSON parser in assembly to understand how that works so that eventually I can compile my templates to machine code instead of just python. That's maybe not so good for production, but then this is a learning exercise.
Computers are pretty fun!