Live data from Hacker News

Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

blog.jwilm.io

281–290 of 491 posts

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#281
post #52

Earlier quoted context omitted.

Just to present an alternate opinion here: I haven't used my terminal's scrollback on purpose in 5+ years now, and it's fine. To me, Alacritty's trade off is perfectly acceptable, and even desirable. As far as I can tell, using Tmux's scrollback instead has no downsides of note, but some _very_ significant upsides. For example, (1) shared buffer between terminal windows, and (2) copy/paste modes that are usable with…

Hm. So, for that to work, I'd basically have to forever hardcode the terminal to launch tmux every single time. Basically, this new terminal + tmux = the old terminal behavior. I'm not saying this is necessarily a bad thing (haven't tried it), I'm just saying this is the way to get my scrollback... uh... back. Might as well ship the terminal with tmux as a hard dependency and launch a tmux child process by default.

You can also set tmux as your default shell with chsh. I've been doing this for a while on macOS and have enjoyed it (other than user namespace issues that still drive me crazy)

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#282
post #2

I'm the author of Alacritty, and I'm here to answer any questions!

I put this comment elsewhere in the thread, but maybe if I put it in this subthread you'll get to see it.

I tested on my laptop (a ThinkPad X250) and alacritty is slower than xterm. xterm can display find / at 80x24 in 11 seconds, but alacritty takes 17 seconds or more, depending on how large the window is (smaller seems to be slower) and whether it's on-screen or not (off-screen seems to be slower).

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#284
post #279
post #190

Earlier quoted context omitted.

You really have nothing better to render on your GPU and store in that video memory than your terminal? I also use a web browser, and feel like it could use a performance boost a lot more than my terminal (particularly as I don't actually believe that using textures in this way is actually the most efficient way to render fonts with OpenGL).

What's your currently preferred way to render text with OpenGL?

There's Distance Fields[1] and Loop-Blinn[2] aside from standard textures that I'm aware of.

Valve uses the first, very few people use the second because of patent issues. They're more computationally expensive in some cases so there's always tradeoffs to be made depending on your hardware.

[1] - http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_...

[2] - http://http.developer.nvidia.com/GPUGems3/gpugems3_ch25.html

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#285

Earlier quoted context omitted.

I respectfully disagree. Alacritty follows the Unix philosophy of doing one thing, and doing it well. I used to think that terminal scrollback and tabs were great ideas -- but switching to tmux changed my mind completely. Tmux is so much more capable for managing your session history. The terminal's tab and scrollback features can never match this. They're just bloat :p

Well, the difference all comes down to how one views tmux, and I'm on the side of hating it. I personally use tmux only to background applications, and any of its other features are "bloat" to me.

I've honestly never seen anything but love for tmux, can you explain why you hate it?

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#286
post #160

Earlier quoted context omitted.

Thank you for the thoughtful comment. There's been a lot more pushback on the scrolling decision than I had anticipated. It's not something I want in my terminal, but it seems that a simple feature like this is essential for others. Perhaps I should reconsider. I worry that a "simple" feature like this may be overly complex internally. Performance with large amounts of output is also a concern. At least if we were to…

> Performance with large amounts of output is also a concern. Frankly, removing two very important features for a lot of people (me included) and then claiming highest performance feels a bit like cheating.

It's not cheating if you gain those features back by using a separate program (tmux) and still see a performance improvement over all other tools, which is what the author is implying. All that does is suggest that terminals might not be the proper layer at which to implement those features (and for the record, I'm on the side of having scrollback, but the lack of it isn't a dealbreaker).

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#287
post #156

Hm, if we're doing GPU rendering for speed, I'd suggest uploading vector glyph data to the GPU and rasterising on the GPU in the pixel shader, rather than using FreeType. See here: http://wdobbie.com/post/gpu-text-rendering-with-vector-textu... . The WebGL Demo is really impressive - it lets you zoom in and out on a multi-page PDF at speeds I haven't seen anywhere else.

That will lose by a lot overall. Hit rates on the glyph cache are massive.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#289
post #267
post #187

Earlier quoted context omitted.

Reading his comment, his concern isn't with c++ as a language, it's with the tooling and development practices around it. He suggests that because of the generally project specific nature of the tooling and development idioms, generally a higher bar of experience is required to contribute. I can't argue with him there, and I'm about as much of a C and C++ fan as it's possible to be.

I fully agree with you here - neither C/C++ are a gateway to salvation. http://www.redox-os.org/news/rust-is-softwares-salvation-17/

That is far from what I meant, and the suggestion that Rust is "salvation" is the stuff of infantile delusion. I'm a big fan of Rust, too, but it isn't going to be the "salvation".

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#290

Earlier quoted context omitted.

I agree. I also have a very basic tmux/vim setup and I can scroll, copy/paste and even resize tmux panels with the mouse.

same. my tmux conf is really small (maybe 20 lines) and it does everything i want -- mouse support, vim keybinds, huge scrollback.

Can you paste that config somewhere for the rest of us to see?
Post reply on HN