posted on 2023-04-29 12:26:46
Have you ever wondered why you can't match powers of 2 with a regex? Well I didn't... at least until I took Theory of Computation and went down this number-theoretical rabbithole on a whim. Let's uncover some cool structure!
posted on 2022-07-04 14:31:44
Fuzzing is essentially testing code with lots random inputs to hopefully get a crash if the code is incorrect.
AFL (American Fuzzy Lop ^ thanks wikipedia) is a bit smarter than the average jank script though, being a genetic fuzzer which uses the compiler's knowledge of branches (if
/while
) to aggressively root out new paths through code, keeping "interesting" inputs for further mutation in some loose analogy to evolutionary success. This also takes some extra setup, but is
extremely
effective
in practice for finding elusive bugs.
posted on 2022-01-16 16:02:09
Unless you're dealing solely with ascii, which is typically a naive assumption in our Unicode world and especially in the realm of text editing widgets, terminal emulators should be avoided for the dusty VT100 relics they are.
Not only is input handling unbelievably botched, consistent text rendering is impossible across terminals.
posted on 2021-11-29 10:24:59
So I started off writing a text editor that would suit my needs: being fully extensible via a scripting language and performant. Along the way I devised an improvement on the piece-table which significantly outperforms all existing similar data structures to my knowledge. There was a small caveat to my particular implementation - it exploited the fact that codepoint and line number tracking are not crucial in the backend of a text editor (details in paper), meaning much of the file did not need to be read with expensive system calls, instead lazily loaded by the operating system's virtual memory subsystem.
Arguably at that point my implementation was not exactly comparable to others since I was no longer providing the same abstract interface as typical text buffers. But the key insight is that bytes, codepoints and lines are simply not the units in which we percieve code.
When designing a development environment, I think a good premise is that not everything is text, just as not everything is a file.
posted on 2020-08-15 10:23:51
Switched from jekyll to coleslaw. Things look much nicer now. Code highlighting is looking real sexy.