27

This is a blog post that really is about C++, but with a look at how Rust does things. So, this is an interesting C++/Rust comparison for once.

27

Last week I basically duplicated the serialization code to provide better debug output.... today, I see this pass in my Mastodon feed. 😀 Well... what are the odds... most likely close to 100% according to how the universe seems to operate.

244
17
50
55
15
[-] snaggen@programming.dev 23 points 3 months ago

https://doc.rust-lang.org/book/ this is a great starting point. Then when you got the basics, and fiddled around a bit, then you can start looking for more specialized books (like Rust Atomics and Locks https://marabos.nl/atomics/ )

50
16
12
18
38
[-] snaggen@programming.dev 30 points 5 months ago

No, it is not based on Gnome. It is a full DE environment written in rust.

[-] snaggen@programming.dev 26 points 8 months ago* (last edited 8 months ago)

So the story here is: A Russian asset tells a Russian narrative?

For reference: https://www.theguardian.com/us-news/2021/jan/29/trump-russia-asset-claims-former-kgb-spy-new-book

[-] snaggen@programming.dev 33 points 9 months ago* (last edited 9 months ago)

From their documentation

Unlike classic terminals, Warp requires you to sign up and log in to get started with the app.

So, yeah, it might be that people are not very impressed by a terminal that requires a cloud account.

But, if you don't type anything sensitive on to your terminal, like passwords and such, then you should be fine....

[-] snaggen@programming.dev 26 points 1 year ago

No, what you describe is called "Rent" or "Lease". People who press a "Buy" button and buy something, expect to own it. Words have a meaning, and trying to wiggle around this with fine print should be considered fraudulent.

[-] snaggen@programming.dev 37 points 1 year ago

Saudi Arabia felt Twitter was a problem, so they paid Elon to take it down in a way it wouldn't come back.

[-] snaggen@programming.dev 24 points 1 year ago

Well, for eggs, that are carbon based, you will in fact have problems since carbon doesn't have a liquid state at regular atmospheric pressure. I guess you can add pressure, but is that really what we mean when asking a question if something melt?

[-] snaggen@programming.dev 23 points 1 year ago

I guess this answeres my previous question about the lack of updates to the Intellij Rust plugin.

[-] snaggen@programming.dev 31 points 1 year ago

I'm happy to see that the maintainer listened to the users, so we got the best possible outcome.

[-] snaggen@programming.dev 33 points 1 year ago* (last edited 1 year ago)

The pricing is a bit much, especially compared to other services like Tutanota that actually runs servers and provides a service in addition to developing the applications. $20-$30 for the onetime purchase option would be more sane.

I know I bought Sync Pro for Reddit, but I know that was nowhere close to these prices.

EDIT: Found the Remove Ads option, and that is more reasonable priced.

[-] snaggen@programming.dev 25 points 1 year ago

But the author doesn't mention the most common way to pass named argument, so I include a comment from mjec over at lobster.rs that covers that (since I'm to lazy to write my own):

It’s not obvious to me why the author didn’t include direct instantiation of the struct, rather than a builder:

#[derive(Default)]
struct SearchOptions {
   pub include_inactive: bool,
   pub age_within: Option<(u32, u32)>,
   // ...
}

let result = search_users(
 users,
 SearchOptions {
   include_inactive: true,
   age_within: Some((5, 29)),
   ..Default::default()
 }
);

This avoids the need for boilerplate enums, or to filter through a vec in order to find the value of an argument. Every caller has to specify ..Default::default() but I don’t mind that! I like the idea that you have to explicitly acknowledge that you want everything else to be default values (and it might be useful to omit it in some places, so you get a compile error if new options are introduced).

view more: ‹ prev next ›

snaggen

joined 1 year ago