• Arborium is AI slopware and should not be trusted

    It would be an understatement to say that I am mildly interested in syntax highlighting.[^2] While I have yet to write a full-fledged parser myself, my blog's[^9] syntax highlighting plugin is custom-built. Under the hood it uses the Lezer[^1] parsing and highlighting system, which is inspired by the gold standard of syntax highlighting used in all modern code editors except Visual Studio Code: tree-sitter. I think Lezer is a great tool and it's especially great in the use case of syntax highlighting on the web,[^3] but I've still kept my eye out for the chance to use tree-sitter instead.

    Last weekend while scrolling through some quieter feeds in my RSS reader, I came across an article which might be the something better I was looking for.

    fasterthanli.me

    Introducing arborium, a tree-sitter distribution

    About two weeks ago I entered a discussion with the docs.rs team about, basically, why we have to look at this: When we could be looking at this: And of course, as always, there are reasons why thi...

    Arborium is a high-performance syntax highlighting tool powered by tree-sitter created by Amos Wenger. Amos (also known as fasterthanlime) is a long-time open source developer who I greatly respected. I learned Rust from his Advent of Code article series, and I appreciate his commitment to correctness and speed. I was especially excited to learn about Arborium because it was designed to work on the web using Javascript. I could use this!

  • A brief overview of three of my site's dependencies

    They say “great artists steal”, and I wanted to showcase how I’ve solved some problems I’ve run into on my site by showing some niche dependencies I’ve picked up. Note that these are mostly files that have originated from other sources that I’ve copied in by hand as opposed to imported.

    HAST util from Lezer

    I will go more into depth on this on a future article on how syntax highlighting on my blog works, but to summarize: I use a tool called Lezer to handle syntax highlighting. This library is part of the pipeline my blog uses for adding that syntax highlighting. This was written by Joel Gustafson and mentioned in an incredible blog post going into some of the history around syntax highlighting. I copied it into my site basically wholesale, and you can find it in my codebase here (converted to javascript from typescript for some reason). I generally prefer copying code in over importing it, because it helps me understand what the code does, and it allows me to tune the code to better fit the needs of my s…