--- Log opened Sun Jun 07 00:00:43 2020 02:03 -!- Kiminuo [~mix@141.98.103.196] has quit [Ping timeout: 272 seconds] 02:47 -!- randyb [~randyb@120.29.76.194] has joined #rust-bitcoin 03:03 -!- Tracy51Weber [~Tracy51We@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 03:07 < elichai2> it's probably worse, `collect` have problems with pre allocating 03:07 -!- randyb [~randyb@120.29.76.194] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 03:10 -!- randyb [~randyb@120.29.76.194] has joined #rust-bitcoin 03:15 < sgeisler> Isn't that what size hints are for? `take` can give you an upper bound and `repeat` has no lower bound, so maybe that iterator would know its exact size? 03:17 -!- randyb [~randyb@120.29.76.194] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 03:19 -!- randyb [~randyb@120.29.76.194] has joined #rust-bitcoin 03:19 -!- randyb [~randyb@120.29.76.194] has quit [Client Quit] 03:48 < elichai2> yeah it's kinda broken IIRC 03:53 < elichai2> But I can't find that issue rn 04:58 -!- Kiminuo [~mix@141.98.103.196] has joined #rust-bitcoin 05:30 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has quit [Remote host closed the connection] 05:36 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has joined #rust-bitcoin 06:41 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 09:43 -!- fiatjaf [~fiatjaf@2804:7f2:2a81:6c39:ea40:f2ff:fe85:d2dc] has quit [Ping timeout: 246 seconds] 10:02 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 272 seconds] 10:23 < andytoshi> i'd go with whatever's more readable 10:23 < andytoshi> i do remember this bug in `collect`, but i'm not too worried about it. if it's causing us problems we should work around it, sure, but otherwise we should just wait for stdlib to get their act together 11:30 -!- fiatjaf [~fiatjaf@177.42.90.101] has joined #rust-bitcoin 11:38 < Kiminuo> andytoshi, https://github.com/apoelstra/rust-miniscript/pull/96#issuecomment-640170389 - It looks like we have a first PR conflict in miniscript. Sanket's PR looks better though, unfortunately :) 11:38 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 11:42 -!- Tracy51Weber [~Tracy51We@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 260 seconds] 11:42 < elichai2> andytoshi: agreed. 11:43 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Client Quit] 11:43 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 11:43 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Client Quit] 11:43 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 11:47 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 13:06 -!- guest534543 [~mix@141.98.103.196] has joined #rust-bitcoin 13:09 -!- Kiminuo [~mix@141.98.103.196] has quit [Ping timeout: 256 seconds] 13:20 -!- jonatack_ [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 13:21 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 256 seconds] 14:53 -!- Netsplit *.net <-> *.split quits: sgeisler, valwal_, vindard 14:54 -!- Netsplit over, joins: valwal_, vindard, sgeisler 14:55 -!- Netsplit *.net <-> *.split quits: wraithm, esotericnonsense, CubicEarth 14:55 -!- Netsplit over, joins: esotericnonsense, CubicEarth, wraithm 14:55 -!- esotericnonsense [~esotericn@unaffiliated/esotericnonsense] has quit [Max SendQ exceeded] 14:55 -!- Netsplit *.net <-> *.split quits: devcarrot 14:56 -!- Netsplit over, joins: devcarrot 14:56 -!- Netsplit *.net <-> *.split quits: windsok 14:56 -!- esotericnonsense [~esotericn@unaffiliated/esotericnonsense] has joined #rust-bitcoin 14:57 -!- dpc [dpcmatrixo@gateway/shell/matrix.org/x-tpmsvlrpivpswnqv] has quit [Ping timeout: 260 seconds] 14:57 -!- Netsplit *.net <-> *.split quits: cloudhead 14:58 -!- Netsplit over, joins: cloudhead 14:58 -!- windsok [~windsok@rarepepe.cash] has joined #rust-bitcoin 14:58 -!- windsok [~windsok@rarepepe.cash] has quit [Changing host] 14:58 -!- windsok [~windsok@unaffiliated/windsok] has joined #rust-bitcoin 14:58 -!- Netsplit *.net <-> *.split quits: gwillen, raj_149, instagibbs, willcl_ark 14:59 -!- Netsplit over, joins: willcl_ark, instagibbs, raj_149, gwillen 15:09 -!- guest534543 [~mix@141.98.103.196] has quit [Quit: Leaving] 15:22 -!- dpc [dpcmatrixo@gateway/shell/matrix.org/x-dsorriaweqhqhemk] has joined #rust-bitcoin 16:25 -!- junderw [sid43070@gateway/web/irccloud.com/x-tkxsrlstezttqtoj] has joined #rust-bitcoin 16:25 < junderw> Hi everyone 16:26 < junderw> I am making a library using secp256k1 library published by rust-bitcoin, and I want to instanciate Secp256k1::new() once when I do MyStruct::new()... 16:26 < junderw> but I can't get the type right... 16:27 < junderw> looking at the library I need Secp256k1 16:27 < junderw> but All is a member of the context module which is private. 16:27 < junderw> Note: I am a rust beginner. 16:29 < junderw> If anyone can tell me how I can do Secp256k1::new() once when I instantiate my struct. (If there's a way to do that without getting at the secp256k1::context::std_only::All then I'd like to hear it too) 16:30 < junderw> Secp256k1::new() is super expensive and doing it at the beginning of every method is slow. 16:31 < junderw> btw, some of my methods will only use verify, some will only use sign etc... so if there's some reason why I should get an instance of SignOnly and VerifyOnly each and store both I would love to hear it. Thanks. 16:52 < gwillen> junderw: I can tell you that there's no advantage to having multiple instances, in pretty much any case 16:52 < gwillen> using one of the Only contexts will just save you some time and memory when initializing the context 16:52 < gwillen> but if you need both just use All, and mostly it's fine to use All no matter what 16:52 < gwillen> and then save the context and reuse it for everything, yeah 16:54 < gwillen> do you have an example of the thing you're trying to do that isn't working? I am mostly familiar with the C secp library (which this is bindings for), but I know some Rust as well. I would expect Secp256k1::new() to Just Work. 16:56 < gwillen> actuall junderw I think the type you want is secp256k1::All, did you see/try that? 16:56 < junderw> pub struct MyStruct { secp: Secp256k1, } gives me a type error. 16:56 < junderw> that's my problem 16:56 < junderw> Secp256k1 is what I want 16:56 < junderw> but All is defined in a private mod 16:56 < gwillen> can you use Secp256k1 ? 16:56 < gwillen> I don't think that definition of All is private 16:57 < gwillen> I think that's the one that's meant for you to use 17:00 < junderw> gwillen thanks that worked. I'm new to rust and Atom's IDE feature is spotty at best with listing members of things. 17:00 < junderw> problem resolved 17:01 < gwillen> ahhh that makes sense, it grabbed the wrong one 17:02 < gwillen> for future reference, here's how I figured it out: look at https://docs.rs/secp256k1/0.17.2/secp256k1/struct.Secp256k1.html, and look at the definition of new9) 17:02 < gwillen> er, the definition of new(). You will see that all the types are clickable. If you click "All", it takes you to https://docs.rs/secp256k1/0.17.2/secp256k1/enum.All.html which tells you the type you want. 17:20 < junderw> awesome 19:22 < junderw> Question: How do I get the inner slice of the ffi::PublicKey object when it's private. `pubkey.0` yells at me because "it's private." 19:23 < junderw> I have an ffi:PublicKey and I would like to make a secp256k1::PublicKey 19:23 < junderw> (ffi meaning secp256k1_sys) 19:38 -!- randyb [~randyb@110.54.145.240] has joined #rust-bitcoin 19:53 -!- randyb [~randyb@110.54.145.240] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 19:54 -!- randyb [~randyb@110.54.145.240] has joined #rust-bitcoin 20:07 < junderw> nvm, I was able to get it to work without needing to do that. 20:08 < junderw> This is what I'm working on BTW https://github.com/junderw/tiny-secp256k1-wasm/pull/2 20:08 < junderw> pointAdd is "match hell" 20:09 < junderw> (for context, this is a WASM implementation via rust for this interface/library https://github.com/bitcoinjs/tiny-secp256k1 20:10 < junderw> native/addon.cpp or js.js should give you an idea of the interface. 20:10 < junderw> it's also documented in the README if anyone wants to help out :-D 20:11 < junderw> once I'm done I would appreciate if anyone has time to review. 20:19 -!- randyb [~randyb@110.54.145.240] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 20:27 -!- randyb [~randyb@110.54.145.240] has joined #rust-bitcoin 20:32 -!- randyb [~randyb@110.54.145.240] has quit [Read error: Connection reset by peer] 20:35 -!- randyb [~randyb@110.54.145.240] has joined #rust-bitcoin 20:37 -!- randyb [~randyb@110.54.145.240] has quit [Client Quit] 20:43 -!- randyb [~randyb@110.54.145.240] has joined #rust-bitcoin 21:02 -!- randyb [~randyb@110.54.145.240] has quit [Remote host closed the connection] 21:06 -!- randyb [~randyb@112.198.68.52] has joined #rust-bitcoin 21:10 -!- randyb [~randyb@112.198.68.52] has quit [Ping timeout: 260 seconds] 21:11 -!- randyb [~randyb@112.198.68.52] has joined #rust-bitcoin 21:14 -!- randyb_ [~randyb@112.198.68.52] has joined #rust-bitcoin 21:16 -!- randyb [~randyb@112.198.68.52] has quit [Ping timeout: 265 seconds] 21:19 -!- randyb_ [~randyb@112.198.68.52] has quit [Ping timeout: 264 seconds] 21:20 -!- randyb [~randyb@112.198.68.52] has joined #rust-bitcoin 21:24 -!- randyb [~randyb@112.198.68.52] has quit [Ping timeout: 260 seconds] 21:26 -!- randyb [~randyb@112.198.68.52] has joined #rust-bitcoin 21:30 -!- randyb [~randyb@112.198.68.52] has quit [Ping timeout: 256 seconds] 21:31 -!- randyb [~randyb@112.198.68.52] has joined #rust-bitcoin 21:36 -!- randyb [~randyb@112.198.68.52] has quit [Ping timeout: 256 seconds] 21:38 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 21:39 -!- randyb [~randyb@112.198.70.229] has quit [Client Quit] 21:46 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 21:50 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 258 seconds] 21:51 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 21:56 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 21:57 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:02 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 272 seconds] 22:02 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:07 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 256 seconds] 22:08 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:12 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:13 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:18 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 260 seconds] 22:19 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:23 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:24 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:27 -!- randyb_ [~randyb@112.198.70.229] has joined #rust-bitcoin 22:28 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 240 seconds] 22:32 -!- randyb_ [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:33 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:37 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:38 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:42 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 240 seconds] 22:43 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:48 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:49 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:53 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 22:55 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 22:59 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 23:00 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:05 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 23:06 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:10 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 23:11 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:16 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 23:19 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:24 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 246 seconds] 23:25 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:29 -!- randyb [~randyb@112.198.70.229] has quit [Ping timeout: 240 seconds] 23:31 -!- randyb [~randyb@112.198.70.229] has joined #rust-bitcoin 23:32 -!- randyb [~randyb@112.198.70.229] has quit [Remote host closed the connection] --- Log closed Mon Jun 08 00:00:44 2020