Introducing the real me!

I'm really excited for the opportunity to introduce my true self. A while back I began exploring my gender expression, and today marks an important step in my journey. So let me re-introduce myself, the real me this time.

Hi! 👋 I'm Emma, a trans woman. I use she/her pronouns.

I'm the same person, just more... me! So all the stuff in About Me is still true! Expect more posts about Python, packaging, and whatever other hobby projects I have going on (I'll probably publish a post this week about PyPI, pip and uv, stay tuned!).

Finally, I'd like to thank my wife and everyone who has supported me on this journey so far. I feel so lucky to be surrounded by so many supportive friends and family members. I absolutely could not have gotten this far without them.

New Rust crate: generational-arena-dom

I've just published a new crate someone may find interesting. I recently had a take-home assessment where I used the Servo project's html5ever HTML parser crate. html5ever is the main crate that servo uses to parse HTML content on the web. This crate is very customizable, and you have to bring your own implementation of the DOM (which means you can handle memory management however you want!). They provide an example implementation of the DOM that uses Rc<RefCell<T>>s all over, which is a bit annoying to use with Rust's borrow checking model. This becomes particularly frustrating when dealing with frequent DOM mutations, as was the case in my project.

Fortunately, I recalled the benefits of using arenas for ergonomic memory management when working with trees. I also had recently read about Vale's generational arena usage, and I was inspired to build a DOM implementation based on a generational arena design. Generational arenas are nice because they don't suffer from the ABA problem, so it is thread-safe to add, update, and delete nodes in the DOM. I ended up coming across the generational-indextree crate, which uses tokens instead of references to refer to tree members, which made working with mutable elements of the DOM much easier!

Anyway, I encourage anyone who is interested to learn more to check out the project on my github or on the project page on crates.io