News for hackers. Stuff that matters.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by paulddraper on Thursday March 23, 2017 @11:14AM (#13940431)
> easy to get started

Yes.

> cross platform support

Yes.

> Because you can write plugins in JS?

Yes.

---

As much as I prefer native programs as a user, it's impossible to ignore the benefits of cross-platform development and plebeian hackability/debuggability.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by akerro on Thursday March 23, 2017 @11:33AM (#13940648)
>> cross platform support

> Yes.

WOW FINALLY SOMETHING that will run on my LINUX and FreeBSD!

ohh.. a lot of plugins don't support linux and it doesn't build on BSD?

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by tedunangst on Thursday March 23, 2017 @11:44AM (#13940782)
Cross platform support means if you want support, you cross over to a supported platform.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by josefx on Thursday March 23, 2017 @11:53AM (#13940882)
Some years ago cross platform in Microsoft speak meant it would run on at least two of the following: A version of Windows, Wincows CE, Windows Phone or Xbox. That cross platform now almost includes a non Microsoft platform is progress.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by paulddraper on Thursday March 23, 2017 @12:17PM (#13941156)
Don't vim, emacs, Sublime, and IntelliJ IDEA work on FreeBSD?
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by floatboth on Thursday March 23, 2017 @12:27PM (#13941254)
(neo)vim, emacs and IDEA certainly do. Sublime is not natively ported, only under the linux compat layer.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by bluejekyll on Thursday March 23, 2017 @11:43AM (#13940768)
Really? I haven't seen this at all... though I don't have a ton of plugins.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by skeeterbug on Thursday March 23, 2017 @04:36PM (#13944009)
Define a lot. Every plugin I use on Atom run on Linux fine.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by jamespo on Thursday March 23, 2017 @11:44AM (#13940781)
> doesn't build on BSD

doesn't run on ZX Spectrum either

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by darpa_escapee on Thursday March 23, 2017 @11:58AM (#13940932)
Why bother describing something as cross-platform if this is the attitude held?
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dekhn on Thursday March 23, 2017 @11:16AM (#13940448)
you can do all of this in Qt, too. Without the overhead of the inner platform effect.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by cle on Thursday March 23, 2017 @11:25AM (#13940552)
You can do it, but it's significantly harder. And with Electron, you can leverage the same skills that are used to build web applications to modify your environment and text editor as well. Those are very significant advantages.

Note: I don't use VS Code or any other JS editor, I use emacs. But I can definitely appreciate the major benefits of the architecture.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dekhn on Thursday March 23, 2017 @12:44PM (#13941443)
I build both web apps and Qt apps. TBH, doing something in Qt is about 1/10 to 1/100 the effort of doing it on the web. The web is a morass of confusing standards, none of which work well together. To get guaranteed, predictable behavior which is documented, and will continue to work properly for 10 years after deployment (with only minor maintainence), you simply cannot use the web.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by josefx on Thursday March 23, 2017 @11:57AM (#13940930)
So does it have a NoScript plugin to kill the unavoidable 200 tracking and ad scripts from Google, Facebook and who knows what running in the background? I am sorry if I offend someone with this, however the current Web experience is something I want as far away from my dev. tools as possible.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by efdee on Thursday March 23, 2017 @02:13PM (#13942441)
While your concern might be valid in general, this is applicable to native software just as much.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by y4mi on Thursday March 23, 2017 @12:27PM (#13941253)
tracking or ad scripts by facebook or google are in neither atom nor VSCode.

both projects are open source if you care to verify

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by fs111 on Thursday March 23, 2017 @01:44PM (#13942112)
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by y4mi on Friday March 24, 2017 @01:23PM (#13950583)
you're being asked while installing f you're fine with anonymized usage information being send to MS for further development of the software.

its a simple checkpoint and pretty much every actively developing project does this nowadays.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by rikkus on Thursday March 23, 2017 @11:34AM (#13940650)
We have 'native' text editors. Sublime Text is very similar to VS Code in many ways. But with Sublime I haven't got up and running writing, running, debugging code in various languages like I have in VS Code.

The whole experience is important. For many, it's more important than the individual 'feature' of being light on resources.

I currently ignore the fact that VS Code is 'heavy' as text editors go, because it's so much lighter than e.g. Visual Studio, leaving me much more RAM free for some of the code I'm running to gobble up and use for its own ends.

I'd prefer lighter 'weight' - in terms of RAM and CPU usage - but I'm not tempted back to Sublime yet.

BTW I'm a vi person, so I'm using vi keybindings in VS, VS Code, Sublime - and anywhere else I can do so. I love Vim's speed, but I can't Get Stuff Done in it like I can in more modern editors. I mastered the keys, not the inbuilt windowing system, scripting language, etc.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by braveo on Thursday March 23, 2017 @12:11PM (#13941078)
I'm always confused when people say this, I've tried a lot of vim modes and to a T I've never found any that were satisfactory.

I really believe that if you find these vim plugins useful you don't really use vim all that deeply. that's not a criticism, just an observation.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Philipp__ on Thursday March 23, 2017 @11:18AM (#13940463)
And that is OK for Notes or todo app, but text editor that is used by developers who tend to customize it with plugins and whatnot I think that is not viable option. But that's just my personal preference, maybe I am wrong...
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by randiantech on Thursday March 23, 2017 @11:32AM (#13940631)
VS Code IS a viable option. I use it daily basis and works great.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by YCode on Thursday March 23, 2017 @11:36AM (#13940681)
Seriously, coming from Visual Studio VSCode is a breeze of fresh performant air.

Anecdotally I was able to create the cursor problem by minimizing/showing the VSCode window while viewing CPU usage DESC in task manager, but the effect was only ~2% usage for me (i7 processor).

If one invisible (from a UX perspective) bug is VSCode's big performance problem then I'll gladly let it eat away at 2% of my CPU until it's fixed.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by DonHopkins on Thursday March 23, 2017 @12:07PM (#13941028)
Plus the fact that it's actually possible to use the profiler and debugger built into VSCode to profile and reflect upon itself, then drill down into its own live data structures, source code and css to discover and fix what was slowing it down.

I once wrote a visual PostScript debugger for NeWS, which I primarily used for debugging itself. [1]

[1] http://www.donhopkins.com/drupal/node/97

The PSIBER Space Deck is a programming tool that lets you graphically display, manipulate, and navigate the many PostScript data structures, programs, and processes living in the virtual memory space of NeWS.

The Network extensible Window System (NeWS) is a multitasking object oriented PostScript programming environment. NeWS programs and data structures make up the window system kernel, the user interface toolkit, and even entire applications.

The PSIBER Space Deck is one such application, written entirely in PostScript, the result of an experiment in using a graphical programming environment to construct an interactive visual user interface to itself.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Philipp__ on Thursday March 23, 2017 @11:38AM (#13940708)
I tried it too... Wasn't satisfied with performances. I used to install Atom every 2,3 months, when VSCode got released I then tried installing it every few months in place of Atom. I still do, but I always uninstall after few hours of using it. It has many good ideas implemented well, but still not worth switching and sacrificing all of the performance for nice git and debugging interface.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lexicality on Thursday March 23, 2017 @11:43AM (#13940760)
What's too slow for you? I recently switched to it from Vim running in a console (+ a bunch of plugins for IDE features) and it's actually more performant. It doesn't freeze when I run ctrl-p for one thing.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Philipp__ on Thursday March 23, 2017 @11:49AM (#13940826)
Well I don't run any plugins in (neo)Vim besides colorscheme, FZF and neomake, and I run neovim inside Terminal.app since it is much faster than iTerm2.

One situation, I open 5k LOC file, scroll to the middle and bam colors are there everything was instant. In VSCode I open same file, slight delay, opens the tab, I click on middle of side codetree, slight delay, and few seconds for colors to draw. This is just one example. And there are those slight delays all over the place that I don't have with sublime, emacs or vim.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by abritinthebay on Thursday March 23, 2017 @12:00PM (#13940953)
VS Code is faster than Atom (by... a lot) tho?

Especially with large files, but just in general. Speed is the main reason I can't stay using Atom for more than a few hours. It's awful.

VS Code is snappier than Sublime Text ffs...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by szatkus on Thursday March 23, 2017 @12:38PM (#13941382)
Wait, why? I use Atom on daily basis, don't have very strong machine, but I've never seen performance issues.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by abritinthebay on Sunday March 26, 2017 @09:12PM (#13964397)
Compared with Sublime Text (what I used before VS Code) Atom was painfully laggy and slow.

Now if I was coming from a larger, probably Java, IDE? Yeah, I can see that Atom would look great.

Just wasn't for me. Glad you like it tho!

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by 8draco8 on Thursday March 23, 2017 @12:11PM (#13941077)
VSC is not even close of being as snappy as Sublime Text. Sublime also dominates when opening large files (2GB+) and searching trough them.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by abritinthebay on Sunday March 26, 2017 @09:08PM (#13964375)
On my Mac that just wasn't true.

Sublime had the edge in a couple of cases, but when opening large files (esp JS bundles) it crawled. Took over a minute to open one.

Same file in VSCode - maybe a couple of seconds. Maybe.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dragonwriter on Thursday March 23, 2017 @01:07PM (#13941702)
While I occasionally need to open large files like that, they aren't source code files, and I have no problem using a different tool than my main source editor for that.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by stinos on Thursday March 23, 2017 @12:31PM (#13941303)
Agreed, except for the domination; true on linux afaik but not on windows: working with the large files is ok but opening them takes ages. VSC is definitely faster there.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by 8draco8 on Friday March 24, 2017 @05:55AM (#13947761)
You are probably right. I've used Sublime only on Mac and Linux. On Windows I was using another great, native application - Notepad++. It was as fast (or maybe even faster) as Sublime on other platforms.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by abritinthebay on Sunday March 26, 2017 @09:09PM (#13964380)
My experience on the Mac too. Working with was ok (mostly) not great but ok, but opening was very slow.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Philipp__ on Thursday March 23, 2017 @12:07PM (#13941035)
Nope, it's not snappier than Sublime.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by abritinthebay on Sunday March 26, 2017 @09:10PM (#13964389)
shrugs

Is for me. Not by a lot, and not in every case, but overall? Is for me.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by orf on Thursday March 23, 2017 @11:34AM (#13940657)
> but text editor that is used by developers who tend to customize it with plugins and whatnot...

There are a huge number of plugins for VS code. It's built to be plugin-centric - most functionality is a plugin.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by paulddraper on Thursday March 23, 2017 @11:19AM (#13940472)
My two cents: you get what you pay for in your IDE.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by randallsquared on Thursday March 23, 2017 @11:29AM (#13940592)
That depends strongly on the IDE and the user. I used to pay Jetbrains every month, but last July I noticed that I preferred VS Code to PHPStorm for essentially everything, and stopped my subscription and uninstalled it.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by kittenmittens on Thursday March 23, 2017 @11:28AM (#13940585)
Would you mind giving some examples, mostly for the higher tier of "paying".
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by cr0sh on Thursday March 23, 2017 @11:50AM (#13940843)
I pay a lot of money for my copy of IntelliJ.

...indexing...

...as I was saying...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by ProAm on Thursday March 23, 2017 @11:47AM (#13940805)
> it's impossible to ignore the benefits of cross-platform development

Performance & bugs/quirks. I'd much rather have performance.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by ue_ on Thursday March 23, 2017 @11:24AM (#13940531)
Emacs is a little harder to write plugins for, but it runs natively and the only impediment is that more people know JS than they do elisp.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dahauns on Thursday March 23, 2017 @11:43AM (#13940754)
Lots of emacs functionality runs via its lisp VM. I'd hardly call that 'native'.

I mean, Emacs had jokes about being bloated decades before Javascript (and Java, another contender for these jokes) even existed. :)

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gmfawcett on Thursday March 23, 2017 @12:06PM (#13941016)
Most of those jokes are completely out of date. "Eight Megs and Constantly Swapping" used to be a big deal, but today it's not.

I don't think running Elisp in Emacs takes away from it being "native." At least insofar as there are no popular text editors (that I know of!) which expect you to compile your plugins and macros to native code. They all have interpreters of one kind or another. What Emacs doesn't have, though, is an inner platform effect: Emacs is the platform, there isn't a second one underneath (no browser engine).

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lispm on Thursday March 23, 2017 @01:01PM (#13941630)
GNU Emacs Lisp code is certainly not native - not until a JIT will be widespread. GNU Emacs usually compiles Lisp code to a byte code which is interpreted by a byte code engine written in C.

If you use a Common Lisp based editor like Clozure CL, Allegro CL and LispWorks have, they don't use a C-based byte code interpreted. The Lisp code is compiled directly to native code. Which makes editor extensions running in natively compiled Lisp code.

The advantage of the c-based byte code engine is compact code and improved portability - since the C compiler will already be provided with most platforms, whereas a native Lisp compiler is typically not something provided by a platform (CPU/OS/...) vendor...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gmfawcett on Thursday March 23, 2017 @01:12PM (#13941740)
I should be more clear. I don't think that just because Emacs contains an Elisp interpreter, we should call it a "non-native" application -- even if Elisp is integral to Emacs' operation.

If forced, I would say that Emacs-the-platform is native, and Emacs the system of Editor MACroS is not, since the macros run on the Emacs platform. But it seems kind of pedantic.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by klibertp on Thursday March 23, 2017 @06:19PM (#13944863)
> I don't think that just because Emacs contains an Elisp interpreter,

The number of lines of Elisp my Emacs uses (counting plugins, but also built-ins) is actually more than twice the number of lines of C.

It's not that "Emacs contains an interpreter", rather it's "Emacs has all these features written in Elisp [...a looong list here...] Oh, and it also has an interpreter to execute it all".

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lispm on Thursday March 23, 2017 @01:48PM (#13942164)
The Lisp code is not natively executed.

Some features like memory management (garbage collection) are layered on top of the OS.

The UI is not 'native' - it's based on a portable substrate written in C/Lisp, which works both on WIMP and terminal systems.

The user interaction is not native (commands, buffers, undo, preference dialogs, window/frames, ...).

etc.etc.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gmfawcett on Thursday March 23, 2017 @05:40PM (#13944612)
I never said the Lisp code was natively executed. I'm not sure where you got that idea.

Let's just agree to disagree. We are talking past each other at this point. Best regards!

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by kazinator on Thursday March 23, 2017 @07:20PM (#13945251)
I think that the definition of "native" should take into account how the code interacts with the system.

Because compiling code to the native instruction set shouldn't affect the semantics: so why should that be the only yard-stick for "native", right?

What is semantically relevant is: how much of the platform is exposed to the programs directly, versus through abstractions.

Suppose a language like Emacs Lisp or Java or whatever has only thin wrappers around POSIX through which applications interact with the platform. Then those programs are quasi-native POSIX programs, really. They are doing things like fork, waitpid, dup2 and whatever almost directly. And suppose that in the Windows version of that language, programs use functions that mimic CreateProcess or WaitForSingleObject. Then, regardless of the language being interpreted, it's really a native programming language.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dahauns on Friday March 24, 2017 @08:59AM (#13948587)
Of course - I should have added that I don't neccessarily share the sentiment behind those jokes (quite the contrary). For me they are just inevitable (social) indicators for "non-native" software (i.e. I'd say anything with significant code running through an intermediate representation or virtualization at runtime).

As such I simply found emacs an odd choice as an example.

BTW: Notepad++ uses .dlls as plugins. (Which doesn't neccessarily make it a better editor than emacs :) )

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pantulis on Thursday March 23, 2017 @12:39PM (#13941389)
Which begs the nice corollary: the definition of "native" doesn't happen to be fixed and changes with time.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gmfawcett on Thursday March 23, 2017 @12:58PM (#13941600)
Well, language is like that. :) But I don't think describing Emacs as "native" here is very different from how the word was used decades ago. To me, "native" is less about how the logic is represented (compiled vs. interpreted code) and more about its execution context. If the host system is an operating system, then the application is native; if the host system is another application, then it's not. I agree that the boundary is blurrier for applications that have scripting interfaces; but I think that most applications don't live very close to that boundary, and are clearly in one camp or the other. (Maybe Emacs is nearer to the edge: there's an old joke that Emacs is a great operating system, it just needs a better text editor.)

Having said all that, I don't think that "non-native" is a pejorative. I use Emacs, but would switch to a "non-native" editor if there were a good reason. I use IDEA (native or not? you decide!) when working on big Java projects, and Emacs for everything else, because Emacs affords me a lot of power that I find lacking in other editors. "Nativity" isn't really part of the equation, it's really about functionality.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lispm on Thursday March 23, 2017 @01:04PM (#13941651)
GNU Emacs comes with its own portable execution platform (the byte-code Lisp execution engine), where Java applications typically use a provided virtual machine.

As such GNU Emacs is just as 'non-native' as a JVM-based editor.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gmfawcett on Thursday March 23, 2017 @01:13PM (#13941751)
Almost agree with you! If the Emacs VM were used for applications other than Emacs -- if it were a general purpose VM -- then I'd completely agree.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lispm on Thursday March 23, 2017 @01:45PM (#13942121)
There are lots of applications written on top of GNU Emacs, but most of the time they use the specific UI and features of an editor, or integrate with the editor.

Example: the calculator of GNU Emacs. https://www.gnu.org/software/emacs/manual/html_mono/calc.htm...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dahauns on Friday March 24, 2017 @09:02AM (#13948607)
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by lispm on Thursday March 23, 2017 @12:56PM (#13941569)
The jokes of GNU Emacs being bloated are from a time when machines with 8MB RAM were modern. The original NeXT computer was introduced in 1988 with 8MB RAM... The Mac II from 1987 started at 1MB, max at 8MB, ... today phones have 2GB RAM.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by sqeaky on Thursday March 23, 2017 @04:19PM (#13943854)
I bought a phone with 6GB of RAM. It keeps getting bigger.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Philipp__ on Thursday March 23, 2017 @12:15PM (#13941139)
Not true. Big chunk of Emacs is written in C.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by jbmorgado on Thursday March 23, 2017 @11:25AM (#13940554)
Well, you can write plugins in Python for Sublime Text and NeoVim (and more). JS and Python and both fairly uncomplicated languages when it comes to "plebeian hackability/debuggability".