News for hackers. Stuff that matters.
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:37AM (#16436402)
> It is a huge productivity boost for programmers at the expense of making computers slow.

It's a productivity boost for web developers, who don't have to learn a new language, and for companies that can hire cheap web developers instead of more expensive desktop developers. It's not a productivity boost for someone who knows (or is willing to learn) .NET or Qt.

Re:Electron 2.0.0 beta by laurent123456 on Thursday February 22, 2018 @04:41AM (#16436420)
Users benefit from it too since the alternative to Electron often is not .NET or Qt but no app at all, especially on Linux.
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:54AM (#16436480)
As far as I'm concerned, I'd rather have no app at all (and use an alternative) than have an Electron app suck users away from the potential native alternative.
Re:Electron 2.0.0 beta by thiht on Thursday February 22, 2018 @05:00AM (#16436505)
So don't use it and use the web version. A potential native app is of no interest to me compared to an actual full featured Electron app.
Re:Electron 2.0.0 beta by majewsky on Thursday February 22, 2018 @05:23AM (#16436598)
In some alternate reality, reasonable resource usage is considered a feature.

Meanwhile, in our universe, it's somehow considered reasonable to expend nearly six gigawatts (= 51 TWh per year) on a number-guessing game that will totally revolutionize global finance some day.

Re:Electron 2.0.0 beta by placebo on Thursday February 22, 2018 @07:46AM (#16437166)
Resource usage in this reality will only become reasonable when there will be a noticeable penalty involved in unreasonable usage, but I guess it boils down to what you define as reasonable: If a noticeable penalty is measured by the end user then - sorry, enough users just don't care, which enables this technology to continue to gain popularity. If there was a law that companies need to pay a percentage of the energy their applications use then you'd quickly see everybody moving not only to native apps, but to the most efficient native apps.

In the meantime, the invisible hand is doing it's thing. Time will tell what it's thing will look like.

Re:Electron 2.0.0 beta by pasabagi on Thursday February 22, 2018 @03:02PM (#16440878)
I think a brief look at the wiki page for 'Anthropocene' tells us exactly what the invisible hand is up to.
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @05:06AM (#16436528)
If the Electron app exists, there's a lot less incentive to write the native one.
Re:Electron 2.0.0 beta by OberstKrueger on Thursday February 22, 2018 @06:04AM (#16436754)
See Slack. If Slack were still some plucky startup, I can understand it using Electron. But it's been around for a while now, and a more performant native application doesn't seem to be coming anytime soon.
Re:Electron 2.0.0 beta by laurent123456 on Thursday February 22, 2018 @07:10AM (#16436992)
Skype for a long time only had an outdated application on Linux. Now that MS converted it to Electron, it's available and regularly updated. The truth is, even for huge companies like Microsoft, the cost of doing a Linux-specific app is not worth it given the small user base, but with Electron they get this for free so they do it.

This is even more true for resource-limited open source projects, as cross-platform gui-based ones are difficult to get right, but Electron makes that easier.

Re:Electron 2.0.0 beta by danieldk on Thursday February 22, 2018 @10:34AM (#16438213)
Skype for a long time only had an outdated application on Linux. Now that MS converted it to Electron, it's available and regularly updated.

And now Mac users get the same terrible Electron app. The problem is that companies are not just making Electron apps for Linux users. They are replacing native well-integrated Mac and Windows applications by Electron apps (Skype) or do not consider writing native apps (Slack).

So, we had nicely integrated applications with Automator workflows, consistent shortcuts, consistent look and consistent feel. And we are replacing them by things that do not fit into the platform at all. No thanks.

Re:Electron 2.0.0 beta by karpodiem on Thursday February 22, 2018 @10:23AM (#16438126)
Now I've heard it all - a company with a seven hundred billion dollar market cap can't afford it. Come on. They can absolutely afford to do native Windows / MacOS / Linux cross platform. They're lazy/don't want to.
Re:Electron 2.0.0 beta by alsetmusic on Thursday February 22, 2018 @11:57AM (#16439017)
> Now I've heard it all - a company with a seven hundred billion dollar market cap can't afford it. Come on. They can absolutely afford to do native Windows / MacOS / Linux cross platform. They're lazy/don't want to.

That’s a straw man argument. The parent said that Linux development might not be worth the cost. They didn’t say anything about the ability to pay.

Re:Electron 2.0.0 beta by v_lisivka on Thursday February 22, 2018 @04:35PM (#16441615)
So we, linux users, actively promoting alternatives for Skype, to increase cost of ignoring us.

«Team, M$ killed Skype for linux, I cannot use it anymore, let switch to something else, like Slack.»

Re:Electron 2.0.0 beta by RaleyField on Thursday February 22, 2018 @03:04PM (#16440900)
They can afford it. They can also afford to put a man on the moon, but it isn't necessarily financially reasonable for them to do so. Think of Microsoft as a collection of teams, each team can't afford to spend "Microsoft" money on its project unless its strategically important. The fact that we don't have native app probably indicates that Microsoft thinks Skype is past its peak of popularity. Thinking of many competing products I understand why.
Re:Electron 2.0.0 beta by gbersac on Thursday February 22, 2018 @12:26PM (#16439297)
They can do it but if it's not profitable, they won't. It's not being lazy, it's being smart in the capitalist sense.
Re:Electron 2.0.0 beta by karpodiem on Thursday February 22, 2018 @12:29PM (#16439333)
I'm fine with that, just call it like it is. This is what Microsoft truly thinks of developing a 1st class open-source solution - not worth their time because it's not profitable enough. So they'll give you a second class solution with the assumption you'd rather have that then nothing.
Re:Electron 2.0.0 beta by xioxox on Thursday February 22, 2018 @10:46AM (#16438310)
Skype used to have a small, snappy and useful app for Linux. Now that MS converted it to Electron, I no longer use it. Qt makes multiplatform apps trivial. Even I, as a hobbyist free software developer, can provide binaries for Linux, Windows and Mac.
Re:Electron 2.0.0 beta by jrs95 on Thursday February 22, 2018 @11:44AM (#16438887)
A lot of people, myself included, actually preferred the Linux version of Skype.

But to be honest, I'd rather have no GUI app on Mac/Linux at all than have it basically be a requirement to waste resources on Slack or whatever other crap and to have developer energy tied up in an editor as shitty as Atom.

Re:Electron 2.0.0 beta by amedvednikov on Thursday February 22, 2018 @08:50AM (#16437497)
I'm working on a native client for Slack, Skype, Twitter etc.

It's only 90 KB (!)

https://eul.im

Re:Electron 2.0.0 beta by mamcx on Thursday February 22, 2018 @12:45PM (#16439493)
How you do this? Probably some of us could guess, but maybe will help people that only know electron :)
Re:Electron 2.0.0 beta by amedvednikov on Thursday February 22, 2018 @12:47PM (#16439521)
Cocoa on macOS, WinAPI on Windows, GTK on Linux.
Re:Electron 2.0.0 beta by stephenr on Thursday February 22, 2018 @12:43PM (#16439478)
Is this the one that uses OpenGL or something to render everything (ie nonnative text controls etc)?
Re:Electron 2.0.0 beta by amedvednikov on Thursday February 22, 2018 @12:47PM (#16439514)
Not any more. Now it uses native controls.
Re:Electron 2.0.0 beta by stephenr on Thursday February 22, 2018 @12:51PM (#16439551)
Oh nice, I need to check this out then!
Re:Electron 2.0.0 beta by blackoil on Thursday February 22, 2018 @09:23AM (#16437681)
Is it 90kb installer or complete app? Also what are using to build the interface?
Re:Electron 2.0.0 beta by amedvednikov on Thursday February 22, 2018 @09:37AM (#16437781)
It's the complete app. Cocoa on macos, WinAPI on Windows, GTK on Linux.
Re:Electron 2.0.0 beta by v_lisivka on Thursday February 22, 2018 @04:53PM (#16441792)
Nice joke. Repository is empty. Source archives are empty. Binary release for Linux: 404.
Re:Electron 2.0.0 beta by sincerely on Friday February 23, 2018 @08:29AM (#16446157)
the dev is using github as a bug tracker, not as a place to host code. if thats’s a problem for you feel free not to download it
Re:Electron 2.0.0 beta by v_lisivka on Friday February 23, 2018 @05:03PM (#16450018)
The dev released source archive for Linux to compile code by yourself. Empty source archive.
Re:Electron 2.0.0 beta by amedvednikov on Friday February 23, 2018 @07:16PM (#16450777)
This is not true. Nothing has been released for Linux yet.
Re:Electron 2.0.0 beta by v_lisivka on Sunday February 25, 2018 @05:48AM (#16458309)
This is true. Nothing has been released for Linux yet.
Re:Electron 2.0.0 beta by Aelius on Thursday February 22, 2018 @07:09AM (#16436991)
Luckily Slack has the IRC and XMPP bridges. can't imagine any other protocols with a wealth of highly performant clients to choose from.

Unlucky for me, my admins refuse to enable the bridges and also won't grant me an API key for use with the weechat slack plugin.

I hate Slack so much. Slow and miserable and unconfigurable and just crashes at least once a month.

Re:Electron 2.0.0 beta by detaro on Thursday February 22, 2018 @07:22AM (#16437035)
Sadly, Slack also happily breaks the protocols in their bridges, e.g. producing invalid IRC usernames. So even though our Slack has the bridge enabled, I can't login to it since it wants me to put a dot in my nick.
Re:Electron 2.0.0 beta by mateuszf on Thursday February 22, 2018 @06:04AM (#16436750)
If the Electron app exists, often the alternative is no app at all.
Re:Electron 2.0.0 beta by swiley on Thursday February 22, 2018 @06:03AM (#16436746)
I would rather run something in wine or run nothing at all than have to run an electron app. It's that bad.
Re:Electron 2.0.0 beta by pluma on Thursday February 22, 2018 @07:40AM (#16437129)
Well, I'm a Linux user and I strongly disagree. Looks like opinions are indeed like a certain posterior orifice.
Re:Electron 2.0.0 beta by h1d on Thursday February 22, 2018 @06:12AM (#16436783)
How bad is it to run Electron apps on Linux?
Re:Electron 2.0.0 beta by pizzapill on Thursday February 22, 2018 @06:19AM (#16436815)
Slack uses ~ 2 GB of Ram and ~ 10% CPU when idle. I used it for a short while but now I'm just leaving a Slack tab open in my browser. Its exactly the same functionality-wise.

Basically I'm fine with Electron apps but I have yet to find one that I need and can't be replaced by a browser tab.

Re:Electron 2.0.0 beta by danielbarla on Thursday February 22, 2018 @06:52AM (#16436933)
Comments like this make me wonder what's going on exactly. Surely your browser tab should now be using ~2GB of Ram and ~10% CPU, since it's the browser, HTML and JS part of Electron that's causing all that?

To be honest though, since my VS Code instance is sitting at ~500 MB (all processes together) and 0%, I'd wager it's not actually Electron itself that's at fault. It probably is incredibly inefficient compared to pure native code, and probably makes it easy to write inefficient code, but still, that's quite heavy usage you're referring to.

Re:Electron 2.0.0 beta by pizzapill on Thursday February 22, 2018 @07:22AM (#16437036)
My guess is that a lot of memory in the browser is shared.

Another commentor in this thread wrote that VS Code is incredible efficient for a Electron app.

Re:Electron 2.0.0 beta by danielbarla on Thursday February 22, 2018 @08:16AM (#16437313)
That could certainly account for some of the memory usage. I'm still confused about why there would be a 10% cpu usage on one, and not on the browser version (especially if they are equivalent, or even share underlying code).

VS Code certainly is efficient for an Electron app, and I'm sure it's really hard to achieve that level of efficiency. To be honest though, I use it side by side with Visual Studio itself, and on many metrics, it eats its big brother for breakfast (e.g. [1])... and that is a native app. One can argue that it's apples and oranges, and that the two are not equivalent, but we have an interesting counterpoint. While I'm sure performance is heavily weighted in favour of native, it seems like it's certainly surmountable.

[1] https://twitter.com/id_aa_carmack/status/695013979807047680?...

Re:Electron 2.0.0 beta by zlynx on Monday February 26, 2018 @12:34AM (#16463348)
My theory on Slack's ridiculous CPU use is animated graphics. If some of those are on the screen the CPU use is at least 10%.
Re:Electron 2.0.0 beta by jrs95 on Thursday February 22, 2018 @11:49AM (#16438942)
My theory is that their code is shit. It shouldn't be surprising given that their Chief Architect wrote a Medium post (Oct 2016) in which he cited concurrency as one of the primary benefits of PHP, and advocated for "curl'ing to localhost" to achieve parallelism.
Re:Electron 2.0.0 beta by calcifer on Thursday February 22, 2018 @06:57AM (#16436946)
On my laptop running Slack Linux 3.0.5 with 3 workspaces & several dozen channels, it idles at 0% CPU and ~550MB RAM (see screenshot [1]).

[1] https://i.imgur.com/juQbGW7.png

Re:Electron 2.0.0 beta by oselhn on Thursday February 22, 2018 @07:27AM (#16437060)
Comparing it to similar native app like pidgin it is still about 10 times more.
Re:Electron 2.0.0 beta by calcifer on Thursday February 22, 2018 @10:47AM (#16438325)
With 10 times the features, it’s not at all unreasonable.
Re:Electron 2.0.0 beta by laurent123456 on Thursday February 22, 2018 @07:43AM (#16437151)
That's also roughly what I see on Windows for my Electron app [0]. 0% idle CPU and about 200MB of RAM. That's large but acceptable compared with other non-Electron apps running, like Sublime Text (170MB) or Thunderbird (320 MB).

[0] https://imgur.com/tMhEwtp.png

Re:Electron 2.0.0 beta by piracykills on Thursday February 22, 2018 @09:09AM (#16437596)
You have some choice native apps - Sublime is Python, which is rather horrible with memory usage and Thunderbird essentially embeds a browser just like Electron apps.

Compare VSCode or Atom with Emacs or Gvim for something more native.

To pick some apps off my desktop right now:

- Emacs with a pile of extensions, 22 MB

- SpeedCrunch, 13 MB

- SumatraPDF, 19 MB

- MS Word, 101 MB

Re:Electron 2.0.0 beta by vopi on Thursday February 22, 2018 @02:11PM (#16440440)
Uhh sublime is written in C++ with it's own custom UI the toolkit iirc. It only uses python for scripting.
Re:Electron 2.0.0 beta by laurent123456 on Thursday February 22, 2018 @09:28AM (#16437710)
In my list of applications that are always active, Firefox and ConEmu are also over 500MB too. The exception is Total Commander (amazingly, still compatible with Windows 3.1), which is only 20MB but it's more the exception than the rule.
Re:Electron 2.0.0 beta by pizzapill on Thursday February 22, 2018 @07:21AM (#16437028)
Haven't been using it since ~ 2 years. My data might be out of date.
Re:Electron 2.0.0 beta by megaman22 on Thursday February 22, 2018 @09:40AM (#16437806)
If it's a .NET app on Linux, you just run Wine, and you're all set.
Re:Electron 2.0.0 beta by jampekka on Thursday February 22, 2018 @09:55AM (#16437913)
This is the weird elitist argument again. I've done my share of native UI development, and it's total pain compared to HTML/CSS/JS. The tools are crap, the compile cycles too long, the languages to restrictive, the APIs too ad-hoc, the layout engines too crappy, the technology support (eg. multimedia) lagging too many years etc etc.

The native libraries had decades to fix this mess, yet they're still by and large the same as decades ago. Will not miss them.

Re:Electron 2.0.0 beta by alexbanks on Thursday February 22, 2018 @03:36PM (#16441133)
> It's not a productivity boost for someone who knows (or is willing to learn) .NET or Qt.

You do not understand what a productivity boost is if you think learning a totally new language and framework is a better choice than using the tools already available.

But also if your logic were correct, we'd all still be writing C.

Re:Electron 2.0.0 beta by JPKab on Thursday February 22, 2018 @11:41PM (#16444292)
.net or qt don't offer all of the beautiful ui experiences available for the web. The latest and greatest in ui tech is now on the web in the form of JS/React/css.
Re:Electron 2.0.0 beta by beojan on Friday February 23, 2018 @04:00AM (#16445105)
Yes they do, with XAML and Qt Quick respectively. On the desktop, I'd rather have the normal menu + toolbars layout though.