News for hackers. Stuff that matters.
Re:What I Learned About MP3 Encoding by sp1rit on Wednesday October 11, 2023 @02:09AM (#37841478)
> 16k lines of obscure C, riddled with pointer magic and arcane memory manipulations? No thanks

Given the popularity of the library I'd imagine it's quite well tested. I also fail to understand why he attempts to port libshine from C to Go when he could just port the header files from LAME as FFI bindings instead. That should also ensure comparability with windows, as I'm sure such a library us also buildable on windows, given that ffmpeg uses it and ffmpeg works on windows.

Re:What I Learned About MP3 Encoding by miki123211 on Wednesday October 11, 2023 @05:42AM (#37842546)
Go programmers usually avoid C bindings if at all possible.

Pure Go can be cross-compiled easily, but that goes out the window once you include C code. You can make it a bit easier by using Zig as your c compiler, but it's still a bit of a pain. If you want to expose your code as a Go package, the situation gets even more complicated.