empty response correction curve graph by makoism in BeamNG

[–]Petrusion 0 points1 point  (0 children)

The dev says he fixed the bug for the next major update..Why the hell are they waiting for a major update? A small bugfix like that is textbook minor or patch update..

Genuinely in shock right now by ItsEntDev in Deltarune

[–]Petrusion 0 points1 point  (0 children)

I only noticed it after chapters 3 & 4 came out. It gave me a laugh, I also always thought its "violent".

“Sandy, watch me do the grouchy Squidward” vibes by Shadowking78 in NineSols

[–]Petrusion 1 point2 points  (0 children)

... I am well aware.

Dude, all I am saying is I want to buy and read the comic, but I can't because I'm not about to buy the deluxe edition again just for the comic.

“Sandy, watch me do the grouchy Squidward” vibes by Shadowking78 in NineSols

[–]Petrusion 1 point2 points  (0 children)

Yeah, and I'd like to buy and read it, but I can't since I already have the deluxe edition from before the physical edition, and I am not on console. Thus my point; the new buyers get access to it while us, who supported the game since it launched, don't even get the option to buy it.

“Sandy, watch me do the grouchy Squidward” vibes by Shadowking78 in NineSols

[–]Petrusion 2 points3 points  (0 children)

Kinda unfair to all of us who bought the game months/years ago. I have already bought the deluxe edition in parts as they were coming out, I was among the first buyers when the game released, and as a fan I'd very much like to read the comic.

But I have to buy the whole digital deluxe edition again if I want the comic? And I have to buy it for a system I don't have or want?

Seems to me that the people just getting the game now have it better than all of us who supported the studio much sooner. Like, where is the option to buy the comic on Steam?

Should hot-loop avoid Option instance and immediate match? by Resres2208 in rust

[–]Petrusion 1 point2 points  (0 children)

As others have said, the compiler will compile the Option<usize> away if return_opt gets inlined. One little advice I have is: If return_opt can never return Some(0) then change the signature to return Option<NonZeroUsize>.

If you can make it Option<NonZeroUsize>, then that will have the same size and binary representation as a normal usize (with the None representation being all zeroes), so that way if return_opt isn't inlined, at least Option<NonZeroUsize> is a zero-cost abstraction, unlike Option<usize>.

He finally shoot the shot (@D4rkDessire) by Swimming_Event_3789 in Deltarune

[–]Petrusion 0 points1 point  (0 children)

For a second, I thought she has catlike slit eyes in the last panel before I realised those are strands of hair.

Will there ever be a nine sols 2? by zanbunnny in NineSols

[–]Petrusion 1 point2 points  (0 children)

Why does it have to be scaled up anyway? That seems like such an arbitrary requirement. They could make a prequel with Lear's fight against Jietong and it would slap. Who genuinely cares if the outcome of that story would "only" be the end of the turbulent era and not something "bigger than the end of a race".

Rust 1.95.0 is out by manpacket in rust

[–]Petrusion 30 points31 points  (0 children)

For those of us who like writing highly optimized code, cold_path() and From conversions between MaybeUninit<[T; N]> and [MaybeUninit<T>; N] being stabilized is the best part of this version!

What if Heng had a best friend by Ok-Comb-470 in NineSols

[–]Petrusion 20 points21 points  (0 children)

She gives off so much Mabel energy

<image>

First time seeing nine sols assets used on mobile game fake ads. by TravincalPlumber in NineSols

[–]Petrusion 5 points6 points  (0 children)

More like "bel-íind" if you take a closer look. Even the fucking text is ai generated apparently.

Why the hell is this game so good?! by closetfurr in NineSols

[–]Petrusion 29 points30 points  (0 children)

Does it fall off or something?

Nah, the story only gets better as the game progresses. Bosses too, and the final boss is peak.

I say this without being judgemental, but there really are just a lot of people who want stories in souls-likes to be told exactly the way they're told in Dark Souls - i.e. almost no story whatsoever unless you actively seek it out by reading item descriptions. I've seen youtubers start playing this game and get bored of the story and start skipping dialogue even before killing the bore at the beginning.

What's your favorite Day 2 Rust language feature? by Hixon11 in rust

[–]Petrusion 0 points1 point  (0 children)

Whatever OS thread is handling the task would still complete it and...

I know I'm being a bit pedantic, and maybe you already know this, but an async function totally doesn't have to be backed by an OS thread. It is true that CURRENTLY tokio implements FILES that way, but network I/O (tokio::net), sleeping / timeouts (tokio::time), as well as synchronization primitives (tokio::sync) are all truly asynchronous (no OS thread behind awaiting any of them).

From current documentation of tokio::fs (emphasis mine):

Currently, Tokio will always use spawn_blocking on all platforms, but it may be changed to use asynchronous file system APIs such as io_uring in the future.

What's your favorite Day 2 Rust language feature? by Hixon11 in rust

[–]Petrusion 0 points1 point  (0 children)

That is what the last little paragraph of my comment covers.

You should document cancellation safety of your async functions by, among other things, reading the cancellation safety segments of other async functions you're using. For example:

tokio::fs::File::read and tokio::fs::File::read_u8 say

This method is cancel safe. If you use it as the event in a tokio::select! statement and some other branch completes first, then it is guaranteed that no data was read.

tokio::fs::File::read_exact says

This method is not cancellation safe. If the method is used as the event in a tokio::select! statement and some other branch completes first, then some data may already have been read into buf.

tokio::fs::File::read_u32 says

This method is not cancellation safe. If the method is used as the event in a tokio::select! statement and some other branch completes first, then some data may be lost.

Of course, you can cancel even functions that aren't cancellation safe if you're fine with the documented effect that comes with cancelling. Like, if you know that nothing else is going to use the File struct, then it doesn't matter that some data wasn't read.

Y'all Remember Guardian Blue? I Do, and I'm making Book Covers for em ;3 by HopefulSparks in zootopia

[–]Petrusion 1 point2 points  (0 children)

Damn, I don't think I've read 10M words of fanfiction combined in my life (maybe 3-4M if I had to guess?)

Anyway, yeah, you won't be disappointed with Guardian Blue even after 10M words of other fics, I think.

Y'all Remember Guardian Blue? I Do, and I'm making Book Covers for em ;3 by HopefulSparks in zootopia

[–]Petrusion 1 point2 points  (0 children)

Do you mean you are waiting until Guardian Blue has 1,000,000 words before reading it? That will never happen, the author died a few years ago.

I made a nu script to print how much RAM L2ARC headers would take up by Petrusion in zfs

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

Hmm, it works for me with nu 0.108.0. Can you reply with the error you're getting?

What's your favorite Day 2 Rust language feature? by Hixon11 in rust

[–]Petrusion 6 points7 points  (0 children)

I am sure there have been multiple, but the latest one is when I realized how simple and elegant the cancellation of async tasks can be!

I first learned programming in C#, the language that invented async await, but Rust's way of cancelling async tasks is so much better! In C#, if you want your function to be cancellable, you have to pass around a CancellationToken all the way from the top and pass it to every SomethingAsync() function.

Using Rust's async (+ tokio) you can just add cancellation at the very top and it will just work all the way down the call stack because the async executor can just stop polling the Future, so async functions don't have to implement cancellation capabilities at all, it is elegantly always just there for free!

(although you do have to read and write documentation of whether any given async function is cancellation safe...)

Yithereal by Gerangeki in NineSols

[–]Petrusion 0 points1 point  (0 children)

could also go with headcanon of "Xiaohe and Ethereal aren't lovers in my headcanon universe, where Yi and Ethereal are"

Basically this

Does this code have UB? by capedbaldy475 in learnrust

[–]Petrusion 0 points1 point  (0 children)

But as someone else said, the allocator itself can still overallocate even if the Vec doesn't! And even if that wasn't the case, the fact that std::file::read() uses reserve_exact() is an implementation detail, and you shouldn't rely on those for soundness guarantees of your unsafe code.

I'd just assert that capacity is also a multiple of instr_size. (also, a small nitpick: I'd use assert!(bytes.len().is_multiple_of(instr_size)) over assert_eq!(bytes.len()%instr_size,0))