3 ms·
Unused code is one issue. A project called Buz[1] found over 11,000 lines of dead code from the Rust port. [1]: https://github.com/jazzzooo/buz https://github.
by tipiirai 2mo ago
Unused code is one issue. A project called Buz[1] found over 11,000 lines of dead code from the Rust port.
[1]: https://github.com/jazzzooo/buz https://github.com/jazzzooo/buz
- unified101 2mo ago11k out of a million. I wish I had a project under 1% of "dead code".
- verdverm 2mo agothere are linters that check for dead code (depending on your language / ecosystem), it should always be 0%
- jibal 2mo agoThe dead code was removed from the pre-Rust Zig version. The OP has no credibility. P.S. Nor does new user parenting my comments.
- unified101 2mo agoFlag the article and move on.
- dminik 2mo agoI mean, how do you check that your frontend code (possibly not even managed by your team) is calling and needs all of your backend endpoints? I'm sure it can be done, and it probably should, but saying it should always be 0% is not very pragmatic.
- myvoiceismypass 2mo agoDead code likely means chunks of code not used by other chunks of code, which should be easy to determine statically in most modern languages. Whether an exposed endpoint is being hit (used) or not as an API is more of a test-code-coverage thing, different from the concept of "dead code".
- dminik 2mo agoTrue, but Bun actually has a similar problem. It's creating bindings to a JS runtime. If the JS glue code then no longer uses it, the code is still marked as alive because it's registered with the runtime.
- touisteur 2mo agoIn a previous life I managed to deliver a system with (basic-block) coverage measurement compiled in (gcov) but instead of the mess of files gcov generates, the whole coverage structure was streamed to a remote server (it compressed very well). Once that was in place it was an amazing telemetry tool. Later on used Intel Processor Trace in a similar fashion for even finer (mc-dc) coverage. Coverage tools are very useful, if a bit hard to use...
- dgellow 2mo agoYou cannot be serious, any person with actual professional software experience would laugh at that claim
- dvt 2mo agoFirst of all, I'd need to see a diff on that. It's insane to make that kind of claim without backing it up. Second of all, dead code (as in truly dead code: like an if statement that is guaranteed to never be true), is optimized away by the compiler. So even if we had all this dead code, it is not an issue that would ever impact the final product. Third of all, the Bun runtime consists of over a million lines of code, so that figure (again, even if true) is insignificant.
- aureate 2mo ago> It's insane to make that kind of claim without backing it up. A bizarre accusation. It's a fork of Bun that says they removed the dead code. All you have to do to see the diffs is look at its history. Most of the commits are code removal. It's a fork of Zig bun, though, not Rust, so hardly relevant to the AI argument.
- aureate 2mo agoThat was 11,000 lines of dead code removed from pre-rust Bun. In a million lines of vibed Rust Bun I'd be astonished if there was a mere 11,000 unused LoC. Noticing unused code isn't a strength of LLMs in my experience.
- jibal 2mo agoCongrats on completely undermining your own argument and credibility. Did you not even read your link? > Buz is an early-stage experimental fork of pre-Rust Bun.... Over 11,000 lines of dead code removed from upstream Bun.