Hacker News new | ask | show | jobs
by Filligree 743 days ago
> The key insight I had here is that, since the end result must be displayed on a terminal screen, there is a reasonably small upper bound on how much memory is required, beyond which point the extra memory couldn't be utilized because it wouldn't fit on the terminal screen anyway.

How large are your terminals?

I'm not sure if this represents lines, or perhaps something else. But on occasion I need to copy things out of my terminal, scrolling while copying doesn't work well, and so I shrink the text size to, let's say, one or two pixels per letter. I suspect Zig won't survive this.

1 comments

One pixel per letter on a 4k screen would be 3840 × 2160 chars at most, so around 8 megabytes if we assume one byte per "character tile" on the screen. I highly doubt Zig would die from this.
The article suggests it’s using a fixed-size buffer of 200 somethings. Seems worth checking, though I have no goose in this race.
If I understand correctly then that's for the number of threads, although I also think that the sudden switch from terminal size back to the topic of threads is confusing so I agree that it's not entirely clear what the connection between the two is - or if there is none, that the structure of the article makes that confusing