--- Day changed Sun Sep 23 2018 05:26 -!- warren [~warren@fedora/wombat/warren] has joined #rust-bitcoin 06:49 -!- IRC-Source_71378 [6ab800ce@gateway/web/cgi-irc/kiwiirc.com/ip.106.184.0.206] has joined #rust-bitcoin 06:50 < IRC-Source_71378> Excuse the 101 question, what is to be gained from having rust implementations of various bitcoin protocols, aside from N more implementations? Is there anything that Rust allows for that is interesting versus implementations in other languages? 06:58 -!- IRC-Source_71378 [6ab800ce@gateway/web/cgi-irc/kiwiirc.com/ip.106.184.0.206] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] 07:25 < dongcarl> Well the guy has quit but if I had to pick one, I would say the main benefit is memory safety without sacrificing performance. 07:26 < dongcarl> I think that as more network code gets written in Rust, we’ll also see concurrency benefits 08:43 -!- itaseski [~itaseski@213.135.179.46] has joined #rust-bitcoin 08:45 -!- itaseski [~itaseski@213.135.179.46] has left #rust-bitcoin [] 09:02 -!- romanz [~romanz@141.226.218.21] has joined #rust-bitcoin 09:28 -!- romanz_ [~romanz@5.22.134.205] has joined #rust-bitcoin 09:31 -!- romanz [~romanz@141.226.218.21] has quit [Ping timeout: 252 seconds] 10:30 -!- grubles [~grubles@gateway/tor-sasl/grubles] has quit [Remote host closed the connection] 11:11 -!- harding [quassel@2600:3c03::f03c:91ff:fe7b:78d1] has joined #rust-bitcoin 13:29 -!- ^^ [d598a185@gateway/web/freenode/ip.213.152.161.133] has joined #rust-bitcoin 13:49 < andytoshi> i think the main benefit is explicit program behaviour, e.g. not implicitly casting every type and its dog to implementation-defined-width integers 13:54 < dongcarl> andytoshi: given arvid's talk, yeah i'd agree... I don't wanna remember implicit casts... 13:57 < andytoshi> in fairness to C++, it's much better than C, where literally every non-struct type can be assigned `0` without the compiler complaining :). (structs need `{0}`) 13:58 < andytoshi> C++ will not implicitly cast enums to ints anymore, nor does it allow implicit casts of arbitrary pointers to/from void* 14:01 < dongcarl> there should be an "explicit C" compiler standard or sth 14:14 < andytoshi> there are lint tools you can run on your C. but if you try that on any nontrivial piece of software you'll get thousands of errors and just give up 14:16 < andytoshi> speaking of which, we should maybe aim for a clean clippy run in rust-bitcoin. (there are a couple lints we'll need to turn off, in particular it whines about by integer-indexing byteslices instead of using .iter().enumerate() which IMO is way more readable for byteslices) 14:16 < dongcarl> Yup 14:16 < dongcarl> I think clippy is now in preview? 14:17 < andytoshi> yep, i tried it a few days ago but didn't do anything about it .. 14:17 < andytoshi> it had a cool suggestion to use e.g. u16::from instead of `as u16`, because u16::from is only implemented for types smaller/eq than u16 14:17 < andytoshi> i.e. ::from will never truncate a value. 14:17 < andytoshi> and it will cause a compile error if we later change types to make existing casts truncate 14:21 < dongcarl> Ooooooh that's really nice 14:21 < dongcarl> I'm guessing still zero-cost tho? 14:21 < andytoshi> yep 14:21 < dongcarl> https://i.redd.it/z8r5uooscas01.png 14:22 < andytoshi> lol 14:44 -!- ^^ [d598a185@gateway/web/freenode/ip.213.152.161.133] has quit [Ping timeout: 256 seconds] 15:20 -!- grubles [~grubles@gateway/tor-sasl/grubles] has joined #rust-bitcoin 19:41 -!- grubles [~grubles@gateway/tor-sasl/grubles] has quit [Ping timeout: 256 seconds] 19:53 -!- grubles [~grubles@gateway/tor-sasl/grubles] has joined #rust-bitcoin 23:08 -!- gmaxwell [gmaxwell@wikimedia/KatWalsh/x-0001] has joined #rust-bitcoin