Rusty 🦀 Femboy 🏳️‍🌈

Free software supporter, proud Linux user 🐧, communist (not a tankie, though I do like Cuba), gay femboy 🏳️‍🌈 and evangelist of the glorious Rust programming language 🦀.

فلسطين حرة! 🇵🇸

Слава Україні! 🇺🇦

Free Luigi!

  • 7 Posts
  • 34 Comments
Joined 8 months ago
cake
Cake day: August 8th, 2024

help-circle


  • Rusty 🦀 Femboy 🏳️‍🌈OPto196GIMP rule
    link
    fedilink
    English
    arrow-up
    38
    ·
    7 days ago

    Pretty good. Many new features, one of them being non-destructive filtering which is the ability to apply a filter (say a Gaussian blur) and then re-edit the filter parameters or even remove it without having to undo.

    However, at least for me, some changes will take some time to adjust to such as “OK” and “Reset” buttons of dialogue boxes now being displayed at the top rather than the bottom.

    Also years work of changes without the wider public testing them means that there are a few bugs/annoyances, one of them being the checkerboard pattern for transparency being replaced with a solid colour (equal to the background colour) when you zoom in too much.















  • Yes, it is that simple. In Rust if you have a structure Person and you want to allow testing equality between instances, you just add that bit of code before the struct definition as follows:

    #[derive(PartialEq, Eq)]
    struct Person {
        name: String,
        age: u32,
    }
    

    In Rust, PartialEq and Eq are traits, which are similar to interfaces in Java. Manually implementing the PartialEq trait in this example would be writing code that returns something like a.name == b.name && a.age == b.age. This is pretty simple but with large data structures it can be a lot of boilerplate.

    There also exist other traits such as Clone to allow creating a copy of an instance, Debug for getting a string representation of an object, and PartialOrd and Ord for providing an ordering. Each of these traits can be automatically implemented for a struct by adding #[derive(PartialEq, Eq, Clone, Debug, PartialOrd, Ord)] before it.