News for hackers. Stuff that matters.
Re:Improving startup time in Atom with V8 snapshots by dstaley on Tuesday April 18, 2017 @02:17PM (#14141367)
If this was truly that simple, don't you think someone would have already done it? Furthermore, is there even an actively maintained, open source, cross platform, development-focused text editor with native UI components?
Re:Improving startup time in Atom with V8 snapshots by coldtea on Tuesday April 18, 2017 @03:03PM (#14141837)
>If this was truly that simple, don't you think someone would have already done it?

Someone already has done it. An one-man-shop built Sublime Text by himself.

Surely it's not having JS as an extension language as opposed to Python (the only difference between ST and what I propose) that's making it difficult.

>Furthermore, is there even an actively maintained, open source, cross platform, development-focused text editor with native UI components?

There's a "cross platform, development-focused text editor with native UI component" that's working great.

Whether there's an open source editor like that is orthogonal, since what I'm discussing is whether is technically feasible to create such a browser -- and the existence of ST proves that it is (and that's by a single developer: with resources such as that GitHub or even better MS, have, it would be much easier).

The choice of license is just a decision after that.

Re:Improving startup time in Atom with V8 snapshots by nilliams on Tuesday April 18, 2017 @03:28PM (#14142068)
I think the developer behind Sublime Text is widely recognised as an outlier.

>> "Sublime Text 2 is mostly coded in C++ and uses a custom UI toolkit." ... [0]

How many other devs/teams are going to reasonably take that on.

(And how do you think the debugging story of his custom framework compares to Chrome Devtools).

[0] http://stackoverflow.com/a/9201645

Re:Improving startup time in Atom with V8 snapshots by frou_dh on Wednesday April 19, 2017 @08:25AM (#14147203)
> How many other devs/teams are going to reasonably take that on?

This strikes me as a sort of devolving-human standpoint that might lead to someone in 2050 asking how anybody could possibly walk 10 miles unassisted.

In the past, small teams of talented developers have written an entire game + game engine + associated tools from scratch, countless times.

Doing in-depth custom UI development for the desktop as part of creating a text editor does not bin as 'Mountain-moving; Don't even try' difficulty.

Re:Improving startup time in Atom with V8 snapshots by dstaley on Tuesday April 18, 2017 @03:16PM (#14141977)
I don't think anyone is arguing that it's technically impossible to create anything. I was just pointing out that the tradeoffs that Atom accepted aren't simply trivial to solve. Jon has put an amazing amount of work into Sublime Text to get it where it is today; it's not some simple thing to build a great, native text editor. However, it's not like Sublime Text isn't without its own tradeoffs.
Re:Improving startup time in Atom with V8 snapshots by Touche on Tuesday April 18, 2017 @03:15PM (#14141965)
How long did it take to build Sublime Text vs. Electron + Atom? Are the original developers in Atom experienced in C++? How easy is it for 3rd party developers to contribute extensions to each? How do the extension catalogs compare, in size?
Re:Improving startup time in Atom with V8 snapshots by fixed_carbon on Tuesday April 18, 2017 @03:01PM (#14141824)
Qt Creator? Although at this point its UI is a mixture of wrapped native widgets and non-native QML widgets.
Re:Improving startup time in Atom with V8 snapshots by dstaley on Tuesday April 18, 2017 @03:18PM (#14141988)
I wouldn't really call Qt Creator a text editor though.
Re:Improving startup time in Atom with V8 snapshots by jen20 on Tuesday April 18, 2017 @02:49PM (#14141688)
IntelliJ does a good job of it without resorting to Electron.
Re:Improving startup time in Atom with V8 snapshots by cwyers on Tuesday April 18, 2017 @04:44PM (#14142740)
No, it just resorts to the freaking JVM, which is not any more lightweight or native than Electron apps.
Re:Improving startup time in Atom with V8 snapshots by Veratyr on Tuesday April 18, 2017 @05:34PM (#14143154)
I don't think that's true. The JVM is far closer to native code than Javascript, both technically and in terms of actual performance. Here's some synthetic number crunching benchmarks: https://benchmarksgame.alioth.debian.org/u64q/javascript.htm...

Even on the I/O heavy workloads that Node/V8 should be able to handle best, Java is ahead: https://www.techempower.com/benchmarks/

And yes, there are many Java apps that like to eat memory but I don't believe it's as bad or worse than V8/Electron and I don't believe Java is as inherently memory hungry as V8/Electron.

Re:Improving startup time in Atom with V8 snapshots by reissbaker on Wednesday April 19, 2017 @08:35AM (#14147249)
The JVM is a virtual machine, just like V8, and neither is particularly "native." Java is an easier-to-optimize language than JavaScript, mainly because static types give better information to the compiler and prevent certain kinds of hard-to-optimize behavior from being written in the first place.

That being said, as someone who's used both Atom and IntelliJ a fair amount (although my daily driver is Vim), you can definitely see the downsides of using the JVM vs V8 in terms of startup cost. People complain about Atom being slow to start, but IntelliJ is so, so much worse — elsewhere in this thread dstaley mentioned it being almost 4x worse on a test file, and in large projects I've seen IntelliJ take literally minutes to begin being usable. The JVM is optimized for long-running server processes that can afford time to boot and warm up; the V8 team spends inordinate amounts of time ensuring that JS can begin executing quickly, even sometimes at the cost of peak performance. And RAM usage in IntelliJ isn't pretty either.

I don't think using the JVM instead of Electron buys much (if anything) in terms of editor performance compared to writing in native languages, like Rust or C++, and using native GUI toolkits instead of Swing/JavaFX or the DOM.

Re:Improving startup time in Atom with V8 snapshots by Veratyr on Wednesday April 19, 2017 @12:52PM (#14149241)
I don't think IntelliJ vs. Atom is a good comparison for Electron vs. JVM. IntelliJ is doing a lot of things Atom doesn't do, like loading/building an index of all of your code and dependencies in order to auto-complete and show docs on demand.
Re:Improving startup time in Atom with V8 snapshots by dstaley on Tuesday April 18, 2017 @03:07PM (#14141884)
IntelliJ doesn't use native UI components though. Furthermore, Atom can open a single file in 3s, whereas opening the same file in IntelliJ takes 11s (these numbers are from cold starts). This is with clean installs of both IDEs on a 2016 MacBook Pro.