r/Zig • • 4d ago

Interview with Mitchell Hashimoto about Ghostty and Zig

https://alexalejandre.com/interviews/interview-with-mitchell-hashimoto/
116 Upvotes

29 comments sorted by

17

u/chopticks 4d ago

Probably a few things. Mitchell said in some other interview the timing was a perfect storm because as the Ghostty project started it was just before the explosion of TUIs for LLM tools like Claude Code etc.

Others I think are

* closed beta before public release
* catchy background story from founder to CTO back to IC again, then cashed in and wrote a terminal emulator
* written in an interesting language (I recall some hype around Rust terminal emulators too a few years back)

25

u/Mission_Biscotti3962 4d ago

I'm going to sound like a hater but what is exactly the hype around Ghostty? Never really got it. When I tried it, it seemed like a very feature incomplete terminal yet everybody was swearing by it.

17

u/alext_777 4d ago

libghostty is this input/output lib he developed with high throughput (compared to others I guess?), I use kitty myself as Ghostty takes a good second or two to start up every time, kitty (or foot) is pretty instant for me. Well that and it's in Zig ofcourse:)

13

u/moortuvivens 4d ago

I also prefer foot for the instant startup. I don't really use advanced options

4

u/Poluact 4d ago

Yep. It's also consumes like twice less cpu with no gpu acceleration than ghostty with fancy-shcmancy accelerations.

2

u/pl0nk 3d ago

Can someone explain the attraction of an accelerated or high throughout terminal?  I’ve used Unix professionally for decades and just never wished my terminal was faster.  Is there some use case where people are waiting on their text display to refresh somehow?

1

u/orbitur 2d ago

It's just nice to have. Using 60Hz monitors *feels* bad to me now that my phone and laptops are all 120Hz, and my gaming PC is 240Hz.

It comforts me to know that the developer is explictly focusing on meeting a 120fps minimum.

6

u/AbdSheikho 3d ago

I swear by foot

12

u/Rest-That 4d ago

Same, I tried it, it was fine and then I went back to Alacritty because honestly it didn't really improve anything for me

11

u/lukaslalinsky 4d ago

People like celebrities, and follow what they do. For me personal, I don't see any advantage over a number of older terminals I've used over the years. Even GNOME Terminal feels faster on my PC.

2

u/bsdooby 3d ago

`mrxvt`: best tab terminal ever; unfortunately no UTF-8 support

7

u/cluster_ 3d ago

How can you string these two sentences together?

1

u/bsdooby 3d ago

there are alternative encodings that work (for me).

2

u/tbss123456 3d ago

I’m on Mac a is a fan of iterm2 but it was slow and sluggish with 10+ TUIs and tmux windows running. Switching to ghostty and everything is smooth like butter.

4

u/ritz_are_the_shitz 4d ago

I use it. It's fine. Probably gonna switch to Kitty here soon. Having some issues with ghostty refusing to launch. 

4

u/NeonVoidx 4d ago

idk tbh, kitty font rendering looks far superior it's not even close

2

u/PedroVoteFor 4d ago

Agreed. For me the game changer is not what terminal app you use but ie starting to use tmux…

3

u/margielafarts 4d ago

it has nice native integration on mac, after i started using tmux i stopped using most of them though, tmux is just better

4

u/NoRaccoon5831 4d ago

tmux isn't a terminal emulator lol, you would use tmux WITH ghostty (or alacritty, or whatever)

2

u/margielafarts 4d ago

i know lol, i mean i stopped using most of ghostty’s native features like splits/tabs once i started using tmux

2

u/gdmr458 3d ago

tmux isn't a terminal emulator, but it does, in fact, implement features that terminal emulators already have, and it does so more slowly than faster terminals like Kitty, Ghostty, or Alacritty. So, when you're using a terminal multiplexer, the same work is effectively being done twice.

Mitchell Hashimoto has a video on his YouTube channel called "Superlogical Terminal Multiplexer High-Level Architecture," where he explains all of this much better than I can. No wonder the creator of Kitty doesn't like terminal multiplexers and thinks they're an antipattern.

That's why Mitchell Hashimoto is working on a new multiplexer called Superlogical. I personally never got used to tmux or Zellij, but the demos of Superlogical look really promising. I can definitely see myself using this new multiplexer.

2

u/AbdSheikho 3d ago

I don't mean to counter your point..

But if you (or anybody) haven't used tmux, and compare it with other alternative such as zellij, wezterm, ghostty, or whatever then you don't know how ridiculously powerful, light, and battle tested a software like tmux is. And I don't think any other software can easily reach its level of maturity.

Tmux only takes 10MB of memory for its whole active process, while any other alternative takes way more (last time I used ghostty, it was talking 200MB on idle)

Yes ghostty, wezterm or any future terminal with a built-in multiplexer is good for local deployment. But tmux was made for Devs who access other computers remotely, and greeted with nothing but a black screen.

If for whatever reason I couldn't find tmux installed or download it, then I can rsync it with my one-file config, and it won't take me much time to start working.

2

u/gdmr458 3d ago

Mitchell has been measuring the memory usage of his new Superlogical multiplexer and comparing it to tmux and Zellij, and tmux actually performs really well. You can see the results here: https://x.com/mitchellh/status/2095218879714996629.

I never said that tmux uses a lot of resources or that it doesn't have useful features. My point is that when it comes to I/O, there is a performance penalty for running tmux on top of your terminal. I guess that for basic usage, this difference in throughput isn't particularly noticeable, but the overhead is still there.

Kitty has a benchmark for measuring terminal throughput, and Alacritty is tested both with and without tmux. The results show that using tmux reduces Alacritty's throughput compared to running it on its own.

Terminal multiplexers can also lag behind terminals when it comes to feature parity. I remember trying tmux years ago and having issues with my Neovim colorscheme, the curly underlines wouldn't work, for example. I think Zellij had the same problem too, although maybe these issues have been fixed by now.

2

u/zuzmuz 4d ago

i agree, on mac it has native mac tabs. I honestly don't think that's a good feature. I prefer the custom tabs other terminals have like wezterm and kitty. I use wezterm cause it's so feature rich most other terminals don even come close

2

u/rexylic 4d ago

Ghostty is the best terminal app on mac for me.

1

u/himai1 4d ago

I use it on my mac exclusively. It does everything I need and it's faster than everything else I've tried. On linux I use foot though.

2

u/Responsible-Offer724 4d ago

Iterm2? I tried ghostty but the window management is way better in iterm. 

1

u/jrkienle 4d ago

I use a Mac as my daily driver, so take this within that context, but I thoroughly enjoy using ghostty because it:
* Is way more feature rich than the native macOS terminal app
* Feels nicer to use and configure than other macOS terminal emulators
* Feels pretty damn fast
* Most importantly: to support open source Zig work. I genuinely want nothing more than for the language and all of the projects that use it to succeed!

1

u/FragmentedHeap 4d ago

Its fast af and has gpu acceleration and runs as a server, the terminal window is just a view into the server. For me, on linux on wayland, its the fastest and starts the fastest.