Live data from Hacker News

Interview with Mitchell Hashimoto about Ghostty and Zig

alexalejandre.com

211–220 of 281 posts

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#211
post #175

Earlier quoted context omitted.

You mean ADA? I'd agree, at least gcc can compile it so it's not limited to the very few architectures that rust supports.

> not limited to the very few architectures that rust supports Of all the complaints about rust, this strikes me as one of weirdest. How much code do you actually write for architectures outside the Tier 3 support list?

0 because it's not supported.

However I did write ADA and C for those.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#212

> I want to make the terminal a special place for applications. The PTY’s in-band signalling (an unstructured byte stream with escape sequences) is a big problem. The Nushell ecosystem tries to fix it with another layer, but we need a fundamental improvement. Many people dislike the Microsoft ecosystem, but PowerShell gets a lot right with structured data. I wish they would say more. The little nushell I used was a r…

Structured data as the communication medium between shell applications is so obviously a good thing, once you've used it, the Unix way of chopping up text with flags and formatting utilities seems barbaric. PowerShell got it half-right but blundered by talking in binary blobs of .NET objects instead of structured text; it was an understandable decision given how Microsoft worked at the time, but held it back from greatness.

But it's not clear how to get from here to there; Nushell doesn't seem to be catching on. I sometimes fantasize about adding two more standard streams, stdstructin and stdstructout, to go with stdin/stdout/stderr, which by informal or formal standard would write JSON (or whatever). Then coreutils and other programs could adopt them gradually and fall back to stdin/stdout whenever encountering a program not using them, and we could have gradual migration while keeping backward compatibility.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#213
post #136
post #111

> I don’t like the Rust culture. There’s no better way to put it. Every time I’ve interacted with them or hear how they talk about Rust, I just don’t like it. I wonder if it's not that different people have entirely different experiences: If you are outside the rust community, you'll mostly interact in the context of language flame wars, "why don't you just rewrite it in rust", etc. That is, you interact with the (sm…

Zealots are a problem in every community, sadly. Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. The zealots just don’t understand (or acknowledge) how “all else being equal” does all the heavy lifting. As somebody who’s fascinated by programming languages in general…

> Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead.

But all other things are not equal, are they? A vital piece of software written in C that has been battle-tested and optimized throughout its two, three, four decades or more of existence does not magically improve if it gets rewritten in Rust. Not only does that not make sense in theory, we've also seen it in reality with the issues with the coreutils rewrites.

You can make a solid argument that new software written completely from zero would be better served by being written in Rust than C. But the "just rewrite it bro" types are so incredibly obnoxious and out of step with reality.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#214
post #136

Earlier quoted context omitted.

Zealots are a problem in every community, sadly. Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. The zealots just don’t understand (or acknowledge) how “all else being equal” does all the heavy lifting. As somebody who’s fascinated by programming languages in general…

> all else being equal, most C software would indeed benefit from being written in Rust instead I don't even think this is true. You can certainly say "the security of computer systems would be a little bit better if most software was written in memory safe languages" (even more so if you went a bit further and said "with automatic memory management"). However, a lot of software exists and is useful , and the only re…

I think we're in violent agreement, because when I said "all else being equal", I really meant all else.

If a language's mental model doesn't mesh well with yours, that's in and of itself an ever-flowing fountain of bugs, and a legitimate reason not to use it. This isn't a valid excuse to not give unfamiliar languages an earnest try, but does justify different people reaching different conclusions afterwards.

The single most important part of the mental model for programming in Excel is precisely that it takes people who tell themselves they could never be programmers, and tricks them into believing they aren't really programming, so they're "allowed" to do it by themselves. It's an incredibly empowering piece of tech. Rust and Zig and Haskell and all the other languages that excite me personally can never hold a candle to that.

> Each language, whether it's F#, Haskell, Common Lisp, PHP, ... brings with it its own kinds of expressiveness and usefulness, and ecosystems of programmers and libraries/modules form around it.

Preaching to the choir :)

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#215
post #136

Earlier quoted context omitted.

Zealots are a problem in every community, sadly. Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. The zealots just don’t understand (or acknowledge) how “all else being equal” does all the heavy lifting. As somebody who’s fascinated by programming languages in general…

> Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. But all other things are not equal, are they? A vital piece of software written in C that has been battle-tested and optimized throughout its two, three, four decades or more of existence does not magically improve if…

If you don't like rust for whatever reason, use any other memory safe language. If you need more convincing that bugs and vulns are dropping let and right from decades old battle tested software, ask anyone with access to frontier ai sec models.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#216
post #136

Earlier quoted context omitted.

Zealots are a problem in every community, sadly. Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. The zealots just don’t understand (or acknowledge) how “all else being equal” does all the heavy lifting. As somebody who’s fascinated by programming languages in general…

> Rust zealots are in the unfortunate position of having the tiniest bit of objective truth on their side — all else being equal, most C software would indeed benefit from being written in Rust instead. But all other things are not equal, are they? A vital piece of software written in C that has been battle-tested and optimized throughout its two, three, four decades or more of existence does not magically improve if…

Yes, that's exactly my point — they're holding on to what is arguably a tiny kernel of truth, and blowing it way out of proportion. And, to be clear, "zealot" isn't meant as a compliment.

And yes, coreutils is a great example of what I mean. The GNU project was always meant to be the basis for a production grade operating system. I mean, GNU Hello is just a hello world program, and its source weighs in at 707kB zipped (or 3.6MB unzipped). The purpose is having a trivial application that can serve as reference for all the standard practices of the GNU Project. No amount of writing things in Rust can replace the engineering mentality that leads to GNU Hello existing. In comparison, as I understand it uutils was first and foremost an educational project that got coopted into being used in production. Things are very much not alike here.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#217
post #211

Earlier quoted context omitted.

> not limited to the very few architectures that rust supports Of all the complaints about rust, this strikes me as one of weirdest. How much code do you actually write for architectures outside the Tier 3 support list?

0 because it's not supported. However I did write ADA and C for those.

> However I did write ADA and C for those.

Ok, but recently? I too wrote code for obscure platforms once upon a time, but not in, say, the last 15 years.

Now that PCs, game consoles, and mobile devices are basically all either amd64 or ARM, there's just not such a long tail of weird platforms to develop for.

(the embedded world I will grant you, still lots of bespoke toolchains running around in that space)

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#218
post #155

Earlier quoted context omitted.

I think you're mistaking text-with-structured data for structured data itself. Because unix shell is irrevocably text-oriented, kludging in something like JSON is basically the best that can be done when you start to want to do structured operations on structured data. (I'm sympathetic to your point about the AWS CLI tools doing JSON by default though--that just sounds like bad design.) Being text-oriented imposes dr…

the point is well-taken, but i do want to show the bash version just for fun: podman image ls --all | sed 's/\s\s\+/\t/g' | tee >(head -n 1) >(tail -n +2 | sort -hrk 5) >/dev/null this is _still_ all text, and we're relying heavily on sort to do a bunch of internal parsing and be in agreement with podman about how sizes should be formatted. also, for "real world" work, i dunno if the tee trick here has any kind of or…

A variant:

  docker image ls -a | stdbuf -oL sed -r 's/\s{2,}/\t/g' | { head -n1; tail -n+2 | sort -hrk5 -t$'\t'; } | column -ts$'\t'
I used docker since that's what I have installed and I assume the output is equivalent.

sort's -t is set to tab for field separation.

stdbuf sets sed's output to only buffer a line at a time and flush, so the head in the {...} command group doesn't completely consume stdin's contents before it's passed to tail.

The column command recreates the space-aligned table based on tab-delimited input.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#219
post #111

> I don’t like the Rust culture. There’s no better way to put it. Every time I’ve interacted with them or hear how they talk about Rust, I just don’t like it. I wonder if it's not that different people have entirely different experiences: If you are outside the rust community, you'll mostly interact in the context of language flame wars, "why don't you just rewrite it in rust", etc. That is, you interact with the (sm…

What would you say is a good starting point for learning Rust? I’ve been curious about it for a while, but coming from a mostly Python, I’m straight up intimidated and fear wasting time trying to learn something I won’t really ever fully be competent in…

[deleted]

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#220

Earlier quoted context omitted.

I read the comment that they were referring to and it wasn't even constructive conversation in the thread. It was basically a complete derail to backdoor in a conversation about why they think everything should be in Rust. OpenBSD still uses CVS, C and Make because that's what works for them. They will continue to keep using C, Make and CVS but that enables them to be productive with the contributors that they have.…

“A complete derail” is doing some heavy lifting there. This is a wide ranging discussion board, not the OpenBSD forums. That shit is fair game even if you don’t like it. (It’s annoying, sure - because dev tribalism is the most played out thing in this industry - but overall the topic can be an interesting discussion point)

there's plenty of Rust posts to talk about Rust.

I come to an OpenBSD post to talk about OpenBSD. Rust isn't even really tangentially related.

Post reply on HN