Live data from Hacker News

Electron considered harmful

drewdevault.com

181–190 of 256 posts

Re: Electron considered harmful

#181

Earlier quoted context omitted.

Even if the app is smaller on drive, it still takes ~200mb in ram for even the smallest apps.

Dropbox itself takes 200Mb and its a simple python app. Google drive takes 300Mb. VSCode takes about 100Mb of ram with a project opened right now. Even my Emacs takes 250Mb and I literally live inside it. All of them have at least 2Gb of virtual memory being mapped to them. Yet I still have 9Gb of free ram. If you want to go against bloat, you might just as well uninstall every single software from your computer, inc…

Each of those apps does a lot more than the most common use for electron: "online messengers"

Also, you're arguing in typical FYGM fashion. Not a good look.

Re: Electron considered harmful

#182

I recently had to decide on a GUI technology for a file manager I'm developing [1]. Electron is sexy, but unfortunately takes way too long to start for my purposes. I ended up with PyQt: Pros: + Fast startup speed + I can use Python (and its vast ecosystem) + Qt has good ready-made components for eg. displaying a list of files (which is exactly what I need) Cons: - Compiling Qt (which I have to do for various reasons…

A file manager would not be a good use-case for Electron. Especially if you don't intend to run it in the browser (which really would make no sense.) For the very reason you outlined - startup times. The average use-cases of file managers are being opened and closed very often. Electron is rather aimed at long-running applications you don't usually restart, like Atom and VSCode. Microsoft could've ported VS to other…

I just start recently a file manager in Electron just for fun. I decided to use electron for a couple of reason.

My everyday work is in Java, JavaScript everyday, I wouldn't use Java in my free time for sure. But I do like JavaScript now with Babel/TypeScript. I did in the past worked with wxWidget and pyGTK but I found that building UI with React is more convenient and flexible.

UI performance are on par for this type of application, plus fetching file information from node is also pretty fast. But if I ever encounter performance issue, it's quite easy to redo the bottleneck in c/c++ with node. And pretty soon in the browser with webassembly.

Memory consumption is less than my Finder process (with all the opened helpers). But if I compare application like VS, VSCode and Intellij. Electron memory usage should be in between a C++ and Java apps.

The challenge would be to make it start/open really fast (now for the prototype it's like 1 second). But I guess it's possible to do the same thing as Nautilus/Windows File Manager/MacOS Finder and have a background process running.

Before the line between language and framework were more sharp. But I think with the evolution of the language and framework like electron, the line is getting a bit more blurry. Great apps could be written in electron as they can be written in a native framework. End users will be the real judges.

Re: Electron considered harmful

#183
post #176

Earlier quoted context omitted.

Electron is a cross-platform desktop framework based on a web stack. http://electron.atom.io/

How does it compare to https://github.com/electrode-io

Sorry, I assumed you were already familiar with electrode.

As detaro says, it's for web apps, not desktop ones. Afaik its mostly boilerplate for node+react.

Re: Electron considered harmful

#184

Earlier quoted context omitted.

Are you suggesting all dynamically typed languages are "terrible"?

The only languages I can think that share those properties are Perl (5, don't know about 6) and the retired Visual Basic. There is more there than dynamic typing.

Not sure what I'm missing. Ruby? Python?

Re: Electron considered harmful

#185

Earlier quoted context omitted.

The point you're actually making is that the decision to build a desktop app with Electron is almost always a business decision and not a technical one. If you already have all this SPA code that you built, it's going to be cheaper to re-use it and provide the same UI to the end user that they already know from your SPA. Forget for a second that the performance will be terrible because it's not native code. Forget fo…

> Not for the HN purists. Is that necessarily a bad thing? I'll throw a great counter-example to you, Mattermost. It's a great open source project that uses Electron to build a client app for just about every single platform. Have you maintained a cross-platform app for Windows, OSX, and all the various flavor of linux? I have, it's hell. You have compiler differences, ui semantic differences and a litany of per-plat…

I also have, and would keep on using Java, Qt, wxWidgets than bothering with Electron, and I do have my share of web projects.

Also for all the kids out there, Electron is the second coming of the MSHTML ActiveX engine.

I didn't like it then, surely don't like it now.

Re: Electron considered harmful

#186

Earlier quoted context omitted.

Dropbox itself takes 200Mb and its a simple python app. Google drive takes 300Mb. VSCode takes about 100Mb of ram with a project opened right now. Even my Emacs takes 250Mb and I literally live inside it. All of them have at least 2Gb of virtual memory being mapped to them. Yet I still have 9Gb of free ram. If you want to go against bloat, you might just as well uninstall every single software from your computer, inc…

Each of those apps does a lot more than the most common use for electron: "online messengers" Also, you're arguing in typical FYGM fashion. Not a good look.

I was merely comparing an Electron app (VSCode, not at all an "online messenger") to average apps running on the desktop because your original comment implied "200Mb for the smallest apps" which isn't true.

Re: Electron considered harmful

#187
post #108

Earlier quoted context omitted.

The arrogance in it, though, is that because people who like JS are "obviously" wrong, the reason must be that they don't know (enough) other programming languages or don't know them well enough. I have used a number of different programming languages before JS, a couple of them more extensively and for a longer time than JS. I like JS. I understand its flaws. I also understand that all programming languages are terr…

First, X-only programmers are obviously wrong, whatever is the value of X. That said, yes, somebody ought to love JS in a not blind way. Big numbers work that way. If that's you, I don't think those comments are for you. All languages have different flaws, every flaw relevance varies by context, and contexts are incredibly subjective. Yet, some contexts are much more common than others, and many people preach in supp…

I did C, C++, Java, PHP, VBA and JS and can't tell why so many people have constant beef with JS. I mean especially after all major platforms have adopted ES2015.

Re: Electron considered harmful

#188

sigh First off, JS is a perfectly usable language. In some respects, it's even great: of the "big three" scripting languages (Python/Ruby/JS), it's the only one that got Lambdas right, and also got closures right (unlike, say, Python). It has sometimes-quirky syntax, and some odd semantics, but they don't bite as often as you'd think. Second off, I would say that this article is right about the bulk of Electron: It's…

Hello again, qwerty'. Thanks for stepping up on the JS issue :-) There are many good languages out there, "when used as directed". Alas, out here in the flyover country of Sacramento, there is really only demand for 3 kinds of jobs: Java, C#.NET (falling off), and some Javascript, ignoring the long tail of one-of-a-kind shops. Given those choices, I'll take the Javascript. Java 8 lambdas are clumsy to use to assemble…

I couldn't agree more with this. Just the fact that functions are a first class type in JS already makes it better than many other languages.

Another thing that JS is great at is the flexibility it provides: objects are very general and you can do almost anything with them.

Anyone would care to explain why does JS take so much hate?

Re: Electron considered harmful

#189

Earlier quoted context omitted.

Hello again, qwerty'. Thanks for stepping up on the JS issue :-) There are many good languages out there, "when used as directed". Alas, out here in the flyover country of Sacramento, there is really only demand for 3 kinds of jobs: Java, C#.NET (falling off), and some Javascript, ignoring the long tail of one-of-a-kind shops. Given those choices, I'll take the Javascript. Java 8 lambdas are clumsy to use to assemble…

... and it's been ages since I did any TK (tcl/tk) :-)

I don't do much, but it's always pleasant when I do.

But where I my manners? Hi Robo. :-). It's been a while. Actually, it's been so long that I only hazily remember the contents of our discussion.

Re: Electron considered harmful

#190

Earlier quoted context omitted.

It's not as bad as I thought, but Python doesn't actually have lexical scope, not really. But the LEGB rules mean that it should still work as you expect.

It does if you're using Python 3, which has the nonlocal keyword for lexical scope.

Finally. But that should really be default.
Post reply on HN