News for hackers. Stuff that matters.
Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @07:14AM (#14629536)
I rather have native app > webapp.

Really don't get the point of Electron, as I never got the point of XULRunner before.

If it is to be a webapp, take advantage of HTML5 features for offline apps, if it is to be native then take advantage of the OS UI/UX features.

Something in the middle just feels schizophrenic from UI/UX point of view.

Re:Pencil – an open-source GUI prototyping tool for all plat... by StevePerkins on Sunday June 25, 2017 @09:08AM (#14629816)
Just a reminder that you're talking about an open source project, sustained entirely by volunteers. I'm sure they'd rather have people contributing, or speaking through their financial donations > complaining that they don't have the resources to write native versions for every platform.

The bottom line is that cross-platform desktop development is HARD.

Qt and Wx eventually push you toward C++, which few people under the age of 40 want to learn. GTK looks awful on every platform.

JavaFX is actually quite nice now, and embedding a Java runtime takes up no more space than embedding Chrome. But you still have to deal with sluggish startup times, and similar complaints as C++... that Java isn't "cool" now, or whatever.

So if you want something that looks decent on Windows, OS X, and Linux, and is written in languages that 19-year olds approve of, then your options are:

1. Write separate native versions for each platform, using C# for Windows, Swift for OS X, and whatever for Linux, or

2. Electron.

If you're a commercial entity, selling products or services for money in the face of competition, then you should probably go with option #1. If you're an open source project or hobbyist, then just go with #2 and take solace in the fact that the people bitching were never going to contribute regardless.

Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @10:48AM (#14630226)
> C++, which few people under the age of 40 want to learn

Thanks for making us aware that it is going to be easier to find jobs in High Performance Computing, Fintech, Games, OS and compiler development, machine learning, GPGPU computing, robotics, automotive industry, database engines, audio processing, medical devices, IoT,....

Re:Pencil – an open-source GUI prototyping tool for all plat... by StevePerkins on Sunday June 25, 2017 @12:04PM (#14630647)
Learn COBOL or RPG, and the world will really be your oyster.

Not criticizing C++ (I'm in my 40's and spent the first several years of my career working with it). Just stating the reality of what people whine about on web forums (when they're not whining that open source developers should do even more free work).

Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @12:18PM (#14630732)
The thing with these youngsters, is than they eventually see that the old guys had some point.

https://news.ycombinator.com/item?id=14613142

Re:Pencil – an open-source GUI prototyping tool for all plat... by type0 on Sunday June 25, 2017 @02:31PM (#14631405)
> JavaFX is actually quite nice now, and embedding a Java runtime takes up no more space than embedding Chrome. But you still have to deal with sluggish startup times,

Startup time for JavaFX is just terrible even in comparison to Electron.

Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @03:15PM (#14631622)
Only if you don't AOT compile to native code, which many on HN seem to keep forgetting about.

There are plenty of options available among commercial JDK vendors, but if you don't want to spend money, ExcelsiorJet has free licenses for non-commercial use.

https://www.excelsiorjet.com/free

Re:Pencil – an open-source GUI prototyping tool for all plat... by natik on Sunday June 25, 2017 @08:15AM (#14629679)
I agree it quite outrageous all the RAM & Size on disk & CPU an electron app requires. But on the other hand what are the other alternative for a one codebase multiplatform app ?

Real OS native UI requires a re-write on each platform unless using libui which is limited to a button, a checkbox and a slider (okay for little app but you won't build a full blown UI editor out of that)

Then there is GTK but it has lots of problems when you want to maintain a multiplatform app, looks ugly on other platform than linux, and performance is not amazing (but with GTK4 and the vulkan renderer it might improve I guess)

At last the only real solution is QT (so it's not like there are zillions of solutions on the native side, there's only QT basically). And with QT if you use C++ then there's no package manager, all that prehistoric qmake stuff , etc... Also visually speaking QT is no more native than HTML, it has to emulate the style of the OS but is not using native OS widgets

Also Electron might feel super heavy, but in the future we might one day have Servo (which seems even more efficient that QT by doing everything on the GPU (just as an example it does glyphs rasterisation on GPU unlike QT)) with either javascript (in this case it will be kind of the same as QT + QML&JS) or with WebAssembly. And concerning the size on disk we could provide it as a dependence common to all app using it (for eg as a FlatPack Runtime on linux).

So right now Electron is outrageous but in the future the situation might improve a lot (with an alternative based on Servo if it ever happens)

Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @08:45AM (#14629752)
Like we used to do in the good old days, before this Web 2.0 craziness, and many comercial apps still do.

Create a small wrapper layer for the supported OSes, which is the option used by most comercial software actually, like Adobe or Office, and many others.

Electron apps basically put the confort of developer in front of the user they are supposed to serve.

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @09:31AM (#14629886)
There is one more thing. Developing in HTML5/JS (with all its ecosystem) is freaking fast in terms of developer productivity. You will probably build full fledge app in shorter time using JS than with C++. So you can deliver MVP to the market faster = profit $$$

And initial group of users are early adaptors anyway. They are usually eager to try new applications even if they are not perfect.

The problem is: "what next?", when users will start complaining about speed or other things.

Should company rewrite original HTML5 based MVP to C++ to gain speed?

Or should they optimize existing HTML5 solution? (many HTML5 apps are running with nearly native responsiveness).

Or something else? Or maybe HTML5 even for MVP is a bad idea?

Re:Pencil – an open-source GUI prototyping tool for all plat... by LeoNatan25 on Sunday June 25, 2017 @11:23AM (#14630403)
How did you make the conclusion that JS is faster than C++? An experienced C++ developer, or better yet, an experience C++ developer team, moves “freaking” fast. The only advantage to the HTML/JS stack is you can get cheap labor from dime a dozen web “devs”. That’s it.

Case in point, look at Atom. Let’s assume your “MVP”, “profit $$$” and what not is somewhat correct. Yet, the amount of engineering time and effort it has taken to optimize that tech to fix things that are trivial in the native world is staggering. How does that fit in your “profit $$$” equation, as an initial core team of experienced C++ developers would have developed with these issues in mind and created a product that is viable in the same scenarios.

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @11:49AM (#14630562)
Ok, maybe I will reconsider C++.

But if you were building such app in C++ what third part solutions would you recommend for building multiplatform GUI? Qt? GTK? What is used now and what will be working/looking good on all three main platforms? (Mac/Linux/Windows)

Re:Pencil – an open-source GUI prototyping tool for all plat... by LeoNatan25 on Sunday June 25, 2017 @09:17AM (#14629845)
Fuck user experience! All that matters to “developers” these days is “hackablility” and “velocity”. The user suffers? It’s his fault he is not using a better device.
Re:Pencil – an open-source GUI prototyping tool for all plat... by ourmandave on Sunday June 25, 2017 @09:51AM (#14629959)
I agree it quite outrageous all the RAM & Size on disk & CPU an electron app requires. But on the other hand what are the other alternative for a one codebase multiplatform app?

If the program fulfills their needs well enough, users don't care what it's written in or how fat it is.

And multi-platform matters. I've seen blog posts on how to get Sketch running on Windows using a Mac VM. Talk about using system resources.

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @09:17AM (#14629846)
I think Atom gave bad fame to the Electron (it's ironically because Electron was made for Atom).

Atom is bloated and slow and people think that each Electron(or Chromium) app is bloated and slow.

But for example VSCode is a lot faster (and consumes less RAM, from what I just checked) than Atom. So it's not Electron to blame...

Re:Pencil – an open-source GUI prototyping tool for all plat... by falcolas on Sunday June 25, 2017 @09:44AM (#14629935)
Not only Electron to blame. Electron still gets a decent share of the blame, simply because it's a memory and CPU hungry runtime.

Many consumer laptops are still shipping with only 4 gigs of ram - that's not a lot of space for Electron apps.

Re:Pencil – an open-source GUI prototyping tool for all plat... by laumars on Sunday June 25, 2017 @02:15PM (#14631337)
I noticed you've been downvoted. I find it amusing the expectations some people have about the hardware consumers should be running. While many on here, being a geek community and all, will have relatively decent systems; most normal people would rather keep a system as long as they can. Not to mention those in poorer communities or countries who cannot afford newer tech.

In fact it was only this year when I upgraded a work colleagues personal laptop from 2GB to 4GB.

Re:Pencil – an open-source GUI prototyping tool for all plat... by falcolas on Monday June 26, 2017 @10:09AM (#14636896)
Meta:

Downvoting is an accepted method of disagreement on HN. It's a problematic stance IMO since downvotes grey out the text, making dissenting opinions impossible to make out if they're unpopular enough.

Back on topic, 4GB laptops are incredibly common, especially in retail stores. Getting a laptop with 8 GB of memory frequently requires looking online (most folks still buy their computers from retail stores) and customizing your order.

For example, I just visited both Dell and System76, and except for the gaming laptops, all of them default to 4GB of ram, and adding more (while not terribly expensive) requires thought and action on the consumer's part.

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Monday June 26, 2017 @01:34PM (#14638685)
It's interesting. What browsers do people use on this machines? Though according to wikipedia most popular browser is Chrome: https://en.wikipedia.org/wiki/Usage_share_of_web_browsers

but it seems weird, because Chrome is such a memory monster (it usually takes almost all RAM memory you have on your machine and additionally disk space if you are running of RAM). I have 16GB ram and Chrome takes me 10GB of it and ~1GB of disk space.

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @04:58PM (#14632140)
I've been downvoted because HN has Dislike Button which encourages people to downvote things they personally don't like instead of making constructive arguments ;)
Re:Pencil – an open-source GUI prototyping tool for all plat... by laumars on Sunday June 25, 2017 @05:52PM (#14632396)
If it's any consolation I did provide a counterargument and got downvoted for it.

As for the 'flag', that's not the same as downvoting. Or at least shouldn't be used in the same way although I have lately seen a disappointing number of comments marked as "flagged" which shouldn't have been. (There's some guidance about flagging posts here: https://news.ycombinator.com/newsguidelines.html). Downvoting is something that's only available to members above a specific karma threshold (2000 IIRC).

Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @05:54PM (#14632408)
I upvoted you.
Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @05:05PM (#14632186)
BTW how to downvote comments on HN? I sometimes "flag" them to mark as downvote, but I'm not sure if flag is the same as downvote.
Re:Pencil – an open-source GUI prototyping tool for all plat... by semi-extrinsic on Sunday June 25, 2017 @05:55PM (#14632411)
You need karma > 500 to downvote. And even then, you cannot downvote replies to your own comments etc.
Re:Pencil – an open-source GUI prototyping tool for all plat... by LeoNatan25 on Sunday June 25, 2017 @11:34AM (#14630461)
> I think Atom gave bad fame to the Electron And GitHub “desktop” client, and Slack “desktop” “app”, and Git Kraken… The list goes on.
Re:Pencil – an open-source GUI prototyping tool for all plat... by laumars on Sunday June 25, 2017 @10:03AM (#14630012)
I've found every Electron app I've used to be terrible. This includes VSCode. In fact compare VSCode to Adobe Brackets - both of which are using web technologies as their framework but Brackets is a node.js application while VSCode is Electron, and you'll see just how badly Electron performs when even compared to similar technologies.
Re:Pencil – an open-source GUI prototyping tool for all plat... by hex13 on Sunday June 25, 2017 @11:43AM (#14630514)
I used Brackets maybe 2 years ago and it was very slow back then. Maybe now they have optimized it, I don't know.
Re:Pencil – an open-source GUI prototyping tool for all plat... by laumars on Sunday June 25, 2017 @11:53AM (#14630585)
Oh it's definitely slow compared to the likes of Sublime Text or vim. But compared to Atom, VSCode, etc Brackets feels a lot snappier and less memory hungry.

This is what I've experienced on 4 different hardware platforms however all running ArchLinux so YMMV.

Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @10:33AM (#14630163)
VSCode is visibly slower than Emacs on my Ubuntu travel netbook.

I only use it due to its Rust's support.

Re:Pencil – an open-source GUI prototyping tool for all plat... by vogre on Sunday June 25, 2017 @07:44AM (#14629610)
From the UX point of view working with local files without logging in somewhere is very precious. From the dev point of view Electron provides the fastest way to make cross-platform app in high-level language.
Re:Pencil – an open-source GUI prototyping tool for all plat... by pjmlp on Sunday June 25, 2017 @08:36AM (#14629730)
Only if the she/he doesn't know any other tech besides web.

Electron apps are the clear example of putting developer comfort before the user UI/UX.

Re:Pencil – an open-source GUI prototyping tool for all plat... by LeoNatan25 on Sunday June 25, 2017 @09:16AM (#14629838)
“Developer comfort” are strong words. It’s putting JS web “dev” comfort, as I certainly wouldn’t feel comfortable writing anything in JavaScript.