Better HN
topnewbestaskshowjobs
Log inSign up

sapiogram

922 karma · joined Aug 18, 2014 (12y ago) · 345 submissions

Submissions

comment 1y ago · link · parent

My build times also included fetching dependencies, which only took a few seconds on my modestly fast 8 MB/s network.

comment 1y ago · link · parent

Thanks for actually including the slow repo in your comment. My results on a Ryzen 5900X:

* Clean debug build: 1m 22s

* Incremental debug build: 13s

* Clean release build: 1m 51s

* Incremental release build: 24s

Incremental builds were done by changing one line in creates/symbolicator/src/cli.rs.

It's not great, but it sounds like your experience was much worse for some reason.

comment 1y ago · link · parent

Thank you, the comment has value now.

comment 1y ago · link · parent

Haters gonna hate. If you're working on a project that needs performance and correctness, nothing can get the job done like Rust.

comment 1y ago · link · parent

My feelings exactly. Go was particularly disappointing, it promised everything but only felt like a sidegrade from Java. Screw it, a downgrade, until go errors get stack traces.

comment 1y ago · link · parent

Interesting, got any links to more information?

comment 1y ago · link · parent

It's the exact same on Linux.

comment 1y ago · link · parent

That was absolutely not true in the "early 2010s", not even 5 years ago unless you wanted to seriously compromise on some other aspect of the display.

comment 1y ago · link · parent

This issue happens without any scaling at all, on both Linux and MacOS.

comment 1y ago · link · parent

It's not, the font renderer just sucks outside of high-DPI displays.

comment 1y ago · link · parent

Yes yes, all your friends are rich, good for you.

comment 1y ago · link · parent

If that was true, it would be very nice if they just acknowledged that...

I don't know the internals of Zed well, but it seems entirely plausible they're doing text rendering from scratch.

comment 1y ago · link · parent

It's not an issue on high-DPI screens. Try again with an external monitor. It's much worse on light mode.

comment 1y ago · link · parent

Thank you, I bring this up in every Zed thread on the internet, hopefully the devs will eventually fix it. Until they do, Zed is simply unusable on regular-DPI displays, at least in light mode. See these screenshots:

Example Zed screenshot, using "Ayu Light": https://i.ibb.co/Nr8SjvR/Screenshot-from-2024-07-28-13-11-10...

Same code in VS Code: https://i.ibb.co/YZfPXvZ/Screenshot-from-2024-07-28-13-13-41...

comment 1y ago · link · parent

This comment is incorrect, I have tried the editor on both MacOS and Linux, and texts looks like crap on both if you're using your screen at its native resolution. The difference is easily visible in screenshots.

Example Zed screenshot, using "Ayu Light": https://i.ibb.co/Nr8SjvR/Screenshot-from-2024-07-28-13-11-10...

Same code in VS Code: https://i.ibb.co/YZfPXvZ/Screenshot-from-2024-07-28-13-13-41...

comment 1y ago · link · parent

No, I think Youtube really is the product. With Premium, you don't see any ads (at least the ones Youtube makes money from), and there's no way "tracking" makes them anywhere near as much money as a simple premium subscription.

comment 1y ago · link · parent

Ah, good to know the other side is now throwing out voter fraud accusations as well.

comment 1y ago · link · parent

His facts have no sources, so also worthless.

comment 1y ago · link · parent

The guy is an American political journalist, his opinions here have exactly zero value to me.

comment 1y ago · link · parent

I don't think anyone is going to starve to death because they can only spend 1000EUR...

comment 1y ago · link · parent

Wonderful work!

...although the fact that a 3x speed improvement was available kind of proves their point, even if it may be slightly out of date.

comment 1y ago · link · parent

> My rule of thumb is that the goroutine that writes to a channel is responsible for closing it. In this case, a deferred call to close the channel in HandlePlayer is sufficient.

This isn't your rule of thumb, it's the only practical way to do it. The problems arise when you have multiple goroutines writing to a channel, which is the case here.

> Still, this example has other issues (naked range over a channel?!) potentially contributing to the author’s confusion.

You sound way more confused than the author. I think you've misunderstood what the (admittedly very abstract) example is supposed to be doing.

comment 1y ago · link · parent

As a language user? Just stop using them entirely. It's what most people do eventually.

comment 1y ago · link · parent

> So if the default position is unbuffered channels (which it should be), you then realize at some point that this is an inferior version of cooperative async/await.

I feel so validated by this comment.

comment 1y ago · link · parent

You joke, but this is not uncommon at all among channels purists, and is the inevitable result when they try to create any kind of concurrency abstractions using channels.

Ugh... I hope I never have to work with channels again.

comment 1y ago · link · parent

You're not bad at Go, literally everyone I know who has tried to do this has concluded it's a bad idea. Just stop using channels, there's a nice language hidden underneath the CSP cruft.

comment 1y ago · link · parent

Unfortunately, Go also made their channels worse by having their nil semantics be complete lunacy. See the "channel API is inconsistent and just cray-cray" section in the article.

comment 1y ago · link · parent

Absolutely nothing has changed at the language level, and for using channels and the `go` keyword directly, there isn't really tooling to help either.

Most experienced Golang practitioners have reached the same conclusions as this blog post: Just don't use channels, even for problems that look simple. I used Go professionally for two years, and it's by far the worst thing about the language. The number of footguns is astounding.

comment 1y ago · link · parent

You've misunderstood the example. The `scores` channel aggregates scores from all players, you can't close it just because one player leaves.

I'd really, really recommend that you try writing the code, like the post encourages. It's so much harder than it looks, which neatly sums up my overall experience with Go channels.

comment 1y ago · link · parent

> When I moved them over to Kubernetes, I also applied CPU resource limit, each in its own pod. I set the limits based on what I measured when they were all running on PM2 ... but the same code running on Kubernetes ran with 10x less CPU overall. Why? Because the async code were not allowed to just run grabbing as much CPU as it can for as long as it can, and the kernel scheduler was able to fairly run. That allowed the entire system to run with less resources overall.

As someone who has advocated against Kubernetes CPU limits everywhere I've worked, I'm really struggling to see how they helped you here. The code used 10x less CPU with CPU limits, with no adverse effects? What were all those CPU cycles going before?

12345
12