all 81 comments

sorted by: hot top controversial new old
[–] 158 points 5 days ago (17 children)

I think that the headline says more about Electron than it does about Rust.

  • source
  • hideshow 17 child comments
  • [–] 37 points 5 days ago* (last edited 5 days ago) (2 children)

    Even the guys who invented Electron (developers of the Atom text editor) stopped using it years ago and switched to Rust when writing their new editor, Zed, and its UI framework GPUI (which Discord will be using too).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 5 days ago (1 child)

    Maybe we don’t want to use JavaScript for literally everything.

    It’s great to see it. I wonder how much of this push comes from the high price of memory.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 4 days ago

    The price of memory-thing is probably not that important as compared to the AI-assisted coding thing. Making things in Rust when you have access to AI tools is dead simple, which was always the argument for making things in Electron. Porting things from one language to another also happens to be one of the sweet spots for AI coding tools, they thrive on tasks that have very clear specs - an already existing codebase with tests is just about as clear of a spec as you can get.

  • source
  • parent
  • [–] 67 points 5 days ago (13 children)

    Yeah exactly. "Just" 240 MB, it's still a lot for a glorified chat app

  • source
  • parent
  • hideshow 13 child comments
  • [–] 23 points 5 days ago (8 children)

    Perhaps it’s vibecoded slop?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 11 points 5 days ago (5 children)

    Rust apps seem to always be on the heavy side, maybe depends how much debug info they leave in

  • source
  • parent
  • hideshow 5 child comments
  • [–] 38 points 5 days ago (1 child)

    Indeed, they’re probably shipping a backtrace symboliser, and since there’s no system-wide equivalent of libc to link against, they’ll be including the entire Rust standard library with the binary too.

    My other hunch is the Krisp noise cancellation ML model is a huge chunk of the memory footprint.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 8 points 5 days ago (2 children)

    I once played around with reverse engineering a Rust program. I compiled the optimized version of the standard "hello world" program which somehow turned into 50,000 lines of assembly.

    It looked like it copied over dozens of functions from libc and the data section was filled with every single possible error string "file not found", "connection timed out", etc. as if there was a possibility of hello world generating an access denied error.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 5 days ago

    Rust has static linking, you get the necessary (and some unnecessary) parts of the standard library in your binary instead of the user having to install the library the way you have to have a libc installed. Makes for fatter binaries but much easier compatibility.

  • source
  • parent
  • [–] 79 points 5 days ago (2 children)

    "Hey Claude, rewrite our dogshit Electron app in Rust, make no mistakes".

  • source
  • hideshow 2 child comments
  • [–] 37 points 5 days ago (1 child)

    man I love that they are ditching electron but, they "just" fixed the discord linux client to properly update and now they are rehauling it? can't wait to get this update 3 years from now.

  • source
  • hideshow 1 child comment
  • [–] 2 points 5 days ago

    I got frustrated enough with the weirdness of the Linux client that I eventually ended up using a pinned browser tab.

    At least then the data collection monstrosity is sandboxed. I believe Flatpak helps, too.

  • source
  • parent
  • [–] 32 points 5 days ago (14 children)

    It's great, but I wonder what happens with the linux client? There is no mention of it in the article.
    Do we get optimized native client or is that too much work if they don't have universal framework anymore?

  • source
  • hideshow 14 child comments
  • [–] 29 points 5 days ago* (last edited 5 days ago) (11 children)

    They are using GPUI. Rust native UI framework from the Zed IDE team. I think the creator of Zed is the one who created Electron in the first place, then left. I'm not sure though.

    So it should be cross platform

  • source
  • parent
  • hideshow 11 child comments
  • [–] 14 points 5 days ago (10 children)

    It's a bold strategy. "Electron sucks! Let's see what else these people made".

    But seriously, why do I need GPU acceleration for my chat UI?

  • source
  • parent
  • hideshow 10 child comments
  • [–] 27 points 5 days ago (4 children)

    It's a video player. You want GPU acceleration.

  • source
  • parent
  • hideshow 4 child comments
  • [–] -4 points 5 days ago (3 children)

    What video? 99.99479% of my Discord experience is text.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 4 days ago

    "Native" sort of loses its meaning in this context - this new client is not "native" in the sense of using the existing GUI tooling for each platform (Cocoa for macOS, any of Microsoft's own frameworks on Windows, primarily Gnome/KDE on Linux).

    It is using a universal framework in GPUI, so the experience will be the same on each platform.

    It is "native" in the sense that it's not web technology on any of the platforms.

  • source
  • parent
  • [–] 63 points 5 days ago (1 child)

    Discord is as much spyware as anything else. Its efficiency in using my computer's resouces in order to log everything about me, build a dossier on me and sell me out at every opportunity is not a consideration, as I view it as something to be avoided like Meta, et al.

    That said, Electron does suck.

  • source
  • hideshow 1 child comment
  • [–] 1 point 5 days ago

    Anything else? Nah bro. It's as much spyware as Google chat or Whatsapp... But Matrix, XMPP, mumble, etc are not spyware (sure, if your host is the CIA maybe, but with these software you can be your own host if you want. No spying guaranteed.)

  • source
  • parent
  • [–] 25 points 5 days ago

    Good to see. Electron is trash for a few reasons.

  • source
  • [–] 30 points 5 days ago (16 children)
  • [–] 30 points 5 days ago (12 children)

    I get why vibe coders love Rust - it’s a lot harder to shoot yourself in the foot if rustc is checking your lifetimes, but holy shit is the code I’ve seen from them the most unholy mess. Rust is difficult enough to read at the best of times but LLMs don’t even bother with any kind of module structure. Just thousands of lines of vomit in single files and a worrying amount of unsafe.

  • source
  • parent
  • hideshow 12 child comments
  • [–] 3 points 4 days ago

    Just tell the clanker to use modern practices poof fixed.

    Jokes aside a lot of that bad code can be detected by static linting tools and gated on, making it impossible for any of those to reach main.

  • source
  • parent
  • [–] 2 points 4 days ago* (last edited 4 days ago) (7 children)

    Preamble: I am a huge LLM/codegen skeptic, for a litany of reasons.

    With that said, this honestly sounds like whoever did the prompting didn’t include something like this in the prompt, along with nuanced adversarial review loops:

    unsafe blocks are strongly discouraged, and must be specifically justified, and survive antagonistic review by a rust language specialist agent and software security specialist agent. Part of the intent of this reimplementation is to leverage the strengths of the rust language itself, and rampant unsafe usage directly contradicts that.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 3 points 4 days ago (1 child)

    "It can't be that stupid, you must be prompting it wrong."

    The ol' reliable.

  • source
  • parent
  • hideshow 1 child comment
  • No, I’m saying that there are ways to introduce feedback mechanisms and antagonistic review and specialist agents to improve the end result of what codegen crap gives you. It’s by no means perfect, but it’s a damn sight better than “make no mistakes”, and if the quality of the rust code is really that much of a shitshow, it’s probably not even being reviewed by a human before getting yeeted into prod, let alone the other things I outlined.

  • source
  • parent
  • [–] 1 point 4 days ago (3 children)

    Sure, but adding adversarial loops, or, some complex addition to every prompt would increase the token usage massively, thus the cost.

    So, why bother with that?

    I could very well be wrong, but all indications I’ve seen have been that that the cost of the tokens needed to get something even vaguely acceptable is greater than the cost of just hiring someone, or a group, to do the job. Unless something needs to be done fast due to an immediate concern, and the cost is no object.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 4 days ago (2 children)

    Perhaps they run a local model, then tokens are essentially free.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 4 days ago (1 child)

    Would need a very beefy cluster, and that definitely isn’t free.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 4 days ago*

    Well yes, I'm not saying it's a free lunch. The point is a large up-front investment buys you unlimited tokens in perpetuity for no more than the cost of electricity to power the cluster — which can be surprisingly cheap for UMA machines.

    I've swapped off API models entirely and have been able to do a lot more useful work since I don't have to worry about token cost or usage limits. Granted it's slower per task (less tk/s), but overall much more productive, and private.

  • source
  • parent
  • [–] 3 points 4 days ago

    Hmmmm, the first blog posts about rewriting the backend part from Go to Rust are a few years old by now (early 2020) so it's clearly not a "let's vibecode everything in two weeks" kind of project.

    However... The later stages are probably vibecoded... Yeah, that would check out today.

  • source
  • parent
  • [–] 11 points 5 days ago

    With screensharing on wayland? With screensharing on wayland, right?

  • source
  • [–] 9 points 5 days ago

    You ever use a Swiss Army knife to open a letter? It’s a lot of extra shit you don’t need but it’s there anyways.

  • source
  • [–] 6 points 5 days ago (3 children)

    How will this affect the vesktop users

  • source
  • hideshow 3 child comments
  • [–] 1 point 5 days ago (1 child)

    It probably won't, but honestly there aren't that many features the desktop client has that you can't just get by using the browser webapp (Keyboard shortcuts, and the "now playing" feature that is a privacy mess, are the two biggest ones that come to mind right now)

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 5 days ago* (1 child)

    I'm pretty sure this is just an experiment:

    • Don't break anything that works
    • The website version of the app can't be replaced
    • The normal discord app is not that memory hungry it's usually below 1 GB for me, maybe consider optimizing your existing codebase?
    • A web based client allows for easier customization, better styling and easier creation of modifications
  • source
  • hideshow 1 child comment
  • [–] 1 point 2 days ago

    Will the rust ai slop be better than the electron humanslop?

  • source
  • [–] -3 points 5 days ago (13 children)

    Why are people on Lemmy using discord?

  • source
  • hideshow 13 child comments
  • [–] 8 points 5 days ago*

    Things I want are held hostage on Discord. If I want to play Motorstorm online, I look at the fan server channel and it has real time lobby stats and chat rooms to get some games going. Just an example. My friends usually use Steam for voice chat.

  • source
  • parent
  • [–] 8 points 5 days ago

    To manage my community more easly and interact with many others aswell plus every friend of my uses it.

    There is no alternative currently that offers a granular permission system like discord's, voice chat and streaming that doesn't also suck in other aspects

  • source
  • parent
  • [–] 3 points 5 days ago

    Someone at work with much more political power, and much less knowledge of how dangerous surveillance capitalism is, insists on using it 'cause they use it all the time and it's functional.

    :(

  • source
  • parent