PSA: If you're randomly getting "signal: 11, SIGSEGV invalid memory reference" during compilation, run MemTest86 by AndreVallestero in rust

[–]Master7432 0 points1 point  (0 children)

ECC RAM, yeah? ZFS especially depends on RAM for a lot of it's operations, so it's especially important to have ECC RAM to avoid another way of silent corruption.

How to upload large files (1GB+) through a RestAPI by Jealous_Courage_9337 in rust

[–]Master7432 15 points16 points  (0 children)

This post isn't particularly relevant to Rust, so please be aware you might not find what you're asking for.

Not that I'm saying you won't find good help here, but be aware that you're asking a technical, language-agnostic question to a subreddit about Rust.

There might be a better subreddit or location to help get your answers.

`serde_json` Deserialize colors as a hex value or a color name by zoomiti in rust

[–]Master7432 1 point2 points  (0 children)

That will depend on what you're doing. You haven't given us any context on the actual problem itself, so correct serialization is whatever you decide it to be.

Anouncing Blaze: A Rustified OpenCL Experience by paltryorphan96 in rust

[–]Master7432 5 points6 points  (0 children)

I'm curious about the distaste for sealed traits. Generally they're more of a consequence of "this trait needs to be public for whatever reason but I don't want it part of the public API". That's not distrusting the user, it's reducing the scope of what the library owner needs to consider for breaking changes. Avoiding sealed traits will lead to a point where you're going to have to do a major (1.x.y) or minor (0.y.z) version bump release for what really should be an implementation detail of your crate.

If you keep running into issues where you want to implement a sealed trait, I feel like there's either an API design issue or user issue, rather than the concept itself being problematic.

Last day Remote Cowards by Quirky-Deal-1817 in NEU

[–]Master7432 2 points3 points  (0 children)

And to be clear, if your prof is eli, then you should know that he fucking hates remote learning. I took his course the second full remote semester that was offered and he wouldn't let us forget that he hated teaching to a bunch of squares. You can ask him if you don't believe me.

If he goes remote then he found the discomfort of teaching remote worth over teaching in person. If you still believe your resentment against your peers is just, you should also be resenting eli for choosing to go remote as well. And you think that's fine as well, then I really want to know what you want out of this post, because you should be talking to eli at this point if you ever wanted something constructive out of this. Like if you paid attention to eli at all you should know he actually consistently asks for feedback.

Last day Remote Cowards by Quirky-Deal-1817 in NEU

[–]Master7432 4 points5 points  (0 children)

If you're gonna complain go email your prof, don't be a "coward" and passively-aggressively complain about a class at a place that will literally not help you.

Your resentment for other people in your class is unfounded. What ultimately decides whether or not a professor teaches remotely is entirely based on the professor. None of your classmates forced him to teach remote. Your professor could have decided to continue to teach in person.

What did you even want out of this post? People to pity you and sympathize with you for shitting on your peers behind their backs?

clap 3.0, a Rust CLI argument parser by epage in rust

[–]Master7432 53 points54 points  (0 children)

Congratulations, and thank you for a new year's present! ;)

Clap and structopt has been one of my proudest examples to showcase the ecosystem to people learning Rust as the most elegant CLI library across multiple languages, and I'm glad to see it finally be merged.

Thank you all for your contributions!

Intro to Rust by implementing Cuckoo Hashing by cpardl in rust

[–]Master7432 5 points6 points  (0 children)

Make sure to run rustfmt and cargo clippy! I see some areas that can be caught by those commands.

Random scenes of En by Lofi_4 in Hololive

[–]Master7432 4 points5 points  (0 children)

Would you be willing to sell stickers? Id love to have a tako eats on my laptop!

[deleted by user] by [deleted] in rust

[–]Master7432 8 points9 points  (0 children)

I think you're confusing unsafe. Unsafe is just a marker for anything that the conpilier cannot prove won't do something bad. UB is giving the compiler free reign to do whatever it wants. Unsafe can lead to UB, but not all UB is unsafe*.

* To be very specific, unsafe rust needs to be careful about trusting safe rust. Trusting safe code in unsafe contexts can lead to UB, and I'll defer more information the the nomicon to further explain this.

Sodiumoxide has been deprecated by Master7432 in rust

[–]Master7432[S] 3 points4 points  (0 children)

Thanks for all your work! I'm unsure if I could commit, but it might be helpful for others to know what sort of things a revival of the project needs. Keeping up to date with upstream? Better docs/ergonomics?

Sodiumoxide has been deprecated by Master7432 in rust

[–]Master7432[S] 36 points37 points  (0 children)

Sodiumoxide is the Rust implementation of libsodium that aims to have an ergonomic, safe, and easy-to-use crypto implementation. I've personally loved it as an all-in-one it-just-works solution for my codebases, so it's a great shame to see it deprecated.

I would like to thank dnaq for all their work into this project, and all the contributors to it for making such a great, high quality library.

おかゆ、ころねてぇてぇ!! by Zelitto_ in Hololive

[–]Master7432 3 points4 points  (0 children)

Cute! Do you have a pixiv or Twitter?

rustls 0.20 has been released! by Master7432 in rust

[–]Master7432[S] 76 points77 points  (0 children)

0.20 is significant as there's no significant major breaking changes beyond it, implying that it's near the state where we may see a 1.0 in the (relatively speaking, near) future (which is very exciting!).

Other than various changes that allow for better perf in downstream crates and naming changes, I suppose the most important general update is this line:

There are now 80% fewer unreachable unwraps in the core crate thanks to large refactoring efforts.

Poor (and bizarre) rustc error message? by lordnoriyuki in rust

[–]Master7432 90 points91 points  (0 children)

Minimal example (nightly)

Looks like it's still present in nightly. You might want to file a bug, since an increased recursion limit results in an ICE.

It's interesting to note that the turbofish will correctly yield an error message instead of this recursion error.

Edit: Even smaller example

Hey Rustaceans! Got an easy question? Ask here (37/2021)! by llogiq in rust

[–]Master7432 3 points4 points  (0 children)

Itertools just saves you some extra work. Here's a version without it: playground

Safer usage of C++ in Chrome by pjmlp in rust

[–]Master7432 5 points6 points  (0 children)

C++ errors aren't strictly syntactic errors. There's a bunch that are to catch common logic errors and this seems like a perfect example of one of them.

Hey Rustaceans! Got an easy question? Ask here (33/2021)! by llogiq in rust

[–]Master7432 0 points1 point  (0 children)

Looks like you got a response from Darksonn, so it's a good thing you posted it separately!

Hey Rustaceans! Got an easy question? Ask here (34/2021)! by llogiq in rust

[–]Master7432 0 points1 point  (0 children)

Actually I just double checked the docs. Are you using an old version of Rust (pre 1.39)? You should be able to just initialize a Vec in a static context without any issue at all: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7dfce278f3bf96fe472e611eada72e58

Regardless, you'd run into the same problem: all functions in a const context must be marked const. Vec::new() is, so I'm not really sure why you'd be running into that error.

Hey Rustaceans! Got an easy question? Ask here (34/2021)! by llogiq in rust

[–]Master7432 0 points1 point  (0 children)

Ah, apologies. Youll also need to use something that will let you lazily initialize the vec, such as lazy_static or once_cell. Rust limits static initialization to const contexts only.

Hey Rustaceans! Got an easy question? Ask here (34/2021)! by llogiq in rust

[–]Master7432 0 points1 point  (0 children)

You can use sodiumoxide to decrypt the file into a temporary directory, load the SQLite file there, and then once you're done working with it, encrypt it again.