this post was submitted on 10 Jul 2024
395 points (95.0% liked)

Linux

47969 readers
1016 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
395
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 

Zed is a modern open-source code editor, built from the ground up in Rust with a GPU-accelerated renderer.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 197 points 3 months ago (44 children)

Installer is piping curl into shell

I thought we were past this as a society 😔

[–] [email protected] 4 points 3 months ago (6 children)

GPU-accelerated renderer.

There's a reason why GUIs don't render fonts in the GPU.

[–] [email protected] 2 points 3 months ago (5 children)

Because it's a pain, there's not much more to it really...

[–] [email protected] 1 points 3 months ago (1 children)

AFAIK it's the copy cost for the memory. GPU makes sense only when the hardware allows this copy to go away. Generally, desktop PCs don't have such specialized hardware.

[–] [email protected] 2 points 3 months ago* (last edited 3 months ago) (1 children)

I don't see why you'd have to copy all that much. Depending on the rendering architecture, once all the glyphs are there you'd only need to send the relevant text data to be rendered. I don't see that being much of a problem even when using SDFs. It's an extremely small amount of data by today's standards and it can be updated on demand, but even if it couldn't it would still be extremely fast to send over every frame. If games do it, so can text editors. Real time text rendering on the GPU is a fairly common practice nowadays, unfortunately not in most GUI applications...

[–] [email protected] 1 points 3 months ago (1 children)

At this point I'm not expert enough to explain more details. You can check font renderers.

Below is what's in my mind but it's just a guess.

In typical PC architectures you have IO between the storage and the RAM, and then there's the copying from the RAM to the VRAM, and editors maybe also want copying from the VRAM to RAM for decoration purposes etc.

[–] [email protected] 2 points 3 months ago* (last edited 3 months ago) (1 children)

I am familiar with the current PC and GPU architectures.

IO is a non issue. Even a massive file can be trivially memory mapped and parsed without much hassle, and in the case of a text editor you'd have to deal with IO only when opening or saving said file, not during rendering.

As for the rendering side, again, the amount of memory you'd have to transfer between RAM and VRAM would be minimal. The issue is latency, not speed, but that can be mitigated though asynchonous transfer operations, so if done properly stutters are unlikely.

Rendering monospaced fonts (with decorators and control characters) at thousands of frames a second nowadays is computationally trivial, take a look at refterm for an example. I suspect non-monospaced fonts would require more effort, but it's doable.

As I said at the beginning, it's not impossible, just a pain. But so is font rendering in general honestly :/

[–] [email protected] 1 points 3 months ago

As I indicated, please check (articles and the documentations of) font renderers at this point.

load more comments (3 replies)
load more comments (3 replies)
load more comments (40 replies)