Improving Eglot performance

Yesterday I started to rewrite the mataroa-cli tool for the millionth time. This time I chose Rust to do it for three reasons:

  1. I like its type system1, even though I don’t really like the borrow checker
  2. I can statically compile to multiple architectures, nice for a CLI tool
  3. The toolchain is really good, the LSP and Cargo are a blessing

While writing the initial portion of the code, I noticed a mild input lag every time I added a new crate. Weird, I’m not writing a lot of code and it’s not my computer that is lagging. After a few minutes searching for the root cause, I discovered that Eglot prettifies the LSP’s JSON RPC output. You can read more on the GNU Emacs bug report #65760.

The solution is quite simple:

(use-package eglot
  (advice-add 'jsonrpc--log-event :override #'ignore))

  1. As much as I like Go and its toolchain, I really hate not having Discriminated Unions (called enums in Rust). ↩︎

Articles from blogs I follow around the net

Variations of the Range kata

In the languages I usually employ. The Range kata is succinct, bordering on the spartan in both description and requirements. To be honest, it's hardly the most inspiring kata available, and yet it may help showcase a few in…

via ploeh blog January 1, 2024

Some notes on NixOS

Hello! Over the holidays I decided it might be fun to run NixOS on one of my servers, as part of my continuing experiments with Nix. My motivation for this was that previously I was using Ansible to provision the server, but then I’d ad hoc installed a bunch…

via Julia Evans January 1, 2024

I found some of my first code! Annotating and reflecting on robotics code from 2009.

In high school, one of my teachers shattered my plans for my life, in the most beautiful way. Most of my life, I'd intended to become a math professional of some sort: a math teacher, when that was all I saw math for; an actuary, when I started to lear…

via blog January 1, 2024

Generated by openring