GoSuB Browser Progress, pt13

Created at 2023-09-14 10:32:29 (1 year ago)

Yes, I'm still fighting with Rust's borrow checker. I've got a lot of help from ChatGPT where it helps me to correct some mistakes (but doublecheck to make sure it's right, it often is not). Also, with the help of codepilot, i've got all steps from the parser implemented. After a while, it knows exactly what to do, which functions and code to call, on which elements a given arm much match. That is really nice!

Lots of tests from the first test file actually passes (although it DOESNT pass on parser error expectations), so the node tree that it generates seems to be ok for the first tests. There are still a lot of tests to be done, and a lot of code to be fixed.

I'm now busy trying to get the "adoption agency algorithm" up and running, which is step by step documented in the specs, but still not easy to implement correctly.. Again, with the help of html5lib-tests, I think i can come up with decent code.

About speed: I don't worry about speed at the moment. To be fair: i don't know how I can even benchmark rust code correctly. I'm afraid there are a lot of cloning of variables that might not be needed, and it's hard to figure out when rust will clone something or not. Sometimes, it seems you have to clone variables in order to make sure the parser itself doesn't get mutable borrowed, which screws up anything else you want to do with it later on. So for now, let's keep things as simple as possible, and make sure the code works, before we make the code fast, and make the code nice.

rust

About jaytaph

Codemuser extraordinaire

avatar Loves building crazy and insane stuff. Happiest when left alone. All I wanted was a Pepsi, just a Pepsi.
Joined:March 24, 2023
Following:2
Followers:2
Posts:50
Comments:3
Upvotes:4
RSS feed