Reformat lists in the latest post

This commit is contained in:
Konstantin Nazarov 2023-10-29 22:20:24 +00:00
parent 04f6f7b549
commit a3d48d0ce4
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22

View file

@ -14,6 +14,7 @@ I'd argue that studying the implementation of an existing mainstream language is
Now, why should you care at all about these things? Isn't it the case that there are lots of great engineers who have never touched the internals of a compiler/interpreter? Sure, I'll grant you that. I would even say that I'm not a great engineer myself, so I can't be the judge. Every time I figure something out, it's usually a hard-won battle that takes _way_ longer than people around me realize. Now, why should you care at all about these things? Isn't it the case that there are lots of great engineers who have never touched the internals of a compiler/interpreter? Sure, I'll grant you that. I would even say that I'm not a great engineer myself, so I can't be the judge. Every time I figure something out, it's usually a hard-won battle that takes _way_ longer than people around me realize.
Having said that, there are a few things that are special about programming languages that make them a good learning material: Having said that, there are a few things that are special about programming languages that make them a good learning material:
- They are multi-stage transformers: starting from lexing to code generation. The transformers would be more or less independent, and writing them a few times will teach you how to compose programs out of "pure" blocks. This is something that you rarely see in mature codebases (unless of course they are written in Ocaml/Haskell) - They are multi-stage transformers: starting from lexing to code generation. The transformers would be more or less independent, and writing them a few times will teach you how to compose programs out of "pure" blocks. This is something that you rarely see in mature codebases (unless of course they are written in Ocaml/Haskell)
- They would teach you to think in trees. A compiler/interpreter is mostly a tree walker, whether for evaluation or optimization. - They would teach you to think in trees. A compiler/interpreter is mostly a tree walker, whether for evaluation or optimization.
- And finally, you'd start to appreciate the cost of abstractions. You'd learn the costs of closures, different types of dispatch and memory accesss. - And finally, you'd start to appreciate the cost of abstractions. You'd learn the costs of closures, different types of dispatch and memory accesss.
@ -29,6 +30,7 @@ And then at some point, I discovered Lisp. I never quite enjoyed writing large p
Sure, a production version of a Lisp dialect would be as hard as other languages, because it would include a JIT compiler and a generational garbage collector. But for educational purposes you don't need this. It is exactly the simplicity of the core idea that matters for a hobby implementation. Sure, a production version of a Lisp dialect would be as hard as other languages, because it would include a JIT compiler and a generational garbage collector. But for educational purposes you don't need this. It is exactly the simplicity of the core idea that matters for a hobby implementation.
Finally, there are many programming languages that are useful without being "fully-featured": Finally, there are many programming languages that are useful without being "fully-featured":
- text processing: sed, awk, and others - text processing: sed, awk, and others
- templating: m4, jinja, etc. - templating: m4, jinja, etc.
- shells: bash, ash, etc. - shells: bash, ash, etc.