Better HN
topnewbestaskshowjobs
Log inSign up

assbuttbuttass

1,347 karma · joined Aug 6, 2021 (5y ago) · 435 submissions

https://news.ycombinator.com/item?id=37272485
Submissions

comment 3w ago · link · parent

It's actually better in many cases for businesses to hire undocumented workers, since it makes the workers position much more tenuous. They are much less like to unionize, demand higher pay, etc. if the threat of deportation is hanging over their head

comment 1mo ago · link · parent

lmao

comment 1mo ago · link · parent

The main problem is that Goroutine stacks are small, starting at 2KiB. When you're calling a C function, the Go runtime can't know how much stack space the C function will use, so it has to defensively expand the stack in a lot of cases

comment 4mo ago · link · parent

Sounds like a great way to get dozens of dependencies before you even write a line of code

comment 4mo ago · link · parent

And then bisect fails because it finds one of the many commits that broke the test before the actual regression

comment 4mo ago · link · parent

Suppose we have a failing test. For many commits, gp carefully separated their change that would break our test, from the change that would fix the test. At some point, someone forgot to run the tests, and introduced a commit that broke the test without adding a second commit to fix it. Now it's treated as a "pre-existing failure," and many more commits are added on top.

How would you identify the commit that broke the test?

comment 4mo ago · link · parent

Of course, but this thread was in the context of someone "carefully curating" their git history

comment 4mo ago · link · parent

That sounds like it would break bisect

comment 4mo ago · link · parent

We've entered the "bond villain" era of VC startups

comment 4mo ago · link · parent

If someone manages to become a world class chess player, they are likely very good at chess

comment 4mo ago · link · parent

> I must admit I'm a little surprised how many people seem to disable secure boot.

To me, secure boot is the setting that I need to remember to turn off before installing the OS, but I would be willing to be convinced otherwise

comment 6mo ago · link · parent

Hmm I wasn't familiar with join, but it looks like you still need join + fmap for the construction? I believe fmap would also need a generic method

comment 6mo ago · link · parent

It's (sadly) still not possible to express monads with this change, since generic methods can't implement interfaces. You'd probably want something like:

    type Monad[T any] interface {
        Bind[U any](func(T) Monad[U])
    }
However this requires the Bind method to be generic, which still isn't allowed in an interface

comment 6mo ago · link · parent

> Why would there be paranoia when writing blocking code with async?

In languages like JavaScript, you have to be careful to avoid blocking the event loop, and use something like worker threads for CPU-intensive tasks. Otherwise you will end up with long tail latencies. In Go, the runtime automatically manages this and can suspend and resume long-running goroutines.

> naively accessing a global value can lead to race conditions

Fair point that the language doesn't automatically catch this, but that's what a mutex is for. In return you get actual parallelism that can use all your CPU cores

comment 6mo ago · link · parent

> Your entire codebase is now a surface area that is at risk of being blocked

The point of goroutines is that they can freely block when needed. It's not like async where you have to be paranoid at every moment about writing blocking code

comment 6mo ago · link · parent

Interesting, thanks

comment 6mo ago · link · parent

Also C++/Java static initialization, C# static constructors, or Rust global variable initialization, ...

Most languages have this feature Afaik

comment 6mo ago · link · parent

I use lowercase for my personal environment variables. It works well since most programs only depend on variables in all caps. Hadn't thought of using MY_

comment 8mo ago · link · parent

I really want to like Helix, but I wish the developers paid more attention to performance, or were more receptive to outside contributions. Helix can really chug, even on small files, and the perception in the community seems to be "it's written in Rust so therefore it's blazingly fast :rocket-ship-emoji:"

comment 8mo ago · link · parent

Which aspects of Rust syntax are adapted from ML? Semantics sure, but to me the syntax seems a lot more similar to C++ (e.g. semicolons, type parameters using <>, etc.)

comment 8mo ago · link · parent

The incels have grown up and now work at the Pentagon

comment 9mo ago · link · parent

This still doesn't help when you update your compiler to use a newer model

comment 9mo ago · link · parent

Just a personal anecdote, but the errors from Guix are terrible. I had to reinstall because I couldn't figure out the scheme errors for my system config

comment 9mo ago · link · parent

> the thing I hate by far the most in NixOS is .. nix

nix has a pretty steep learning curve, sure

> scheme? Aka Lisp? Seriously???

No nix, no scheme, got it. I wonder which language you would use?

> YAML files exist for a reason.

LMAO

comment 9mo ago · link · parent

Yeah, it only checks whether the last bot comment is older than 30 days, completely ignoring any human comment

    if (botCommentDate < oneMonthAgo) {
        // Close the issue - it's been stale for 60+ days
Hard to imagine how this got past code review...

https://github.com/anthropics/claude-code/blob/5e3e9408feea9...

comment 10mo ago · link · parent

> Writers kept sending to sub.messages. The channel grew. Memory grew.

Channels are buffered in Go, they will not grow unbounded.

> Tickers Are Not Garbage Collected

It used to be necessary in older versions to call ticker.Stop(), but in recent versions it's no longer necessary.

    // Start goroutines
    go s.pumpMessages(ctx, sub)
    go s.heartbeat(ctx, sub)
    
    // Monitor the connection
    go s.monitorConnection(ctx, sub)
The "fixed" code is still using the fire-and-forget pattern for goroutines which encourages this kind of leak. Go makes it easy to add concurrency on the caller side, so it's usually better to write blocking functions that clean up all their goroutines before returning.

In general this article screams AI with most of the conclusions being hallucinated. Goroutine leaks are real, but it's hard to trust any of the article's conclusions

comment 10mo ago · link · parent

I fixed an almost identical bug at work a few months ago: an internal service was calling some network device, and would only fail for IPv6-only devices. Turns out it was trying IPv4 first, and then when it failed, it would retry the request with IPv6, but the request body was already consumed so the retry failed with a cryptic error

comment 10mo ago · link · parent

Screen sharing works in Zoom now, you'll have to find a new cherry-picked example
12345
15