code logs -> 2023 -> Tue, 24 Jan 2023< code.20230123.log - code.20230125.log >
--- Log opened Tue Jan 24 00:00:59 2023
01:08 gizmore [kvirc@Nightstar-0iomk0.dip0.t-ipconnect.de] has joined #code
01:11 gizmore|2 [kvirc@Nightstar-rr5p4m.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
01:22 Degi_ [Degi@Nightstar-ikf.rs7.12.89.IP] has joined #code
01:25 Degi [Degi@Nightstar-5bqjrg.pool.telefonica.de] has quit [Ping timeout: 121 seconds]
01:25 Degi_ is now known as Degi
01:41 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
02:39 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
02:52 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
02:52
<&McMartin>
Hmm, you know what
02:52
<&McMartin>
I think I finally have something I can call a Rust-shaped problem with a straight face
03:04
<~Vornicus>
man
03:15
<@celticminstrel>
??!??!?
03:15
<@celticminstrel>
How on earth does swapping two unique_ptrs cause the contents an array in both to get wiped…?
03:15
<@celticminstrel>
^contents of
03:16
<&McMartin>
Somebody's move constructor went berserk?
03:17
<@celticminstrel>
But moving a unique_ptr shouldn’t be calling the move constructor of the content…?
03:18
<@celticminstrel>
Mind you, I wonder if I can just delete the custom move and copy constructors now…
03:19
<@celticminstrel>
Ah, there are reference members, so I guess I do need them…
03:19
<@celticminstrel>
Still, if I factored out all the non-reference members I could probably simplify them dramatically.
03:20
<@celticminstrel>
But that aside… how on earth does swapping two unique_ptrs alter the content pointed to?
03:20
<@celticminstrel>
I still have some C array members too, do those require a custom copy/move constructor?
03:21
<@celticminstrel>
(The reason they haven’t been replaced with `std::array` is because they’re multidimensional.)
03:23
<@celticminstrel>
Bizarrely, when I search for references to memcpy, Xcode also points me to a use of memmove.
03:24
<@celticminstrel>
I guess `int mdarray[a][b]` can actually be replaced by `std::array<std::array<int, a>, b>> mdarray` without any additional code changes, right? Or maybe swapping a and b, not sure.
03:26
<@celticminstrel>
Guess a few code changes are needed. Can’t use `std::extent` on an `std::array`…
03:28
<@celticminstrel>
I really do need to swap a and b in that example, don’t I…
03:33
<@celticminstrel>
Huh. I really thought `std::array::size` was static, but apparently it’s not. Fortunately it looks like `std::tuple_size` works.
04:05 mac [macdjord@Nightstar-04p1sk.dsl.bell.ca] has quit [[NS] Quit: Deep inside, every housecat believes themself to be just a temporarily embarrassed tiger.]
04:11 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
04:12 mac [macdjord@Nightstar-04p1sk.dsl.bell.ca] has joined #code
04:12 mode/#code [+o mac] by ChanServ
04:14
<&Reiver>
wibs mac
04:14 * mac wvaes
04:17
<&Reiver>
Any luck on the DRG?
04:21 mac [macdjord@Nightstar-04p1sk.dsl.bell.ca] has quit [[NS] Quit: Deep inside, every housecat believes themself to be just a temporarily embarrassed tiger.]
04:28 mac [macdjord@Nightstar-04p1sk.dsl.bell.ca] has joined #code
04:28 mode/#code [+o mac] by ChanServ
04:29
<@mac>
Steam's still booting.
04:29
<&Reiver>
All good
04:29
<&Reiver>
You should have invites wehn you arrive
04:29
<@mac>
(On this machine; I'm logged in on the other.)
04:29
<&Reiver>
(I dunno if the last between sessions so)
04:31
<@celticminstrel>
I rewrote the swap functions in the “recommended” format but it doesn’t change anything.
04:39
<@celticminstrel>
I could see this outcome happening if I were swapping the pointee rather than the pointer, but I don’t understand how it could happen when swapping the pointer…
04:39
<@celticminstrel>
That said, swapping the pointee is actually what I want here, and it still happens when I do that, yet the thing ultimately being swapped has no explicit copy or move constructor.
04:53
<@celticminstrel>
Feels like I’ve written `x = move(y)` but am actually getting `y = move(x)`…
07:04 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
07:04 mode/#code [+o himi] by ChanServ
07:24
<&McMartin>
OK, this is actually *much* more Python-shaped than Rust-shaped, but I am overtly amused by what would happen if I did this in Rust
07:34 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
07:40 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
07:50 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
08:04 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
08:10 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
08:38 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
12:25 Kizor_ [a@Nightstar-nfsqa7.yok.fi] has joined #code
12:26 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
16:23 Kizor_ [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
16:28 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
16:48 Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has joined #code
17:36 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
18:18 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
19:28 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
19:34 abudhabi_ [abudhabi@Nightstar-kj84je.adsl.tpnet.pl] has joined #code
19:34
< abudhabi_>
Hmm. Is there some linux way to reboot USB?
19:34
< abudhabi_>
I occasionally get the issue that my peripherals (mouse and keyboard via KVM) stop working, and a reboot fixes this.
19:35
< abudhabi_>
I'd like to do the same, but without rebooting.
19:38 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
20:40 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
21:27
<&ToxicFrog>
abudhabi_: find the corresponding device nodes in /sys/bus/pci/drivers/xhci_hcd/ (and possibly other *hci_* and *hci-* directories depending on details of your USB hardware). The devices will all be symlinks in those directories consisting of a bunch of numbers separated by colons.
21:27
<&ToxicFrog>
Echo the device name of the device(s) you want to reset into "unbind" in that directory, wait a bit, then echo it into "bind".
21:27 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
21:28
< Mahal>
Just do that witha script, other than relying on the keyboard you're *using* :P
21:31
<&ToxicFrog>
Yeah.
21:31
<&ToxicFrog>
Write a shell script to do this for you (or find an existing one; "linux usb reset bind unbind" should work as a search term) and invoke that.
21:31 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Connection closed]
21:32
<&ToxicFrog>
(same cautions apply to using `xinput` to wiggle your keyboard's connection to the X session~)
21:45 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
23:37 Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
--- Log closed Wed Jan 25 00:00:01 2023
code logs -> 2023 -> Tue, 24 Jan 2023< code.20230123.log - code.20230125.log >

[ Latest log file ]