Live data from Hacker News

Xi: an editor for the next 20 years [video]

recurse.com

131–140 of 306 posts

Re: Xi: an editor for the next 20 years [video]

#131

Earlier quoted context omitted.

That's where pathfinder [1] comes in, as the fastest font rasterizer, utilizing the GPU and built in rust. (not affiliated). Ok maybe I'm overselling just a little but it's exciting! [1]: https://github.com/pcwalton/pathfinder

Thanks for the kind words :) But Pathfinder doesn't do shaping.

Ah, thanks for the clarification. It seems I need to do a bit more research before I advocate others projects, sorry about that. :)

Re: Xi: an editor for the next 20 years [video]

#132
post #126

Earlier quoted context omitted.

Latency and multi-process editing environment has been on my radar recently. Programming languages providing analysis servers, external syntax highlighters and of course REPLs all benefit from editor that’s fast and async. Since Jetbrains editors brought zero latency writing to my attention I’ve begun to notice which apps seem to hinder my writing. It’s getting easier to build your own editing system instead of havin…

Xi's medium-range plans for modal editing support[1] are intended to be modular/general enough that you could plug in whatever particular modal-editing implementation you'd like. 1: https://github.com/google/xi-editor/issues/302

Thank you, that's a good thread. I see Kakoune is mentioned. Will have to check back later on.

Re: Xi: an editor for the next 20 years [video]

#133
post #64

Pragmatically speaking the issue with switching editors is the fact that if it is not emacs or vi it is not a default install on whatever you sit down at. I have tried tons of editors, and I always come back to vim. Heck, I have even moved my .vimrc to be the simplest possible with the smallest number of plugins.

What's your reasoning behind needing it to be a default install? seems an odd requirement for an editor. For instance, notepad is default on windows, and I'll use that when needed on vanilla windows machines, but for the 99% of my editor needs I install and customize a number of enviroments (including Vim). I don't mind whether it's installed by default or not.

As the other poster guessed, vi is there on any system I log into that runs some form of Unix, including switch hardware.

Re: Xi: an editor for the next 20 years [video]

#134

Earlier quoted context omitted.

For that particular text editor latency of char typed to appear on screen will be 16ms (normal 60 FPS refresh rate). Editor keeps each line in separate DOM elements (like but no margins and only text inside). So we just need to relayout one particular line in order to show typed character.

> For that particular text editor latency of char typed to appear on screen will be 16ms (normal 60 FPS refresh rate). That's very impressive, if so. On Windows 7 with DWM (GPU display compositor) switched off? How did you validate and measure latency? Someone correct me if I'm wrong, but I'm under impression Windows 10 DWM adds additional latency making 16 ms latency unachievable.

Not sure I understand your concerns. If you have DirectX there then you will have the same GPU rendering.

If that's about CPU rasterizers then Direct2D/WARP and Skia rasterizers are pretty good.

Problem is that if you have two monitors of the same size but one of "standard" 96ppi and another is, say, Retina grade (300+ ppi) then GPU rendering is the only reasonable option. Number of pixels to rasterize is 9 times more in Retina case. We do not have CPU performance increased 9 times...

Re: Xi: an editor for the next 20 years [video]

#135
post #9

Xi creator did an amazing work implementing ropes ( https://github.com/google/xi-editor/tree/master/rust/rope ) The design documents ( https://github.com/google/xi-editor/tree/master/doc/rope_sci... ) explaining the concepts and implementation details is a must for those who want to understand its core. But I still have my regards regarding input latency being accredited only to the text editor. I recently switched b…

Alacritty is slower than Terminal.app..[1] perhaps placebo effects were/are in play?

[1]https://danluu.com/term-latency/

Re: Xi: an editor for the next 20 years [video]

#136
post #37

Xi looks great, has a very clever design, and clearly is a next generation platform for building a useful and powerful editor. I'd love to see this project continue and be a success. I think there is plenty of room for yet another text editor. Here's where I'm going to be a bit of a party pooper. Pragmatically speaking all of the great stuff Raph is talking about doesn't really matter. What Raph cares about are the k…

> Pragmatically speaking all of the great stuff Raph is talking about doesn't really matter. What Raph cares about are the kind of things people who build text editors like to geek out on and again Unfortunately that's not true. If only MORE people that build text editors actually DID geek out on such things. Alas, we have 30+ years of editors that got all those wrong. > Imma let you finish but VSCode and Atom and th…

if the editor is slow its certnly not due to core. but most likely that its parsing 10k files for intellisense. even the most naive implementation of a text editor will be fast.

Re: Xi: an editor for the next 20 years [video]

#137
post #129

Earlier quoted context omitted.

> My main goal is to build something that feels entirely like a native app. It's not clear to me how this relates to the question. Emacs and vim are native apps.

Maybe we're using different definitions of "native". In the most common case, both of these editors use the cross-platform "VT-100 UI Toolkit" (e.g. ansi escape codes in your terminal emulator), regardless of platform. Some exceptions do exist. But native as it's being used in relation to this project refers specifically to whatever frontend framework is 'the standard' for a given platform, where one exists.

> > Emacs and vim are native apps.

> In the most common case, both of these editors use the cross-platform "VT-100 UI Toolkit" (e.g. ansi escape codes in your terminal emulator), regardless of platform.

I daresay that the single most common way to deploy emacs is as an X11 editor, followed by a macOS editor, followed by a vt100 console editor. Emacs is a fully GUI programme, and has been for decades at this point.

Re: Xi: an editor for the next 20 years [video]

#138

Presenter here, feel free to ask questions. Also thanks to the awesome Recurse Center for inviting me to speak and making the recording, and the audience for their great questions.

I'm surprised you found creating attributed strings and CTLineRefs was acceptable. These are the main bottleneck in iTerm2's renderer, and I ditched them when rewriting the renderer in Metal. Since ASCII is an important fast-path for us, and other than ligatures in fonts for programmers there's no need to go through all that machinery. Did you do anything clever to get around the slowness of creating NSAttributedString's and CTLineRef's?

Re: Xi: an editor for the next 20 years [video]

#139
post #6

Async and CRDT to coordinate between core and plugins is super clever and seems scalable to future design choices. Levien calls out that there is a high complexity overhead to this architecture, but that it's probably worth it to maintain performance.

I agree. Async is critical. It's very important to catch the need for async early on, and then implement as async from the get-go. Going from sync to async is pretty much a rewrite, and no fun at all.

Re: Xi: an editor for the next 20 years [video]

#140
post #135
post #9

Xi creator did an amazing work implementing ropes ( https://github.com/google/xi-editor/tree/master/rust/rope ) The design documents ( https://github.com/google/xi-editor/tree/master/doc/rope_sci... ) explaining the concepts and implementation details is a must for those who want to understand its core. But I still have my regards regarding input latency being accredited only to the text editor. I recently switched b…

Alacritty is slower than Terminal.app..[1] perhaps placebo effects were/are in play? [1] https://danluu.com/term-latency/

The article you linked is specifically about latency. There are other factors that contribute to overall terminal experience such as high frame rate and high throughput. Once latency reaches a "good enough" level, it becomes a non issue, and frame rate and throughput remain. Alacritty excels in those areas (there's even a table in that article demonstrating Alacritty's high throughput).

There is also a plan[1] for making Alacritty's latency best-in-class.

[1]: https://github.com/jwilm/alacritty/issues/673

Post reply on HN