News for hackers. Stuff that matters.
Re:Xray – An experimental next-generation Electron-based tex... by moosingin3space on Monday March 05, 2018 @07:51PM (#16525997)
Every text editor beyond the most basic is incredibly complex. Terminals are a complete mess, so every terminal-based text editor certainly can't be called "simple", and that's not even beginning to consider extensibility! Emacs and Vim have entire interpreters embedded into their codebases, for instance.

Maybe text editors with an extensible feature set really are more complex than we've been led to believe?

Re:Xray – An experimental next-generation Electron-based tex... by boomlinde on Tuesday March 06, 2018 @02:02AM (#16527356)
Messy and simple are orthogonal characteristics. A terminal is simple in that cursor movement, colors and style are all the result of a bunch of escape sequences. Once you have a list of the escape sequences you want to parse or emit, implementing a terminal or an application targeting the terminal is not hard. It's messy because there are historically a bunch of different terminals that implement different escape sequences. It's not easy and it's not clean and beautiful, but it's still simple.

It's a bit weird to bring up scripting languages. The problem is that people want a customizable and scriptable editor. Solving that problem by providing a script language to its users is not overengineering, it's simply meeting a demand.

Looking at this, it uses some native facilities simply to setup a web browser view. Within that, it doesn't even use the built-in functionality of a browser to render the text you're editing, but resorts to custom rendering and layout using webgl. This isn't simple or clean. It's a convoluted waste of resources in that regard. Why not use one of the smaller cross-platform OpenGL wrappers?

Maybe it'll be a fine editor, but it's much more complex than it needs to be. I guess that because they set a "Web-compatible build artifact" as a goal on the roadmap, it makes sense, but is that really an interesting goal? What problems will be solved once the editor is a tab in Chrome?

Re:Xray – An experimental next-generation Electron-based tex... by bluedino on Monday March 05, 2018 @08:33PM (#16526195)
What's the memory footprint of Terminal.app and vim + plug-ins?
Re:Xray – An experimental next-generation Electron-based tex... by flukus on Monday March 05, 2018 @09:18PM (#16526379)
On windows my current cygwin session with tmux and a single markdown document open in vim is about 25MB. Some of my chrome tabs (jira is the most complicated thing open) are nearing 200MB, somehow outlook is taking about 500MB and Visual Studio is eating many GB's.

It's extraordinary how wasteful some apps can be.

Re:Xray – An experimental next-generation Electron-based tex... by Prefinem on Monday March 05, 2018 @08:37PM (#16526219)
Not sure, but I have had vim lock up my MacBook Pro with 16GB of RAM and force me to do a hard reboot
Re:Xray – An experimental next-generation Electron-based tex... by PrimHelios on Monday March 05, 2018 @09:19PM (#16526384)
That sounds like an OS/hardware problem, honestly. There's no reason vim with any setup should lock up a machine.
Re:Xray – An experimental next-generation Electron-based tex... by Prefinem on Monday March 05, 2018 @09:27PM (#16526417)
The linter was the issue.

I actually have better performance with Sublime Text and JavaScript than I do with vim and JavaScript. I wish that weren’t the case.

If you know if any better ways to get vim working with Syntastic for linting (eslint), I would love to know.

Re:Xray – An experimental next-generation Electron-based tex... by tomc1985 on Monday March 05, 2018 @09:30PM (#16526433)
Agreed, if anything will slog a text editor it is usually the linter

Also, you can choke vim with large (>5gb) test files. Or is that fixed now?

Re:Xray – An experimental next-generation Electron-based tex... by Prefinem on Monday March 05, 2018 @09:39PM (#16526467)
The irony is that sublime text doesn’t slog down
Re:Xray – An experimental next-generation Electron-based tex... by Turing_Machine on Monday March 05, 2018 @11:19PM (#16526839)
Sublime Text and TextMate will both choke big time if you feed them a large enough file without any line breaks. I have some largish machine-generated (5-10 MB) JavaScript data files that will reliably bring either editor to its knees if I accidentally click on one of them. The XCode editor also chokes.

I seem to recall (though haven't tried it for a while) that the Visual Studio Code editor handles them okay.

It's not a big issue -- since these are machine-generated, it's not normally necessary to edit them by hand. Every once in a while, though, I'll accidentally click on one of them in the file tree. Then I'll curse and kill the editor process.

Re:Xray – An experimental next-generation Electron-based tex... by dkns on Tuesday March 06, 2018 @03:11AM (#16527598)
Switch syntastic for ale: https://github.com/w0rp/ale It's asynchronous if you're running vim8+
Re:Xray – An experimental next-generation Electron-based tex... by Prefinem on Tuesday March 06, 2018 @10:36AM (#16529438)
Awesome, thanks for this!
[dead]
Re:Xray – An experimental next-generation Electron-based tex... by lpghatguy on Monday March 05, 2018 @08:16PM (#16526130)
Editing large pieces of text efficiently is a Hard Problem, especially collaboratively without conflicts.

In the case of editors like Xi and XRay, they use CRDTs, which doesn't look anything like how Notepad would represent text.

There's real work here that's actually useful, it's not just "another extensible text editor".

Re:Xray – An experimental next-generation Electron-based tex... by jachee on Monday March 05, 2018 @09:42PM (#16526482)
I have never, even once, in my nearly-20-year career had the desire to collaboratively edit a single, specific text file.

Isn't collaboration without conflicts what version control systems are made to do?

Re:Xray – An experimental next-generation Electron-based tex... by codedokode on Monday March 05, 2018 @10:19PM (#16526616)
I even think it would be annoying if someone would just move cursor around when I edit something. And there definitely would be conflicts if they would try to edit the file at the same time. Who needs this feature?
Re:Xray – An experimental next-generation Electron-based tex... by catach on Monday March 05, 2018 @11:14PM (#16526812)
The way it generally works is that each user has their own cursor.
Re:Xray – An experimental next-generation Electron-based tex... by tomc1985 on Tuesday March 06, 2018 @05:41PM (#16532749)
Google Docs gives everyone their own cursors
Re:Xray – An experimental next-generation Electron-based tex... by skybrian on Monday March 05, 2018 @10:33PM (#16526666)
Proof by personal experience isn't all that convincing. Maybe you've never done pair programming, but other people have.
Re:Xray – An experimental next-generation Electron-based tex... by redspectre on Tuesday March 06, 2018 @03:02AM (#16527572)
If you really need to collaborate on the same file, can't you just share a session in tmux?
[dead]
Re:Xray – An experimental next-generation Electron-based tex... by moosingin3space on Tuesday March 06, 2018 @12:54AM (#16527142)
See, I thought you were complaining about software complexity when you posted your original comment about "why does a text editor need so much abstraction". Nope, turns out it's just another run-of-the-mill anti-Electron rant.
Re:Xray – An experimental next-generation Electron-based tex... by bluedino on Monday March 05, 2018 @08:33PM (#16526196)
>> Does the world really need another extensible text editor?

People said that when Sublime was released