Hacker News new | ask | show | jobs
by zingar 8 hours ago
I fetch my google calendar every few minutes to get everything into my agenda. The API request is async, but writing to the calendar file and some additional processing made Emacs hang for 10 seconds at a time. The LLM-inspired solution was to spawn entire new emacs processes to do the work in the background. It's pretty cool that it works, but it feels like it shouldn't - and wouldn't with 2+ threads - have been that complicated.
1 comments

Ah, so for stuff like that, it seems current strategy is to build a "server" part that handles concurrency (in a different language) - that's how lsp servers work, and projects like eca-emacs. If I ever get to build something like what you've described I'd probably write the server part in Clojure, Janet, Jank or Jolt¹ or maybe even Zig or Rust. It is a nice, practical example - exactly the stuff I've been asking about, thank you for providing it. I agree, it would be nicer if this kind of stuff was possible without complicated hacks.

---

¹ https://github.com/jolt-lang/jolt