News for hackers. Stuff that matters.
Re:Electron is flash for the desktop (2016) by ballenf on Tuesday April 11, 2017 @11:27AM (#14088810)
> ... Electron applications are shite in comparison with proper native applications.

Is that true from a user's perspective? The average user I know would not have the idea that Slack is somehow inherently worse than say MS Word or any other truly native app they use everyday. What would Slack gain by integrating better with my Mac?

Slack starts up too fast for me to read the little quotation (penultimate Macbook Pro). I actually wish it was slightly slower because I like those cheesy quotes when I can catch them. Everything feels almost instant. Not bash instant, but as fast as any mainstream messaging app.

I leave it running all the time and get what feels like normal full hours upon hours of battery life. There are apps or browser tabs that I've noticed destroying battery life, but Slack nor Atom nor MS Visual code are on that list for me.

The anti-Electron complaints all kind of feel like the same argument that comes up as each new layer of abstraction gains acceptance. I'm sure there's a lot that Electron can and should improve. Running multiple copies of Chrome does sound awful, but until I read that I didn't know the atrocities it was committing.

Just doesn't feel productive to try to make Electron go away vs. working to improve it or create a better cross-platform abstraction.

Re:Electron is flash for the desktop (2016) by _jal on Tuesday April 11, 2017 @11:36AM (#14088924)
> Is that true from a user's perspective?

It is for this user.

> What would Slack gain by integrating better with my Mac?

Far better resource management, one would hope, for starters. As the article pointed out, when you're measuring your IRC client's memory use in hundreds of megs, there's a problem.

It isn't uncommon for me to need to choose which "essential" apps to turn off to get something done on a maxed-out MBP. So Slack gets turned off, and maybe someone gets annoyed that I don't respond to something, while I run a few VMs in Slack's former memory space.

As far as other things, well, using a platform's capabilities as appropriate is generally considered good form - HCI concerns, and, generally, just people like things to be consistent. I don't know why we're supposed to forget this now.

I personally don't care if Electron goes away or what, but to the extent that I'm forced to run Slack by my cow-orkers' choices, it sure would be nice if it were less of a bucket of ass.

Re:Electron is flash for the desktop (2016) by abdulkareemsn on Tuesday April 11, 2017 @12:16PM (#14089528)
Recently I was doing some mean stack development ram was maxing out 8 GB and system was struggling to run smoothly Mongo alone was hogging around 1.5 GB and webpack was hogging 1 GB there are three seperate expressjs servers hogging 500 mb each

And then there was slack

Re:Electron is flash for the desktop (2016) by ballenf on Tuesday April 11, 2017 @11:48AM (#14089145)
Finally an argument that is concrete and understandable! Seriously, this is the first comment I've read that is tangible as opposed to theoretical. All the other complaints are on the basis of being morally offended by the ratio of resource usage vs. application functionality.

The nice thing about slack is that it will run about anywhere. The app on my phone magically knows if the app is not running on my laptop and will then and only then send me notifications. But, I'm not suggesting this as a solution for you -- best productivity killer I know is having to pay attention to yet another device while trying to get work done.

Depends on your environment, but I have of one very effective and successful coworker who just flat out refuses to use Slack. The number of companies where that is acceptable is probably limited. Unfortunately.

Re:Electron is flash for the desktop (2016) by apetresc on Tuesday April 11, 2017 @01:57PM (#14090665)
> I personally don't care if Electron goes away or what, but to the extent that I'm forced to run Slack by my cow-orkers' choices, it sure would be nice if it were less of a bucket of ass.

For what it's worth, since you seem to like IRC clients so much better, Slack has a built-in IRC bridge: https://get.slack.help/hc/en-us/articles/201727913-Connect-t.... It works just fine, in my experience.

Re:Electron is flash for the desktop (2016) by mikejmoffitt on Tuesday April 11, 2017 @03:02PM (#14091290)
From experience, using the bridge means pinging the admin on slack about it, and convincing them that it's even worth doing, and then being stuck in "The IRC Room", instead of the others rooms in which people are actually communicating.
Re:Electron is flash for the desktop (2016) by abalashov on Tuesday April 11, 2017 @09:42PM (#14094101)
Allow me to humbly suggest:

https://github.com/wee-slack/wee-slack

I use it extensively for everyday Slack, where I don't care much about inline media and inline formatting. And for a text client, weechat + this plugin handle it pretty gracefully.

Re:Electron is flash for the desktop (2016) by mcgrath_sh on Sunday April 16, 2017 @04:11PM (#14127265)
I know I am really late to this, but one of the things I have been meaning to try is running Electron apps that have Web Apps with [Fluid](http://fluidapp.com). I think this may give me the perks without some of the drawbacks. I am not really sure, but it is an experiment I would like to try out.
Re:Electron is flash for the desktop (2016) by hawkins on Thursday April 20, 2017 @11:51PM (#14162986)
I've never heard of Fluid before, but it seems to be a glorified shortcut with minor features such as notification badges. I really can't tell how this can integrate with Electron at all.

Electron would have you write a web app and package it as an app installed to your Applications folder just like any native app. You'll write this code in JS, HTML, CSS and use Electron APIs.

Fluid also would have you write this in JS, HTML, CSS but use Fluid APIs instead. The two compete for the same role in that sense.

Re:Electron is flash for the desktop (2016) by tjl on Monday May 01, 2017 @12:46PM (#14239149)
With Fluid, you don't do anything from the web developer's prospective. The Fluid app just packages a Web site as a separate application. So, what this means that any user can take a Web site and make that a separate app if they want it.
Re:Electron is flash for the desktop (2016) by baddox on Tuesday April 11, 2017 @02:54PM (#14091230)
> when you're measuring your IRC client's memory use in hundreds of megs, there's a problem.

Not really, unless you're using most of your RAM or you treat this as a fundamental principle. I've never checked my Slack RAM usage, and I'm sure it's higher than if they built a great native app, but it's also never had any performance problem with Slack or any other application (okay, except for Eclipse, but I stopped using that when Android Studio came out).

> It isn't uncommon for me to need to choose which "essential" apps to turn off to get something done on a maxed-out MBP

And there's the key. You have a very specific use case that is probably extremely rare. I'm a full-time developer and as far as I know I've never been low on RAM on my first generation Retina MBP.

Re:Electron is flash for the desktop (2016) by michaelmrose on Tuesday April 11, 2017 @03:35PM (#14091632)
People are less likely to be spinning up vms but may have far less ram to start with and the more apps they use that are wasteful of power and ram the more likely this becomes an issue for them.

It is truly strange to hear being resource constrained being described as a special case in computing.

Re:Electron is flash for the desktop (2016) by Volt on Tuesday April 11, 2017 @05:01PM (#14092406)
Last time I taught undergrads (last semester) their computers were far from anything as good as we'd have. If I asked them to run anything remotely demanding, it really taxed their laptops.

We really do need to be more mindful of resource usage. I'd rather write my own lightweight clone of something I want than use an Electron-based hog. There are menubar-only apps that come with an entire Electron dependency.

Re:Electron is flash for the desktop (2016) by baddox on Wednesday April 12, 2017 @02:55AM (#14095391)
Why is that strange for personal computer usage? How common do you think it is for users to experience a performance problem caused by low memory? I'm genuinely surprised that we could apparently have such opposing intuitions. My intuition is that it is exceedingly rare.
Re:Electron is flash for the desktop (2016) by michaelmrose on Wednesday April 12, 2017 @05:44PM (#14102050)
Your intuition is badly formed because it ignores how crappy real peoples computers are. The world is full of really bad computers that people don't upgrade because their computer is a low priority item for them and they have lots of other more important things to put their money towards like food shelter, and medicine.

Further their machines are full of software that runs all the time for no reason including but not limited to multiple redundant antivirus that are trying in vain to scan everything in real time in a vain attempt to prevent the next malware infection from taking hold.

Various services like file system indexing and virus scans run at inconvenient times and render things slower than before.

Laptops are super prevalent because their portability is more important than power. Its not at all unusual to keep using the same machine for 5-8 years as long as it still works.

Real people have bad computers with bad specs and in a massive number of cases the browser is already using a significant portion of the entire computers resources.

Re:Electron is flash for the desktop (2016) by jernfrost on Tuesday April 11, 2017 @12:27PM (#14089646)
The electron apps I've seen don't really have much UI. As soon as you build an app with some complexity it will start being a problem.

As a native Mac developer I can drop in things like a predicate editor for defining filters or queries. They come with Cocoa. I can put in sophisticated table views and tree views. I can connect all of this easily to core data which loads from a database objects on demand without any code needed to be written by me.

You see this sort of shortcuts in the electron apps I've seen. They don't have proper GUI for preference configuration like any Mac app as they can't get that for free. Atom doesn't have a regular file open dialog. I use that a lot, dropping a file into it to jump to a particular location I got open in Finder (file manager).

My preferred editor, TextMate has very little development resources behind it compared to Atom, yet it has a far richer GUI. You got a GUI for creating and editing plugins. Not just editing config files. You got native rich UIs for selecting fonts and colors. You don't have to write font names and color names in some config file.

There is a certain irony in the claim about how stuff like Electron saves you cross platform code, when what is usually not cross platform is the GUI, and the electron apps I've seen has very little of it. Try making something with the complexity of Keynote, Pages or Numbers in electron and I think the lack of a comprehensive set of prefabricated GUI components will start making its mark.

Not to mention the numerous native APIs which exist which you have to duplicate, e.g. for vector graphics, animations, 3D graphics, audio, video, font handling, OpenCL.

How about people with disabilities or internationalization? You got great native tools for doing that, how do you accomplish that in Electron without re-inventing the wheel?

Re:Electron is flash for the desktop (2016) by charlieflowers on Tuesday April 11, 2017 @03:27PM (#14091554)
> The electron apps I've seen don't really have much UI. As soon as you build an app with some complexity it will start being a problem.

Well, VSCode certainly seems to contradict this.

Re:Electron is flash for the desktop (2016) by eyko on Tuesday April 11, 2017 @05:07PM (#14092458)
The GUI in VS Code is basically: a file tree view, an editor area, the command palette overlay, a status bar, and the debugger panel/area.
Re:Electron is flash for the desktop (2016) by speeder on Tuesday April 11, 2017 @12:57PM (#14089959)
I use a macmini for my dev work. Almost every time it freezes out of the blue the culprit was some html based "app" frequently with process nwjs using 100% of cpu and huge amounts of ram.

This includes chrome and electron based stuff

Re:Electron is flash for the desktop (2016) by AlphaSite on Tuesday April 11, 2017 @02:21PM (#14090901)
I actively don't use and discourage people from using Slack where I can because of how poorly it runs.
Re:Electron is flash for the desktop (2016) by ziikutv on Tuesday April 11, 2017 @05:15PM (#14092520)
What about Slack webpage?
Re:Electron is flash for the desktop (2016) by AlphaSite on Tuesday April 11, 2017 @06:09PM (#14092970)
Same issues. The bloat is atrocious.
Re:Electron is flash for the desktop (2016) by mi100hael on Tuesday April 11, 2017 @03:36PM (#14091636)
And because it's a closed-source, expensive implementation of IRC.
Re:Electron is flash for the desktop (2016) by AlphaSite on Tuesday April 11, 2017 @06:09PM (#14092975)
That's not great, but I can live with that.
Re:Electron is flash for the desktop (2016) by eyko on Wednesday April 12, 2017 @04:57AM (#14095945)
With no fuss history
Re:Electron is flash for the desktop (2016) by mi100hael on Wednesday April 12, 2017 @10:58AM (#14098263)
Honestly, though, the in-client search sucks. I'd much rather search archived text IRC logs through some web interface or locally than try and find something from 6 months ago within Slack.
Re:Electron is flash for the desktop (2016) by nojvek on Tuesday April 11, 2017 @11:41AM (#14089016)
I totally agree with you. I only use Slack from we app but I'm a heavy user of VSCode and Spotify. I believe in standardized Web API's rather than a clusterfuck of native API's.

The problem here is the base platform Electron and underlying Chrome/Nodejs

But as consumers we feel when our browser lags, so browser vendors optimize speed over memory and cpu, caching the shit out of everything. The Web is a dangerous place so they further isolate every tab as process, sandbox them and keeps lots or copies of the same thing in RAM because a security flaw is a lot more shameful than a memory flaw.

You are right, electron is a hog. Last I checked all, electron, chromium and Nodejs were open source. We can actually make a difference.

Making noise also makes a difference. When someone complained about VSCode cpu usage because of idle cursor and it blew on HN, next month's release had a fix (for all platform)

The truth is you can't move fast doing native development with different libraries. Electron keeps your dev costs down and allows you to move very fast.

Re:Electron is flash for the desktop (2016) by Gracana on Tuesday April 11, 2017 @12:07PM (#14089424)
> You are right, electron is a hog. Last I checked all, electron, chromium and Nodejs were open source. We can actually make a difference.

Won't that encourage more companies to cut corners? How can producers of quality products compete when other companies can release prototypes that their paying customers finish for them?

Re:Electron is flash for the desktop (2016) by nojvek on Thursday April 13, 2017 @11:00PM (#14112448)
There's the argument "Why should I do it? If I'm paying for it then they should do it"

And there's, "This really sucks, its an open source project, I think I can make a difference that would affect millions in a small way but would still make a big impact overall"

Re:Electron is flash for the desktop (2016) by Sanddancer on Tuesday April 11, 2017 @09:07PM (#14093977)
So use a cross-platform toolkit then like Qt, WxWidgets, Tk, etc. You don't need the bloat of a browser engine.
Re:Electron is flash for the desktop (2016) by catshirt on Tuesday April 11, 2017 @11:50AM (#14089167)
seriously. and skype is a grand example of how shitty a native client can be.

tired of this argument. if you put in the proper effort, your users won't care or notice.

Re:Electron is flash for the desktop (2016) by drdaeman on Tuesday April 11, 2017 @12:12PM (#14089470)
Is Skype native?

Except for the very old 4.x Linux version - which is native Qt - and comparably old Windows ones, I thought, all of the recent versions are webbrowser wrappers (one sort or another) with some occasional native widgets around that.

Re:Electron is flash for the desktop (2016) by drdaeman on Tuesday April 11, 2017 @02:32PM (#14091013)
(Can't edit the post above) But, of course, Skype issues aren't because of their UI nativeness. Their UI layer is... well, tolerable. Heck, I'd be happy if all I'd have to complain about Skype would be a crappy UI.

But I don't think UI implementation has to do anything about why we love it so much. I mean, missing calls and messages every other week, random desync between clients and all the usual rituals that every other group call starts from (you can hear them accompanied with chants "can everyone hear me?", "$name are you here?", "tell me if you see my screen" and "let me drop the call and restart").

Re:Electron is flash for the desktop (2016) by catshirt on Tuesday April 11, 2017 @07:01PM (#14093283)
i think i was still overreacting to prove a point. everything you're saying is right.

my point is, even if i concede native is "better" or whatever, the difference should be negligible for most apps for all users (let alone "most" users).

Re:Electron is flash for the desktop (2016) by matthewmacleod on Tuesday April 11, 2017 @12:10PM (#14089457)
You are of course correct. It's possible to make awful native applications, and good non-native applications.

The sliders mean that you will trade performance off against ease-of-development. It will be easier to ship a basic Electron/web-stack app than a native one for multiple platforms. However, it will be harder to do this is in a high-performance and well-integrated way.

I went through all this with Cordova back in the day when trying to build cross-platform mobile apps. I was able to ship apps quickly, but at the expense of quality – it's okay to do this so long as you are aware of the trade-off.

Re:Electron is flash for the desktop (2016) by catshirt on Tuesday April 11, 2017 @12:20PM (#14089585)
yep definitely. and there is definitely a cost and effort required to make Electron feel as good as native. depending on your feature requirements, this can get really hairy.

i'm just exhausted by the "web apps feel so much worse than native!1" argument which is an over simplification and not a rule.

Re:Electron is flash for the desktop (2016) by Johnny_Brahms on Tuesday April 11, 2017 @01:47PM (#14090564)
Skype for Linux is a web app. It is a lot worse than the old Qt client.

Are the other platforms native? I thought they switched to webrtc in 2015 to be able to just use a simple web window wrapper for all platforms, just not Linux.

Re:Electron is flash for the desktop (2016) by easuter on Thursday April 13, 2017 @03:45PM (#14110315)
The newer skype versions on Windows are web-based.
Re:Electron is flash for the desktop (2016) by brandon272 on Tuesday April 11, 2017 @12:18PM (#14089556)
Slack behaves perfectly fine for me and I don't have incredible hardware. It's non-Electron apps that are typically mentioned by macOS' energy management system as "consuming significant energy", in my experience.

Edit: Mass downvotes; lol ... Just stating my personal experience!