▲ 5 r/i3wm

keybinding on the copilot key

so apparently all thinkpads now have this "copilot" key that absolutely everyone loves, but it doesn't have a keycode, instead that weird Win+Shift+F23 shortcut or something like that idk. sooo how do i keybind a command with that thing please

reddit.com
u/zylosophe — 9 days ago
▲ 0 r/maths

did genAi really help with the open geometry problem thing?

okay so, recently, there was this big security breach discovered in the linux kernel, and articles are acting like genAi helped with finding it (while in reality it just helped writing an (especially simple) script to prove it, a human could easily do that).

if they are capable to be dishonest about this, how much of "genAi solved an open geometry problem" (https://openai.com/index/model-disproves-discrete-geometry-conjecture/ ) is true? asking people that know about maths

reddit.com
u/zylosophe — 1 month ago
▲ 18 r/rust

self-referencing struct but i don't want to modify the struct

use std::{mem::MaybeUninit};

#[derive(Debug)]
struct Foo<'a>(&'a Foo<'a>);

fn main() {
  let mut foo = MaybeUninit::uninit();
  foo.write(Foo(unsafe{ &*foo.as_ptr() }));
  let foo = unsafe { foo.assume_init() };
}

soo it seems to work, but the rules (of never dereferencing / convert to reference a pointer that doesn't point to a valid value) and miri don't like it. but there should be a way to do it since i don't use the value until it's initiated, i just move the pointer??

don't wanna use Rc or something because optimization and mostly because i don't want to modify all my impls for the structs for this

reddit.com
u/zylosophe — 2 months ago
▲ 41 r/rust

ok so i got the trait Foo, and the trait Bar<F: Foo>. if i make a wrapper for a Bar:

    struct Wrapper&lt;F: Foo, B: Bar&lt;F&gt;&gt;(B);

doesn't work because "F is unused". do i *have* to add a PhantomData to "use" F?

reddit.com
u/zylosophe — 2 months ago