--- Log opened Thu Sep 29 00:00:34 2022 00:37 -!- tibo [~tibo@240d:1a:afa:4000:dc0d:ca3c:7de5:ce89] has joined #bitcoin-rust 07:17 -!- tibo_ [~tibo@240d:1a:afa:4000:6580:b811:9dd6:f4ba] has joined #bitcoin-rust 07:21 -!- tibo [~tibo@240d:1a:afa:4000:dc0d:ca3c:7de5:ce89] has quit [Ping timeout: 246 seconds] 07:56 -!- tibo [~tibo@fp5a950abc.tkyc110.ap.nuro.jp] has joined #bitcoin-rust 07:59 -!- tibo_ [~tibo@240d:1a:afa:4000:6580:b811:9dd6:f4ba] has quit [Ping timeout: 268 seconds] 09:00 -!- dunxen [~dunxen@2001:470:69fc:105::1:fec1] has quit [Quit: You have been kicked for being idle] 09:02 -!- afilini [~afilini@2001:bc8:1828:245::2] has joined #bitcoin-rust 09:02 < afilini> hey everyone, quick question: is there a reason why From is not implemented for Sequence and PackedLockTime? 09:30 < andytoshi> it may have been an oversight 09:31 < andytoshi> or it may have been that kixunil fights me whenever i try to use .into() instead of a method with a super-long name designed to re-educate the Bitcoin Core out of everyone 09:31 < andytoshi> ..yeah, there we go 09:32 < andytoshi> there's a `from_consensus` method which does exactly what you want 09:32 < andytoshi> please file an issue 09:32 < andytoshi> or you can pile onto https://github.com/rust-bitcoin/rust-bitcoin/issues/1298 where i made the same complained about sighash modes 09:35 < afilini> i would personally find useful to have From implemented because i'd like to use it in our descriptor macro 09:36 < andytoshi> can you file an issue and link to #1298 ? 09:36 < andytoshi> sorry to be snarky, it's not productive 09:36 < BlueMatt[m]> heh, I still think `Into` was a major mistake in the rust language. 09:36 < afilini> so whatever the user passes to the macro, i'll just call `Sequence::from` or `PackedLockTime::from` and i can accept a larger variety of types (it could be a sequence itself, or a u32, etc) 09:36 < andytoshi> BlueMatt[m]: interesting! because it exists at all, or because it's annoying to use? 09:36 < BlueMatt[m]> magic baddddddddd, code readability important :) 09:36 < andytoshi> i mean, it's explicit 09:36 < afilini> andytoshi: sure! 09:36 < andytoshi> i wouldn't mind if we required peopre to use `into::()` say 09:37 < BlueMatt[m]> it hides all relevant type information, and very often has many implementations. 09:37 < andytoshi> but at least the way to write this is obvious 09:37 < BlueMatt[m]> which means I find it highly unreadable 09:37 < andytoshi> and you don't have to go sifting through the docs reading the type signature of every function until you find the one that does the conversion for you 09:37 < BlueMatt[m]> yea, I guess if you _had_ to write out the type in order to use it I'd be okay with that. 09:37 < BlueMatt[m]> but at that point you might as well have a method thats explicit 09:37 < andytoshi> BlueMatt[m]: ok, that's fair that bare .into() is very hard to read 09:37 < andytoshi> BlueMatt[m]: no, because there's no standard name for explicit methods 09:38 < BlueMatt[m]> yea, fair point, though `to_*` or `into_*` are generally used 09:38 < BlueMatt[m]> if they were slightly more consistent or enforced at a rustc-warning level then it'd be pretty good imo 09:38 < andytoshi> ok, well then i have a separate fight which is that we keep sticking _consensus_ randomly into shit.. 09:39 < BlueMatt[m]> heh, well that sounds like a rust-bitcoin-specific problem :p 09:39 < andytoshi> fair enough :P 09:39 < andytoshi> anyway afilini if you open an issue asking for From i will support you :P 09:39 < andytoshi> in fairness if we implement this, nobody is obligated to use it 09:41 < afilini> done! https://github.com/rust-bitcoin/rust-bitcoin/issues/1302 09:42 < afilini> yeah i think i agree with Matt about `into`, but `from` is very useful when you don't want to force users to do the conversion themselves 09:45 < afilini> i mean, now rust-bitcoin has like three different types for representing timelocks, and if you write a function you could just take a generic type that you can use to construct a LockTime for example 09:46 < afilini> i like having more types in general, it leads to less "accidents" with users confusing things and shooting themselves in the foot, but on the other end it needs to be easy to convert between these types, otherwise it just gets annoying imho 10:01 -!- pablomartin [~pablomart@82.180.147.233] has joined #bitcoin-rust 10:06 -!- pablomartin [~pablomart@82.180.147.233] has quit [Client Quit] 11:01 -!- andytoshi [~apoelstra@user/andytoshi] has quit [Quit: leaving] 11:10 -!- andytoshi [~apoelstra@user/andytoshi] has joined #bitcoin-rust 11:11 -!- andytoshi [~apoelstra@user/andytoshi] has quit [Client Quit] 11:17 -!- andytoshi [~apoelstra@user/andytoshi] has joined #bitcoin-rust 11:56 < andytoshi> btw i finally started a script which is running all the rust-bitcoin and miniscript fuzztests indefinitely on my server. if any stop i will receive a text message 11:56 < andytoshi> i set the niceness of all of them to 19 so hopefully i don't notice it messing with my daily work 12:02 < BlueMatt[m]> Nice, chaincode has it running as well, after some initial honggfuzz hiccups 12:10 < RiccardoCasatta[> Did someone of you found a failure with fuzzing after a very long run? I found bugs with fuzzing but usually quite soon then nothing (but I never let run more than a couple of days) 12:18 < andytoshi> yeah, i've seen it happen 12:18 < andytoshi> btw our miniscript compile_descriptor fails with and(hash256(),pk()) 12:18 < andytoshi> we compile this, lift it, then recompile, and it gets reordered 12:18 < BlueMatt[m]> For deserialization targets, no, for more complicated stuff, yea, I’ve seen stuff after years of cpu time 12:19 < andytoshi> heh i don't think i've ever seen years, but definitely hours 12:19 < BlueMatt[m]> Yea I’ve seen it after a month or more on like 40-100 cores 12:22 < RiccardoCasatta[> Woah, what was the target? 12:24 < BlueMatt[m]> LDK has some super deep complex targets that basically fuzz the full library top-to-bottom (not very well, though) 12:32 < andytoshi> btw i don't think the niceness is helping, my server feels really super slow 12:32 < BlueMatt[m]> You want the priority stuff 12:32 < BlueMatt[m]> Not nice 12:32 < BlueMatt[m]> chrt 12:41 < andytoshi> oh nieat 12:42 < andytoshi> ok, tried that, we'll see if things improve 12:43 < andytoshi> yeah i think that's better --- Log closed Fri Sep 30 00:00:35 2022