News for hackers. Stuff that matters.

benjacksondev

Re:Show HN: Multiply your binary math skill with 24bitsa.day on Friday January 17, 2025 @08:29AM (#42737294)
Yeah, seems to be happening since OP posted. I played the game a few times (3 days in a row). It was fun. But, what I found was strange with the game was the most significant bit was on the right. So, 10000000 was 1 instead of 64; took a while to get used to.

Kafka falls back to an advertised listener, is there a performance penalty?

In Kafka it will fallback to a different advertised listener if one of them is not available. This is required for us to enable a stretched cluster (brokers on the cluster 1 try to resolve to internal address before trying external address for brokers on cluster 2, vice versa).Would there be a significant performance penalty when setting up like this, especially if its by design?I guess it does...

( Read More... | no comments | on HN )
Re:Bash: Creating and Managing Child Processes on Sunday November 24, 2024 @03:08PM (#42230099)
Hey PopGreene, initially, `$child_pid` was set, but I refactored to use `$!` throughout instead. It must have been an oversight when I refactored `$child_pid` out, as the script still passes with the `$child_pid` not set. This is because running `wait` without an argument exits successfully. With `$child_pid` no longer set, it should be replaced with `$!`; otherwise, the script does not wait until the child process is terminated.

To clarify, the `wait` is there to avoid zombie processes, which is the script's intention; it should not be `$child_pid` but instead `$!`.

I've amended the post; thank you.