Mitchell Hashimoto
๐ค SpeakerAppearances Over Time
Podcast Appearances
web browsers every every independently every person i've run into that's done a lot of text work has landed on oh yeah i read firefox and chromium source code and blink and like all these different things like and that is true of ghosty as well like whenever anyone has been like i want to support this feature and i think how do you make that work you find the answer because web browsers have solved it and they've their cross platform and things like that um yeah
web browsers every every independently every person i've run into that's done a lot of text work has landed on oh yeah i read firefox and chromium source code and blink and like all these different things like and that is true of ghosty as well like whenever anyone has been like i want to support this feature and i think how do you make that work you find the answer because web browsers have solved it and they've their cross platform and things like that um yeah
Yeah, I mean, depending on the audience here, I mean, I think my thoughts on configuration are going to be loved or hated. I've created a good duopoly of people that either love HCL with Terraform or think that I've crapped on the entire industry with this thing that people have to do every day. It's one or the other. No further comment on that, but I think because of that, I think...
Yeah, I mean, depending on the audience here, I mean, I think my thoughts on configuration are going to be loved or hated. I've created a good duopoly of people that either love HCL with Terraform or think that I've crapped on the entire industry with this thing that people have to do every day. It's one or the other. No further comment on that, but I think because of that, I think...
There's a lot of experience I have with configuration. Vagrant was Ruby. Packer has JSON and supported JSON and then now supports HCL. Then Terraform is HCL. I sort of got done the spectrum. And so I was coming into this a little with some experience and opinion. And Ghosty's primary... So its configuration file is a custom text-based non-programming format. There's no conditionals. It's just...
There's a lot of experience I have with configuration. Vagrant was Ruby. Packer has JSON and supported JSON and then now supports HCL. Then Terraform is HCL. I sort of got done the spectrum. And so I was coming into this a little with some experience and opinion. And Ghosty's primary... So its configuration file is a custom text-based non-programming format. There's no conditionals. It's just...
key equals value straight down. People have described it as very any-like, but there's no categories like any. It's just key equals value. The principle why behind that, and I suspect I'm going to have to keep defending this over and over, but the principle why behind it is that the config file and the command line arguments are...
key equals value straight down. People have described it as very any-like, but there's no categories like any. It's just key equals value. The principle why behind that, and I suspect I'm going to have to keep defending this over and over, but the principle why behind it is that the config file and the command line arguments are...
So anything, any key equals value you could set in the file, you could do dash dash key equals value on the command line and they perfectly match. So if you know how to do the CLI, you could do the config file and vice versa. And that's a very important property I want to keep. I think it's very educational friendly to a tool. And then the other reason is because it I could parse it.
So anything, any key equals value you could set in the file, you could do dash dash key equals value on the command line and they perfectly match. So if you know how to do the CLI, you could do the config file and vice versa. And that's a very important property I want to keep. I think it's very educational friendly to a tool. And then the other reason is because it I could parse it.
validate it, and load it in a single forward pass. So this was more of a performance thing, but I don't need to maintain an abstract syntax tree like you might have to with a YAML or something. I could have an array of bytes, you know, conceptually an array of bytes, read one at a time. I only have to keep a small, you know, fixed size back buffer, move forward, and I could parse the config.
validate it, and load it in a single forward pass. So this was more of a performance thing, but I don't need to maintain an abstract syntax tree like you might have to with a YAML or something. I could have an array of bytes, you know, conceptually an array of bytes, read one at a time. I only have to keep a small, you know, fixed size back buffer, move forward, and I could parse the config.
And it is... it is definitely a detail that's probably not super important, but because of that, ghosty has the fastest config parser and you have to read the config every time you start ghosty. And so it's, it's something that I didn't want to waste startup time on. And so that's a big reason why I chose that format as well.
And it is... it is definitely a detail that's probably not super important, but because of that, ghosty has the fastest config parser and you have to read the config every time you start ghosty. And so it's, it's something that I didn't want to waste startup time on. And so that's a big reason why I chose that format as well.
But yeah, I mean, I, I really haven't gotten any from the people who have actually used ghosty. I haven't gotten any pushback on it. It's hard to dislike. I mean, the only thing you might want is like conditionals and things like that. And And I just think philosophically, I tell, you know, those people you should be using Western or something that supports Lua.
But yeah, I mean, I, I really haven't gotten any from the people who have actually used ghosty. I haven't gotten any pushback on it. It's hard to dislike. I mean, the only thing you might want is like conditionals and things like that. And And I just think philosophically, I tell, you know, those people you should be using Western or something that supports Lua.
Like that's, that's not something I'm never, I'm never going to make initializing a runtime loading files, evaluating code, part of the startup path of my terminal emulator. Like it's not going to happen. So yeah.
Like that's, that's not something I'm never, I'm never going to make initializing a runtime loading files, evaluating code, part of the startup path of my terminal emulator. Like it's not going to happen. So yeah.
It has implications. I'm not sure exactly for what yet. I mean, I think the one that popped up first was people wanted a different theme for light versus dark mode. And so that was sort of the first conditional thing that popped up. We solved it in a different way. You can just specify a light and dark theme. as separate config options, pretty straightforward. But there's other ones, too.
It has implications. I'm not sure exactly for what yet. I mean, I think the one that popped up first was people wanted a different theme for light versus dark mode. And so that was sort of the first conditional thing that popped up. We solved it in a different way. You can just specify a light and dark theme. as separate config options, pretty straightforward. But there's other ones, too.