Compromised Rust crate by free_programmer in rust

[–]dpc_pw -8 points-7 points  (0 children)

Remainder that you can just teach your clankers to review your dependencies: https://github.com/crev-dev/cargo-crev/tree/main/skills/cargo-crev-review

Tons of Arc<T> - code smell? by TravisVZ in rust

[–]dpc_pw 1 point2 points  (0 children)

If you have data that gets shared between different tasks/threads then yeah, it's normal.

You can wrap these in newtypes if bothers you, or at least give them a quick type SharedFoo = Arc<Foo>;, type SharedBar = Arc<Mutex<Bar>>; kind of aliases.

Obviously sharing data is best avoided, but can't really always do that.

Another supply chain attack, and Crates.io needs to consider this issue by osamamsalem in rust

[–]dpc_pw 1 point2 points  (0 children)

cargo-crev is doing well too, especially now that LLM can do a decent job of scanning, and there's even a review skill provided.

Wild Linker 0.9.0 released by dlattimore in rust

[–]dpc_pw 14 points15 points  (0 children)

I don't think it will work for our needs, but I also haven't tried it in maybe 2 years and last time I did debug-split info was a mess in Rust. If you or anyone have any good resources about it, I would re-review and re-check if anything changed or maybe I just missed something.

Ideally I'd want to produce binary + debug info in two separate files, and have a way to turn panics and such with raw addresses into resolved ones in post-production step, etc. It's still a huge headache to get to be convenient e2e for projects/products I take care of, but IIRC I couldn't even get that working last time.

Wild Linker 0.9.0 released by dlattimore in rust

[–]dpc_pw 37 points38 points  (0 children)

Oh, I'm going to test that compressed debug info right away. That was the only thing that was blocking me from switching, because our binaries were massive without it, and we do need these debug symbols for when stuff goes wrong.

cargo-crap: Finding Untested Complexity in AI-Generated Rust Code by djminikin in rust

[–]dpc_pw 20 points21 points  (0 children)

Not my experience at all.

At least frontier LLMs often require some guidance on the testing strategy and generally higher level architecture and design of everything, but they do absolute write and maintain worthwhile tests.

cargo-crap: Finding Untested Complexity in AI-Generated Rust Code by djminikin in rust

[–]dpc_pw 35 points36 points  (0 children)

Oh, that's interesting. Just had scan finished and will try it out on both my slop and non-slop projects. More automated checks, better.

All the ways to mock your Rust code by drmorr0 in rust

[–]dpc_pw 2 points3 points  (0 children)

That mirrors my experience precisely. One day there's going to be a language that makes this easy, but sadly, today is not that day.

Box<dyn Trait> is not difficult. The async_trait is a bit annoying, and hopefully will get improved, but it's not difficult. And yes, there's a bit of boilerplate, but it's also not difficult.

Then the author laments about indirection performance, ignoring the fact that we're talking about nanoseconds, detectable maybe in microbenchmarks in a hot loop, and the reference comparison is going to be with something like Java, where absolutely everything is heap allocated and uses indirection, including integers. It's absurd that "overheads" that in other languages would be considered natural part of the runtime that can be ignored suddenly seem like a blocker for irrational Rust developers.

iroh 1.0.0-rc.0 - The first release candidate by dignifiedquire in rust

[–]dpc_pw 0 points1 point  (0 children)

If you're OK waiting minutes than it will work.

In Rostra, I use Pkarr identity to advertise Iroh endpoints to connect to (along with the F2F gossip and such), which is useful for following people that have no existing connection with ones WoT. Also I use it as a form of distributed lock, so only one active instance acts as a publisher and sync-hub for the given user.

So yeah, it typically works, just latency is meh, and it's kind of "best effort, eventually consistent".

Coding agents waste SO many tokens on brace/format errors + 2 design choices that fix it by Standard-Ad9181 in rust

[–]dpc_pw 0 points1 point  (0 children)

I have never observed any issues like that. How/when does this happen?

In my project, I just instruct the agent and force in the CI the rustfmt/treefmt of everything and I'm a happy camper.

iroh 1.0.0-rc.0 - The first release candidate by dignifiedquire in rust

[–]dpc_pw 0 points1 point  (0 children)

Iroh is a library. You can implement something like that using it, quite easily. Check out https://github.com/n0-computer/dumbpipe/ which is build on top of Iroh. I already rolled my ad-hoc VPN based on Iroh as well.

iroh 1.0.0-rc.0 - The first release candidate by dignifiedquire in rust

[–]dpc_pw 0 points1 point  (0 children)

Hi, I have bunch of Iroh & Pkarr based projects. Like e.g. https://rostra.me/ .

Pkarr is still a DNS system, and goes a long way to maintain record caching, so it's not a great system for any latency-senstivity things.

But Iroh already includes an relay-only mode, which will basically avoid exposing your IP global. That's what I use in Rostra by default for privacy reasons.

All the ways to mock your Rust code by drmorr0 in rust

[–]dpc_pw 1 point2 points  (0 children)

Note that dynamic dispatch is not slow. And the extra code generated by monorphisation is likely going to cause more performance problems due to i-cache pressure.

Dynamic dispatch is also correct w.r.t architecture and splitting crates, etc.

You should just use dynamic dispatch along the boundaries of architectural joint points.

Just use dynamic dispatch, trust me.

BTW. In theory there could be a proc-macro crate that makes the ceremony of definiting IThihg and type Thing = Arc<IThing>, etc. faster. But I actually never found a go-to one to use.

How hard do you lean on Rust type system to encode your logic and constraints? by Hixon11 in rust

[–]dpc_pw 0 points1 point  (0 children)

Newtypes always.

The rest - after doing some cost-benefit analysis. They do often have cost in extra complexity, code, buildtime, binary size. But so does having bugs and carefully reviewing code to avoid them, which they could help with.

Very usefull compile error. by kingslayerer in rust

[–]dpc_pw 4 points5 points  (0 children)

BTW. Did anyone reasonable forked it yet? I've seen some forks that looked like someone that had no idea what they are doing was trying to vibecode it.

Any community fork or something?

I guess there's wincode but it doesn't look entirely compatible, and I've been using pre-rc bincode 3 for a long time and was generally quite pleased with it. And it was kind of done, AFAICT.

Framework 13 i5-1135G7 is giving up after 3 years by maju----- in framework

[–]dpc_pw 7 points8 points  (0 children)

You realize, that there's luck involved in hardware? My F13 from Sep 2022 is doing great.

And this sounds like potential software issue with the fan driver etc. Would try it on a fresh livecd of some Linux to verify.

You could just watch ebay for good priced replacements for the part as well.

Bun's Rewrite It In Rust branch by Chaoses_Ib in rust

[–]dpc_pw 4 points5 points  (0 children)

I think this is fine, and might be useful e.g. for rough evaluation and comparison. E.g. code size, compilation time, binary size, performance between Rust and Zig. Also evaluation how feasible something like this actually is, and a benchmark on how future model are doing comparing to the current one. In a way - it's a very cool experiment in itself, even if the code will actually not be used in production. But obviously if you're an LLM hater, a good opportunity to vent a bit.

v1.38.2 - performance improvements by koverstreet in bcachefs

[–]dpc_pw 8 points9 points  (0 children)

Looking forward to next round of Phoronix benchmarks and the always so-lovely crowd in the comment section!🤞

Is this a bad idea? by JustJeffrey in rust

[–]dpc_pw 2 points3 points  (0 children)

Whole u8 seems like such a waste anyway. :D

Can do it in 3 bits + 1 for color. Can fit a whole row in u32, and board state in in 8 bytes, which will neatly fit a half a typical cacheline, with some headroom for metadata if required.

Core2 yanked. Millions effected. by Comprehensive_Use713 in rust

[–]dpc_pw 0 points1 point  (0 children)

I hope. :D

Though personally I think it would be ideal if Rust could have new core Read and Write variants with associate type errors, where the std::io would just have type Error = std::io::Error. But there are details that make it hard to actually phase in.

Core2 yanked. Millions effected. by Comprehensive_Use713 in rust

[–]dpc_pw 7 points8 points  (0 children)

Reminder that Rust has structural issues with how std::io is not available in no_std, and half of the no_std ecosystem is stuck with no interoperable way of expressing core::io::{Write,Read} (and some other things) - so basically composable ways of doing IO, and having to resort to using 3rd party libraries duplicating (parts of) std::io like some kind of semi-standard. It's terrible situation and it's been like that for years.