Login
You're viewing the code4lib.social public feed.
  • Sep 1, 2026, 6:19 AM

    So far in the zed (now gram) codebase I have found three separate theme pickers, two separate markdown parsers and renderers, two separate language server installation implementations, one broken capability/permission system that only applies to one of the language server implementations and a system for loading settings from JSON that leveraged monomorphization bloat (convoluted generic async rust code strikes again) to generate 10 MB of code in the binary... and probably even more nonsense that I'm not remembering now. Trying to fix anything is like pulling at a thread in a ball of yarn but the ball of yarn is the ball from Katamari Damacy and out tumbles three cows, a high rise building and a brass orchestra

    💬 5🔄 9⭐ 0

Replies

  • Sep 1, 2026, 9:08 AM

    @krig This reminds of SQLite’s FAQ of what can corrupt SQLite databases and one of them is literally “linking SQLite into your binary more than one time”.

    🙈

    EDIT: Want to be clear that this is not a dunk on SQLite or anything. It’s entirely reasonable to design the library to only expect one copy of itself!

    💬 0🔄 3⭐ 22
  • Sep 1, 2026, 1:29 PM

    @torb it's kind of funny; in C linking the same thing twice will cause issues and doesn't work, so rust fixes that. With the consequence that you end up with multiple copies of lots of dependencies. I discovered that the SVG renderer and the text renderer each pulled in a separate copy of harfrust (for text shaping) plus all of its dependencies twice, and I think there are something like 80 dependencies that are all duplicated in gram now... it's a total mess

    💬 0🔄 0⭐ 0
  • Sep 1, 2026, 1:46 PM

    @krig @torb normal rust behavior.

    "two different versions of the same crate defining a trait in the dependency tree making different dependents incompatible" is the bane of my current existence, given I just spent several weeks fixing those kinds of issues across a dependency tree of a project I'm working on…

    💬 0🔄 1⭐ 10
  • Artemisart_codesmith@toot.cafe
    Sep 1, 2026, 6:53 PM

    @fogti @krig @torb
    I'm honestly baffled by this behavior.
    Just install the dependency once, according to the highest compatible version!
    If you can't resolve to the highest compatible version (exclusionary transient dependencies by two packages), throw an error and make the app developer reconcile!

    💬 0🔄 0⭐ 0
  • Sep 1, 2026, 9:19 PM

    @art_codesmith @fogti @krig @torb that's kinda how rust works. It only links multiple versions of a dependency if they're deemed not compatible, using semver semantics around version numbers.

    It doesn't error on multiple versions by default because incompatible versions are almost universal, due to transitive dependencies. There's a lint that can enforce "only one version of a crate is allowed", which does the "throw an error" behaviour you describe. I used that in my projects for a long time. I never had a project that didn't have a list of crates to allow be multi-version, because there's *always* some crate that hasn't bumped dependencies yet.

    💬 1🔄 0⭐ 0
  • Sep 3, 2026, 12:01 PM

    @womble
    the problem is that semver semantics dont exist, everybody does what think is right and there's no way to stantardize what a breaking change is, rust developers love to think semver is something acually useful tho
    @art_codesmith @fogti @krig @torb

    💬 0🔄 3⭐ 3
  • 💬 0🔄 1⭐ 2
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Oct 12, 2026, 12:14 PM

    @krig been using gram, daily (alongside rustrover) for months; thank you for all the hard work and getting this project started in the first place.

    re: ripping out the plugins

    i'd love to hear more about this. would you stick with WASI based plugins or switch to something else?

    💬 0🔄 0⭐ 0
  • Oct 12, 2026, 12:18 PM

    @swatters I’m not sure! Which is one reason it hasn’t happened yet. On one hand I like the idea of not having a massively capable plugin system, kind of along the lines of helix. Once there are complex plugins that people use and depend on the architecture becomes pretty locked in. On the other hand I don’t like the awkward extensions we have now and have thought about using Roto as a scripting language instead, fix the permissions, add a way to list and update extensions and so on.

    💬 0🔄 0⭐ 0
  • Nov 12, 2026, 7:39 PM

    @krig If you are interested, I’ve recently implemented a plugin system for Gnome Commander which is also written in Rust. The idea was to have out-of-process plugins written in any programming language (the default plugins are written in Python), communicating with the application via JSON messaging and accessing a number of well-defined APIs this way. Sandboxing plugins wasn’t a goal, so they are just regular executables. This design made writing plugins really simple. API documentation is here: gitlab.gnome.org/GNOME/gnome-c

    @swatters

    💬 0🔄 0⭐ 0
  • Nov 12, 2026, 7:31 PM

    @krig I’ve tried out gram now (only heard of zed before and stayed clear of it because of the LLM crap). Trying to change some keyboard shortcuts in the Keymap Editor I can certainly see what you mean. From the look of it I’ve hit something like five bugs already, and I don’t need to see the code to recognize it being badly wrong on the conceptual level (using action as identifier despite it being non-unique? something like that, and never mind horrible usability). I hope I can make it moderately usable for me, then I might be able to help out with the code.

    💬 0🔄 0⭐ 0