00:07 fdobridge_: <r​inlovesyou> that's on x11 btw, on wayland it doesn't seem to work at all, getting this on wayland with the headset not reacting at all
00:07 fdobridge_: <r​inlovesyou> https://cdn.discordapp.com/attachments/1034184951790305330/1204579251043442758/image.png?ex=65d53ed9&is=65c2c9d9&hm=519c75ece47628096f334e82ba52b1b644f91ae3c2251e66b539d9527997ad39&
00:14 fdobridge_: <r​inlovesyou> i just updated to 6.7.4 and these errors do not appear in dmesg anymore, although it seems unrelated
00:33 fdobridge_: <!​DodoNVK (she) 🇱🇹> KDE or GNOME?
00:33 fdobridge_: <r​inlovesyou> kde
00:42 fdobridge_: <r​inlovesyou> on gnome xorg it's the same result
00:42 fdobridge_: <r​inlovesyou> gnome wayland however
00:43 fdobridge_: <r​inlovesyou> not sure how to describe this, direct mode does not seem to be working :Hehe:
00:43 fdobridge_: <r​inlovesyou> https://cdn.discordapp.com/attachments/1034184951790305330/1204588206784520192/image.png?ex=65d54730&is=65c2d230&hm=6fa6de14f2995a9c9e2a5981d7fe07e1390d98e7d40d947023ae5f76b6996ae2&
00:45 fdobridge_: <r​inlovesyou> looks pretty awesome though
00:53 Lyude: weee, I think I'm slowly starting to understand how the general pattern for rust bindings goes
00:55 fdobridge_: <m​ohamexiety> yeah those are some neat glitches
01:30 fdobridge_: <a​irlied> at least stk vulkan works 😛
01:32 fdobridge_: <z​mike.> That's something
01:48 fdobridge_: <r​inlovesyou> We're definitely closer to functional vr than proprietary :Hehe: on xorg the headset lights up, it's just not properly presenting frames yet
01:50 fdobridge_: <a​irlied> guess I should take my vive out
01:55 fdobridge_: <r​inlovesyou> would be a huge help
01:56 fdobridge_: <r​inlovesyou> this patch is the starting point
02:08 fdobridge_: <b​abblebones> I came here to address this sooner rather than later, I really didn't want to bug you folks as I know you have enough on your plate without somebody bugging you about specific Vulkan features for NVK
02:08 fdobridge_: <b​abblebones>
02:08 fdobridge_: <b​abblebones> But the moment that direct mode begins working there's going to be a secondary issue of reprojection shaders requiring realtime properties to work.
02:08 fdobridge_: <b​abblebones>
02:08 fdobridge_: <b​abblebones> We were having this issue on RADV and pixelcluster helped mitigate the overwhelming majority of it with that cute little compute tunnel commit in mesa and the kernel. When the GPU is fully saturated with work there remains nothing to spare so that the compute warp shader can't hit its target and the result is the frame in the HMD sticking to your face for an extra frame since it can't properly reproject.
02:08 fdobridge_: <b​abblebones>
02:08 fdobridge_: <b​abblebones> Without this VR is pretty intensely jarring under most normal usage so I wanted to inquire about the status of VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT implementation and any hardware specific opts nvidia offers which could be used to prioritize the compute shader queue in specific over the graphics queue so people don't barf on first contact.
03:54 fdobridge_: <S​id> 😲
03:55 fdobridge_: <S​id> I need to try this
05:12 fdobridge_: <i​shitatsuyuki> I saw that Nvidia prop exposes lots of graphics queues but is my understanding correct that they are just multiplexed into one hardware queue by the HWS? Do you know if there is any advantage from HW multiplexing that cannot be done by the app or the kernel?
05:39 fdobridge_: <a​irlied> we will likely eventually expose whatever they do
05:40 fdobridge_: <a​irlied> they afaik do fixed scheduling between the gfx queues, but they may expose priorities
05:46 fdobridge_: <i​shitatsuyuki> ok, thanks
07:39 fdobridge_: <!​DodoNVK (she) 🇱🇹> That looks like a PS1 game though
08:40 fdobridge_: <!​DodoNVK (she) 🇱🇹> What could be the reason for this? I was enabling an output when this happened 🐸
08:40 fdobridge_: <!​DodoNVK (she) 🇱🇹> https://cdn.discordapp.com/attachments/1034184951790305330/1204708275283562496/nouveau_output_freeze_journal.log?ex=65d5b703&is=65c34203&hm=2e6e227015fa8331ae2c7785ac7ba083818588ca74086f2e324af8f0c789d030&
09:10 fdobridge_: <!​DodoNVK (she) 🇱🇹> Interesting errors when starting Monado 🐸
09:10 fdobridge_: <!​DodoNVK (she) 🇱🇹> https://cdn.discordapp.com/attachments/1034184951790305330/1204715783415136298/message.txt?ex=65d5be01&is=65c34901&hm=2871bc6a43efa52be84d545f6994d8a991351315d6218767b3e1f7d2f458b001&
11:55 fdobridge_: <r​inlovesyou> Oh yeah, if you're using envision you should turn off the debug & curated gui
12:16 fdobridge_: <!​DodoNVK (she) 🇱🇹> I obviously don't use that
13:46 fdobridge_: <d​wlsalmeida> Can somebody explain to me what `#define DRF_LO(drf) (0 ? drf)` and friends do?
13:49 fdobridge_: <k​arolherbst🐧🦀> dealing with the drf.h header files
13:49 fdobridge_: <k​arolherbst🐧🦀> it's to extract bits out of the "31:0" or such patterns
13:49 fdobridge_: <k​arolherbst🐧🦀> ehh the numbers
13:50 fdobridge_: <k​arolherbst🐧🦀> you can't look at one macro on its own as it explains nothing
13:50 fdobridge_: <d​wlsalmeida> the syntax looked weird to me, because `(0 ? foo)` looks like it does nothing, but looking at one expansion ` __set_u32(((th)), ((base_address)), (0 ? 63:32), (1 ? 63:32));;` makes more sense
13:50 fdobridge_: <k​arolherbst🐧🦀> yeah
13:51 fdobridge_: <d​wlsalmeida> `(0 ? 63:32)` is just a ternary operator right? nothing "special" going on here?
13:51 fdobridge_: <k​arolherbst🐧🦀> correct
13:51 fdobridge_: <k​arolherbst🐧🦀> it's to expand to `32`
13:52 fdobridge_: <d​wlsalmeida> @karolherbst ty! 🙂
14:16 fdobridge_: <!​DodoNVK (she) 🇱🇹> xrgears works on nouveau + NVK for me (in the Wayland direct mode with DRM leasing magic) :triangle_nvk:
16:41 fdobridge_: <b​abblebones> Thankyou both, is it possible you could keep me posted on any scheduler/ priority developments on nouveau/NVK? We have a server of a few Gentoo users willing to trial any experimental priority scheduling improvements and report their usability for realtime activities.
16:41 fdobridge_: <b​abblebones>
16:41 fdobridge_: <b​abblebones> I believe AMD is currently utilizing similar fixed behavior @pixelcluster could correct me if I am wrong here, but we do now have that hardware trick of compute tunneling (at least for RDNA hrdware.)
16:41 fdobridge_: <b​abblebones>
16:42 fdobridge_: <b​abblebones> It can't deal with large dispatch situations though where a single shader wave is too heavy and frustratingly we still rarely miss on AMD, I would hope Nvidia is being fairly transparent with documentation requests if you are able to ask how best to handle compute shaders that must be processed as soon as they are received regardless of existing GPU load on the graphics queue.
16:42 fdobridge_: <b​abblebones>
16:42 fdobridge_: <b​abblebones> The best solution may or may not be 1:1 what Nvidia is already doing in the open driver module as a heads-up. We can at least inform you if its functional or not from our end.
16:52 fdobridge_: <r​inlovesyou> incredible! could you get me a patch to play with? :3
16:53 fdobridge_: <b​abblebones> I believe the intent of the compute tunneling feature was to assist realtime guarantees of scheduling by making them tighter but since no such thing is occurring it instead becomes the guarantee... Working most of the time.
16:53 fdobridge_: <b​abblebones>
16:53 fdobridge_: <b​abblebones> Trying to ensure at least one vendor can get out of this rut and make realtime assurances.
16:54 fdobridge_: <!​DodoNVK (she) 🇱🇹> It's the same one I sent you actually (maybe you should try to apply it to vulkan-nouveau-git package instead?)
16:54 fdobridge_: <r​inlovesyou> 🤨
16:55 fdobridge_: <r​inlovesyou> but doesn't that also just pull from source?
16:56 fdobridge_: <r​inlovesyou> the only difference i can see is that it applies two patches
16:56 fdobridge_: <r​inlovesyou> ```
16:56 fdobridge_: <r​inlovesyou> nak-iadd3-imad.patch
16:56 fdobridge_: <r​inlovesyou> nvk-memory-budget.patch
16:56 fdobridge_: <r​inlovesyou> ```
16:56 fdobridge_: <!​DodoNVK (she) 🇱🇹> Some of those patches may or may not make a difference (but I'm not sure)
16:57 fdobridge_: <r​inlovesyou> on wayland i couldn't even get the headset to light up at all
16:57 fdobridge_: <r​inlovesyou> so i'm surprised you got that working on wayland
16:57 fdobridge_: <!​DodoNVK (she) 🇱🇹> I also wonder how you're starting Monado/xrgears (I run them both manually)
16:57 fdobridge_: <r​inlovesyou> well i do it through envision
16:57 fdobridge_: <r​inlovesyou> but like, that just pulls the latest source from monado/opencomposite and runs them for you
16:59 fdobridge_: <!​DodoNVK (she) 🇱🇹> I compiled monado-git and ran `XRT_COMPOSITOR_FORCE_GPU_INDEX=<my NVIDIA GPU Vulkan ID> MANGOHUD=1 monado-service` to start it (my screen showed a grey screen with MangoHUD frozen but it unfreezes when I start an OpenXR application)
17:01 fdobridge_: <r​inlovesyou> yeah for me it only slightly lights up the headset
17:01 fdobridge_: <r​inlovesyou> and it's a black flickery void
17:01 fdobridge_: <r​inlovesyou> and on wayland nothing happens at all
17:02 fdobridge_: <!​DodoNVK (she) 🇱🇹> Can you disable GSP and enable atomic KMS (with `nouveau.atomic=1` kernel option)? 🤔
17:20 fdobridge_: <r​inlovesyou> yeah
17:20 fdobridge_: <r​inlovesyou> that works @asdqueerfromeu
17:20 fdobridge_: <r​inlovesyou> why the hell
17:21 fdobridge_: <!​DodoNVK (she) 🇱🇹> Did you do both of those things?
17:21 fdobridge_: <r​inlovesyou> yes
17:21 fdobridge_: <r​inlovesyou> gsp is off an atomic is on
17:21 fdobridge_: <r​inlovesyou> yet another gsp issue with my card?
17:22 fdobridge_: <!​DodoNVK (she) 🇱🇹> I wonder if this is another GSP weirdness issue (can you re-enable GSP?)
17:22 fdobridge_: <r​inlovesyou> and keep atomic?
17:23 fdobridge_: <!​DodoNVK (she) 🇱🇹> Yes
17:24 fdobridge_: <r​inlovesyou> yeah, gsp breaks it.
17:24 fdobridge_: <r​inlovesyou> typical..
17:24 fdobridge_: <r​inlovesyou> what is it with GSP and my god damn card
17:27 fdobridge_: <r​inlovesyou> it's getting just a tiny bit annoying, first it didn't work at all, now this
17:28 fdobridge_: <!​DodoNVK (she) 🇱🇹> I'll have to check if it happens with my GPU
17:30 fdobridge_: <r​inlovesyou> you're not using gsp?
17:30 fdobridge_: <r​inlovesyou> i thought we needed that for reclocking
17:38 fdobridge_: <!​DodoNVK (she) 🇱🇹> I'm not
17:38 fdobridge_: <r​inlovesyou> why not lol
20:13 Lyude: C ffi in rust kind of rules
20:36 karolherbst: yeah, it does
20:58 betteroffwithout: It's not like i care what you say to a person that tried to help you negatively, cause you feel hinted over that both of your own considered functional brain cells are rotten :), i was not even trolling or pranking you, absolute truth was delegated, but that as you go to terror me at my own hotel, is something that gets you responses soon, that is the only thing i do care, shot that comes off or out your fingers in here i care
20:58 betteroffwithout: none about, from mouth near me where you are discouraged and not even allowed to enter near proximity with me, is something about your scums behavior that needs correcting or forcing to take better direction. In other words of course you are scum in my book.
21:03 juri_: so, how did we earn such dedicated spam?
21:06 dwfreed: flavor of the week
21:10 karolherbst: juri_: being unlucky :')
21:10 airlied: he's been doing it for > 10 years
21:12 airlied: from 2010 : https://people.freedesktop.org/~ajax/what-the-utter-fuck
21:18 fdobridge_: <m​ohamexiety> holy shit that's dedicated
21:18 karolherbst: health issues be like that
21:32 juri_: wow.
21:35 fdobridge_: <r​inlovesyou> Absolute mental illness lol
21:36 fdobridge_: <b​abblebones> And I thought I was persistent
22:25 fdobridge_: <S​id> istg we need to disallow tor connections
22:26 fdobridge_: <S​id> it'd reduce spam so much
22:44 fdobridge_: <k​arolherbst🐧🦀> probably
22:44 fdobridge_: <S​id> dewit karol
22:45 fdobridge_: <k​arolherbst🐧🦀> how tho?
22:45 fdobridge_: <S​id> you know you'd rather not have to deal with spam
22:45 fdobridge_: <S​id> good question, I've never looked into it, gimme a moment
22:48 fdobridge_: <k​arolherbst🐧🦀> yo...
22:48 fdobridge_: <k​arolherbst🐧🦀> it kicked two others :ferrisUpsideDown:
22:49 fdobridge_: <S​id> `/msg ChanServ SET #nouveau mlock +b $~a`
22:49 fdobridge_: <k​arolherbst🐧🦀> I think one was a legit user..
22:49 fdobridge_: <S​id> oh, you already got it 😅
22:49 fdobridge_: <k​arolherbst🐧🦀> yeah.. I'm using the AKICK stuff for that usually
22:49 fdobridge_: <k​arolherbst🐧🦀> mlock is.... weird
22:49 fdobridge_: <S​id> I'm pretty sure you can have per user exceptions
22:50 fdobridge_: <S​id> which would be easier than dealing with spam 😅
22:50 fdobridge_: <k​arolherbst🐧🦀> but... uhh
22:50 fdobridge_: <k​arolherbst🐧🦀> pain
22:50 fdobridge_: <S​id> yeah
22:51 fdobridge_: <k​arolherbst🐧🦀> it doesn't matter tho, they'll use VPN soon or something
22:51 fdobridge_: <S​id> I'm asking my fluent-in-IRC friends on what'd be the best way
22:52 fdobridge_: <k​arolherbst🐧🦀> I doubt there is any solution
22:52 Sid127: yeah
22:52 fdobridge_: <k​arolherbst🐧🦀> that's kinda the deal if your network is like anonymous or something
22:52 Sid127: best we can do is constantly mitigate :\
22:52 fdobridge_: <k​arolherbst🐧🦀> I'm sure on matrix it would be worse
22:52 Sid127: oh, definitely
22:52 Sid127: anything exposed to matrix.org is very prone to getting raided
22:53 Sid127: I've seen it happen on the GrapheneOS channels myself
22:53 fdobridge_: <k​arolherbst🐧🦀> yeah.. and you can't do any sensible moderation there
22:53 Sid127: yup
22:53 fdobridge_: <k​arolherbst🐧🦀> yeah.. they also had bricked rooms and all that kinda of fun stuff
22:53 fdobridge_: <k​arolherbst🐧🦀> they told me 😄
22:53 Sid127: heh
22:54 Sid127: one thing we could do is require cloak to be on
22:54 Sid127: apparently
22:54 fdobridge_: <k​arolherbst🐧🦀> mhh
22:54 fdobridge_: <k​arolherbst🐧🦀> that's kinda pain
22:55 fdobridge_: <k​arolherbst🐧🦀> and won't really help here, would it?
22:55 Sid127: yeah
22:55 Sid127: welp
22:55 Sid127: no winning :pensive:
22:56 fdobridge_: <k​arolherbst🐧🦀> I think matrix would be viable if rooms were tied to a server, and one could just disallow bad actor servers
22:56 fdobridge_: <k​arolherbst🐧🦀> but apparently it was a design choice to not allow moderation
22:56 Sid127: another.. albeit small IRC network has just set bans on tor and vpn exit nodes
22:57 fdobridge_: <k​arolherbst🐧🦀> yeah...
22:57 Sid127: and asks people to connect without it if they wish to
22:57 fdobridge_: <k​arolherbst🐧🦀> probably the best choice
22:57 fdobridge_: <k​arolherbst🐧🦀> look.. if you think you need tor to join #Nouveau on IRC I think you have other issues
22:57 fdobridge_: <b​enjaminl> you should be able to ACL-ban servers in a matrix room
22:58 fdobridge_: <b​enjaminl> matrix moderation is, in general, a pain though
22:58 fdobridge_: <k​arolherbst🐧🦀> maybe freedesktop matrix with banning matrix.org would be viable...
22:58 fdobridge_: <b​enjaminl> yeah if you can get away with it, that might work
22:58 fdobridge_: <k​arolherbst🐧🦀> and only allow servers with non pita account creation policies
22:58 fdobridge_: <b​enjaminl> matrix.org is where like 99% of drive-by spam comes from
22:59 fdobridge_: <k​arolherbst🐧🦀> I'd honestly be fine with SSO/oauth only matrix servers allowing to join
22:59 fdobridge_: <k​arolherbst🐧🦀> if they allow email only reg, insta ban
22:59 fdobridge_: <k​arolherbst🐧🦀> or something even weaker
23:00 Sid127: we could also set +R
23:00 fdobridge_: <b​enjaminl> the problem is that the person that keeps spamming the #Nouveau irc seems pretty dedicated
23:01 fdobridge_: <k​arolherbst🐧🦀> isn't +R already set?
23:01 fdobridge_: <b​enjaminl> they would probably be willing to manually set up accounts on servers that don't have open registration
23:02 fdobridge_: <b​enjaminl> banning the open-registration servers gets most of the bots and low-effort manual stuff, but doesn't help that much against a determined person that only wants to spam with one account at a time
23:02 fdobridge_: <k​arolherbst🐧🦀> it would be nice if we could only allow people who have a fdo gitlab account
23:02 fdobridge_: <k​arolherbst🐧🦀> that kinda gives you 2-3 chances
23:02 Sid127: karolherbst: +R is not set
23:02 Sid127: current modes are +Mnt
23:03 Sid127: though, yeah, account registration is too easy
23:03 fdobridge_: <b​enjaminl> hmm, so you can also set a whitelist on a room, so if you set up a fdo matrix server that does auth through gitlab and then only whitelisted that one
23:03 fdobridge_: <b​enjaminl> of course, then you have to admin a matrix server...
23:03 fdobridge_: <k​arolherbst🐧🦀> yeah...
23:03 fdobridge_: <b​enjaminl> lol
23:03 Sid127: you *can* disable federation on the matrix server
23:03 fdobridge_: <k​arolherbst🐧🦀> you can't win with matrix
23:04 Sid127: but that's just annoying
23:04 fdobridge_: <k​arolherbst🐧🦀> can you allow certain servers?
23:04 Sid127: I think so
23:04 fdobridge_: <b​enjaminl> on the room ACL?
23:04 fdobridge_: <k​arolherbst🐧🦀> mhhhh
23:04 fdobridge_: <b​enjaminl> yes
23:04 Sid127: just a sec
23:04 fdobridge_: <k​arolherbst🐧🦀> but that still means we'd have to admin a matrix server
23:05 fdobridge_: <b​enjaminl> unfortunately, you probably can't do fancy auth stuff with conduit
23:05 Sid127: https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_domain_whitelist
23:05 Sid127: oh, conduit
23:05 fdobridge_: <b​enjaminl> so you're stuck with synapse, which is a _terrible_ experience
23:05 fdobridge_: <k​arolherbst🐧🦀> I just want to have gitlab oauth login
23:05 fdobridge_: <b​enjaminl> I haven't run a synapse server for a couple years now, but when I was we had constant problems with it triggering memory leaks in postgres
23:06 fdobridge_: <k​arolherbst🐧🦀> can I just get something hoested?
23:06 Sid127: very far shot: set channel invite only, redirect to a different channel, manually invex everyone that needs it, account ban the rest, maybe with some really agressive filters on that alt channel
23:06 fdobridge_: <b​enjaminl> I think you can pay element to host a server for you, but don't know the details
23:06 Sid127: karolherbst: I host a homeserver
23:07 Sid127: but I'm not *entirely sure* I wanna open it up to a larger network e-e
23:07 fdobridge_: <k​arolherbst🐧🦀> I mean.. we have servers, just need somebody willing to admin it forever
23:07 fdobridge_: <k​arolherbst🐧🦀> 😄
23:07 Sid127: I wouldn't mind the admin bit, methinks, at least not for a few years
23:07 fdobridge_: <k​arolherbst🐧🦀> mhhhh
23:07 fdobridge_: <k​arolherbst🐧🦀> I have an idea
23:07 Sid127: I've been using synapse with few issues for well over a year now
23:08 fdobridge_: <k​arolherbst🐧🦀> could we have a matrix room, which you can only join via an IRC bridge?
23:08 fdobridge_: <k​arolherbst🐧🦀> or well..
23:08 fdobridge_: <k​arolherbst🐧🦀> your account on the same server
23:08 Sid127: don't think so
23:08 fdobridge_: <k​arolherbst🐧🦀> mhh
23:09 Sid127: because as soon as you bring IRC into the mix, you're able to connect from anywhere
23:09 Lyude: karolherbst: how familiar are you with unsafe rust? i'm wondering if you might know how (or if even) one would have a C FFI function return Option<std::ptr::NonNull<some_foo>> instead of *mut some_foo
23:09 Sid127: maybe we can look at dendrite instead of synapse
23:09 karolherbst: Lyude: you can just do that stuff
23:10 karolherbst: just have to make sure to the invariants hold
23:10 Sid127: ok, neither conduit nor dendrite can do federation whitelists, *but* I think we can get by with a firewall
23:10 Lyude: :)?
23:10 Lyude: (does not know what an invariant is)
23:10 karolherbst: Lyude: like.... the rules of the rust types
23:10 fdobridge_: <b​enjaminl> we've had success with spam in #rust:matrix.org by temporarily setting the room to invite-only and then having people that want to join "knock"
23:10 fdobridge_: <b​enjaminl> "success" as in "triggered a chain of state-resets that took several days to resolve", but like after that it was okay lol
23:10 Sid127: block activity on the federation port and whitelist domains
23:10 karolherbst: you don't have to use bindgen to call a function, you can always specify the C symbol name on any extern function
23:11 karolherbst: and use whatever interface
23:11 karolherbst: but if you want to use Option<NonNull<T>> instead of a raw pointer that should just work
23:11 karolherbst: bindgen uses Option<...> for function pointers regardless e.g.
23:11 karolherbst: I think you can also tell bindgen to replace certain types, but dunno if the cli exposes it
23:12 Lyude: hm, fwiw: https://gitlab.freedesktop.org/lyudess/linux/-/blob/rvkms/rust/kernel/drm/kms/plane.rs?ref_type=heads#L128 this is the function I'm trying to make return Option<NonNull<*mut foo>> - since it would be very very nice if I could use ? here
23:13 fdobridge_: <r​edsheep> Does another option besides this discord server need to exist? If there was an invite link on the website, or better yet somewhere in gitlab, then there would still be public access. It would only cut off people unable to navigate to discord in the browser.
23:13 Sid127: redsheep but that requires account creation
23:13 Sid127: irc always has allowed guest users
23:14 Sid127: also, this server is not FDO approved :P
23:14 karolherbst: Lyude: ohh.. that function is called from the C side, right?
23:15 Lyude: karolherbst: correct
23:15 karolherbst: then you _Should_ be able to just use Option<NonNull<T>> I think
23:15 karolherbst: let's see...
23:16 karolherbst: Lyude: worst case you can always wrap it..
23:16 Lyude: yeah I've been considering that
23:16 karolherbst: but you should be able to just cast the func pointer and it should be okay
23:16 Lyude: https://paste.centos.org/view/7456f215 this is what I get
23:17 karolherbst: (func as *const c_void).cast()
23:17 karolherbst: maybe...
23:17 karolherbst: worst case do a mem::transmute
23:17 karolherbst: let's see...
23:24 karolherbst: Lyude: https://godbolt.org/z/Tnze9fYvh
23:25 karolherbst: or well...
23:25 karolherbst: this: https://godbolt.org/z/ErneE8c1f
23:25 karolherbst: not sure if the transmute stuff can be made any simpler
23:25 karolherbst: ohh
23:25 karolherbst: seems like you don't have to qualify the transmute
23:26 karolherbst: Lyude: https://godbolt.org/z/WKcG5co8M
23:26 karolherbst: https://godbolt.org/z/e49orc99T
23:26 karolherbst: final version :D
23:27 Lyude: yay! ok cool
23:28 karolherbst: I wonder if that could be added to rustc directly, because that should "just work"
23:28 karolherbst: though NonNull has some weirdo requirements
23:28 Lyude: yeah I was gonna say, it seems like this is something that should just implicitly be cast if the transmutation is sound
23:29 karolherbst: there is some work on making transmuting a bit easier to do, but not sure where the discussion was
23:31 Lyude: also my team of professional furries may have pointed out a way (or at least a very strong hint) that I can get rust-analyzer to start giving me all of the errors in my editor instead of just some of them, so I'll have to try that later :)
23:31 karolherbst: heh
23:32 karolherbst: yeah, I might have to figure out how to do all that properly in visual code as well, but...
23:32 karolherbst: uhh
23:32 fdobridge_: <b​enjaminl> https://rust-lang.github.io/rfcs/2835-project-safe-transmute.html
23:32 karolherbst: pain :D
23:32 karolherbst: ahh yeah... that was it
23:40 Lyude: mhm - seems transmute just complains it's a zero-sized type
23:40 karolherbst: yeah...
23:40 karolherbst: the cast is what makes it all work
23:40 Lyude: huh
23:41 karolherbst: I have no idea why, but transmute ain't happy without that `as *const ()` part
23:41 karolherbst: well..
23:41 karolherbst: I suspect in your case you might have to specify the args properly
23:41 karolherbst: let me see if I can make it work without such pain
23:42 fdobridge_: <b​enjaminl> does `mem::transmute::<fn() -> Option<NonNull<u32>>, fn() -> *mut u32>` not work?
23:43 Lyude: i haven't yet tried typing the full thing out in that code - I was hoping the compiler might be able to infer the type (which, when using as - it very much does appear to infer it correctly)
23:43 Lyude: but then complaints it's not a primitive cast
23:43 karolherbst: Lyude: https://godbolt.org/z/K5o5nnaTM 🙃
23:44 Lyude: oh hah
23:44 Lyude: good enough for me, let's try that
23:45 karolherbst: if the func has no args you can't use `fn(_)` but have to use `fn()` but.. uhh.. C funcs without args are like... non existent anyway :P
23:46 fdobridge_: <k​arolherbst🐧🦀> @vdpafaor 1. it's a lot to type and 2. nope
23:47 karolherbst: seems like `std::mem::transmute::<fn(_) -> _, _>(my_cb)` works...
23:48 karolherbst: so yeah, it would work, but it's just pain to type
23:48 karolherbst: but at this point either qualifying the transmute or doing a cast is kinda the same