1112
My poor RAM... (loot.buckodr.ink)
submitted 9 months ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top controversial new old
[-] [email protected] 116 points 9 months ago

I love having multiple copies of Chromium installed on my system at the same time. 250 MB internet messengers please!

[-] [email protected] 19 points 9 months ago

You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?

That's because developers stopped min/maxing storage and started bundling all of an application's dependencies with it instead of trying to rely on globally installed packages and frameworks that can break or be missing or lead to dependency hell.

No one likes larger download sizes and more storage being used but the tradeoff is by and large worth it.

[-] [email protected] 23 points 9 months ago

Isn't this about performance and not storage?

Making and managing an electron app is easier, but it is possible (with more work) to have clean install/uninstall, a nice UI, and consistent regular updates while still being fast and efficient.

Better programs will always need more work to create.

I am curious about what other options there are, and why Electron is what a lot of people go with.

[-] [email protected] 20 points 9 months ago* (last edited 9 months ago)

Options:

Native app for each platform:

  • Pros: native code is going to be the fastest possible to run and have the smallest dependencies
  • Cons: have to write all your code 3+ times in different languages, have less time to develop new features and optimize existing code.

Progressive Web App:

  • Pros: single app, write once runs anywhere, no signing keys, no lock in, can be hosted anywhere, runs on everything
  • Cons: artificially limited by Apple on iOS, doesn't have access to deep operating system resources, only what's exposed through the browser, limited multithreading capabilities

React Native:

  • Pros: single app, write once, runs anywhere, similar enough to React Web that a lot of developers will have an easy time learning it
  • Cons: still kinda finnicky, not super easy to make it work and perform well across all platforms, you'll probably still end up having to write some native code, not actually CSS / React Web so still a bit of a learning curve coming from there

Qt:

  • Pros: single app, write once, runs anywhere, low level / compiled means that it will be small and performant
  • Cons: written in C++, harder to find developers for, harder to implement modern out of the box niceties that CSS gives you for free, poor devX compared to react

.NET MAUI (formerly Xamarin):

  • Pros: single app, write once, runs anywhere, low level / compiled enough to be more performant than most web apps out of the box, well documented
  • Cons: written in C#, easier to find devs for but not many experts in it specifically, MVVM model is not as pleasant of a devX as React, again no css

Electron:

  • Pros: single app, write once, runs anywhere, has full access to operating system resources and deep multithreading if needed, can be as simple as web app in a container or as complex as something like VSCode.
  • Cons: takes up more storage and ram since you're bundling chromium with your app
load more comments (2 replies)
[-] [email protected] 15 points 9 months ago

People choose Electron because they already know how to write Chromium apps (web dev). It's really just ease of development, using another framework takes more specialized skills than using Electron.

That's why everything is Chromium these days.

load more comments (5 replies)
[-] [email protected] 15 points 9 months ago

You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?

Not really. Well maybe I take it for granted having switched to Linux.

I mostly hate Electron for the dumb RAM usage.

load more comments (1 replies)
[-] [email protected] 14 points 9 months ago

250 MB internet messengers please

Hum... Make them some of those large-sized megabytes if it's Teams.

[-] [email protected] 9 points 9 months ago

Teams is truly exceptional, more so because the same company has VSCode.

Both show the inherent lag and sluggishness of Electron apps, but they're on totally opposite ends of the spectrum. Which is wild. It's like a case study or something.

load more comments (1 replies)
[-] [email protected] 79 points 9 months ago* (last edited 9 months ago)

Wouldn't it be great if there was a way for all these electron apps to share the same runtime so people don't have to bundle it with their applications.

You know, I bet if the applications without the runtime are small enough, you could probably stream them directly from the internet without even downloading anything up front!

I guess that shared runtime would need some way to browse the applications....

^(vscode gets a pass)

[-] [email protected] 28 points 9 months ago

Use the system webview, you cowards!

Developers bundle all of Chromium, because they're afraid the OS webview will have a different browser engine. Testing is too hard…

This is such a terrible excuse — usually the same app runs in browsers too, so it already has to deal with even wider variety of browser engines.

[-] [email protected] 12 points 9 months ago

Tauri moment

[-] [email protected] 11 points 9 months ago* (last edited 9 months ago)

I will say that unless something's changed in Windows recently, the win32 API webview is still a vestigial version of internet explorer due to Microsoft's obsession with non breaking changes (not saying that's a bad thing)

Given I lived through those years as an engineer, I completely understand people wanting to avoid that particular ancient eldritch horror.

Edit: apparently there's webview2 now based on edge (and therefore chromium), I take it all back

[-] [email protected] 10 points 9 months ago

I mean even for something like .NET, apps install the version of the runtime they need in a shared space, so that they can be used by everyone desiring that specific version.

load more comments (1 replies)
[-] [email protected] 22 points 9 months ago

You mean instead of downloading the app, we could just browse through them? That's a revolutionary concept. We could call them hyper-apps!

[-] [email protected] 7 points 9 months ago* (last edited 9 months ago)

Outside of PWA shortcomings, I believe there's a way to have a .NET application run a WebView with Edge (Chromium). I believe Windows 11 has both pre-installed now.

I don't even want to run NodeJS anymore. I would run all my server apps on headless Chromium if I could.

load more comments (2 replies)
[-] [email protected] 70 points 9 months ago

We live in a timeline where desktop apps all run in a browser, whereas mobile websites are all their own apps.

[-] [email protected] 29 points 9 months ago

mobile websites are all their own apps

Yeah, written in react native :D

load more comments (1 replies)
[-] [email protected] 9 points 9 months ago* (last edited 9 months ago)

For now at least, PWAs work on Android and I believe many apps already use electron or something similar under the hood

load more comments (1 replies)
[-] [email protected] 49 points 9 months ago

It seems every new shiny technology today tries its darndest to short-circuit 40+ years of advances in OS virtual memory design. Between Electron and Docker, the entire idea of loading an image into memory once and sharing its pages among hundreds of processes is basically dead. But at least there's lower support burden!!!1111

[-] [email protected] 31 points 9 months ago

Docker is just a lightweight container that has the app and OS all in one package. It uses the underlying kernel of the host system. No where near the same as electron apps.

[-] [email protected] 19 points 9 months ago* (last edited 9 months ago)

Except each container has its own libc and any other dependencies. If any linked binary or library has a different inode, it gets loaded separately. I would say it is indeed quite similar, even if the images in question here aren't hundreds of megabytes in size like with Electron.

load more comments (5 replies)
load more comments (5 replies)
load more comments (2 replies)
[-] [email protected] 44 points 9 months ago

World Wide Web was not intended to be an app framework.

[-] [email protected] 29 points 9 months ago

Internet was not intended to be worldwide, it was for military purposes. Still, we all evolve.

[-] [email protected] 11 points 9 months ago

Yet Internet just scaled up to handle worldwide traffic, while WWW evolved into mess noone is able to implement anymore.

load more comments (9 replies)
[-] [email protected] 9 points 9 months ago

Still, we all evolve

Speak for yourself,nerd

[-] [email protected] 11 points 9 months ago

What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?

Most attempts to build that just lead to a worse version of it.

I'll be the first to admit it's bloated to all hell after 25 years of people stacking crap on top of more crap, and it's perilously close to being completely controlled by Google, but it is what it is.

[-] [email protected] 21 points 9 months ago

What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?

Doom. It runs on every-fucking-thing

load more comments (3 replies)
load more comments (3 replies)
[-] [email protected] 44 points 9 months ago
load more comments (1 replies)
[-] [email protected] 43 points 9 months ago

I HATE ELECTRON I HATE ELECTRON I HATE ELEC

[-] [email protected] 18 points 9 months ago

Electron? More like cringetron

load more comments (2 replies)
[-] [email protected] 21 points 9 months ago

Electron is awesome, badly coded apps just suck. Look at Voyager for Lemmy, it's great and it's just a web app.

[-] [email protected] 22 points 9 months ago

Electron apps are nice in some ways, but use a ton of memory

I usually don't mind electron apps too much, but I do prefer native apps

[-] [email protected] 11 points 9 months ago

Voyager is made with Ionic. The difference with Electron is that in Ionic, trough Swift/Kotlin, shows a WebView from the System Browser (mobile only) while Electron “installs” Chrome each time (desktop only).

WebApps are great, but Electron is just too much

[-] [email protected] 11 points 9 months ago

No, it's not nice. Looks good only on Windows where everything have unmaching look anyway.

load more comments (4 replies)
[-] [email protected] 19 points 9 months ago

At this point JavaScript is Java. Write once, deploy everywhere.

[-] [email protected] 18 points 9 months ago

And no, my fellow PHP devs, “Native” PHP's also not it!

[-] [email protected] 18 points 9 months ago

If I have to load elements from the web just to use the electron app properly, I’d rather use a web app and load the whole page each time and not have the tracking.

[-] [email protected] 15 points 9 months ago

That's why I got 32GB ram when I upgrade my PC. I don't give a fuck to how many ram they use now.

[-] [email protected] 16 points 9 months ago

This is the same coping mechanism as "just build another 4 lane highway. That should solve the traffic issues". You are just shifting the problem.

load more comments (11 replies)
load more comments (2 replies)
[-] [email protected] 14 points 9 months ago

Folks in this thread complaining about Electron I think miss the point. It is a trade-off. It is designed to allow engineers who have a web dev skillset to write desktop apps. For those like me who want to write the occasional hobby app - it's great. It's also great for orgs to be able to have cross functional teams. Just like React Native allows this for the mobile world. This could be because they're small and can't afford specialist native engineers for each platform they want to support - or it could be that they want to spend their money in other areas and happy to trade off app performance. If it was as lean or as performant as native apps there would be a lot of people in this thread looking for work.

load more comments (5 replies)
[-] [email protected] 11 points 9 months ago

Wait until Tauri will gain popularity.

[-] [email protected] 12 points 9 months ago

Yeah, then we can have marginally more responsive web apps.

Seriously though, web apps are usually just optimized like shit in addition to using chrome.

load more comments (6 replies)
load more comments (1 replies)
[-] [email protected] 8 points 9 months ago

Tja in a world where every OS has its own stupid little UI system, language and IDE..

load more comments (9 replies)
[-] [email protected] 8 points 9 months ago* (last edited 9 months ago)

Well, people tend to pick the easiest way to achieve an objective, even though the solution is not simple nor optimised.

load more comments
view more: next ›
this post was submitted on 11 Sep 2023
1112 points (97.4% liked)

Programmer Humor

31214 readers
1206 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS