News for hackers. Stuff that matters.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tejinderss on Saturday April 08, 2017 @04:45AM (#14066015)
Personally I think it's a biggest mistake to use browser engine for a text editor. We already knew how slow and clunky the browsers are and thanks to vscode and atom our text editors are becoming the same. I would stick to sublime text and vim for as long as I could. /rant
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by flohofwoe on Saturday April 08, 2017 @04:55AM (#14066042)
Did you actually give VSCode a try before making such statements? I use both (neo)vim and VSCode (with vim key bindings, sacrilege!) daily. Vim starts up faster (vim is instantly vs about 1 second for VSCode), but once you're in the editor it depends what you do in it. For instance the standard python syntax highlighter in vim is much slower in vim for files with a few hundred to a few thousand lines of code compared to VSCode. Setting up a C++ dev environment and debugger via vim plugins is hit and miss, in VSCode it's just a few seconds to install the extension, and step-debugging is snappier then in 'native tools' (e.g. Xcode).

TL;DR: it's not Electron or Javascript which makes editors slow, it's how the code is written.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by abrkn on Saturday April 08, 2017 @09:23AM (#14066774)
I switched from Atom to VS Code a few weeks ago and find VS Code's performance to be excellent. Haven't used Atom since.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by swozey on Saturday April 08, 2017 @12:25PM (#14067666)
Were you a heavy Atom plugin user? I'm afraid I'll leave and all of the great plugins won't convert.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by andrewguenther on Saturday April 08, 2017 @01:52PM (#14068065)
90% of my Atom plugins were built-in for VSCode.

* Terminal built-in

* Sublime style Alt-O for header file switching

* Minimap

* Javascript/Typescript support made a lot of my plugins obsolete

I have language plugins installed for Dockerfiles, protobuf, and a few others, but VSCode felt really complete out-of-the-box. I didn't feel the need to install a ton of plugins to make it useable like I did for Atom.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by F2 on Saturday April 08, 2017 @01:20PM (#14067921)
Which plugins?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by dolzenko on Saturday April 08, 2017 @11:58AM (#14067523)
Any idea on what exactly VS Code did better to achieve that performance compared with Atom?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by killercup on Saturday April 08, 2017 @01:43PM (#14068013)
Plugins don't run on the UI thread IIRC
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @04:46PM (#14068928)
You do. They also have some really smart people(I'm assuming more than one, but at least one has posted on HN about editor optimizations they have made) who seem to pull out all the stops on monaco to produce a very fast "smart" text editor.

Lots of good architecture decisions made. The marriage with TypeScript has also worked out well; it's on fire and coffee is smouldering. This helps with getting people to jump in and contribute.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tjoff on Saturday April 08, 2017 @05:02AM (#14066067)
"TL;DR: it's not Electron or Javascript which makes editors slow, it's how the code is written."

It would not have been humanly possible to get something like Spotify (we have lists of text and icon-sized images) so resource intensive in any other language.

Now if you want to spend ten (hundred?) times the effort to actually make javascript do something decent I truly hope you get pleasure from that sadistic adventure.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by flohofwoe on Saturday April 08, 2017 @05:13AM (#14066096)
I don't know, writing extensions for VSCode in Typescript is actually quite pleasant. Sure it would be better to have a super-performant, super-small, cross-platform runtime environment. But what would that be? Qt? Java? .NET? Or another roll-your-own UI kit?

PS: I think Spotify should have simply stayed in the browser, the desktop app is redundant.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tjoff on Saturday April 08, 2017 @05:26AM (#14066131)
Why not Qt? And, since this is Microsoft, why not take this opportunity to develop the backend in .NET core.

But I yes the biggest impact javascript will have on mankind is that noone will ever be bothered to create a good foundation for cross platform applications.

The desktop app is absolutely paramount for Spotify to stay relevant. Not sure if I've seen or heard of anyone using it in the browser (not that that is relevant, but I'd stop using it the very second I can't use it as a standalone app).

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:16PM (#14069596)
> the biggest impact javascript will have on mankind is that noone will ever be bothered to create a good foundation for cross platform applications

Why isn't Electron a good foundation for cross platform apps? The only possible negative to Electron is that the runtime is gigantic. A decent tradeoff if it means for example the VS Code team can support three OSes and push out rapid updates. I really can't see any downside to this, what am I missing?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by roblabla on Saturday April 08, 2017 @07:33AM (#14066456)
Because Qt is a huge library. And it's not even really native outside of Linux KDE (though it's the closest we'll get cross-platform wise).
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @02:48PM (#14068328)
It is huge, but so is Electron.

It's as native as it gets, it imitates native widgets perfectly and allows the designer to easily recreate every element of a particular OS' HIGs with the use of stylesheets and native code.

In before "doesn't look native in my macOS": Because the people writing in cross-plat tools usually don't care about getting every detail right, they just want their app to run well everywhere. But Qt does allow the developer to nail those details without too much effort if he actually cares.

The only problem with Qt is C++.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by roblabla on Saturday April 08, 2017 @08:18PM (#14069794)
Been doing some research about my problems with qt. I found some interesting stuff.

In qt6, there will be "native components" that use the actual underlying OS widgets[0]. They'll be less stylable, but will integrate better with the native look and feel. That should take care of the annoying cross-platform problems.

The other problem left is how big it actually is. As it turns out, it's possible with the LGPL to statically link your program and still comply with the license[1]. Basically, you just need to provide a way to download the .o files so they can be relinked against a different version of Qt.

Thanks to this, it should be possible to create (relatively) lightweight, statically-linked binaries of Qt software.

As far as the C++ is involved... There are qt bindings for just about every other language out there. Just today, bindings for go were released[2].

The future is bright for qt and cross-platform apps.

[0] http://blog.qt.io/blog/2017/02/06/native-look-feel/ [1]: https://news.ycombinator.com/item?id=4302517 [2]: https://news.ycombinator.com/item?id=14068525

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Monday April 10, 2017 @06:58PM (#14083311)
> As far as the C++ is involved... There are qt bindings for just about every other language out there.

Absolutely not. And the ones that do work are ginormous. The Go bindings are LGPL licensed, meaning they aren't an option for most people until Go plugins are available across the board, at least.

With that said, QML does have plenty of bindings, thankfully. And indeed, Qt's future looks bright, while Gtk's uncertain, so the former is definitely the saner option.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Johnny_Brahms on Saturday April 08, 2017 @09:27AM (#14066785)
I don't want to be a part of the anti-electron crowd,but for something like a text editor qt will most certainly be smaller than electron.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @04:51PM (#14068960)
VS Code didn't start out like you think it did. More akin to life forming in a petri dish vs sitting down to design the Visual Studio replacement.

From what I recall piecing together it came about internally as MS due to monaco and TypeScript. I'm under the impression it was a TypeScript dogfood/dev environment project. It worked out well and they threw it over the fence to the public where it caught fire.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by z3t4 on Saturday April 08, 2017 @01:39PM (#14068003)
What's the user benefit of a (JavaScript) "desktop" (Electron, nw.js) app vs the same app as a web (browser) app , given that the web app has all the features of the desktop app, when the app won't work without the server ? (if you can't run the server yourself)

Benefits for a web app (non-desktop):

  * User don't have to download the "browser" (Electron or nw.js)
  * The user don't need "install" permissions
  * The app can be accessed via an URL
  * The app runs in a VM (a browser) that don't give full (root) access like a Electron/nw.js app does.

btw, I did not know Spotify had a web app. There's only a tiny link to it at the bottom of the page, impossible to find unless you really look for it, witch is probably why no one is using it. P.S I'm now enjoying Spotify via the web app after not using it for years because I don't like "desktop" apps (for the reasons above)
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by yoz-y on Saturday April 08, 2017 @06:53PM (#14069502)
Not à Spotify user but in general: - a native app can have global shortcuts (very important for a media player) - you don't accidentally refresh a native app - native apps don't get purged from memory at random - UI is generally better, keyboard shortcuts are more consistent
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by seangrogg on Saturday April 08, 2017 @06:55PM (#14069517)
As a web developer that has never touched electron I would imagine the benefit is simple: * One API that "just works" * Guaranteed caching of necessary assets * Access to native features (such as simplified access to the file system)

I could totally see all of this on the browser. But then the file system needs to go to the cloud, we need to consider hipster browsers (like k-meleon and omniweb), and we have to deal with the browser determining how our assets are cached and evicted.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by obmelvin on Saturday April 08, 2017 @03:23PM (#14068530)
It is much easier to navigate to the desktop app than to hunt through browser tabs to change the song etc.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:17PM (#14069600)
A browser has very limited access to the file system. That's a death knell for a text editor.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by derefr on Saturday April 08, 2017 @02:48PM (#14068332)
Is Spotify's resource-intensiveness due to things it's actively doing in Javascript (i.e. a lot of procedural code running all the time), or is it due to things it sets up the DOM to do (i.e. a really complicated page that the renderer chokes on)?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by z3t4 on Saturday April 08, 2017 @05:16AM (#14066103)
use a stepping debugger to see what it does. then remove stuff that dont add value.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Razengan on Saturday April 08, 2017 @07:08AM (#14066375)
VS Code uses 13% CPU when idle due to blinking cursor rendering

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

Edit: Ah a bug. I still hate apps that don't use my OS's native UI controls though; even if you can stomach the inconsistencies in look and feel, you DO most definitely lose out on many features that the OS would give you for free.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by flohofwoe on Saturday April 08, 2017 @07:22AM (#14066416)
That was fixed a few days later with the March update: https://github.com/Microsoft/vscode/issues/22900
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by maccard on Saturday April 08, 2017 @07:29AM (#14066440)
That was a bug and can easily happen in native software too.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by hashhar on Saturday April 08, 2017 @09:15AM (#14066742)
And the biggest point is, it was a Chromium bug. Recently the Chromium team also breaked special keys (Home, PgDown, PgUp, End, Insert etc.) over RDP which caused a lot of issues for people using VSCode.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @04:55PM (#14068987)
Wow, how do you even break keys over RDP from inside your app?! Do you have a link; I'm curious about the root cause.

Some here may recall that early VS Code had a but where drag to highlight and menu option highlighting on mouse-over was busted in Virtual Box. So crazy and also a chromium bug.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by hashhar on Saturday April 08, 2017 @09:02PM (#14069925)
The issue contains a link to the related Chromium bug where I think you can follow up.

https://github.com/Microsoft/vscode/issues/24107

I don't know for a fact that it is RDP but it's the common factor among other people with the same issue.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Saturday April 08, 2017 @05:00AM (#14066059)
Personally I think that trotting out this argument in every single post about VSCode/Atom/Electron/etc. serves absolutely no good purpose at this point (other than upvotes or the pleasure of expressing an opinion, perhaps), but I'm happy to be corrected.

That said, I'm also still using Sublime Text / vim primarily because they do feel faster on startup and handle big files well.

But I think rationally it would make sense for me to move to VSCode, because 1) my code editor is almost always open, and 2) I rarely need to edit really large files, and 3) VSCode is plenty fast for pretty much all other use cases and offers a whole bunch of advantages over ST.

Atom I'm less sure of. It seems to get faster every few months that I give it a spin, but it still feels 'laggier' even in normal use, which is definitely a problem for me.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @10:41AM (#14067125)
It serves a very important point: showing that mediocrity will not be silently tolerated.

I understand that productivity is important and a significant number of web developers can't seem to learn anything else except JavaScript or worse, don't want to, but such things as professional pride, craftsmanship and excellence do exist and are very appreciated.

Those things represent the opposite of building software applications in JavaScript. I don't know why others criticize such apps, but that's why I do it: they are normalizing flawed software and a lousy experience and mixing it with extreme arrogance.

I've had this deep disagreement with various people ever since web apps were invented. The best of the best of these apps sucked then and they still suck now and are a waste of everybody's time.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @01:03PM (#14067850)
Come on. There are lots of JS developers who care a lot about "professional pride, craftsmanship and excellence".
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @01:32PM (#14067974)
Building desktop (or mobile) apps in JS is not compatible with craftsmanship, nor is it compatible with excellence.

To those that truly care about excellence and don't merely pay lip service to it, there is only one way of building: using that platform's native toolkit. For project or ideological reasons one can make a compromise and use something like Qt, Xamarin or wxWidgets, etc.

This leaves JS native-like apps for those that care about doing things fast by only using the knowledge they already have. That would perhaps be understandable, if they admitted that it's a big quality and performance compromise. Yes, we tried our best, but this is the only thing we could do with this budget/team/whatever. Totally fine.

Instead we get uppity devs claiming that desktop apps will be killed and bragging about how they're delivering the best experiences. It's this toxic cocktail of arrogance and lack of ability that is intolerable.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by derefr on Saturday April 08, 2017 @03:37PM (#14068581)
> This leaves JS native-like apps for those that care about doing things fast by only using the knowledge they already have.

What about the devs who care about shipping a lockstep-feature-parity multiplatform app, and are willing to go through whatever hassles it takes to get "write once, run [with platform-conformant controls + behaviors] anywhere"? Because that—and not "doing things fast" or "only using the knowledge they already have"—is the argument I hear for developing Electron apps.

What would you suggest for those developers? Just give up on their desires and do 10x as much work (likely meaning being 10x as many people) to ship for every platform, like Facebook? Or go through months/years of initial effort to develop a cross-platform UI toolkit abstraction to build their app upon, like the browser chrome of Firefox and Chrome is targeted at? Use something like Java's Swing, and pretend that's better just because "at least it's not Javascript"? Ship a GTK or QT app that doesn't look/work natively on half your platforms?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pseudalopex on Saturday April 08, 2017 @08:01PM (#14069751)
When I've worked on multi-platform apps, the case for "write once, run anywhere" has always boiled down to developer hours and current knowledge. Sometimes someone suggests that a single GUI will mean less code and fewer bugs, but the ones with cross-platform GUI experience know that's optimistic.

"10x as much work" is a huge overstatement, especially when platform conformance is a goal.

For native look and feel, I'd pick Qt over Electron any day. The catch is that no toolkit can abstract away all the platform-specific details. A minimum-effort Electron app looks like a web page; a minimum-effort Qt app falls into the uncanny valley.

There can be good reasons to choose Electron! But it also has drawbacks, and it isn't the only option.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @02:23PM (#14068225)
> To those that truly care about excellence and don't merely pay lip service to it, there is only one way of building: using that platform's native toolkit.

Since you are clearly an expert here, can you explain to me how an immediate-mode API from the 1980s in which all painting is done via the painter's algorithm and context switches to kernel mode on every operation is superior to a declarative model that allows for global optimizations to minimize state changes and batch draw, in addition to using hardware Z-buffers to minimize overdraw?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Monday April 10, 2017 @03:55PM (#14081986)
I'm not an expert and I don't want to be one, I just want to have access to quality tools (preferably open source) and I want the majority of developers to use those tools. Native UIs are efficient, web UIs aren't. It doesn't matter to me that they're built using painters, batch drawing or pixie dust as long as the API is sane and performant.

I think your post is a nice summary of the thinking that got us here in the first place: experts always looking at the possible future optimizations and not stopping to think at the present quality or if it's at all reasonable to build complex UIs in a document mark-up language.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @02:55PM (#14068362)
Aren't you the guy behind this https://github.com/pcwalton/libui-rs ?

Kind of strange to write bindings to something you hate so much. Or was it a changed of mind in the last 11 months?

With that said, I do agree with you, but there's not a single solution out there that does this efficiently, a browser is a ginormous level of indirection after all.

But if you want to spearhead such a thing I'm sure as hell interested.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @05:00PM (#14069012)
What is this comp sci politico? Somebody writes a few bindings and that's evidence of their UI party affiliation?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @05:20PM (#14069097)
What the hell? I knew the bindings because I've been investigating GUI solutions for Rust for the past few days, and was very surprised to see the author speak so poorly of a solution he poured time on; now people treat technical doubts as some sort of witch hunt?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @06:48PM (#14069488)
I apologize if I miss-read that. At first it seemed like you were questioning his opinion based on his binding work.

This whole section has a very polarized/aggro vibe that's putting me on guard against false dichotomies and dogmatic arguing :| I need a chill pill myself.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @03:10PM (#14068454)
Yeah, I wrote those bindings, though they're incomplete, and libui's memory management is so broken that I lost interest in finishing them.

It's a fair point, however. :) Much of my interest in libui was (a) to provide platform support for the browser engine; (b) to provide a solution for simple projects that don't want large dependencies. I've always believed the native UI frameworks from the '90s to be poor fits for modern graphics hardware. But sometimes your workload is so simple you don't care about whether your UI is as fast as possible, and minimizing dependencies is a more important criterion. That's where simple native UI layers can be a good fit.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @03:48PM (#14068637)
> I've always believed the native UI frameworks from the '90s to be poor fits for modern graphics hardware.

Is there anything out there taking a better approach that works for native desktop? React Native and Flutter look like interesting solutions, but RN attempts to do all the hard work with JS, which is far from ideal; and Flutter is limited to Dart (which not that much better) and isn't getting any traction on desktop outside of the experimental Fuchsia.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pseudalopex on Saturday April 08, 2017 @09:26PM (#14069985)
To me, "native toolkit" means standard UI elements, not the lowest-level API.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:35PM (#14069664)
In today's world of text editors, I'd take VS Code over anything. Anything at all. This notion that webapps must be bad is ludicrous.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:33PM (#14069658)
How large of a file are you talking?

I just opened a 9.75mb JavaScript file in VS Code and it edits it quite well. It syntax highlights the top of the file immediately, and it does take quite a while for the highlighting to work its way down the file (I'd say about 20 seconds). But as far as editing goes, you can jump anywhere in the file and edit without any hesitation, instantly.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by criddell on Saturday April 08, 2017 @07:49AM (#14066495)
People invest quite a bit of time into their tools. When something new comes along and gains traction, it threatens that investment. Maybe VSCode gets so popular that $EDITOR stops getting updated?

Otherwise, there really isn't any reason why I should care what tools you use.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by nottorp on Saturday April 08, 2017 @05:41AM (#14066174)
Well, the main question is still "why oh why?". It's not like Microsoft can't afford to pay developers to do something native.

Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by taude on Saturday April 08, 2017 @08:48AM (#14066647)
As a VSCOde user on both Mac and Windows, I'm not sure they needed to do anything native. Seems like wasted work, when what they've ended up with is plenty fast and looks good in both environments.

I'm not using VSCode to edit one-off files from my terminal. The use case is for your folder-based projects. I generally open it once/week or reboot, etc, and finds it loads, mounts my folder and I'm done in the amount of time it takes me to grab a sip of coffee.

I think too many people base speed because they're used to one-off editing files directly from their filesytem. At this point in time, I only do this when editing config on remote servers and such.

EDIT: I just went and opened VSCode from my terminal and it took about 3.5 seconds to load up an entire React Native project on a three year old 11" MacBook Air.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:40AM (#14067425)
Yeah, "Visual Studio" is a big, slow, bloated mess, that when working on a typical project, especially web projects will just freeze out regularly and plugins will stop the world, doing who knows what.

VS Code actually loads faster, doesn't freeze as much, and in general runs faster than any IDE I've ever used. And I've used a few. There are faster code editors, but VS Code is a bit more than most of them, but less than a full IDE typically is.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by jeremy_wiebe on Saturday April 08, 2017 @11:15AM (#14067303)
They have done something native...for many, many years. It's called Visual Studio.

VSCode has found a place in my workflow now and I don't care what language or platform they've used. It's proven to be more full-featured than competing editors and they are improving it much faster than other editors (based on my completely non-scientific, possibly biased observations).

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by simooooo on Saturday April 08, 2017 @07:53AM (#14066501)
Probably to not have to write a cross platform UI library and encourage contributions by using a wildly popular language
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Saturday April 08, 2017 @05:57AM (#14066210)
> Well, the main question is still "why oh why?". It's not like Microsoft can't afford to pay developers to do something native.

Yeah I do share that question with you and would love an answer from the team!

> Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.

Could you clarify what you mean with that? Accusing me of being 'deceptive' seems a bit unwarranted and disproportionately antagonistic, considering that as far as I can tell I've made a clear distinction between VSCode and VS (meaning Visual Studio proper), and considering that I can't think of any reason why I would choose to deceive in this matter. Where did I go wrong?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by TeMPOraL on Saturday April 08, 2017 @06:00AM (#14066221)
I think the parent didn't mean to accuse you, but Microsoft, for re-using the "Visual Studio" brand in a product so completely different that it deserves a distinct name.

Reminds me of how pissed I was with Amazon calling their line of regular Android tablets "Kindle Fire". I don't know what the sales teams there think, but for customers, the "Kindle" brand was literally synonymous with "that e-ink screen thing".

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:43AM (#14067452)
I'm more pissed about VS for Mac than VS Code... if I were to call out naming something badly.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by nottorp on Saturday April 08, 2017 @10:45AM (#14067147)
That's correct, I was talking about Microsoft.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Sunday April 09, 2017 @03:36AM (#14070965)
Ah, fair enough. Was confused there for a bit.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:42AM (#14067443)
The editor "Monaco" was already written... it was for VS Online. They took the already written editor, Electron (Atom Core, etc) from the Atom project (another editor) and grafted the two together. Atom's editor at the time was horribly slow... Electron + Monaco actually worked well.

They've spent the time since then working on actual features... while they'd probably have just barely released anything if they had to do it all in C++, and wouldn't have nearly the depth of extensions they do.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by hliyan on Saturday April 08, 2017 @07:28AM (#14066435)
Historically, I have found that dismissing an otherwise effective technology due to performance is a bad idea. Fifteen years ago I dismissed Java in favour of C++ because at the time the JVM was about 25 times slower than native. Now I regret not investing more time learning Java. I suspect the same will be true of HTML/JS apps in the next few years. Hardware and performance improvements will likely erase any differences.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @10:23AM (#14067043)
I also dismissed Java for a long time until a few years ago when I developed a mobile project in Java and unfortunately did encounter over-architecting and lack of interest in performance as expected. On the other hand, I can't say I disliked using the language, even if I found it quite restrictive. Java is a pragmatic tool, it's not about fun or expressiveness but making a team of average or better engineers build something that works. And it does that very well.

Now that I've had that experience, I know it's not for me, but I can understand when a tool like Java makes sense.

JavaScript vs anything else is not the same as C++ vs Java, because JavaScript is not an effective technology to build software applications in. It never was and likely won't become one.

It has a weak type system and non-existant standard library. Must be run in a packaged browser. Anything UI-related must be done by using a document markup language and style sheets. The fact that any app developed in it is guaranteed to be inefficient and sluggish is just the cherry on top.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @01:15PM (#14067897)
> It has a weak type system

Dynamic typing is useful. The "native" Objective-C is dynamically typed, for example. Static typing is useful too. If history has shown anything, it's shown that both dynamic typing and static typing have their places, and trying to argue that one is superior to the other in all circumstances is one of the most boring arguments imaginable.

> non-existant standard library

This is more or less a deliberate design choice, because there are many implementations of JS and that multiplies the probability of incompatibility. Consider the headaches that have arisen between Microsoft's STL and GNU's STL...

> Must be run in a packaged browser

Node? This is obviously false.

> Anything UI-related must be done by using a document markup language

It's an effective retained mode tree of nodes, with a whole lot more optimizations than any native toolkit I know of. (Look at how the childNodes array is implemented sometime, for example; no native toolkit does the kind of caching that browsers do...)

> style sheets

Style sheets are a great idea. They're becoming increasingly popular for native development nowadays (Qt, GTK, etc.)

> The fact that any app developed in it is guaranteed to be inefficient and sluggish is just the cherry on top.

I'm as much of a critic of current browser design as anyone, but this is mostly the fault of old browser designs. The Web platform has a lot more potential for performance than things like the Win32 API, as I've elaborated on in many other posts.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @01:42PM (#14068008)
It's useful, but when that's the only tool one has, it becomes a liability. I like using both JS and Python where it makes sense, but building a medium-sized or large app in such languages is asking for trouble.

Some teams make enough of an effort that they are able to deliver such an app. That should not be encouraged, but rather criticized as encouraging development practices. To be clear: they can do whatever they want in their projects. I have a problem when they recommend such methods to others, without being honest about the pitfalls and effort involved.

Re standard library: the STL is currently working great! JS would kill to have something as stable and high quality as the STL.

Re node: I am not aware of any desktop or mobile apps using node. Isn't that a server-side technology?

Re markup: does it matter how much optimized it is and how much caching it does when in the end it's still slow?

Re style sheets: they're great when used for styling, like in Qt (not sure what GTK is doing). But that doesn't scale when building widgets and doing positioning.

pcwalton, web apps have had the potential to do X, Y and Z better than native apps for the past decade. At one point web developers need to talk less and deliver.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @02:20PM (#14068205)
> I like using both JS and Python where it makes sense, but building a medium-sized or large app in such languages is asking for trouble.

There have been tons of reliable large apps written in dynamically typed languages. This is, again, a tiresome argument.

> the STL is currently working great! JS would kill to have something as stable and high quality as the STL.

The STL took nearly a decade to get hash tables. And for years, users suffered from Microsoft and other vendors taking very different approaches to template expansion, causing no end of ifdef hell. JS never had such issues.

> But that doesn't scale when building widgets and doing positioning.

Huh? How does flexbox "not scale"? Positioning is just one aspect of style.

> At one point web developers need to talk less and deliver

I've been working on browsers for 7 years, and on most of those weekends, thanks.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Monday April 10, 2017 @04:19PM (#14082167)
The tide seems to be turning against dynamic languages because developers are getting tired of the poor performance, fragility and maintenance difficulty. We just needed to see some innovation in the static typing camp: the transition from Objective-C to Swift is a great example.

A typical app can be made pretty reliable with enough testing effort and a good process, so I'm not surprised that large apps have been written in dynamically typed languages, although I am now curious which apps you had in mind. Can't think of anything the scale of e.g. Photoshop, Oracle or Linux.

Re STL: Really? :) I'll take missing hash-tables (dictionaries are fine) any day over no library. I don't know which period you're referring to with the ifdef hell, but at least for the past decade I can't think of any STL compatibility issues. Perhaps you can be more specific here? In any case, JS never had such issues because back then it was being used to make text blink. Now that it's facing more challenges we start seeing the issues.

Re working on browsers: you're not a web developer. I will say though that Mozilla pushing this web-everything agenda is disappointing. The FirefoxOS lesson has not been learned...

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by psyc on Saturday April 08, 2017 @08:49AM (#14066649)
15 years ago, I believed that one day, generational garbage collection would be so good that I wouldn't have to think about it. I'm no longer holding my breath for that day.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by rco8786 on Saturday April 08, 2017 @11:18AM (#14067316)
Yes! Right now Electron is the easiest way to build cross OS desktop apps, bar none. Just like Java was the easiest way to write cross platform code back then.

Dismissing it for performance reasons is a fool's errand. The performance issues are fixable and we're already seeing them get fixed.

Bold prediction - JavaScript(or rather, a future incarnation of it resembling es7/es8) will be the lingua franca for all platforms(web, desktop, and mobile) within a decade.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by psyc on Saturday April 08, 2017 @08:47AM (#14066643)
I'm a long-time game developer, and plenty smug most of the time about the absurd waste of resources in modern software development. However, aside from the principle of the thing... I use VSCode all day, every day. Most of the time, I'd have no way of telling that it wasn't native. It's fast and responsive. I can't think of anything about it that seems laggy, and that's on a 4 year old laptop.

HOWEVER, I have several times seen it get into a state where it's unusably slow. As in, type a character, and it shows up 500 ms later. Now, maybe this is a bug that can be fixed. Or, maybe it's a fundamental problem with trying to make an app that forces you to effectively work in a VM, all the time.

Anyway, I still wouldn't have believed, 5 years ago, that a JS/HTML/CSS app in a browser could be so snappy, overall. Maybe it's just a matter of time before perf is great across the board. Or, maybe, like heap-walking GCs, they will always be fundamentally prone to pathological cases, because the whole idea was fundamentally flawed from the start.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by 9935c101ab17a66 on Saturday April 08, 2017 @05:28AM (#14066138)
Your comment adds nothing new to the frequent and tired war (native vs electron). I get it, you prefer Vim and Sublime (I find this quite funny because I can only suppose critics attacked Sublime Text with the same arguments you use now)

Either way, Atom/VSCode have developed a large following which encompasses lots of talented and smart people. They both cannot be completely summed up with the description "slow and clunky." They are absolutely not perfect, but if you really cannot see any of the many reasons people use them, you're being left behind and I strongly suggest you refrain from commenting.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by josteink on Saturday April 08, 2017 @06:38AM (#14066299)
> Personally I think it's a biggest mistake to use browser engine for a text editor. We already knew how slow and clunky the browsers are and thanks to vscode and atom our text editors are becoming the same

That's an interesting claim, given that Visual Studio (not VS Code) is native through and through and still it's orders of magnitude slower to work with on any sizable code-base compared to the "slow" editor VS Code.

It's almost as if you could say that on modern hardware the architecture of the application dictates overall performance much more than the technology used to implement it.

But yeah, that would certainly be madness, so let's not go there, eh?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by saurik on Saturday April 08, 2017 @06:48AM (#14066322)
Just because you can make a slower text editor doesn't really demonstrate anything unless the person you are arguing against would have used that slower one (and "architecture" is definitely something constrained by an implementation decision as critical as "implemented using a web browser").
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by josteink on Saturday April 08, 2017 @06:59AM (#14066351)
Sure. Any concrete implementation detail constrains your architecture and freedom to some extent.

But VS Code first and foremost uses a web-browser for UI. How much does the choice of a UI-technology really constrain the rest of your application and its architecture?

I would argue that with a good architecture, the choice of UI-platform should place near zero effective constraints on the rest of your application, how it's structured and how it performs. It should certainly not be a critical component of your overall design, it should be an implementation detail.

Are you arguing otherwise? Can you come up with some concrete examples where the choice of UI-library causes troubles other places in the application? If not, it seems you're more or less agreeing with my original statement.

And as such, I don't see any fundamental problems using a web-browser in a text-editor.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:47AM (#14067467)
Then go ahead and "do it better"... so far VS Code has how many plugins? and how many users compared to other editors (excluding the cli editors vim/emacs etc). Yeah, sublime is faster and has a lot of aging plugins that haven't kept up... and there are IDEs that do more.

Those IDEs are all much slower in my experience, and even Sublime is outmatched in terms of plugins. Because it's just so damned accessible with VS Code. If it runs good enough on the hardware you're using, wtf does it matter?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @10:29AM (#14067067)
Visual Studio is not native, large parts of it are built in .NET. Hence the slowness.

Note: native means the platform's native toolkit, running with the best performance on that platform. E.g: Java or C and C++ for Android, C and C++ for Linux, C and C++ and Obj-C for macOS, C and C++ for Windows, etc.

Things that are not native: Python, .NET, Xamarin, JavaScript, Java on anything except Android, etc

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mrmondo on Saturday April 08, 2017 @05:54AM (#14066203)
I could not agree more, this is why every time I try atom I go back to sublime, that's really only one example of many - there's a massive difference between javascript 'desktop web app frames' and native applications written in ObjC/Swift/QT etc... between the terrible perceived(?) latency of javascript apps and the memory usage to be honest I just delete the app and find something else when I come across them.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Ardren on Saturday April 08, 2017 @09:38AM (#14066825)
I put off even looking at VS Code for a while because of the poor performance of Atom. But when I tried it, I was really surprised at how much faster VS Code was.

It's changed my opinion of electron based programs.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:50AM (#14067483)
I had the same experience... after atom and brackets, I was like, sure... I installed it to make fun of it... but it actually ran well. It's been my daily driver ever since, and better with each release.

The integrated terminal is far and away my favorite feature, second would be the git+diff integration... though merging/rebasing needs a good story.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by jdub on Saturday April 08, 2017 @07:07AM (#14066370)
Sublime is mostly written in Python. Yes, there are some native elements, particularly where performance is paramount.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mrmondo on Sunday April 09, 2017 @03:03AM (#14070882)
Sublime is actually mostly native c++, but it has python bindings for its API
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by 13years on Saturday April 08, 2017 @08:54AM (#14066662)
Actually, its the other way around. The web platform is the future even within the realm of performance.

Once technologies like Servo and Web Assembly become part of the standard platform, it will be the preferred platform for performance reasons. There will likely be nothing that can give you the same performance and also be cross OS platform.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by thomastjeffery on Monday April 10, 2017 @01:51AM (#14076366)
There will always be portable C. There will always be GTK/Qt/etc.

The only thing that is really incompatible is Windows, and Microsoft working hard to make that less and less true.

Servo will be a drastic improvement, though.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcarolan on Saturday April 08, 2017 @06:37AM (#14066298)
This is called hacker news. Things that work well should be elevated, by trial, above all else. Try it. Seriously.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by GordonS on Saturday April 08, 2017 @01:34PM (#14067984)
I would have said the same - before actually trying it.

Turns out VS Code is actually surprisingly fast! Startup time is only marginally slower than notepad (and I have several plugins added), and performance when running for things like search and replace is super fast. Try it, it will surprise you.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @12:47PM (#14067775)
VS code is free and available on all three major OSes. Download it and give it a shot, you may be pleasantly surprised.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by simion314 on Saturday April 08, 2017 @05:23AM (#14066123)
I am wondering if they can switch the UI part, say use the Canvas and WebGL(there are some libs for GUI with GL but I do not test them)
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by 13years on Saturday April 08, 2017 @09:02AM (#14066696)
There is likely no need. Hopefully a technology like Servo will get built into Electron. If that happens, there shouldn't be any issues related to performance. Servo in theory can be even faster than native libraries thanks to its use of retained mode. https://air.mozilla.org/bay-area-rust-meetup-february-2016/#...
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by hashhar on Saturday April 08, 2017 @09:25AM (#14066780)
Servo is quite good actually. If you haven't already, try using browser.html from Mozilla which uses Servo and HTML for the UI.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by epoch1970 on Saturday April 08, 2017 @01:26PM (#14067947)
I wouldn't consider Servo to be "quite good", at least in its present state.

The Browser.html UI is quite minimal, in the sense that it really doesn't do much at all. It's basically a list of tabs along the right side. I also find it quite laggy, and sometimes it locks up completely. I'm not sure why you think people should be impressed with it.

As for Servo itself, there are noticeable rendering problems with pretty much every web site I've ever tried with it. Even the servo.org home page had rendering glitches when I last tried it several days ago! The scrolling is very broken under macOS. I've also had it crash now and then.

Maybe it will get better in the future. But at this time I'd consider Servo to be pre-alpha quality software. Trying to impress people with it would probably do more harm than good. They'll likely encounter problems with it right away, and it won't leave a good impression on them.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by simooooo on Saturday April 08, 2017 @07:57AM (#14066512)
Well they're currently using Dom elements with CSS. So would likely be a massive effort to reimplement all it as proper web GL. Which is kinda what a browser does internally anyway
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by johnfn on Saturday April 08, 2017 @09:32AM (#14066805)
As usual for hacker news, the top comment on a really insightful article has nothing to do with the article whatsoever and is instead a surface level criticism about something vaguely related.