News for hackers. Stuff that matters.
Re:Hyper 2, Electron based terminal by movedx on Monday April 23, 2018 @03:36AM (#16901247)
Good read. Thanks.

And I agree: Electron is horrible to deal with as an end-user. I've been using Vim for some time and then decided to use VS Code. The integrations, plugins, and everything else were awesome, but man the 3-4GB of RAM was just crazy. Despite the fact my machine has 16GB of RAM, I'm dealing with quite a few VMs and Docker containers locally, so actually 16GB isn't a lot.

Re:Hyper 2, Electron based terminal by Sean1708 on Monday April 23, 2018 @12:05PM (#16904623)
> but man the 3-4GB of RAM was just crazy

What kind of files do you usually work with? Because I've currently got two 10000+ line python files open which are part of a project that is at least a million lines of code, and my VSCode instance is using less than 300 MB of RAM.

Re:Hyper 2, Electron based terminal by movedx on Monday April 23, 2018 @04:36PM (#16907152)
I've got three Go files open and looking at all the processes related to "Visual Studio Code.app", I see a residential memory footprint of 660MB. I'm using the latest version.

That also coincides with:

https://medium.com/@caspervonb/why-i-still-use-vim-67afd76b4...

And

https://github.com/jhallen/joes-sandbox/tree/master/editor-p...

Re:Hyper 2, Electron based terminal by Sean1708 on Tuesday April 24, 2018 @06:43AM (#16911409)
Yeah that seems a lot more like what I would expect.
Re:Hyper 2, Electron based terminal by fbnlsr on Monday April 23, 2018 @03:57AM (#16901363)
I've been using VSCode for years and it's been great, but I'm always looking for learning something new. I keep reading about Vim and last time I checked it seems SO complicated to use. I don't understand how it's so popular. Is it because it's blazing fast?
Re:Hyper 2, Electron based terminal by hungerstrike on Monday April 23, 2018 @09:45AM (#16903315)
Vim isn't that popular with coders. Visual Studio and Notepad++ are the most popular across the board while Vim is preferred by Sysadmins according to this Stackoverflow survey from 2017 - https://insights.stackoverflow.com/survey/2017#technology-mo...

Notice how those numbers don't add up to 100%. They let you pick multiple answers on the survey. Therefore, I would consider Vim percentage even lower in reality since many people would specify it on a survey since they basically have to use it while working on a server.

Vim is used by a small but very loud minority. Don't listen to them - they're optimizing for the wrong thing (keeping your fingers on the home-row of the keyboard) at the expense of just about every other aspect of computing.

Re:Hyper 2, Electron based terminal by movedx on Monday April 23, 2018 @04:18PM (#16907013)
> Vim is used by a small but very loud minority. Don't listen to them - they're optimizing for the wrong thing (keeping your fingers on the home-row of the keyboard) at the expense of just about every other aspect of computing.

It would be good if you could unpack this some more and explain it in detail. If I'm wasting my time then I'd like to know why and consider whether or not I should change my practices.

The part of your statement that stands out to me is, "keeping your fingers on the home-row of the keyboard". I think this is called touch typing and I can assure you, I don't do it. I'm fast on the keyboard, but not as fast as a touch typist. I throw my fingers all over the place, actually.

Vim for me simply boils down to being a fast, simple, lightweight tool that offers years upon years of development in both the core of the product and plugins, themes, etc.

I'm not really sure how my choice of hammer can be optimising for the wrong thing if it does the same thing your hammer does and we're both productive?

Re:Hyper 2, Electron based terminal by hungerstrike on Tuesday April 24, 2018 @11:07AM (#16913182)
> if it does the same thing your hammer does...

It does not do the same thing as my hammer. Not even close. As a matter of fact, with Vim you cannot get even half the functionality of a good graphical IDE or even something like VSCode without drastically lowering your standards.

> Optimizing the wrong thing...at the expense of just about every other aspect of computing...

Vim lacks discoverability. That's the first major aspect of computing that Vim just completely throws out the window.

Speaking of windows - Vim also lacks integration with the rest of your graphical OS by default. You can't use your normal graphical file picker, you can't just drag files into Vim and you can't easily configure Vims activity to be reflected in the rest of your OS (in areas such as recently-edited-files and so on). Sure, you can get a graphical version of Vim, but now you have 2 problems - you have to configure different versions of Vim to use it the way you want to.

Even the mouse pointer a hallmark of modern computing, is largely useless in Vim!

Also, text-based configuration is throwing out another majorly useful aspect of computing: convenient and easy to access settings.

Anyway, if you enjoy editing text like it's 1976 - that's fine with me. Just don't try and tell me it's as good as my hammer because it simply is not.

Re:Hyper 2, Electron based terminal by dakom on Monday April 23, 2018 @09:35AM (#16903248)
I switched over the past month or so - started by using the vim plugin, and then eventually when ditched it and went with vim itself.

The scary thing for me, even after getting used to navigation, was the lack of it feeling like an IDE - autocomplete, compile on save, etc.

After installing some plugins - it's now wonderful and I enjoy it much more than VSCode.

There's a ton of little extra benefits you get from the switch besides the usual - for example, when you use a mouse, the time you spend navigating visually is kinda wasted. With a keyboard, that time is spent thinking about "what's the next parenthesis" or "what's inside these quotes" which turns idle time into something more useful like getting more familiar with the code.

Re:Hyper 2, Electron based terminal by jannes on Monday April 23, 2018 @04:23AM (#16901516)
You can use vim keybindings in VSCode. It mostly works, except for more advanced stuff.

Correct indentation when pasting is a pain in my opinion.

And somehow I find the VSCode's multi-cursor feature so much more convenient than Vim's macros.

Re:Hyper 2, Electron based terminal by SPBS on Monday April 23, 2018 @08:36AM (#16902803)
> And somehow I find the VSCode's multi-cursor feature so much more convenient than Vim's macros.

That’s not an unpopular opinion, I suspect it’s because multiple cursors provide an extremely tight visual feedback loop (feedback after every action) as compared to macros where you kind of just shove actions into a black box and pray it works correctly for the next location you test it on

Re:Hyper 2, Electron based terminal by movedx on Monday April 23, 2018 @05:01AM (#16901731)
> Correct indentation when pasting is a pain in my opinion.

    :set paste
:)
Re:Hyper 2, Electron based terminal by matzy on Monday April 23, 2018 @01:57PM (#16905782)
gg=G

couldn't be easier my friend

Re:Hyper 2, Electron based terminal by stiGGG on Monday April 23, 2018 @04:50AM (#16901669)
Using vim is like driving a car with manual transmission. The first time you do it, it seems so extremely complicated and you think you never would be able to be fast with it. After some time you are got used to it and you think it‘s impossible to be fast without it.
Re:Hyper 2, Electron based terminal by caspervonb on Monday April 23, 2018 @04:06AM (#16901429)
Does editing text with the keyboard alone make sense to you? That's the gist of it, you use commands to manipulate text. It's hard to grok at first when you're only used to textarea style editors without modes.
Re:Hyper 2, Electron based terminal by movedx on Monday April 23, 2018 @04:12AM (#16901459)
It has a learning curve that'll take about 2-3 weeks to convert to muscle memory and become habit. Give it a shot. You'll learn something new and if it doesn't work out, VSCode will still be there :-)
Re:Hyper 2, Electron based terminal by owenwil on Monday April 23, 2018 @04:04AM (#16901417)
"Electron is horrible to deal with as an end-user" - this is not reflective of your average user at all. Most people are just happy to have an app that looks, acts and feels native.
Re:Hyper 2, Electron based terminal by flukus on Monday April 23, 2018 @04:06AM (#16901431)
The average end-user has less than 4GB of RAM and would struggle to run electron apps at all. They would get frustrated with the computer being slow but would not know who to blame.

Aside from that, electron apps do not look, act or feel native.

Re:Hyper 2, Electron based terminal by physicsguy on Monday April 23, 2018 @04:23AM (#16901517)
Does the average developer though? I wouldn't want to work on a developer machine without at least 8gb.
Re:Hyper 2, Electron based terminal by flukus on Monday April 23, 2018 @06:31AM (#16902116)
It really depends, some work might necessitate 8GB+ but most really shouldn't and only do because the tools they use were built by developers with that much RAM.

At work I need my 16GB but that's because Visual Studio and the app I'm working on the most are memory pigs. Visual Studio 2017 doesn't really have any compelling features over 2005, but 2005 ran quite comfortably in 2GB, so with this piece of software alone I need a lot more memory for no gain.

At home in the other hand I have a fairly low end (and now 3 year old) dell laptop with 8GB of RAM, but with my current c project and DE (i3, riced way more than necessary) I'm using less than 2GB (with vim+unix as the IDE), so plenty to burn when required. This is a more productive environment too, I have a fully incremental build that will compile, run unit tests and run memory tests in the blink of an eye every time I save a file, so I'm getting much more feedback much quicker than I do with Visual Studio.

Devs on lower resource machines will also be dogfooding much better. If their apps are slow and bloated then they'll feel the pain their users will and be much more likely to address them. Windows 10 might have a start menu that didn't take several seconds to open if the developers weren't on top of the line surface pro's.

Re:Hyper 2, Electron based terminal by majewsky on Monday April 23, 2018 @05:35AM (#16901880)
I can work productively on my 6yo notebook with 4 GB RAM, because a terminal, CLI tools, vim and a browser covers my needs. If I had to use Electron apps, I'd probably have to look into buying a new notebook, which is quite wasteful both on the money side and on the material resources side of things.

Some developers will probably need more than that because of the resource demands of their specific fields, but other than that, 640 KB ^W^W 4 GB should be enough for everyone.

Re:Hyper 2, Electron based terminal by stephenr on Monday April 23, 2018 @05:51AM (#16901940)
Electron apps don't look/act/feel native.