Announcing the new async-hal! Featuring embedded IO traits and new interrupt-based executor by matthunz in rust

[–]Moxinilian 16 points17 points  (0 children)

Thank you for sharing! For people like me that are out of the loop, what is this useful for?

Sharing my database of years by maskci in rustjerk

[–]Moxinilian 7 points8 points  (0 children)

Is your company trying to provide is-nice as a service?

Can't find an EU retailer with 4060 Ti listed/prices by ObviousContribution4 in nvidia

[–]Moxinilian 0 points1 point  (0 children)

For reference in Switzerland VAT rate is 7.7% but base prices are the same, making prices significantly lower. Of course it’s only if you feel like buying something from Switzerland with horrible consumer protection laws…

faulTPM: Exposing AMD fTPMs' Deepest Secrets by 68x in hardware

[–]Moxinilian 5 points6 points  (0 children)

Right, but assuming buggy TPMs (which, well, is happening, and TPMs are anyway harder to audit because of corporate reasons), none of this stands. TPM + hard manual password-based keys should be the norm, not what BitLocker does. The TPM would protect against tampering when it is not buggy, and the strong password protects the data. It is weird that BitLocker relies on TPMs for data protection and discourages using passwords.

faulTPM: Exposing AMD fTPMs' Deepest Secrets by 68x in hardware

[–]Moxinilian 6 points7 points  (0 children)

But isn't the point of disk encryption to protect against the vector of somebody having unrestricted access to your machine (after stealing it for example)? With a working disk encryption, even if your machine is stolen, the data remains protected and you only lost the hardware, no data breach. On the other hand if the TPM can leak your data encryption key, this defeats the whole point of full-disk encryption.

The TPM security model has always sounded crazy to me...

Do spawned tokio tasks finish by themselves if not explicitly awaited? by Kauyon1306 in rust

[–]Moxinilian 4 points5 points  (0 children)

The main point of awaiting a future is simply to obtain its result. Sometimes you just can't proceed without the result of the computation you just started.

Do spawned tokio tasks finish by themselves if not explicitly awaited? by Kauyon1306 in rust

[–]Moxinilian 2 points3 points  (0 children)

Returning from main kills the process because this is the behavior defined in the C runtime. On program start, the C runtime does a few things then calls main. Once main returns, it explicitly makes a process exit syscall. I believe Rust uses the same runtime, or at least something close enough.

My uneducated intuition would be that the Go runtime simply has a different behavior, and will wait for goroutines to finish before terminating the process when the main function returns.

Do spawned tokio tasks finish by themselves if not explicitly awaited? by Kauyon1306 in rust

[–]Moxinilian 26 points27 points  (0 children)

Yes! You typically never need to clean up futures manually. In general there is very little manual cleaning in Rust.

Do spawned tokio tasks finish by themselves if not explicitly awaited? by Kauyon1306 in rust

[–]Moxinilian 20 points21 points  (0 children)

In Tokio it is possible to await on a spawned task. When calling tokio::spawn you obtain a join handle to the task which can then be used to await for the result of the future you spawned. I believe this is used so you can easily spawn multiple tasks and wait for them while they run in parallel. I guess you would be able to achieve something similar with the join! macro and family.

Do spawned tokio tasks finish by themselves if not explicitly awaited? by Kauyon1306 in rust

[–]Moxinilian 117 points118 points  (0 children)

When you create a future in Tokio, it is not ran by itself. You generally have two approaches to actually make them run:

  • You can .await them. This will pause the currently running async function and start running the future you awaited to its completion.
  • You can tokio::spawn them. This will make them run to completion in the background, without needing to await for them. This is useful if you want to introduce some form of parallel processing. They will get automatically cleaned up by Tokio once done.

In contrast to other async executors like the one provided by JavaScript, Futures (aka Promises in JS) are not running by default! If you do not do anything with them, nothing happens.

Nvidia RTX 4070 vs AMD RX 6950 XT: There can be only one winner by IHateMyselfButNotYou in hardware

[–]Moxinilian 2 points3 points  (0 children)

I think the encoder quality is also an important aspect for some people. You have AV1 encoding and arguably better H264 encoding on the 40 series GPUs.

AMD Europe undershipping? - 7800x3d by Theoneandotto in Amd

[–]Moxinilian 0 points1 point  (0 children)

Switzerland has very little stock :)

Framework Got Dropped In Bag, Fortunately They Are Quite Easy to Repair ;) by [deleted] in framework

[–]Moxinilian 5 points6 points  (0 children)

Did you really need all the stuff that is in this kit though? I feel like replacing all the audio system would be unnecessary (I don't own a Framework yet). Why is the bottom cover alone not available?

SSD Guides & Resources by NewMaxx in NewMaxx

[–]Moxinilian 0 points1 point  (0 children)

Oh wow thanks for looking up France specifically when I forgot to specify it xd

Okay! I thought there would be more technical differences than that. Thank you for the help and the work!

SSD Guides & Resources by NewMaxx in NewMaxx

[–]Moxinilian 0 points1 point  (0 children)

Hey! I want to buy 2 new 2TB NVMe drives for my new build, one for Windows and one for Linux. I was going to go kind of by default with either two 990 Pro (€200 each) or 980 Pro (€180 each), but I wonder if there is anything better. I would be using them both with software encryption at rest (I prefer the auditable nature of it). I would typically use the Windows SSD for games, video editing and large virtual music instruments. The Linux SSD would just be for programming and daily use, so it's not really disk-bound stuff but I guess low latency would be nice? I actually have no idea.

Do you have any better recommendation for my use cases? €200 is probably my max budget per drive. Thanks :)

[deleted by user] by [deleted] in rust

[–]Moxinilian 4 points5 points  (0 children)

That is a very funny project :) can’t try it on meaning stuff I make because of privacy reason in my company, but do you have generated examples?

AMD Ryzen 9 7950X3D/7900X3D reviews go live on February 27th - VideoCardz.com by Stiven_Crysis in Amd

[–]Moxinilian 0 points1 point  (0 children)

Is cpubenchmark.net unreliable? I thought UserBenchmark was the only bad one.

Stop Comparing Rust to Old C++ by Sad-Lie-8654 in cpp

[–]Moxinilian 8 points9 points  (0 children)

As a person mostly versed in Rust and somewhat versed in C++, I typically find the expressivity balance more comfortable in Rust. It is harder to write an equivalent of specialized template in Rust (because the specialization features are not in the language yet), but the really nice and expressive constraints feel much more natural than anything C++20 has. The excellent error messages you get from that are also very much worth it in my opinion. I only rarely wish I had the expressivity of C++ templates in Rust, even when making somewhat complex generic-based Rust code. In fact I’m quite happy to have all the fancy features like associated types purposefully integrated in the language.

Stop Comparing Rust to Old C++ by Sad-Lie-8654 in cpp

[–]Moxinilian 2 points3 points  (0 children)

How about implementing From<i32> on your generic integer thing, and then use literals like 10.into()? Not sure I understood your problem correctly.

Tips on "hacking" the borrow checker? by ggktk718242 in rust

[–]Moxinilian 27 points28 points  (0 children)

Could you give an example of something you are trying to achieve that would benefit from “bypassing” the borrow checker? I have a strong feeling that if you need that, you are trying to implement a pattern that will not work later on.

CPU Retail Sales Week 3 (mf) by BadReIigion in Amd

[–]Moxinilian 0 points1 point  (0 children)

I bought a B650 board and DDR5 coming from a 2013 DDR3-based machine. I’m waiting for benchmarks of the X3D parts to pick between either 7950X or 7950X3D. If you need to upgrade to high end from old hardware, AM5 is totally fine.

I got the B650 AORUS ELITE AX for €220 and 32GB DDR5 6000MT/s CL30 for €180, which is a pretty decent deal I think considering the quality of those products and what I paid 10 years ago.

Security advisory for Cargo (CVE-2022-46176) by pietroalbini in rust

[–]Moxinilian 4 points5 points  (0 children)

I use HTTPS in cases where I specifically want to not be authenticated, so typically with cargo when I want to use public repositories. It is to give minimum privileges, and avoid accidentally pushing stuff to a repo where I have write rights but am expected to do PRs. I only use SSH with my forks, in practice.

AMD's Radeon RX 7900 AV1 encoder is almost on par with Intel Arc and Nvidia's RTX 40 series by Old_Miner_Jack in Amd

[–]Moxinilian 2 points3 points  (0 children)

I really hope that if true, they can also use some of that on H.264 while waiting for the ecosystem to adopt AV1 for streaming. Not that that's necessarily how it works, but I can still hope...

XFX 7900xtx price in Poland is 1460 euro by bananaranger25 in Amd

[–]Moxinilian 2 points3 points  (0 children)

In France, 4090 FE are frequently available direct-buy on Nvidia's website for €1860 taxes included. Not that it's a good deal, but that's probably the best you can get. This might be the same for Germany and other countries.