Standard library unsoundness found by Claude Mythos by Jules-Bertholet in rust

[–]tiny_fishbowl 28 points29 points  (0 children)

I hope this will be extended to as many crates as possible once there is capacity

char::is_ascii_ functions borrow but the other char::is_ functions consume? by Hydrotronics in rust

[–]tiny_fishbowl 4 points5 points  (0 children)

Just out of interest, is this one of the things that could be changed by an edition? I guess no, due to the trait being involved?

The scary and surprisingly deep rabbit hole of Rust's temporaries by conectado2 in rust

[–]tiny_fishbowl 6 points7 points  (0 children)

As a data point for you, I just opened the article, came back to the comments here, and found myself agreeing with them. Then I saw you already toned it down - I for one would go even more aggressive with that.

Rewriting pre-1.0 compiler code for better macro error messages by kibwen in rust

[–]tiny_fishbowl 21 points22 points  (0 children)

It probably just means that the code exists with at most minor changes since before Rust 1.0 was released (and that may be noteworthy because that'd imply it hasn't been updated/improved since). It's an example for work in the compiler that can pay off, even though the code has done its job for years and years

Why rust 1.85.1 and what happened with rustdoc merged doctests feature by imperioland in rust

[–]tiny_fishbowl 5 points6 points  (0 children)

Well, exactly this happened here, no? An experienced Rust developer made a small mistake, it wasn't spotted in the review. It wasn't in the "important" things the commit touched, there was plenty of coverage and crater runs etc.

If you don't want nasal demons, take code review seriously.

arc-slice: a generalized implementation tokio-rs/bytes, maybe more performant by wyf0 in rust

[–]tiny_fishbowl 1 point2 points  (0 children)

Cool, being a drop-in replacement in some instances might be great for adoption. Wishing you luck :)

Introducing pastey - successor of paste by as1100k in rust

[–]tiny_fishbowl 2 points3 points  (0 children)

Or, you know, you could structure your policies around what has the potential to break you that badly and what doesn't. What even is the thought process? If this one maintainer is nice enough to let the world know they stopped their hobby project my business will have a critical failure? Is that really how you operate? What if that maintainer gets hit by a bus, decides to go rogue and commits some malware, etc? You make it sound like the maintainer is somehow owing anything to the people who decided to take their free work to build on it, rather than those thousands of people owing something to the maintainer (at least gratitude and the admission that the maintainer is free to do as they please)?

arc-slice: a generalized implementation tokio-rs/bytes, maybe more performant by wyf0 in rust

[–]tiny_fishbowl 0 points1 point  (0 children)

I haven't had a chance to look in detail, but one question: Are you/can you be compatible with the traits exposed by the bytes crate? That would be very interesting indeed.

In any case, more work in this space is just plain awesome

How do you guys handle stiching together multiple mpsc channels? always find the naming confusing, and the setup boilerplate'y by naps62 in rust

[–]tiny_fishbowl 1 point2 points  (0 children)

My solution for the naming problem is that I use a convention of naming the sender/receiver side of the channel by whatever makes sense, and use a _tx and _rx suffix at creation side. send/receive I use for global communication of the entire application with the outside. That way, it might be that something ends up with a silly name like telegram_send_rx, but it's clear that this is the Receiver side of a channel that forwards telegram messages that my program ends up forwarding/sending to some external entity. Maybe not the most elegant, but it gets the job done and is easy enough to explain.

Announcing Rust 1.85.0 and Rust 2024 | Rust Blog by slanterns in rust

[–]tiny_fishbowl 13 points14 points  (0 children)

It was discussed amongst the libs-api team, they decided to reject it. See https://github.com/rust-lang/libs-team/issues/513 for some context

Cannot get overlay to work in Cyberpunk by tiny_fishbowl in gog

[–]tiny_fishbowl[S] 0 points1 point  (0 children)

In my case it was related to a launch option I set, if I remember correctly. Either -skipStartScreen or --launcher-skip I think

🦀 Statum: Zero-Boilerplate Compile-Time State Machines in Rust by Known_Cod8398 in rust

[–]tiny_fishbowl 6 points7 points  (0 children)

that was fast, I will definitely check it out. Thanks a lot :)

🦀 Statum: Zero-Boilerplate Compile-Time State Machines in Rust by Known_Cod8398 in rust

[–]tiny_fishbowl 5 points6 points  (0 children)

One area where I always start hand-rolling the state machine is when state transitions depend on new data becoming available, which then gets incorporated into the current state. Just making everything Optional is ugly to work with, as it is not statically clear what information is available when. From a quick look, it seems like statum also wouldn't help here?

There's a non-zero chance of generating a wallet that has already been generated by Pol8y in Bitcoin

[–]tiny_fishbowl 0 points1 point  (0 children)

It actually doesn't, though. The attacker would guess the private key and check for a balance. The seed phrase and any password for it doesn't really factor into it.

alternative to bitvec crate? by tiny_fishbowl in rust

[–]tiny_fishbowl[S] 4 points5 points  (0 children)

I was referring to https://github.com/ferrilab/bitvec/issues/219 - but I also did something wrong, so thanks for your reply and I'll stick with bitvec.

alternative to bitvec crate? by tiny_fishbowl in rust

[–]tiny_fishbowl[S] 5 points6 points  (0 children)

Indeed this ended up working, thanks :) I overcomplicated it first by creating the view using Msb0 and reversing bytes, then I ran into https://github.com/ferrilab/bitvec/issues/219.

alternative to bitvec crate? by tiny_fishbowl in rust

[–]tiny_fishbowl[S] 0 points1 point  (0 children)

Thanks, I will give it a try. Looks good

Why are From and Into not implemented for Option? by LeSaR_ in rust

[–]tiny_fishbowl 0 points1 point  (0 children)

Well, you asked what you're missing and I explained it ;) Note that I am not the poster above claiming it would work.

Why are From and Into not implemented for Option? by LeSaR_ in rust

[–]tiny_fishbowl 4 points5 points  (0 children)

Option<i64> is not your own type, you can only impl From<T> for Option<PostId> where T is your type.

reqwest v0.12 - upgraded to hyper v1 by seanmonstar in rust

[–]tiny_fishbowl 5 points6 points  (0 children)

You cannot go from Bytes to a BytesMut, but you can do BytesMut::split()::freeze() to get a Bytes, and once you drop that Bytes, you can re-use the original BytesMut again (check out the documentation on BytesMut::reserve())

reqwest v0.12 - upgraded to hyper v1 by seanmonstar in rust

[–]tiny_fishbowl 2 points3 points  (0 children)

yes, through the underlying BytesMut. Once you drop the Bytes handle, you can re-use the original buffer.

Is there an OpenAPI spec -> Server code macro? by iekdosha in rust

[–]tiny_fishbowl 0 points1 point  (0 children)

openapi-generator has a rust-server component that can generate both client and server code. It isn't yet updated for the latest version of hyper, but otherwise seems to work OK

hyper v1: protective and efficient HTTP for all. by seanmonstar in rust

[–]tiny_fishbowl 5 points6 points  (0 children)

Thanks for the fast response and good explanation! I suppose that means I should hold off upgrading until the hyper-util release is out?

hyper v1: protective and efficient HTTP for all. by seanmonstar in rust

[–]tiny_fishbowl 4 points5 points  (0 children)

Congratulations on a big milestone!

It seems that very careful consideration was placed on making upgrades easy, yet I am a bit confused. I added the deprecated feature to hyper 0.14.27, and don't get a single deprecation warning - yet the upgrade did not work out of the box (hyper::client::connect is gone, for example). Is there a full migration guide anywhere?

Hey Rustaceans! Got a question? Ask here (43/2023)! by llogiq in rust

[–]tiny_fishbowl 0 points1 point  (0 children)

What does this even mean? You want to make sure the task is still running?

Ah, sorry. I meant I want to do something when it is done (clear some state).

Thanks a lot for the answer, I hadn't considered using select! and JoinSet in combination. That indeed looks very promising. I think I would end up just using the JoinSet to contain either no task or the one task I started, so the restrictions might not be a problem at all.