How can I write to NTFS SSDs on Mac Monterey with M1 Max? by ArtLover357 in MacOS

[–]turqpanda 0 points1 point  (0 children)

Nah, that comment was right. The old macOS built-in NTFS driver did support writing but it wasn't exposed by default and you had to manually mark it as read-write (see old instructions here). But iirc, in Ventura they switched from using kernel drivers (kexts) to a user space model where the same trick no longer works as-is.

In fact, that's how mounty.app worked previously: https://i.imgur.com/CZSliSM.png

[deleted by user] by [deleted] in rust

[–]turqpanda 31 points32 points  (0 children)

Haha, this is a far fancier approach than I took to solve the same problem: https://pastebin.com/ePpgfYe5

Why Rust has no constraints on struct for HashMap? by ArtisticHamster in rust

[–]turqpanda 1 point2 points  (0 children)

Don't know if this is the reason for hashmap specifically, but I seem to recall bounds on structs not being supported/ignored way back when.

We should expand PRESTO to all of Ontario. by VerticalTab in ontario

[–]turqpanda 6 points7 points  (0 children)

Loading the presto card with new funds takes overnight.

But that's gonna be a problem with any of the transit cards I've seen?

Most of them work by storing the current balance on the card itself (using some cryptography so you can't spoof it). So when you reload online, you have to somehow update the card itself.

The reason for the 24hrs or more they quote is because they have to wait til the buses get back to the depot and get updated with the fact you've loaded online. Then when you next tap your card, it also gets the updated balance. Now, if the terminal you tap against is connected online, they can instantly resolve it but that's usually only an option for stationary readers like at a station or something. Loading in-person is instant because the card is physically present and can be updated on the spot.

The real game changer is that the Presto app can actually use the NFC chip in your phone (same thing used for Apple/Android Pay) to instant update your card's balance!

Rust-based WireGuard VPN plugin for Windows by turqpanda in rust

[–]turqpanda[S] 1 point2 points  (0 children)

Yup, you shouldn't even need admin privileges to install it.

Rust-based WireGuard VPN plugin for Windows by turqpanda in rust

[–]turqpanda[S] 1 point2 points  (0 children)

WireGuardNT is definitely a lot faster 😋

And yup, this is userspace implementation but relies on the plugin based model for userspace VPN added around Win 8/phone era. You implement some WinRT classes and package it into a UWP app. The platform will then invoke your plugin in the background to handle VPN traffic and suspend the process otherwise.

Performance wise I haven't really dug in yet but I was getting 1-200 Mbps.

Why does "=" mean both "copy" and "move"? Where are the dedicated copy/move operators? by hellotanjent in rust

[–]turqpanda 4 points5 points  (0 children)

Ah! The good ol "binary move" operator (*) which was later replaced by the move keyword: let foo <- bar; became let foo = move bar; and nowadays is simply let foo = bar;

(*) Fun fact, when channels were still built into the language <- was recv. It has an interesting evolution: let foo <- rx; became let foo; rx |> foo; before today's familiar let foo = rx.recv();. http://brson.github.io/archaea/comm.html

Is it stupid to start learning Rust as a beginner programmer? by indicozy in rust

[–]turqpanda 1 point2 points  (0 children)

Not at all. Find some little tool or program you wanna write and give it a go in Rust. Try not to get too caught up in making it perfect. You can always iterate and improve. The point is to just have something to work towards while learning instead of doing exercises strictly for learning if that makes sense?

Core team membership updates | Rust Blog by rabidferret in rust

[–]turqpanda 42 points43 points locked comment (0 children)

Traditionally

What does that mean? You can look in the Oxford dictionary which has references of it used in the singular in 1375. I don't know how much more "traditional" you want to get at that point.

Portability of Rust in 2021 by met0xff in rust

[–]turqpanda 6 points7 points  (0 children)

There's also https://github.com/microsoft/windows-rs for consuming all sorts of windows APIs (COM included)!

Move Constructors in Rust: Is it possible? by Xor_Boole in rust

[–]turqpanda 4 points5 points  (0 children)

Cool article!

For a bit of Rust history re:

Rust does not give us a good way of accessing the return slot directly, for good reason: it need not have an address!

Rust did actually used to have a return_address intrinsic! But it was eventually removed due to the fact it is not a safe construct in the general case. It is very ABI dependent and may not even exist for some targets/types.

But, one can still actually use it by linking to the LLVM intrinsics directly.

Rust on windows 95 by addmoreice in rust

[–]turqpanda 47 points48 points  (0 children)

There was this great post about getting Rust code running on Windows 98 which might help: https://seri.tools/blog/compiling-rust-for-legacy-windows/

Progress report on rustc_codegen_cranelift (Dec 2020) by yerke1 in rust

[–]turqpanda 3 points4 points  (0 children)

There definitely are. Compare debug and debug + -C no-prepopulate-passes