--- Log opened Sat Jul 13 00:00:10 2019 01:14 -!- harding [~harding@cpe-66-91-121-125.hawaii.res.rr.com] has joined #rust-bitcoin 05:48 -!- belcher [~belcher@unaffiliated/belcher] has quit [Read error: Connection reset by peer] 05:48 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 05:56 < andytoshi> elichai2: you need to offset more than just `size_of` 05:56 < andytoshi> you need to offset so that you remain consistent with `align_of<[u8]>` 05:56 < andytoshi> (actually on most platforms these will be the same. but nonetheless..) 07:11 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-hacfyzmcrztowdnz] has quit [Quit: Connection closed for inactivity] 09:06 -!- esotericnonsens_ [~esotericn@unaffiliated/esotericnonsense] has joined #rust-bitcoin 09:48 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-trvcpifdvsfsorex] has joined #rust-bitcoin 10:40 < elichai2> andytoshi: i'm pretty sure it needs to be aligned to u8 not [u8]. and I guess I can't assume that u8 is always aligned to one, right? 10:41 < elichai2> (don't think [u8] can be checked for alignmet because it doesn't have a compile time size) 12:23 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 14:46 < andytoshi> lol everything is aligned to 1 14:46 < andytoshi> we are returning a Box<[u8]>, we need to align to [u8] 14:46 < andytoshi> a raw pointer derived from a Box<[u8]>, that is 14:47 < andytoshi> also i don't see any Sized requirement on https://doc.rust-lang.org/std/mem/fn.align_of.html 15:32 < elichai2> That's weird. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d46389b06f5a07d352892270dfa945f1 15:36 < elichai2> i'm not sure I understand https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e7345269be291cf63853664acbe87396 15:37 < elichai2> Ok, I guess I've never really used Sized before. it's the oposite. every generic has Sized as an implict trait unless you add `T: ?Sized` which *remove* that bound 15:37 < elichai2> https://doc.rust-lang.org/std/marker/trait.Sized.html 15:55 < elichai2> A different direction using `alloc` instead https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d8ef9a3e51809a5e467ad93c9faccc4a 16:12 < elichai2> nvm, this requires nightly on 1.22.0 :( I actually liked that approach 19:12 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 260 seconds] 21:08 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin --- Log closed Sun Jul 14 00:00:10 2019