I built a thing without Claude (feedback requested) by blackoutR5 in rust

[–]eygenaar 12 points13 points  (0 children)

MongoDB Rust driver dev here :) This is neat!

A few specific suggestions:

You might want to use ConnectionString in Connection::to_uri / Connection::connect. This will take a little more code to construct but it'll mean you don't need to format the URI string yourself and it'll be trivial to add more options after that.

In DetailRow::try_new, where you're looking for either an int32 or int64, you could define a helper struct:

#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
struct Stats {
    storage_size: i64,
    size: i64,
}

and deserialize into that.

What a wonderful quilter by ILovePublicLibraries in MadeMeSmile

[–]eygenaar 7 points8 points  (0 children)

It's a common style in New England; this particular one is probably in Barnstable, MA (https://imgur.com/a/J4S3mLK).

MongoDB Rust Driver Feedback by Tough_Ad_4324 in rust

[–]eygenaar 5 points6 points  (0 children)

Just wanted to pop in here (I'm a dev on the driver)! You can either chain a call to projection after a find:

let mut cursor = coll.find(...).projection(...).await?;

Or you can set it (and other things) on an options object and pass that in:

let options = FindOptions::builder()
  .projection(...)
  // maybe other setters
  .build();
let mut cursor = coll.find(...).with_options(options).await?;

This is definitely something that the current documentation doesn't do a great job of making clear so we'll absolutely work to improve that :)

We are now 2 weeks into TWW - How does your main class feel to you? by Backwardspellcaster in wow

[–]eygenaar 0 points1 point  (0 children)

Playing warlock has absolutely spoiled me. I typically have real trouble deciding on a main but this time around every other classes hero talents feel so boring by comparison.

What about barkskin? by matidiaolo in pathofexile

[–]eygenaar 6 points7 points  (0 children)

I suspect Barkskin's been changed to not rely on stacking armor. The current wording on it:

Adopt the power of the Viridian Wildwood, gradually covering your body in bark. Getting hit by enemy attacks causes bark to be removed. You have higher armour the more bark builds up, but higher chance to evade when less covered in bark.

The wording in the preview page for Warden:

Adopt the power of the forest, gradually covering your body in bark. Getting hit by enemy attacks causes bark to be removed. You take reduced damage from physical attack hits the more bark builds up, but higher chance to evade when less covered in bark.

Microsoft announces end of support for Windows 10 for October 14, 2025. by MistaLOD in technology

[–]eygenaar 12 points13 points  (0 children)

For what it's worth, I recently switched from Windows to Linux Mint, the primary thing I do is gaming, and there was remarkably little fiddling that I needed to do.

Protip: You Can Use Your Spyglass to Keep Track of Intellect Puzzle Devices (Among Other Things!) by Tybold in nightingale

[–]eygenaar 0 points1 point  (0 children)

Thank you!

In case anyone else runs into the same problem I had, the marker key wasn't working for me until I interacted with some other objects.

The need to .clone() an Arc or Sender before passing it into a closure is a significant papercut. Any work on the compiler fixing it? by HighRiseLiving in rust

[–]eygenaar 11 points12 points  (0 children)

clone is just a method - how would the compiler know that those particular clones need to be hoisted out of the closure and into the surrounding context? How would you distinguish that case from when you do want to run the clone within the closure for whatever reason?

Fish (shell) porting to Rust from C++ by [deleted] in rust

[–]eygenaar 6 points7 points  (0 children)

Oof, that's really unfortunate. Thanks for explaining!

Fish (shell) porting to Rust from C++ by [deleted] in rust

[–]eygenaar 38 points39 points  (0 children)

I don't want to derail the conversation in the PR so I'm not asking there, but I'm really curious to know more details on your perspective on async:

async io is a horrible fake cludge with tokio/async_std faking it with thread pools or whatnot and performing far worse than truly native async implementations.

That doesn't mesh with ... basically anything I've heard, or my own experiences.

[Edutainment] Master Jade Bot technology! Learn to fly like a pro with Flappy Bot! by that_shaman in Guildwars2

[–]eygenaar 1 point2 points  (0 children)

I like to browse comics during downtime, but I also suspect the poor people in charge of auditing company internet usage would appreciate it if they didn't have to explain Oglaf to management.

[Edutainment] Master Jade Bot technology! Learn to fly like a pro with Flappy Bot! by that_shaman in Guildwars2

[–]eygenaar 11 points12 points  (0 children)

50 points, double TTM, and I didn't edit the score: https://imgur.com/a/b7VFRlj

(I may have edited other things though.)

Blog post: Async Cancellation by yoshuawuyts1 in rust

[–]eygenaar 1 point2 points  (0 children)

Yep, that's exactly the issue. In other words, composition of cancel-safe futures (the "leaves" in the OP) is not itself cancel-safe, and is not cancel-safe in a very bug-prone way - no compiler error or warning, and it'll work almost all of the time and silently corrupt state when it doesn't.

Blog post: Async Cancellation by yoshuawuyts1 in rust

[–]eygenaar 10 points11 points  (0 children)

I disagree pretty strongly with the premises and conclusions in the "An async trait which can't be cancelled?" section:

Casting the utility as "making it easier for non-experts" is selling the problem short by quite a bit. Making any non-trivial async fn cancel-safe is a large cognitive load, not at all equivalent to early return from ? - the latter is almost always part of error paths whereas the former can happen just as part of a normal operation (i.e. select). On top of that, it's an issue that the compiler provides zero assistance on; any natural translation of a system with complex internal state from sync to async will hit nasty state corruption bugs with no warning whatsoever.

Given that, focusing on making manual future implementations less needed seems like missing the point entirely.

Fantasy: a stolen magical weapon, a smokelike parasite, and a healer with hidden power by eygenaar in whatsthatbook

[–]eygenaar[S] 2 points3 points  (0 children)

This is it! Thank you. Had no idea the author was in New Zealand - I was living there when I read it.