One thing that I find easier in C compared to Python is that loops are not as expensive. And sometimes, things are easier to implement when you can think of them individually.
For example, to render characters with different styles, we can do this in C:
for (index = 0; index < SIZE; index++) { render_character(characters[index], styles[index]); }
This is cheap in C. But in Python, it is expensive. So to make this fast in Python, we might want to do something like this:
for (substring, style) in split_parts(text): render_text(substring, style)
Assuming we can write split_parts without looping over all characters, this will perform better in Python because of fewer loop iterations.
in #c
Modes are only problematic if the current mode is not the user's locus of attention?
A quasimode is more likely the user's locus of attention because the act of pressing and holding a button creates a richer experience that the user is in this mode?
What is Rickard working on and thinking about right now?
Every month I write a newsletter about just that. You will get updates about my current projects and thoughts about programming, and also get a chance to hit reply and interact with me. Subscribe to it below.