• 0 Posts
  • 45 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • Software implementations of those features is often slower, and runtime checking can often be too expensive compared to the gains.

    since it seems like nobody but cachy or custom kernel runs anything but V1

    Gentoo offers x86_64-v4 binary builds too.

    There was a proposal for Fedora too, though it was ultimately rejected.


    Ultimately the gains right now seem to be only 1-3%, though that might also be because there’s not much demand for these kind of optimizations. If more distros enable them they might become more widespread and the benefits might increase too. It’s a chicken-egg problem though.





  • It’s mentioned in footnote 6:

    As an example, to make this work I’m assuming some kind of “true deref” trait that indicates that Deref yields a reference that remains valid even as the value being deref’d moves from place to place. We need a trait much like this for other reasons too.

    It would only work for references that are stable after the value they reference is moved. Think for example of a &str you get from a String.







  • GNOME devs never said that theming is incompatible (just “not supported”), and you’re still not explaining whay you mean with “incompatible” either. Managing window controls also doesn’t seem a requirement to be “compatible”, as the app still runs fine even with client side decorations (again, it just won’t fit visually with the rest of the system).

    And by the way, the problem is not theming per-se, but the fact that apps get themed by default, they inevitably break by default, and app developers are left to deal with that. Nobody ever tried to improve the situation so the solution they came up with is to have their apps always look the same.




  • They tested the same strings on that implementation

    The code they were looking at was used for writing the table, but they were testing the one that read it (which is instead correct).

    though judging by the recent comments someone’s found something.

    Yeah that’s me :)The translation using an associated const also works when the const block uses generic parameters. For example:

    fn require_zst<T>() {
        const { assert!(std::mem::size_of::<T>() == 0) }
    }
    

    This can be written as:

    fn require_zst<T>() {
        struct Foo<T>(PhantomData<T>);
        impl<T> Foo<T> {
            const FOO: () = assert!(std::mem::size_of::<T>() == 0);
        }
        Foo::<T>::FOO
    }
    

    However it cannot be written as:

    fn require_zst<T>() {
        const FOO: () = assert!(std::mem::size_of::<T>() == 0);
        FOO
    }
    

    Because const FOO: () is an item, thus it is only lexically scoped (i.e. visible) inside require_zst, but does not inherit its generics (thus it cannot use T).