HN Simulatornew | past | comments | lists | submit | mitchellh's commentslogin

These are Ghostty GUI release notes, but I want to take a moment to highlight the libghostty progress we've made since Ghostty 1.3.

As a reminder, libghostty is the highly portable, embeddable library that provides core terminal emulation, render state, and more. I always felt that a free, high qualty, lightweight, reusable terminal emulation core would benefit the developer world more than any single GUI application. And that is playing out!

It is and always was my true purpose with the Ghostty project (I said this in my first ever talk about Ghostty!). I've jokingly said many times that Ghostty GUI is just a glorified tech demo for libghostty. That's not fair though, because GUI is great and there are really talented people working on it.

Since I started the project, Ghostty has always gotten people saying "I don't understand why you'd start a terminal emulator today." Well, the answer is libghostty. It's truly unique and its enabling something special (imo!).

Highlights of libghostty since 6 months ago (none of the below was true 6 months ago):

- Libghostty has nearly 100% coverage of all of Ghostty's core (and you can compile with flags to remove any of these features for size/safety): https://libghostty.tip.ghostty.org/

- Libghostty now builds and is tested (in CI) for: Apple (macOS, iOS, visionOS), Windows (MSVC and GNU), Linux, FreeBSD, Android, WebAssembly, and freestanding (i.e. direct on hardware with no OS).

- Libghostty has bindings in pretty much every popular programming language: C, Zig, Go, Swift, Python, Rust, .NET, etc.

- Libghostty's memory requirements have dramatically shrunk to enable the portability above. There's still work to do but a single empty terminal now takes 90% less memory. And at scale I've proven 10,000 active (input/output happening) terminals on a Linux server with 4 cores and 8 GB of RAM.

- Libghostty powers all JetBrains IDE terminals, over 12.5 million active users. https://blog.jetbrains.com/platform/2026/10/jetbrains-termin...

- Libghostty is the most popular core behind the wave of venture-backed "agentic" terminals and editors, such as Herdr, cmux, and many others.

- Libghostty is being discussed and has been verbally accepted to replace the terminal core in Neovim: https://github.com/neovim/neovim/pull/39773 (work still to be done)

- Libghostty powers a really popular and powerful terminal emulator for emacs (Ghostel): https://github.com/dakra/ghostel

- Libghostty's speed is used by Antithesis to fuzz popular terminal programs and has directly led to hundreds of bug fixes sent upstream to programs such as tmux, btop, shells, and other terminal emulators. :)

- And so much more: https://github.com/Uzaaft/awesome-libghostty

Libghostty is really successfully turning into the tide that raises all boats. As it becomes more popular, Ghostty itself gets more performant and stable, and so does everyone else. It is also a vehicle for delivering modern terminal emulation to the widest source possible.

I plan on tagging libghostty 1.0 in the next few months and declaring ABI stability at that point!


Because of your multiple "I am tired of saying this, but this text was written by me and not an LLM" in your blog posts, I want to tell you that I read it word for word. :D I know this comment adds not much but I felt it needed to be said.


One almost forgets how easy it is to read a wall of text when it was written by a human. This was nice to read (also because you can feel it's got care behind it).


I have been reading through pharma textbooks written before AI and realized it's so relieving to follow language that has been crafted over multiple editions by humans. When I started to realize how much easier it was for me to read textbooks than the average AI-assisted text, that's when I realized we are truly cooked (at least for this chapter of AI + writing).


Can you give an example of a pharma textbook that has gotten worse during the AI-slopp-ocalypse? Bonus Internet points for sharing any especially egregious passages!


They didn't claim they've read ai pharma textbooks, just used a pharma textbook (which I guess is heavy to read) as a comparison to being easier to read than ai written text.


[flagged]

Yeah, I thought the pharma bit was potentially performative, but I want to give OP the benefit of the doubt, as is customary here on HN.


"One almost forgets how easy it is to read a wall of text when it was written by a human. "

Erm, this really depends on the human I think.


Amen. I'll never, ever stop writing my own articles by hand.

I don't mind if my English isn't entirely idiomatic and all my sentence constuctions aren't "by the book" correct. I want to write, and I want anyone reading my writing to know that it's the product of thinking and editing that's unique to me.


you mean you don't like phrases like "here’s what they don’t tell you" !?


At this point I just get frustrated reading AI prose. I tried for the past few months to just shut my mouth and force myself to read AI prose, since r/singularity wasted no breath telling people how they're Luddites for not marrying an AI.

But I can't do this any longer. I'm tired, boss.


You were right to call me out on that.


And the real load-bearing part? It's not that, it's this. And honestly? That's great!


They should train AI for this, God it would help.


Lowkey so true. I was wondering why I was able to read to the end without getting lost or distracted lol


When I am tired, it's when I know I am alive.


what a great quote.

here's another:

"when i am sad, i have to remind myself that sadness i feel so as to qualify me to enjoy and feel joy."

this is not mine, it's a paraphrase of a poem verse from Mawlawi (aka Rumi in the West).


As an aside, I once saw someone cite something somewhat profound and cited Rumi as the source, and I was like "hm that doesn't sound like him but maybe I'm just uncultured."

Turns out they were quoting Rumi from K Pop Demon Hunters and I indeed am uncultured.


haha. well consider me uncultured wrt to K pop Rumi.... I didn't know about it until your comment.

The one I am mentioning is جلال الدین محمد بلخی رومی So the sufi saint.


I'm from the KDE project, and have been working on a new frontend built on libghostty-vt to hopefully one day ease our maintenance burden.

It's been a quite smooth experience, and I remain very excited about the lib. I believe you are successfully setting the standard. Big congrats for your 1.4.0!


Ooooo, will this end up in Konsole / konsolepart? Or will it be a new app?


It'll be a new app, but it does provide a drop-in replacement for konsolepart (along with also having a QML module API for embeds into Qt Quick-based app, closing a gap Konsole currently leaves open). I'm sure it'll be some time before it would be ready to replace Konsole as default, also because conversations like that take some time and are a community process.


Oh Konsole while great (efficient and feature-rich) is showing its age and has a bit of a widget bloat and an unwieldy configuration system. For that reason I switched to Kitty a couple of years ago when I was transitioning to neovim I'm have not looked back since.

This looks like a great opportunity for the KDE project to rethink its terminal application for the modern age. Text-based config would be amazing though not sure how it'll fit into KDE Frameworks etc.


Surely you know konsolerc is text-based, right?


Plus one on this one. I have chezmoi apply my konsole settings onto every new machine and sync the settings between machines as I modify them over time.


Thank you for your work on this. When I was working on neovim core and started dealing more and more with the edge cases of libvterm and terminal emulation in general, I had the same thought "we should just have a gold standard library for this." But that was 6/7 years ago (2019) and a lot of stuff happened in that interim unrelated to engineering that demotivated me from pursuing it.

Periodically, I would run into TUI issues and think "I should just finally do it," especially around wanting to replace tmux in general. But I knew from experience the long tail of annoying issues for terminals that it's more time consuming than it appears, and so I again never bothered.

Thanks for the good work to raise all boats :)

I tend to move away from terminal emulation towards GUI when I can (and using custom remote protocols somewhat inspired by arcan), but TUI is still useful for a while. I actually had a need for a good terminal emulation library for the fallback TUI/pty attachment for non-gui programs for my supervisor, so I'll try out libghostty.


libghostty is brilliant and I'm very glad it exists. ghostel in Emacs is completely brilliant and so fast compared to anything else, a wonderful project fascinated by libghostty. another i might mention is zmx [ https://zmx.sh/ ] - process persister (detach, attach) with panes, tabs, hijacking the terminal. i always end up using tmux just for persistence and then am frustrated I can't remember how to copy etc. zmx has more features than some things of a similar nature and my understanding is that it's able to be taking advantage of libghostty things.

(a couple of us working on packaging libghostty and ghostty proper to for Guix at the moment )


Any plans for Ghostty to have the history of the terminal window reloaded on restart? Like the Mac native terminal app does? I am a heavy terminal user with a lot of tabs open, and after I restart the computer for whatever reason, I would like to have my terminal(s) as I left them.


Use tmux or something like it (I now use zmx[1]).

[1] https://github.com/neurosnap/zmx


I am not interested in workarounds.


The feature you're asking for is a terminal multiplexer. You want one built in, but to suggest terminal multiplexers are a workaround to requiring a terminal multiplexer is a stretch.


It is not a terminal multiplexer feature, it is one of the terminal software itself.

I do not know if you read my initial commment, but MacOS Terminal (native app) has this feature. And it is not a terminal multiplexer like tmux or what you proposed.


Why static output history for a session/tab with reload on restart should be a multiplexer feature? I mean, the Ghostty GUI has already multiple tabs and split terminals, aren't those multiplexer features as well? I don't follow you.


> Libghostty now builds and is tested (in CI) for: [...] freestanding (i.e. direct on hardware with no OS).

That's really cool, but I'm drawing a blank; what's it used for? Embedded terminal something?



> Libghostty now builds and is tested (in CI) for: [...] freestanding (i.e. direct on hardware with no OS).

I am really impressed. When I had read your original comment, I literally shouted oye! (meaning woah) because of how interesting it felt. Glad that I can see the demo as well.

But aside from the fun little demo, what are the real use cases that we can think of as well.

here are some that I have thought of

1. SSH'ing into a terminal (VPS) or being able to view what the AI agents are doing on that VPS and controlling them very thinly in your pocket.

2. I have a slight dream that I'd like to chip in but I always wanted to create something like monkeytype but on embedded-hardware. Something which can just plug to TV's and people can connect a keyboard and start to type.

3. Or another idea but being a book reader and having it connect to some library resource

(2) & (3) for the underdeveloped regions.

Maybe (1) can be good as well and could very well be a small computer terminal which can teach/help the underdeveloped regions.

I live in India and I see it first hand how genuinely just want to create some extremely minimalist software on extremely cheap hardware to make funding of them easier and more scalable.

This also makes the constraints work good as one of the govt's basically spent a lot of money providing mid/high end tablets to every children and it turned out to be quite catastrophic because although it was kiosked because it was just intended to watch videos or read resources.

Children paid people to crack it and then started using instagram on it. My mother is a govt. teacher and she strongly thinks that it was a waste of resources and even the parents of the children and local village meeting committees think so as well. I remember reading some local news articles about villages conducting meetings on how to prevent their children from such instagram addiction so quickly after the tabs were given.

I would like to hope that maybe someday someone creates the more optimal solution to the problems that I discussed and libghostty comes handy to the situation. Thanks for making it and have a nice day :-D


Okay, that's fun:) ...so if I use this on an ESP* with a physical display and keyboard attached, at what point does it stop counting as a terminal emulator again?:)


I hadn't thought about this angle -- inspiring as expected from Ghostty hacking!

Just took our TinyBubbles framework (TinyGo + BubbleTea) and added TinyGhostty [1]. We had all the parts in place.

The web demos use Booba [2] and our ghostty-web fork, so that's libghostty embedding another libghostty. The source cells are composited into our TinyHAL device abstraction. The UX is presented using "Booba Actions" which abuses OSC 7501.

This describes the differences between TinyGhostty and go-libghostty [3]. I've run other demos on embedded devices, but not this one yet. The fonts could use some love.

[1] https://nimbleterminal.github.io/TinyBubbles/?demo=tinyghost...

[2] https://github.com/NimbleMarkets/go-booba

[3] https://github.com/NimbleTerminal/TinyBubbles/tree/main/tiny...


Is libghostty in charge of its own rendering, or can I bring my own renderer?


As a fairly recent ghostty user I was surprised with how quickly it became my default terminal. Very smooth experience so far.


Just wanted to say thank you for all your contributions to our industry, Mitchell. I love Ghostty and your vision here, and evangelize it whenever I can.

It's a pleasure reading your posts.


Thanks for the work on getting libghostty 1.4 out! :D

Wanted to add too that I can't wait for xterm to eventually support libghostty, you've been super supportive providing feedback!

https://github.com/xtermjs/xterm.js/issues/5686


That's xterm.js. Xterm is an entirely different piece of software.


Agreed on the value of libghostty. I switched from vterm to ghostel recently and it's solved some refresh issues I previously had with vterm when using CLI coding agents in emacs.


Maybe I’m just dreaming here but how far off is libghostty for Linux consoles?


I prototyped this last week. Unfortunately the apprt abstraction I used isn’t something ghostty will externally support. So a proper console port needs to be rebuilt on libghostty.

But if you run nix you could give it a whirl: https://github.com/KritR/ghostty-kms


I tried to use kmscon before, and it does work nice and is much faster. But, I can only have one app that is using DRM, i.e., I cannot start console/DRM image viewer from such terminal, or mpv, etc. That is a deal breaker and issue for me.


Yeah ghostty w/ kmscon was able to do images. didn’t try mpv though.


Aha, I wondered why the JetBrains terminals had become so much better recently. Didn't realize they'd made the switch.


IIRC they announced they've done a bunch of improvements to the integrated terminal in the release notes for the current or previous bigger release. But it was not switching over to libgbostty. The linked blog post says "starting from version 2026.3" which is the current EAP release. The post is only two days old.


Thank you for Ghostty! I've got an insane fork (AI generated) that uses variable width fonts and then does math so columns (like in top) still line up!

Any interest in moving console typography past the 80's, since computers are fast now?


Interesting! Have you looked into variable-axis monospaced fonts at all for this project?

https://monaspace.githubnext.com/


Ooh, those are nice! Thanks for the tip.


What's the rough approach? Do you support mixed fixed/variable, like could an editor show mono for code and variable for prose?


How do you know it's supposed to be columnar? Would you have a screenshot?


But can you actually paste into the terminal search popup now? :D Its the dealbreaker that keeps me on iTerm2 on my home machine, and the irritation that has me considering just launching iTerm2 and going back to it on my work machine. I still see the "Update Available: 1.4.0" message but knowing it was fixed would encourage me to close all my sessions and update.


I remember you asking for a contact Apple in the army days to replace their terminal's engine. Hoping it happens in 28.


the web version powers our quickstart via a cloudflare websocket and some custom patches (only on desktop): https://hotaisle.xyz/quick-start

it is all open source: https://github.com/hotaisle/hotaisle-website


Absolutely incredible. You've convinced our team to start getting to work in Zig and we're loving it!! Thanks for all you do


What are use cases of libghostty? Is it for building things like the terminal inside VS Code or any other such GUI application?


When reading the start if your comment describing libghostty, I was thinking: "Surely an example of a cross-platform software that could use such a thing is IntelliJ"

And right afterwards you write that not only it is the case, but the change is very recent !


Awesome, great going Mitchell! And Ghostel, which I'm hearing of for the first time, sounds very exciting.


I've tried to use terminal embedded in jetbrains' IDEs few years ago but they were full of childish errors. Anyway I’ve learned my lesson, and now I only use terminals that aren’t integrated into an IDE.


I know it’s been said elsewhere ITT, but thank you for making and supporting Ghostty!


If I don't want to use the wave of "venture backed ghostty wrappers" for remote mobile coding similar to Claude Code remote, what options do I have? Any plans for a first party remote solution that's not SSH?


rootshell is libghostty and free, doesnt strike me as vc backed


As a first-party remote solution, I've been playing with the beta version of Rex (https://www.superlogical.com) and its remote access is pretty slick!


I am fiending for an invite to Rex. I hope I can use it to replace my Paseo workflow!


If you like Paseo (I love it), keep an eye on Happier. I think they made the right choice by starting from a multi domain architecture rather than Paseo's independent domains shown on the same client approach.


cmux is fully open source and open to contributions. I have worked on its tmux mode a bunch, and I find it good now.


Hello Onavo. Cosyra.com is not venture backed and not a ghostty wrapper! Lets you remote control all your agents from your phone without SSH.


My favorite libghostty project is rootshell which is the best terminal for iOS. (Other than Ghostty itself of course)


Isn’t it written in Zig? Not sure how that is “highly portable” compared to C


Yeah, the definition of "portable" being used is one that is not useful for most users, the fact that it's not in Fedora and neither Debian is a sign of it. Especially considering the demand for ghostty, it's a very cool project.

Someone willing to distribute ghostty has to pull in a whole programing language stack just for it, ghostty seems to be the most important project written in zig so far.

For the definition of portable that matters to me, this is the least portable possible, if it was written in almost any other language it would have been more portable. And yes, this all goes away once zig is onboarded to all distros, then it becomes "empirically portable", but we're not there yet.

PS.: "Portable" meaning which CPU architectures are supported is not a very useful meaning of the word for me, even though it's more accurate, it says nothing about the ability to actually build and run it in different OSes.


> has to pull in a whole programing language stack just for it

That’s implying a lot more than I think is the case for Zig.

Zig itself is a very lean and independent executable. It’s just one binary. Statically linked on Linux I believe. It’s even moving toward removing LLVM dependence.

I don’t know of any other language that aims to be as portable as Zig, including C itself. Of course, not all of those goals have been realised yet, but at this stage I don’t think there’s much preventing portability from Zig’s part itself, other than more architectures supported in its own compiler backend. And I suppose a 1.0 release would make it easier to get the compiler more widely distributed.


Zig can also compile to C so at least it's as portable.


In a sense I would expect C to be the most portable language ever* so I am not sure how good of a comparison candidate it is

* With some UB herbs and spices


From https://ziglang.org/intro/overview/

  Zig is also a C compiler

  Here’s an example of Zig building some C code:

  hello.c
  > #include 
  >
  > int main(int argc, char **argv) {
  >   printf("Hello world\n");
  >   return 0;
  > }
  

  $ zig build-exe hello.c -lc
  $ ./hello
  > Hello world


What does that have to do with portability? It doesn’t support a bunch of CPU architectures, the portability metric I care about.


I misread the comment I was replying to, thinking it was about using Zig to port something, when it was actually about porting something that uses Zig.


I/my agent somehow integrated it into a C++ app on Windows. So one way or another, it does work.


Zig is even more portable than C


You’re kidding right? That’s not what the support matrix on the Zig site shows. Plenty of CPU archs in Tier 3/4. No support for Alpha, HPPA, M68K, Sparc, or SuperH.


"portable" and "has ports" mean two different things. there might be targets Zig doesn't have great support for yet but what I meant is that bootstrapping a target to Zig is a simpler endeavor than it is for C


Is it? I think zig use llvm codegen. Once you got llvm for your architecture, you get 99% of modern language


LLVM codegen is optional, and LLVM is being turned into a runtime dependency.

Zig has its own compiler backend. With limited arch support of course. Only used in debug modes for now.

I think the most interesting part is they rely on WASM for bootstrapping so all you need to make to bootstrap Zig anywhere is a WASM interpreter (if I understand correctly).


Great stuff! If it wasn't for Rex I'd still be using Ghostty daily


Any chance to get quake-style terminal (AKA dropdown terminal) in KDE like guake and yakuake? That is the one thing keeping me from switching.


I'm using the quick terminal setting to do this.

https://ghostty.org/docs/config/keybind/reference#toggle_qui...


I tried so hard to use the quick terminal but it does not work anywhere close to as nice as iTerm2's hotkey window.

  keybind = global:cmd+ctrl+alt+shift+t=toggle_visibility
overall I have had better experience using `toggle_visibility` to show/hide Ghostty for hotkey style window.


Ah thanks, I will check it out.

Last time I checked it didn't work on Linux (or I couldn't make it work on my setup, I don't remember). It seems it still has some limitations but better than before.


Is it feasible to implement the libvte surface on top of libghostty? Might be interesting as a drop-in replacement.


Thank you for libghostty! I'm using it for my own terminal on Windows. I'm quite pleased with it


Curious which terminal is this? I've been looking for a Windows terminal app which uses Ghostty.


I haven't published it. It's a bit different than other terminals. Each program runs in its own box so you can run many commands concurrently without futzing about with additional tabs, or backgrounding, or tmux. It's got a Copy button on each which I absolutely love (useful for sending outputs to LLMs), a Restart button which is fantastic for restarting servers, scripts, and test runners. An 'X' for killing apps that don't want to die from Ctrl+C (or for exiting vim!). Native tab completions. Syntax & error highlighting as you type.

Here's a screenshot: https://files.catbox.moe/932rsg.png

If that sounds interesting I might be willing to publish it, but I'll warn you now that it is vibe-coded. I've been iterating on it for a couple months now though and I think we've worked out pretty much all the kinks.


Sounds very interesting! Would be cool if you could publish it because there are not many Ghostty ports for Windows.


But could it do two rows of tabs?


Thank you for making Ghostty, it’s a pleasure to use it everyday for work :)


Is the launch timed for Halloween parties? Good job team + community!


Thank you, and your team, so much Mitchell.


Why is libghostty better than alacritty?

Although not necessarily advertised as such, I've been successfully using alacritty in several projects injecting terminals into things both serious and silly.


I wouldn’t say it’s better, because that’s very subjective, but it is more “feature complete”. Alacritty is very minimal and rejects community PRs for features often driven by their general ethos. libghostty supports a lot of features I don’t foresee making their way into Alacritty.

I use Alacritty and GNOME Terminal. I don’t have a great reason for not using or trying Ghostty other than I have a minor aversion to Zig. (Again, not a great reason and arguably a not good reason)


I started using Ghostty on Gnome with Helix because that one of the few that supports ligatures. And being user-friendly and not ugly


I am pretty sure that Mitchell has addressed the matter in previous blog posts.


terminal emulation keeps playing a central role in "computing" not withstanding it being an ugly prehistoric crocodile. Do you ever envision creating something modern, without the warts and with a design that incorporates half a century of lessons-learned? Something that fills this need but in a more elegant package? I'm asking because you're one of the few people that seems well-positioned to make a clean-slate replacement

I personally avoid using the terminal as much as possible b/c the whole things feels very archaic/fragile/baroque - but the central idea seems great and I'd love a modern take on it


> Do you ever envision creating something modern, without the warts and with a design that incorporates half a century of lessons-learned?

Turns out that the warts are the incorporation of the lessons learned. For this reason, just before Wayland fulfills its destiny and becomes an immaculate replacement for X11, a new generation of developers will determine Wayland's codebase is too complex to comprehend and must be rewritten from scratch.


Certainly parts of terminals protocols are archaic, but overall it's not nearly as fragile as you make it out to be.


problem is not the terminal, it is the Unix philosophy for CLI programs. Non-structured text piping and bash scripting being major pain points for me personally.

There is no reason why programs input/output can't be schema'ed, consumed and piped in a type-safe manner. And why there can't be a better standard than bash for simple scripts.

But it is really hard to pull this kind of thing off unless you redesign most of the common tools by scratch and do so through a committee and somehow push it down people's throat through strict platform control.


You can rewrite all of the cli utils to fit your preferences. There’s no hard standard for piping (some utility pipe binary) and bash is not a requirement either (a shell is just a program).

No need to push it to people. Do it for yourself and create your community around it.

Also no need to do it from scratch. It’s just the interface part that needs to be rewriten.


The problem is this doesn't do much without buy-in across a wild array of software that isn't developed in lockstep, and that simply isn't going to happen, so text pipes win because they're here and they're ubiquitous and they're useful enough despite the flaws you point out.


the number of gotchas involved in bash scripting indicates to me it's very hard to make robust solutions using the terminal. Trying to understand how things like colors work in the terminal makes the whole thing look very duct-taped together


I am building what you speak of!


> And at scale I've proven 10,000 active (input/output happening) terminals on a Linux server with 4 cores and 8 GB of RAM.

When you say you've proven, are you hinting at use of formal verification?


Here, "proven" can be read as a synonym for "demonstrated".


Right, this was my assumption. I think my question got misinterpreted in terms of tone (viz the downvotes). But I was nurturing a hope that Mitchell might come back and say yes then share some wisdom. :)


I'm super excited for you and this, but this is mostly a highlight list of who is using your library. I was kind of excited to read about the actual changes to the library but I suppose I can go read the changelog on my own.


The distinction between those semantics died a long time ago by others I'm sorry to say, and I'm continuing to persist that.

APC is far less supported overall by terminals (for example, Terminal.app on macOS would simply dump APC to the screen, ignore the framing, and treat the APC data as normal pty data, and Terminal.app is used by a LOT of people). Plus, its anything-goes format makes it hard to ship safe protocols that overlap with others (APC was always meant afaik for _one_ protocol -- the application's, not multiplexing many).

Compare this to OSC which is well supported, has a well defined multiplexing format (the first number), and has a well defined framing that all terminals I know of ignore for unknown values. That's perfect.

As the Arcan project so eloquently stated[1]: "Terminal emulators emulate a machine that has never existed, a fantasy computer." More details in the link by people I respect who have worked on this problem far longer than I have.

[1]: https://arcan-fe.com/2025/01/27/sunsetting-cursed-terminal-e...


Operating System Command actually doesn't have a well defined multiplexing format. That 'first number' is not in the standards. It's a thing that has haphazardly grown as people have tacked more and more stuff onto OSC. The standards don't even guarantee numbers in the command string at all.

In fact, you can say the exact same thing about OSC (it was meant for one protocol, the operating system's) as you just did about APC. Because that's what ECMA-48 actually says: 'The interpretation of the command string depends on the relevant operating system.'

There is no operating system standard for this in the Unices or in Linux-based operating systems. As I said, this is something that haphazardly grew in the last decade or so as people decided that they needed some kind of terminal control string, and how dtterm and xterm had been processing OSC (very limited compared to all of the things that people have nowadays tacked on) was there.


Creator of Ghostty here.

We run on a 6 month release cycle as noted in our release notes. The 1.4 release was scheduled for the last week of September, but it had to be pushed to October due to personal family travel as well as some lagging localization PRs. After we release in October, there won't be another release until March.

I'm actually working on the 1.4 changelog right now and I put out a call for help for the translations yesterday on X. The only risk now is that my 3 year old became very sick today and my wife is out of town, so I'm solo parent and that's now impacting things.

There's been literally over a thousand changes on main between March and today and if you look at our commit history we're extremely active with commits almost every day. So I'm not sure what anyone is trying to imply by sharing this with this title, but please don't read into it in any weird way.


Creator of Ghostty here. Always a fan of new terminals. I noticed your benchmarks are against Ghostty 1.3.1, which is fair, since its the latest released, but our IO throughputs in particularly the areas you tested have improved by more than double on some machines, so if you get a chance, I would ask you rebenchmark on `main`.

I don't know if it'd be faster than your terminal or not, but it'd be significantly faster than 1.3.1. On my M4 MacBook Pro, ASCII processing improved by about 2.8x, if that holds in your benchmarks, it would be faster than shitty. But, who knows. I'd prefer you ran it yourself.


We're currently tied in wall (yours is better at ASCII, while random is worse). But considering that user is better for me in both cases (algorithmic), we'll still have a chance to compete. :)) I've updated the tables.


What are your go-to checks for quality terminals, when you are scoping out something new?


I'll definitely do it as soon as the release happens!


I'd try the master, but I have no experience with the zig ecosystem. I'd end up compiling something wrong and getting weird results. I'd rather wait for the official binaries!


Ghostty provides official nightly builds from the main branch [0]. You do not need to build it yourself.

[0] https://github.com/ghostty-org/ghostty/releases


> Good news is that modern compilers are more than capable of emitting SIMD code even if original source is nothing but.

They're really not (I have a whole section on it in the blog post). This example in the post doesn't auto-vectorize, for example. And its a pretty big part of the overall throughput for plain text runs (ascii or unicode). Really, the point of that section is that almost nothing auto-vectorizes, backed up by LLVM docs and published research.

Instead, writing 12 lines for a 5x gain is way easier than crossing your fingers and hope someone else pays your bills.

Bigger picture, the real point is that this stuff isn't complicated. You wouldn't copy and paste 100 lines because you hope the compiler "lifts this into a for loop", you just write the for loop cause you know how and its simple.

Similarly, the common case of "process N values in parallel" is very simple. Write a dozen lines of code you're comfortable with. No need to pray the compiler people saved your bacon.


Case-in-point, the example in my own post doesn't auto-vectorize with LLVM or GCC at highest optimization levels. Basically, compilers will never auto-vectorize loops with an early loop break afaik.


You would have to give the compiler some help to allow it to auto-vectorize this. Warning, untested: https://godbolt.org/z/b358bMWzG. This unrolls the loop by 16 times. The trick is using `&` instead of `and` so that there's no short-circuiting. All 16 elements are read on each iteration of the loop. This gives the compiler the freedom to replace these reads with a single 16 byte load.

> compilers will never auto-vectorize loops with an early loop break afaik.

I think this is changing. https://godbolt.org/z/ea1E7dx9v. GCC 14 won't try to vectorize this because of the break statement. But GCC 15 does vectorize it. This got a callout in the "General Improvements" section of the release notes: https://gcc.gnu.org/gcc-15/changes.html

I don't think there's any equivalent in clang/LLVM.


You need to let the compiler know that there are at least 4 or 8 elements to process. This may require padding data and/or having a second loop after the main one that processes the remainder <4 or <8 elements.

You start the post with:

> There is an opportunity to use SIMD. SIMD turns those into this: > > for (8 byte chunk in bytes) { /* ... */ }

If you actually wrote that loop, there is a good chance the compiler (gcc specifically) will auto-vectorize.

In any case, the more manual SIMD optimizations I have seen require reworking the data altogether, not just processing N elements at a time. For example, instead of packing two 4-vectors into two registers to do a dot product, pack the XXXXs, YYYYs, etc. into 4 vectors and compute 4 dot products for the price of one. That not only requires having 4 vectors to process, but also thinking how exactly they are packed in registers.

I don't know why qurren is downvoted. You really should see if you can get the compiler to auto-vectorize first (possibly padding data structures and loops) before you write anything by hand.


> You really should see if you can get the compiler to auto-vectorize first (possibly padding data structures and loops) before you write anything by hand.

Counterpoint: https://pharr.org/matt/blog/2018/04/18/ispc-origins

> I think that the fatal flaw with the approach the compiler team was trying to make work was best diagnosed by T. Foley, who’s full of great insights about this stuff: auto-vectorization is not a programming model.

> The problem with an auto-vectorizer is that as long as vectorization can fail (and it will), then if you’re a programmer who actually cares about what code the compiler generates for your program, you must come to deeply understand the auto-vectorizer. Then, when it fails to vectorize code you want to be vectorized, you can either poke it in the right ways or change your program in the right ways so that it works for you again. This is a horrible way to program; it’s all alchemy and guesswork and you need to become deeply specialized about the nuances of a single compiler’s implementation—something you wouldn’t otherwise need to care about one bit.

> And God help you when they release a new version of the compiler with changes to the auto-vectorizer’s implementation.

> With a proper programming model, then the programmer learns the model (which is hopefully fairly clean), one or more compilers implement it, the generated code is predictable (no performance cliffs), and everyone’s happy.


How is that different from any other compiler optimization?

And what does the last statement in the quote mean anyway? When is performance "predictable"; do you freeze the entire toolchain?

And what is the alternative? Handroll manual SIMD code for every possible architecture you may target?

If you're writing C++, you're already rolling on decades of compiler optimization. You return by value because it makes code more readable and safer and rely on RVO. You write functions to abstract and rely on the compiler inlining. When it doesn't work for your specific target/toolchain, you may decide to handroll stuff. The proof that you're banking on the compiler is that if you run a debug build of any non-trivial program, it runs like absolute dogshit.


> How is that different from any other compiler optimization?

When it can be single-handedly responsible for an 8× speedup, you might not want to rely as much on the compiler as in the case of smaller, cumulative optimisations.

> And what is the alternative? Handroll manual SIMD code for every possible architecture you may target?

Use a library like Highway? https://github.com/google/highway


Forgot to add: using Highway also means that you can detect and take advantage of e.g. AVX2 or AVX-512 in one binary that still works on CPUs without those instruction sets, whereas relying on autovectorisation would mean having to build with `-mavx2`, `-mavx512`, etc. which means that pretty much no one who relies on prebuilt binaries would get them.


> mitchell, i know you hang around some of these comments sometimes

hi im here

> i noticed that in ghostty you bring in some c++ libs to do the simd heavy lifting for you. any plans to port that to zig? anything missing from the language or libs that's preventing it?

No plans to port it. For others, this is referencing highway: https://github.com/google/highway

The major limitation of Zig's vectors is that they're compile-time only. So if you're building redistributed software that compiles for a baseline CPU target, it won't be as optimized as it could be for YOUR possible machine.

Highway compiles our SIMD modules for different hardware configurations and at startup does a CPUID fingerprint to figure out which to load. That way even baseline has AVX512 etc. implementations, and we just activate the right one at runtime.

We only use Highway for our hottest hot paths that we feel benefit from that specialization.

No plans to port that (although, I spent hundreds of dollars and slop-forked it into Zig with the help of this good boy GPT and it worked great actually, but I didn't want to maintain it).


ahaaa, yeah, i don't personally do any runtime switching but i hear that as a deal-breaker from other folks.

it's interesting – i've found that zig tends to extend my vectors to the native width of the platform and then operate on them there. e.g. i had a `@Vector(2, f32)` that i was using as a demo and the generated assembly was promoting it to 256 bits and using avx2 instructions on it!


> i've found that zig tends to extend my vectors to the native width of the platform and then operate on them there

oh interesting. though i suspect that isn't zig and thats llvm.


looks like it – compiled as debug (native linux x64 backend) gives me the vector type i've asked for. release modes extend to the "native" width.

this is testing in isolation as well, could be that in the midst of other vector code it changes things. llvm definitely does a great job optimising tightly-written vector code to be even faster.


Why does your website block Tor so I can't read the article?


No idea


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: