--- Log opened Tue Mar 05 00:00:07 2019 01:25 -!- TamasBlummer1 [~Thunderbi@p200300DD670F9D38BDDA44ABBFE5A31E.dip0.t-ipconnect.de] has joined #rust-bitcoin 01:27 -!- TamasBlummer [~Thunderbi@p200300DD670F9D5125C327E25BCC31D9.dip0.t-ipconnect.de] has quit [Ping timeout: 264 seconds] 01:27 -!- TamasBlummer1 is now known as TamasBlummer 03:25 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 03:25 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 07:51 < dongcarl> stevenroose andytoshi: I guess we can't return `[u8]` anyways? We can only `write_into` a `Writer`... Yeah `to_bytes()` sounds good to me 08:05 < stevenroose> dongcarl: andytoshi: updated the PR. I didn't add tests, since they're just delegating to existing logic. 08:06 < stevenroose> https://github.com/rust-bitcoin/rust-bitcoin/pull/243 08:07 < dongcarl> stevenroose: We can change this later, but I guess I'm concerned about how we can differentiate between serializing functions that return `[u8; $SOMECONSTANT]` and those that return `Vec` 08:08 < dongcarl> I'm sure there are other libraries that do this? 08:08 < stevenroose> dongcarl: I acknowledge that they are probably more efficient, but I think using [u8; LENGTH] is very awkward to use in interfaces. I only know secp to do it. And Sha256dHash in the past, not sure if the new bitcoin_hashes do it. 08:11 < dongcarl> stevenroose: Yeah I guess they're only one extra word memory-wise 08:11 < dongcarl> And you can always use write_into or something like that 08:12 < dongcarl> Approved! :-) 08:20 < stevenroose> Cool 11:10 < andytoshi> stevenroose: [u8; LENGTH] is ludicrously more efficient than Vec. it avoids an allocation and a pointer indirection. probably a difference of like 1000x 11:11 < andytoshi> but ack your pr 11:13 < stevenroose> hmm, that's a lot.. just saying that a lot of interfaces take vecs and then you end up doing both. most interfaces should take &[u8] though and then it's just a &x[..] operation. which took me a while in the very beginning to get used to, but once you have it, it's actually convenient 11:17 < andytoshi> we could add a type to rust-secp that was either a [u8; 33] or [u8; 65] and which implemented the indexing traits 14:45 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 256 seconds] 16:02 -!- CubicEarth [~CubicEart@c-67-168-1-172.hsd1.wa.comcast.net] has quit [Ping timeout: 245 seconds] 16:06 -!- CubicEarth [~CubicEart@c-67-168-1-172.hsd1.wa.comcast.net] has joined #rust-bitcoin 18:12 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 18:50 -!- icota [~igor@25-173.dsl.iskon.hr] has joined #rust-bitcoin 18:53 -!- icota_ [~igor@141-136-183-9.dsl.iskon.hr] has quit [Ping timeout: 255 seconds] --- Log closed Wed Mar 06 00:00:07 2019