Electron apps are not really apps, they are just web pages with rudimentary heavy-weight browsers included.
If you are about your users' well-being, please, don't use Electron in your project. Using more than 300 MB of RAM and slowing down the whole system just to edit a small text file or send a chat message is a sin.
Some people think and even more people say that Electron is being bashed because it's cross-platform, and this is supposed to rob the FOSS Unix ecosystem of its users because there will be no reason to use it then.
FOSS has always been OK with cross-platfom development, as far as I can remember. Moreover, it always has been FOSS' schtick: almost all significant Linux apps could be compiled for Windows - GIMP, Pidgin, Mozilla, just to name a few. We don't hoard our programs, cross-platformism is encouraged.
No. Electron gets bashed for whole different reason.
And not because it's lazy. Being lazy is a good thing in most cases.
Electron gets bashed because it's lazy AND bad. Because it assumes that everyone is rich enough to have the latest and greatest gear, that memory and CPU are cheap, and they are cheap everywhere, so they can be wasted on bullshit. Because it thinks that optimization is not necessary. Because it's careless with the users' resources.
It reminds me of "Linux" versions of proprietary programs of mid-2000s. Don't sweat it, just slap Wine on it, and ship it for Linux. I used to get angry at stuff like this. But Wine at least didn't hog as much resources as Electron.
And to top it off, you'd think that an app which ships in distributions of at least 100 MB and eat 300 MB of your RAM from the start will at least look the part, right?
Most Electron apps are flat, boring, ugly and almost always a chore to use.
I remember times when Unreal Tournament shipped at 500 megabytes. A full game, and beautiful one at that, by that time. And the kicker? It ran on 32 mb RAM computer. Without 3D acceleration. Slowly, granted, but it did run and was playable. An Electron app would kick in the towel the microsecond it started on such machine.
Только консоль только хардкор. Я уже отвыкать стал от проектирования форточек. Если уж совсем никуда без морды, то на худой конец проще вэб сервер поднять.
@inhosin не, ну "только консоль" это уже другая крайность.
Когда есть такие языки как Rust и Go (который кстати таки научился в компиляцию только нужных объектов из библиотек. Бинарник, конечно, все равно выходит не самый тощий, но уже не сотни мегов как у Электрона) - и тулкитов вроде Qt (который при всей моей недолюбви к нему, является истинно кроссплатформенным), вообще нет никакого оправдания транжирить ресурсы пользователей убогим Электроном, если прямо страсть как хочется кроссплатформы.
@drequivalent А каким кодоредактором сейчас кошерно пользоваться. У меня Atom для всего, что программируется и Brackets для веб.
@inhosin спасибо! VS Code оказалась именно тем, что я искал. Сижу, кропая прожку на Питоне.
@dazai Well, yeah. It's not only app developers who do that though. Self-importance is a human problem, not a computer technology problem. Electron is just a manifestation of that.
If you studied in the university, you know what I'm saying. Every teacher of every subject on your curriculum, no matter how irrelevant to your actual speciality, thinks that their subject is a glorious gift to humanity and the very most important thing ever that you should definitely know, so they won't let you get away with C until you answer the material as if you're going for an A+. Other subjects are just nonexistent to them. And really, what should they do? Give in? No way. That would be going against all they are about!
Thus, the dreaded examination seasons, when you cram 5 subjects across three days.
The game takes around 60MB of memory on average, and runs on about 2% of my i5 CPU.
@drequivalent Yup. The developer is making the choice to force their users to pay thousands of times over for their one-time convenience.
@freakazoid @drequivalent that core reasoning, "...computers are good enough that we don't need to optimize (much or at all)." is behind my personal dislike for most of the bits of tech I genuinely hate.
's why I dislike (most) operating systems almost by default.
Most squabbles (nano/vim/emacs, Mac/Win/Nix/etc) are about *preference*, and at heart I really don't care.
Failure to be cognizant of tech barriers, especially when claiming "moar compatible", is *deeply problematic*.
@eryn @drequivalent Right. It's true that we don't need to use hand-coded assembly anymore (and in fact that's often worse). It's also true that we can often use interpreted or higher-level languages that don't produce such optimal code. And we can use libraries with relatively abstract APIs rather than having everything be purpose-built all the way down. But once you're throwing in a whole browser and two different JS runtimes you've gone too far.
Not applicable for large co’s, ofc, but many Electron apps are made by individuals. Their time and resources are valuable too.
@nornagon @drequivalent Also, we're asking developers to put in the effort ONCE to learn something better, at which point it's more like 20% more effort, if even that. And now they can make more money professionally programming too rather than spending the rest of their lives as "web developers" who can't be bothered to learn any actual programming skills.
@riga Again. Electron gets bashed not because it's accessible.
Electron gets bashed because it's inefficient, wasteful and low-quality.
@drequivalent @freakazoid @nornagon I agree with that, but I wonder if people appreciate how good the ergonomics of the stack is compared to the alternatives. With Electron, I get to use a simple functional architecture that has very predictable properties. I get to use a well-designed language that balances simplicity and safety (Typescript) I get to use an extremely well-documented and supported set of libraries and API's.
Efficiency is something we as developers can choose to reasonably trade off against, it is not the only measure of quality.
There isn't an all-around better solution today for what Electron does. Better on one or two dimensions? Yes, of course. At everything? No.
Wasting people's resources on bullshit is low-quality programming and shouldn't be legitimized. For fuck's sake, the program that put man on the moon was 4 kilobytes in size.
But we need ways to use those nice new paradigms (react and friends) on the desktop without running more blood copies of chrome. “
See also this post of his about tribes: https://josephg.com/blog/3-tribes/
What is it about using more resources than necessary that bothers you? Is it inherently irksome (i.e. you value efficiency for efficiency's sake)? Or is there something beneath that in your value system that makes efficiency important?
@nornagon Efficiency for efficiency's sake, sure. Efficient is beautiful.
But most important, I think the devs should think about not only themselves but also others. The more efficient your shit is, the less pointless work it does, the less time and resources it consumes, the more shit the user wiil be able to do.
Imagine if everybody starts using Electron. When the user starts three simple-ass apps and the home supercomputer they blew at least a thousand bucks on starts to slow down, overheat and make strange noises, that's not good user experience. You'd think that the community have gone insane! So why should Slack or Riot or Atom get a pass?
By pushing bloated crap, we're creating quality of life problems for our users, which are, in the end, our most valuable asset.
re: Electron rant
@drequivalent I would actually be more open to Electron if it was genuinely cross platform.
By that I mean it's *Nix support is brittle and limited. It means it is compatible with a small number of very similar GNU/Linux distros and no one else. With a build system that doesn't even make the most basic allowances for other *nix OSes.
Electron is a death sentence for any kind of userbase on a BSD or most non Ubuntu/Fedora/Arch distros.
@drequivalent "it assumes that everyone is rich enough to have the latest and greatest gear,"
That's what I hate the most, is when webdevs shame people for not buying new hardware, which is wasting money and creating e-trash, to run their app because they couldn't learn any other framework.
I see the same in gamedev communities - Someone makes a "minimalist indie" game in "modern OpenGL" which is code for 'it needs an Nvidia Titan to run' and crashes on Intel. I target GLES2.
@drequivalent Not to mention the "Free RAM is wasted RAM" myth which is so obviously wrong that it's offensive.
Free RAM is the kernel's business. That belief is the Flat Earth of programming.
@drequivalent Really offtopic but once I was debugging a Lua game that was leaking memory.
Someone online told me it's normal for scripting langs to leak memory, that I should get used to it, that I was mistaken.
I told them that based on my knowledge and experience they were full of shit.
Finally I found the bug: I wasn't popping the Lua-C stack, and so it was leaking a stack frame on every game tick.
"Lua doesn't free memory". For fuck's sake. Of course it does.
@CharredStencil and what else interpreted languages are for if not for managing (assigning and freeing) memory and other resources? Granted, they do poorer job of it than manual management, but still.
@drequivalent They apparently thought that every single app just naturally leaked memory, or at least never freed memory when it freed objects. Meanwhile I had a Lua IRC bot running for weeks.
Even worse, I don't think this was the same person who told me that all apps have a busy loop (Not an event reactor!) inside them. There's two of these people out there.
I guess taking an operating systems class and using Qt for a couple years made me an expert in the field. Where's my Phd?
@CharredStencil Free RAM is free RAM goddamnit. That means, it's RAM that I can use for something that is not your app.
@drequivalent Like an instance of Chromium that actually does something useful.
I don't know why anyone uses the Slack desktop app - Running two Chromiums that can't de-dupe their pages must be awful on RAM.
@drequivalent a lotta apps wouldn’t exist on Linux at all if it wasn’t for Electron
others like etcher are full of trackers and other crap, and would probably be better off not existing on linux at all.
and as someone mentioned in another reply, they still dont really exist on linux. they exist on ubuntu, and the webdevs are too busy proclaiming that their app is cross platform to hear the users saying that it doesnt work
If you are a 'tech' bro, the name would imply that you would at least care about tech. We used to be proud of people who would fit an entire OS on a floppy, or make a demo or a game with advanced graphics techniques that could run on a potato with amazing stability and framerate. Methinks, someone who pushes for grossly inefficient frameworks and legitimizes low-quality programming and thinks optimization is a myth is not much of a 'tech', bro.
@drequivalent Not even rudimentary. A full blown browser. And a copy of NodeJS.
@velartrill Apparently so!
Русская нода социальной сети "Мастодонт", части Fediverse - всемирной федерации социальных сетей. Зона общения, свободная от рекламы и шпионажа, теперь и в России.