2
lorentz
2y

The number of concurrent transformations impacting more than half of the codebase in Orchid surpassed 4, so instead of walking the reference graph for each of these I'm updating the whole codebase, from lexer to runtime, in a single pass.

In this process, I also got to reread a lot of code from a year ago. This is the project I learned Rust with. It's incredible, not just how much better I've gotten at this language, but also how much better I've gotten at structuring code on general.

Interestingly though my problem-solving ability seems to be the same. I can tell this by looking at the utilities I made to solve specific well-defined abstract problems. I may have superficial issues with how the code is spelled out in text, but the logic itself is as good as anything I could come up with today.

Comments
  • 1
    The four transformations are:
    - retain code location information all the way until runtime error reporting
    - intern everything
    - introduce named constants for functions that are not inlined on the syntax level because we don't want locals in the caller to shadow globals in the callee
    - eliminate types and generics from all intermediate representations because I defined them all wrong anyway.
  • 2
    As an added benefit named constants pave the way to DLLs and I can't stop thinking about this even though it's like 5 months away
Add Comment