HackerLangs
TopNewTrendsCommentsPastAskShowJobs

assbuttbuttass

1,336 karmajoined 5 anni fa
https://news.ycombinator.com/item?id=37272485

Submissions

ProjectM – Cross-Platform Music Visualization Library

github.com
2 points·by assbuttbuttass·7 mesi fa·0 comments

comments

assbuttbuttass
·l’altro ieri·discuss
I couldn't find anything about this from a search, do you have a link to the bug tracker or something?
assbuttbuttass
·7 giorni fa·discuss
If someone manages to become a world class chess player, they are likely very good at chess
assbuttbuttass
·8 giorni fa·discuss
> 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
assbuttbuttass
·mese scorso·discuss
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
assbuttbuttass
·mese scorso·discuss
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
assbuttbuttass
·2 mesi fa·discuss
> 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
assbuttbuttass
·2 mesi fa·discuss
> 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
assbuttbuttass
·2 mesi fa·discuss
Interesting, thanks
assbuttbuttass
·2 mesi fa·discuss
Also C++/Java static initialization, C# static constructors, or Rust global variable initialization, ...

Most languages have this feature Afaik
assbuttbuttass
·2 mesi fa·discuss
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_
assbuttbuttass
·4 mesi fa·discuss
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:"
assbuttbuttass
·4 mesi fa·discuss
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.)
assbuttbuttass
·4 mesi fa·discuss
The incels have grown up and now work at the Pentagon
assbuttbuttass
·5 mesi fa·discuss
This still doesn't help when you update your compiler to use a newer model
assbuttbuttass
·5 mesi fa·discuss
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
assbuttbuttass
·5 mesi fa·discuss
> 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
assbuttbuttass
·5 mesi fa·discuss
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...
assbuttbuttass
·6 mesi fa·discuss
> 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
assbuttbuttass
·6 mesi fa·discuss
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
assbuttbuttass
·6 mesi fa·discuss
Screen sharing works in Zoom now, you'll have to find a new cherry-picked example