[-] b_van_b@programming.dev 4 points 1 month ago

What would you suggest as an alternative?

[-] b_van_b@programming.dev 14 points 1 month ago

I assume it's because many people outside the USA are accustomed to taking off their shoes when entering a house or apartment.

[-] b_van_b@programming.dev 7 points 2 months ago

The Godot engine GUI is also made in Godot.

[-] b_van_b@programming.dev 5 points 2 months ago

What's the image? I just get an error message.

[-] b_van_b@programming.dev 17 points 9 months ago

Probably rust, so I can push myself to do some real practice with it.

[-] b_van_b@programming.dev 5 points 9 months ago

What did Brave do?

[-] b_van_b@programming.dev 21 points 9 months ago

I use stars to keep a list of repositories I'm interested in. You can even put them in different categories, like browser bookmarks.

[-] b_van_b@programming.dev 5 points 11 months ago

Why did deno fade?

[-] b_van_b@programming.dev 5 points 1 year ago

Click on the star next to the share icon.

[-] b_van_b@programming.dev 4 points 1 year ago

For the moment, you can at least uncheck "Show NSFW content" at https://programming.dev/settings

-3
[-] b_van_b@programming.dev 4 points 1 year ago

Speaking of which, what are all the rust communities in the fediverse?

17

I'm going through the interactive version of The Book, and I'm confused by the results of an exercise in Ch 4.3 - Fixing Ownership Errors.

The following code does not work, and they say it's because it would result in the same heap space being deallocated twice:

fn main() {
    let s = String::from("Hello world");
    let s_ref = &s; // reference s
    let s2 = *s_ref; // dereference s_ref
    println!("{s2}");
}

But in my mind, this should be equivalent to the following compilable code, which transfers ownership of s to s2 :

fn main() {
    let s = String::from("Hello world");
    let s_ref = &s; // reference s
    let s2 = s; // move s directly
    println!("{s2}");
}

If s_ref is a reference to s, then dereferencing s_ref should return the String s, shouldn't it? Why can't s be moved to s2 with either the above code or let s2 = *&s;, which fails in the same way?

view more: next ›

b_van_b

joined 1 year ago