Live data from Hacker News

Interview with Mitchell Hashimoto about Ghostty and Zig

alexalejandre.com

151–160 of 281 posts

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#151
post #115

Earlier quoted context omitted.

Rust is one of the safer languages, but saying that it is "the safest language" is just a baseless exaggeration. Decades before Rust and long before the simplified language that was C, there were safe programming languages, where all invalid operations, numeric overflows or out-of-bounds accesses generated exceptions and where use-after-free was impossible, because either garbage collectors or reference counts were u…

> with appropriate rules, restrictions and discipline This completely misses the point.

The rules can be enforced by a static code checker.

That is really not very different of rules enforced by the Rust compiler.

For someone who does a fresh start, using a Rust compiler may ensure safer programs out of the box, but that does not mean that the same results cannot be achieved by alternative means when using other languages, when the use of those languages makes sense for other reasons, and it is worthwhile to invest resources in making appropriate libraries and tooling.

In general, I recommend against the use of C++ in new projects, but I see much too often claims about things that are supposedly difficult or impossible to do in C++, which are just false.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#152
post #96

Earlier quoted context omitted.

I tried that, but the Rust build process was too painful, and agents seemed to burn a lot of tokens guessing how to get the code to compile. I rewrote my project in Elixir and it’s been going much more smoothly

Elixir is great, and I have recently started using it myself, but its not a substitute for Rust. Try writing device driver in Elixir, or anything CPU intensive.

GP said nothing of what they were building. Seems pretty probable it was a web service/application rather than a device driver.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#153

It's so sad that Rust vs Zig has been dragged into the AI psychosis vs anti AI narratives. I feel people are taking sides or picking and choosing now based on their allegiance and religious values. What good comes out of this?

It's just standard nerd drama. Nothing good comes of it but it doesn't matter at all either. Just shake your head and move on with your life.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#155

This is the only statement I disagree with: > PowerShell gets a lot right with structured data. CLI programs should operate on text. If you want to parse and format it, do so, but the default output mode should be plain text, so that I can pipe it into grep or awk without a second thought. I am continuously irritated that the AWS CLI defaults to outputting in JSON. No one (I hope…) is using that tool in programs; tha…

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 drastic limits on composability. Because there is no structure, every element of a pipeline needs to do its own parsing of the input data. This leads to brittle pipelines where every element is tightly coupled to its input's textual representation.

As an exercise, try to write a pipeline that sorts podman images by size without removing the column headers[0]:

  $ podman image ls --all 
  REPOSITORY                                 TAG         IMAGE ID      CREATED       SIZE
  docker.io/prom/prometheus                  latest      937690d77350  2 months ago  367 MB
  quay.io/keycloak/keycloak                  latest      da9433c9fac3  2 months ago  466 MB
  registry.fedoraproject.org/fedora-toolbox  43          a32da54355ca  4 months ago  2.19 GB
  docker.io/powerdns/pdns-auth-49            latest      8c1385c9deed  4 months ago  208 MB
  docker.io/testcontainers/ryuk              0.13.0      b75bc7ce94c3  6 months ago  7.21 MB
As far as I can tell, there is no way to do this in a manner that's even remotely composable. Your best bet is to basically do everything from within awk. Whatever the result would be, it certainly won't be pretty!

Contrast that with what you can do in PowerShell. You can write a couple of standalone functions[0] that are readable and composable, resulting in this pipeline:

  podman image ls --all |
      Replace-SpacesWithTabs |
      ConvertFrom-Csv -Delimiter "`t" |
      Sort-Object -Property {Convert-HumanSizeToBytes -Size $_.size} -Descending

[0] Repurposing this from a blog post I wrote: https://www.cgl.sh/blog/posts/sh.html#this-should-be-basic

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#156
post #43
post #32

Earlier quoted context omitted.

Powershell commands automatically format the data for you, you can pipe it to grep just fine (I do it all the time). It's just that you can also access it in a structured way if you need to. It's the best of both worlds. Linux tools that are starting to output raw JSON by default are indeed a nuisance, but how else can you achieve structured output if no standard shell supports it? It's a chicken and egg problem.

and new shells are developing features to handle structured data like json: here is an elvish shell command that converts a freetube playlist from json into a list of urls grouped by author: for i (cat 'freetube-playlist-favorites.db' | from-json)["videos"] { mkdir -p $i['author'] print http://youtu.be/$i['videoId'] >> $i['author']/get } here is one to get a list of devices connected to my zerotier network curl -s -H…

Great example! How do you like using elvish? Even though I am a proponent of structured data and like PowerShell a lot (mentioned in a nearby comment of mine), I use fish as my regular shell. Big fan of fish's careful focus on user experience, but would be open to trying something structured.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#158
post #37

Earlier quoted context omitted.

I feel this way about most Hashi tools, they just seem massively overrated to me. Ghostty is fine I guess, I find it to be way buggier than iterm with a fraction of the features. Zig is fine, has some cool stuff, the community seems roughly the same as the rust, with again just way less features. The rest of the hashi tools are fine, I don’t really use any of them anymore. Vault was a big deal at some point I guess

That's so dismissive, the HashiCorp products were a game changer in a world that had very little, Vault and Terraform are super widely used

Ah yeah… it was so fun when vault wouldn't let me store a 4096bit private key because it was too long, so I had to use 2048bit one instead. Peak software engineering right there.

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#159

I've tried to learn rust of the longest time but failed, it's not the community that is the problem but the language itself. It is far from aesthetically pleasing, a child of perl and c++ meta template programming that inherited the worst traits of both. Go and Python are my current preference, and C being an old soul mate.

> C being an old soul mate. Maybe try Odin. Based on what I have read, it’s basically C capability-wise with better ergonomics - a simple language; no objects and limited compile time shenanigans.

I'd like to try out Odin and also Inko, which looks like Rust and Go had a baby. https://inko-lang.org

Re: Interview with Mitchell Hashimoto about Ghostty and Zig

#160
post #110

Earlier quoted context omitted.

Vault can seem niche however it’s used a lot in high assurance environments given it is easily integrated with Thales HSMs and has FIPS compliance

>niche Literally all companies I've worked for a know about use Vault for storing secrets to be used during deployment. It would be interesting to learn that this is different elsewhere.

If in Cloud, then go Cloud native. No reason to run Vault. But on prem, there are limited options and Vault fits the bill.

If you want auto unseal with HSM and don't have to worry about the unseal key shards, then you can hook it up the HSM. Of course, HSMs are expensive and you also have to buy a Vault license.

Post reply on HN