1 2013-01-27 00:00:00 <CodeShark> so then it does place some responsibility on the developer for optimizing things a bit
  2 2013-01-27 00:00:12 <Scrat> ACTION is taking a look at Rust
  3 2013-01-27 00:00:18 <Scrat> looks very Go-like
  4 2013-01-27 00:01:01 <HM> CodeShark: yep, and it gives you unmanaged access to memory
  5 2013-01-27 00:01:18 <HM> the endgame is a systems language
  6 2013-01-27 00:01:21 <CodeShark> I always hated about Java that it doesn't let me tell it that I'm done with something and I want it to take care of removing it from the heap immediately
  7 2013-01-27 00:02:26 <HM> I have bigger gripes with java than that :P
  8 2013-01-27 00:03:03 <CodeShark> well, the fact that it was both a programming language and a virtual machine bundled under a single brand was also a little annoying :)
  9 2013-01-27 00:03:16 <HM> but whatever, languages are like languages. sometimes you have to go to another country and put up with them
 10 2013-01-27 00:04:09 <CodeShark> sure - when in rome and all that
 11 2013-01-27 00:04:17 <sipa> CodeShark: you mean a language, a compiler, a runtime library, and a virtual machine?
 12 2013-01-27 00:04:31 <CodeShark> lol. yeah, sipa :)
 13 2013-01-27 00:05:16 <CodeShark> although I don't mind the language and runtime library being combined if the implementation is optimized and it makes code more consistent in style
 14 2013-01-27 00:05:25 <CodeShark> like C++ and std
 15 2013-01-27 00:07:07 <HM> Interesting to note that the Clang devs are reimplementing their libstdc++ from scratch
 16 2013-01-27 00:07:15 <Luke-Jr> sipa: bleh, couldn't you have based that pull on top of block proposals? :<
 17 2013-01-27 00:07:27 <HM> although the clang i have on my system uses the GNU implementation
 18 2013-01-27 00:08:50 <Luke-Jr> sipa: if there's even anything new in that pull of yours? O.o
 19 2013-01-27 00:09:02 <sipa> Luke-Jr: read the description?
 20 2013-01-27 00:10:08 <sipa> heh, ok
 21 2013-01-27 00:10:22 <sipa> seems i never looked into how block proposals was implemented
 22 2013-01-27 00:10:43 <Luke-Jr> <.<
 23 2013-01-27 00:11:22 <CodeShark> where's block proposals?
 24 2013-01-27 00:11:39 <Luke-Jr> https://github.com/bitcoin/bitcoin/pull/1816
 25 2013-01-27 00:12:40 <CodeShark> lol "Rebased and implemented @sipa 's CValidationResult solution."
 26 2013-01-27 00:12:46 <CodeShark> 2 months ago?
 27 2013-01-27 00:13:21 <sipa> i even completely forgot about having suggested such a solution :S
 28 2013-01-27 00:13:24 <Luke-Jr> XD
 29 2013-01-27 00:13:34 <sipa> seems I'm at least consistent with myself...
 30 2013-01-27 00:15:05 <Scrat> ACTION likes spendfrom.py
 31 2013-01-27 00:17:40 <sipa> Luke-Jr: i think what i've implemented now is somewhat more efficient (not copying it through every function return) and deals with runtime errors as well
 32 2013-01-27 00:17:52 <sipa> Luke-Jr: adding rejection reason codes/strings to it shouldn't be hard
 33 2013-01-27 00:18:01 <Luke-Jr> sipa: it shouldn't be copied???
 34 2013-01-27 00:18:33 <Luke-Jr> but I guess it's more flexible
 35 2013-01-27 00:18:36 <sipa> i didn't copy anything!
 36 2013-01-27 00:18:48 <Luke-Jr> no, I mean returning a value shouldn't copy it :P
 37 2013-01-27 00:19:13 <sipa> right, there are optimizations that avoid that
 38 2013-01-27 00:19:17 <CodeShark> references are faster...except if you're spawning a thread and doing a tight loop on the data, in which case copying is faster as we found out the other day, right, sipa? :)
 39 2013-01-27 00:24:29 <CodeShark> however, for classes with only a couple primitive type members, I question whether avoiding copies really should be a priority at all
 40 2013-01-27 00:24:52 <HM> if you're not going for ABI stability it doesn't really matter a damn
 41 2013-01-27 00:25:47 <HM> passing by value sucks though when you import foo.h and it uses a type from bar.h
 42 2013-01-27 00:26:01 <HM> with a reference you just need a forward declaration, speeds up compilation
 43 2013-01-27 00:26:25 <HM> i noticed this the other day looking at "main.h"
 44 2013-01-27 00:27:28 <HM> I was trying to create a transaction in code without pulling in all the block and database stuff
 45 2013-01-27 00:27:33 <CodeShark> heh
 46 2013-01-27 00:27:58 <sipa> haha
 47 2013-01-27 00:28:09 <CodeShark> this sounds familiar :)
 48 2013-01-27 00:28:56 <sipa> HM: see #2154
 49 2013-01-27 00:30:44 <HM> libbitcoin is a nice codebase
 50 2013-01-27 00:31:29 <HM> competitive implementations are a good thing, worked well for bittorrent clients
 51 2013-01-27 00:31:48 <HM> well, until they started fighting over protocols
 52 2013-01-27 00:31:53 <CodeShark> I only took a brief look at libbitcoin - never really played with it much
 53 2013-01-27 00:32:56 <CodeShark> I also have my own codebase for basic bitcoin message structures, HM... :)
 54 2013-01-27 00:33:21 <HM> you mean the wire protocol?
 55 2013-01-27 00:33:25 <CodeShark> yeah
 56 2013-01-27 00:34:12 <CodeShark> but I only started packaging it so it could be easily used by other developers
 57 2013-01-27 00:34:19 <CodeShark> never really fully packaged it
 58 2013-01-27 00:34:24 <HM> that's awesome, got github?
 59 2013-01-27 00:34:36 <CodeShark> https://github.com/CodeShark/CoinClasses
 60 2013-01-27 00:35:16 <CodeShark> and the networking stuff could use some improvements as far as setting up message queues and supporting higher concurrency and such
 61 2013-01-27 00:35:27 <HM> looks decent enough, is this from scratch?
 62 2013-01-27 00:35:33 <CodeShark> pretty much
 63 2013-01-27 00:35:57 <CodeShark> https://en.bitcoin.it/wiki/Protocol_specification was what I mostly used as a reference :)
 64 2013-01-27 00:36:39 <HM> ACTION nods
 65 2013-01-27 00:36:49 <CodeShark> and I took some of the ECDSA code from bitcoind
 66 2013-01-27 00:36:56 <CodeShark> specifically the CoinKey class
 67 2013-01-27 00:38:19 <HM> i quite like having an RPC interface atm, it means there's no bitcoin code linked in to any of my code which is reassuring for stability both ways.
 68 2013-01-27 00:38:49 <HM> i think the author of libbitcoin has pushed the transaction database to postgres
 69 2013-01-27 00:39:38 <HM> i'm not familiar with that side of things, i'm mostly interested in the crypto and transactional side of it all.
 70 2013-01-27 00:40:08 <CodeShark> yeah, I started out mostly just trying to build a notification agent
 71 2013-01-27 00:40:09 <CodeShark> lol
 72 2013-01-27 00:40:19 <HM> did you succeed?
 73 2013-01-27 00:40:36 <CodeShark> yeah - check out the listener2 example
 74 2013-01-27 00:41:48 <HM> yup makes sense
 75 2013-01-27 00:42:01 <CodeShark> then I wanted to build a custom wallet
 76 2013-01-27 00:42:22 <CodeShark> then a block chain/transaction database
 77 2013-01-27 00:42:40 <CodeShark> but I didn't start on the end of wanting to build a full verification node
 78 2013-01-27 00:43:11 <CodeShark> verification nodes already existed - what was missing was a way to filter messages and send alerts
 79 2013-01-27 00:43:49 <HM> I'm amazed how many bitcoin web services there are popping up
 80 2013-01-27 00:45:11 <CodeShark> as for the wallet stuff, I wanted to experiment with creating custom transactions
 81 2013-01-27 00:45:24 <CodeShark> now there's the createrawtransaction RPC in bitcoind
 82 2013-01-27 00:45:32 <CodeShark> but when I started working on it, that RPC didn't exist
 83 2013-01-27 00:45:59 <HM> yeah it's handy
 84 2013-01-27 00:48:40 <HM> did anyone consider a dbus api?
 85 2013-01-27 00:49:20 <CodeShark> not that I'm aware of
 86 2013-01-27 00:49:45 <HM> it's just that DBus makes more sense locally than HTTP RPC
 87 2013-01-27 00:49:51 <HM> well, except on Windows
 88 2013-01-27 00:49:59 <CodeShark> but that might be something to consider in trying to separate the GUI from the verification node
 89 2013-01-27 00:50:07 <CodeShark> which is something I'd really like to eventually do
 90 2013-01-27 00:50:33 <HM> that should be fairly straightforward
 91 2013-01-27 00:50:41 <HM> bitcoin doesn't have a million and 1 user functions
 92 2013-01-27 00:51:12 <HM> do you mean by creating a library or via RPC + multiprocess?
 93 2013-01-27 00:51:32 <CodeShark> well, ideally I'd like to see bitcoind become a streamlined, optimized verification/relay node
 94 2013-01-27 00:51:47 <CodeShark> whose main tasks are validating network messages, relaying them, and preventing DoS
 95 2013-01-27 00:52:23 <CodeShark> and I'd like to see wallets, notification agents, network monitoring tools, and databases moved to separate processes
 96 2013-01-27 00:53:03 <HM> for what it's worth, i like that idea muchly
 97 2013-01-27 00:55:31 <CodeShark> and while it would be possible to start from scratch in building such an engine, the fact that such an engine already exists, works, and has been tested and is trusted by people already means it's probably easier to work from the inside out than from the outside in
 98 2013-01-27 00:56:55 <HM> I agree
 99 2013-01-27 00:57:15 <CodeShark> which is why I've put the CoinClasses project on hold for the moment in favor of improving bitcoind
100 2013-01-27 00:58:02 <HM> RPC has the advantage that you can break all your other APIs whenever you please without upsetting developers.
101 2013-01-27 00:58:12 <HM> well, external developers :P
102 2013-01-27 00:58:50 <HM> hell you can even change languages
103 2013-01-27 00:59:43 <CodeShark> yeah, and it's decent for situations where you don't require excessive bandwidth
104 2013-01-27 00:59:59 <CodeShark> or excessive back and forth, rather
105 2013-01-27 01:00:46 <HM> Are you familiar with zeromq?
106 2013-01-27 01:00:54 <HM> it's something i've been playing with recently
107 2013-01-27 01:01:01 <CodeShark> played with it briefly - never built a major app with it
108 2013-01-27 01:01:21 <HM> the codebase put me off
109 2013-01-27 01:01:40 <HM> i have a nasty habit of looking at the code for everything before i use it
110 2013-01-27 01:02:17 <CodeShark> heh - I didn't really look under the hood
111 2013-01-27 01:02:17 <HM> another nice thing i've been looking at of that ilk is Piqi
112 2013-01-27 01:02:27 <HM> but it's Erlang centric, sadly
113 2013-01-27 01:03:21 <CodeShark> I have zero experience with erlang - but have heard good things about building apps with high concurrency using it :)
114 2013-01-27 01:04:11 <HM> yeah that's the spin
115 2013-01-27 01:04:23 <CodeShark> as for being compatible with google protocol buffers, so it's essentially another representation language that uses the same wire format as protocol buffers
116 2013-01-27 01:04:24 <gmaxwell> thumb thumb thump, another one bites the dust: https://bitcointalk.org/index.php?topic=139089.0
117 2013-01-27 01:04:59 <HM> CodeShark: but seemless mappings between JSON, PB and a built in RPC service
118 2013-01-27 01:05:07 <HM> PB doesn't do RPC well / at all
119 2013-01-27 01:05:20 <CodeShark> well, PB is a binary format
120 2013-01-27 01:06:44 <CodeShark> and most HTTP is text
121 2013-01-27 01:07:03 <HM> HTTP is an abortion for anything other than what it was designed for
122 2013-01-27 01:07:08 <CodeShark> haha
123 2013-01-27 01:07:19 <CodeShark> you mean fetching documents from servers? :)
124 2013-01-27 01:07:24 <HM> the RESTful nuts keep trying to make web app APIs beautiful and semantic
125 2013-01-27 01:08:13 <HM> Disclaimer: I will rant about webdev at the drop of a hat
126 2013-01-27 01:08:26 <CodeShark> it's a victim of its own success
127 2013-01-27 01:08:39 <HM> gmaxwell: I'm not familiar with the ASIC saga. Have butterfly actually shipped anything?
128 2013-01-27 01:08:54 <CodeShark> HTTP made it possible for complete nonprogrammers to put together something that has the vague semblance of an interactive app
129 2013-01-27 01:10:01 <gmaxwell> HM: nope, not yet at least.
130 2013-01-27 01:10:24 <gmaxwell> HM: avalon claims to be shipping now but may be having some customs challenges.
131 2013-01-27 01:10:35 <gmaxwell> basic imploded.
132 2013-01-27 01:11:08 <HM> if customs are the problem, wouldn't domestic buyers be tickety-boo?
133 2013-01-27 01:11:23 <Luke-Jr> I don't buy Avalon's story tbh.
134 2013-01-27 01:11:27 <jgarzik> customs is just speculation
135 2013-01-27 01:11:36 <jgarzik> Avalon has just said "we shipped"
136 2013-01-27 01:11:38 <gmaxwell> Asicminer has suffered some delays (that god, or we'd have a single mining farm with a supermajority of the hashpower, run by people who claim to not see any problems with that)
137 2013-01-27 01:12:13 <gmaxwell> jgarzik: ah, I thought they'd actually said they may have slowdowns in customs. Hard to not get swamped in a sea of speculation.
138 2013-01-27 01:12:45 <gmaxwell> I note that their shipping delays mean that I have to have them change my shipping address, and they haven't responded to my email asking them to do so.
139 2013-01-27 01:13:14 <gmaxwell> I'm now actually waiting on hearing back from them to book plane tickets... getting a little irritated about that.
140 2013-01-27 01:13:53 <gmaxwell> (esp since I asked before ordering if it was going to be an issue to do this if their shippment ended up happning after my move)
141 2013-01-27 01:15:03 <Luke-Jr> gmaxwell: Southwest lets you cancel with practically no notice, FWIW
142 2013-01-27 01:15:10 <Luke-Jr> and get a full refund on your plane ticket
143 2013-01-27 01:15:14 <Luke-Jr> (as credit, but still)
144 2013-01-27 01:15:57 <Luke-Jr> there's been a few times I've booked multiple flights months in advance, since I didn't know exactly when I'd be flying
145 2013-01-27 01:16:08 <Luke-Jr> and cancelled the ones I didn't end up taking
146 2013-01-27 01:16:23 <CodeShark> I'm glad I have nothing to do with the whole ASICs drama unfolding :)
147 2013-01-27 01:16:31 <CodeShark> and can just watch from the outside with amusement
148 2013-01-27 01:16:36 <Luke-Jr> CodeShark: meh, it's only drama if you read bitcointalk
149 2013-01-27 01:17:06 <HM> or r/bitcoin
150 2013-01-27 01:25:17 <JWU42> building new rig and been a while since installing from git
151 2013-01-27 01:25:25 <JWU42> get this error - 12.04 box
152 2013-01-27 01:25:26 <JWU42> compilation terminated.
153 2013-01-27 01:25:26 <JWU42> db.h:14:20: fatal error: db_cxx.h: No such file or directory
154 2013-01-27 01:26:07 <JWU42> I checked out 0.7.2 - not master
155 2013-01-27 01:26:09 <CodeShark> you need to set your include path
156 2013-01-27 01:26:14 <CodeShark> what OS are you running?
157 2013-01-27 01:26:27 <JWU42> Ubuntu 12.04
158 2013-01-27 01:26:47 <CodeShark> are you building the headless daemon? or bitcoin-qt?
159 2013-01-27 01:26:57 <JWU42> seems db related for sure - and I notice comments about db 4.8 in the build notes
160 2013-01-27 01:27:03 <JWU42> bitcoind
161 2013-01-27 01:27:04 <CodeShark> check out https://github.com/bitcoin/bitcoin/pull/2195
162 2013-01-27 01:27:12 <JWU42> headless..
163 2013-01-27 01:27:25 <CodeShark> grab the configure file from that repo and try running it
164 2013-01-27 01:28:16 <CodeShark> this: https://github.com/CodeShark/bitcoin/blob/cb23ca73567011551b09326e616e869826128fd7/configure
165 2013-01-27 01:29:08 <CodeShark> or no, sorry
166 2013-01-27 01:29:14 <CodeShark> this: https://github.com/CodeShark/bitcoin/blob/cb23ca73567011551b09326e616e869826128fd7/src/configure
167 2013-01-27 01:29:22 <CodeShark> the other one is for bitcoin-qt
168 2013-01-27 01:29:39 <Luke-Jr> JWU42: did you install db4.8 dev pkg?
169 2013-01-27 01:29:55 <JWU42> Luke-Jr: yeah
170 2013-01-27 01:30:01 <CodeShark> you can either install the 5.1 package or the 4.8 package. it should work with either
171 2013-01-27 01:30:20 <JWU42> CodeShark: your script calls for 5.1 but the build inst say no...
172 2013-01-27 01:30:21 <Luke-Jr> CodeShark: bad idea to use anything but 4.8???
173 2013-01-27 01:30:44 <CodeShark> the script looks for the most recent version and gives a warning if it's 5.1
174 2013-01-27 01:30:47 <Luke-Jr> CodeShark: if your script allows anything else without --use-wrong-bdb-version or such, that's a bug
175 2013-01-27 01:30:52 <JWU42> libdb4.8-dev is already the newest version.
176 2013-01-27 01:31:23 <CodeShark> anyhow, if you have 4.8 installed, the script should find 4.8
177 2013-01-27 01:31:34 <Luke-Jr> JWU42: usually you can build with make -f makefile.unix BDB_INCLUDE_PATH=/usr/include/db4.8/
178 2013-01-27 01:31:35 <JWU42> BDB: Berkeley DB 4.8.30: (April  9, 2010)
179 2013-01-27 01:31:59 <JWU42> the script says I am missing packages and calls for 5.1-dev
180 2013-01-27 01:32:14 <CodeShark> so you have the 5.1 header installed
181 2013-01-27 01:32:34 <CodeShark> look in /usr/include
182 2013-01-27 01:32:40 <JWU42> libdb4.8++-dev couldn't be found
183 2013-01-27 01:33:00 <JWU42> E: Package 'libdb4.8++-dev' has no installation candidate
184 2013-01-27 01:33:50 <Eliel> CodeShark: the drama surrounding ASICs is somewhat interesting to watch :) I do have money on the outcome (on BFL) though, but the attitude I take with that investment is "if it works out, great. If it doesn't, well, my bet didn't work out."
185 2013-01-27 01:34:02 <CodeShark> you need to get it from https://launchpad.net/~bitcoin/+archive/bitcoin for Ubuntu precise, JWU42
186 2013-01-27 01:34:13 <JWU42> Luke-Jr: the 4.8 dir isn;t in /usr/include
187 2013-01-27 01:34:27 <CodeShark> there isn't necessarily a db4.8 directory
188 2013-01-27 01:34:44 <CodeShark> in my Ubuntu, it's just /usr/include/db.h
189 2013-01-27 01:34:50 <JWU42> CodeShark: looking at his comment above with the BDB_INCLUDE comment
190 2013-01-27 01:34:59 <JWU42> yeah - that exists
191 2013-01-27 01:35:04 <Luke-Jr> JWU42: you need libdb4.8++-dev pkg
192 2013-01-27 01:35:27 <Luke-Jr> sudo add-apt-repository ppa:bitcoin/bitcoin
193 2013-01-27 01:35:46 <CodeShark> not sure that will work...will that work on Ubuntu precise, Luke-Jr?
194 2013-01-27 01:35:53 <Luke-Jr> CodeShark: it should
195 2013-01-27 01:35:59 <CodeShark> https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.txt
196 2013-01-27 01:36:46 <Luke-Jr> JWU42: be sure to apt-get update between apt-add-repository and apt-get install libdb4.8++-dev
197 2013-01-27 01:37:01 <JWU42> apt-add doesn't work
198 2013-01-27 01:37:03 <CodeShark> I don't think apt-get will work on 12.04 for 4.8
199 2013-01-27 01:37:14 <JWU42> CodeShark: i thoink u are right
200 2013-01-27 01:37:18 <CodeShark> you need to download the package from https://launchpad.net/~bitcoin/+archive/bitcoin
201 2013-01-27 01:37:18 <Luke-Jr> JWU42: doesn't work, how?
202 2013-01-27 01:37:26 <CodeShark> or you can install 5.1
203 2013-01-27 01:37:33 <JWU42> sudo: add-apt-repository: command not found
204 2013-01-27 01:37:47 <Luke-Jr> O.o
205 2013-01-27 01:38:06 <JWU42> =)
206 2013-01-27 01:38:08 <CodeShark> JWU42, you have two choices: apt-get install libdb5.1-dev libdb5.1++-dev
207 2013-01-27 01:38:15 <CodeShark> or download the package from https://launchpad.net/~bitcoin/+archive/bitcoin
208 2013-01-27 01:38:20 <CodeShark> and install 4.8
209 2013-01-27 01:38:34 <JWU42> ok - never manually installed - will google how
210 2013-01-27 01:38:50 <JWU42> I thought you use dpkg
211 2013-01-27 01:38:58 <CodeShark> no, not to install this particular package
212 2013-01-27 01:39:11 <Luke-Jr> sudo apt-get install python-software-properties
213 2013-01-27 01:39:29 <CodeShark> apt-get will not work for db4.8 on ubuntu precise
214 2013-01-27 01:39:40 <Luke-Jr> CodeShark: why not?
215 2013-01-27 01:39:51 <JWU42> https://launchpad.net/ubuntu/precise/+source/db4.8/4.8.30-11ubuntu1  <  here?
216 2013-01-27 01:39:52 <CodeShark> because there is no official package for it
217 2013-01-27 01:39:59 <Luke-Jr> CodeShark: that's why you add a repository
218 2013-01-27 01:40:06 <CodeShark> yes, JWU42
219 2013-01-27 01:40:24 <Luke-Jr> JWU42: python-software-properties supposedly has the apt-add-repository program
220 2013-01-27 01:40:33 <JWU42> so grab the 3 files then what?
221 2013-01-27 01:40:37 <JWU42> Luke-Jr: thks
222 2013-01-27 01:40:56 <CodeShark> you actually just need the top file, I believe, JWU42
223 2013-01-27 01:40:59 <Luke-Jr> JWU42: those 3 files won't do you any good
224 2013-01-27 01:41:18 <JWU42> nothing like conflicting advice ;)
225 2013-01-27 01:41:21 <CodeShark> Luke-Jr: I've installed it using those files :)
226 2013-01-27 01:41:30 <Luke-Jr> CodeShark: the non-deb ones?
227 2013-01-27 01:41:45 <CodeShark> let me see...
228 2013-01-27 01:41:49 <Luke-Jr> his linked page has no deb file
229 2013-01-27 01:41:55 <JWU42> correct
230 2013-01-27 01:42:11 <Luke-Jr> why Launchpad is hiding it, I don't know
231 2013-01-27 01:42:24 <Luke-Jr> I do know that installing from the repository should work tho :P
232 2013-01-27 01:42:31 <JWU42> K
233 2013-01-27 01:42:58 <JWU42> PPA added now
234 2013-01-27 01:43:12 <CodeShark> ok, then add the repo :)
235 2013-01-27 01:44:05 <JWU42> tada
236 2013-01-27 01:44:07 <JWU42> ;)
237 2013-01-27 01:44:27 <JWU42> thks Luke-Jr
238 2013-01-27 01:44:29 <Luke-Jr> np
239 2013-01-27 01:44:31 <JWU42> and coderrr
240 2013-01-27 01:44:33 <JWU42> err
241 2013-01-27 01:44:35 <JWU42> CodeShark:
242 2013-01-27 01:44:46 <CodeShark> everything is working now?
243 2013-01-27 01:44:51 <JWU42> check
244 2013-01-27 01:44:54 <JWU42> add the PPA
245 2013-01-27 01:45:01 <JWU42> update
246 2013-01-27 01:45:08 <CodeShark> great
247 2013-01-27 01:45:12 <JWU42> then can install the 4.8++
248 2013-01-27 01:45:20 <CodeShark> I think I just built 4.8 from source when I did it - lol
249 2013-01-27 01:45:31 <JWU42> hardcore =)
250 2013-01-27 01:45:50 <JWU42> I am going to end up redoing this box anyways
251 2013-01-27 01:46:18 <JWU42> not keen with the partitioning
252 2013-01-27 01:46:24 <JWU42> haste makes waste
253 2013-01-27 01:46:28 <JWU42> :/
254 2013-01-27 01:46:31 <CodeShark> and 5.1 should work fine, too - only thing is upgraded wallets won't be compatible with 4.8 nodes
255 2013-01-27 01:46:45 <CodeShark> but if you don't have any 4.8 nodes, I recommend using 5.1 :)
256 2013-01-27 01:47:43 <Luke-Jr> thankfully bdb is going away soon, so there won't be any need to upgrade beyond 4.8
257 2013-01-27 01:48:33 <CodeShark> couldn't have happened soon enough
258 2013-01-27 01:49:59 <CodeShark> Eliel: I suppose any sane investor understands the high risk nature of the game
259 2013-01-27 01:51:24 <CodeShark> and if you can't afford to take the loss without it hurting your personal finances it's probably not a game you should be playing :)
260 2013-01-27 01:51:38 <CodeShark> but I hope things turn out well for you
261 2013-01-27 01:52:10 <sipa> once bitcoind does not depend on bdb anymore, i think i'm going to ritually purge it from my hard drive
262 2013-01-27 01:52:18 <CodeShark> haha, sipa
263 2013-01-27 02:13:06 <JWU42> damn
264 2013-01-27 02:13:19 <JWU42> cannot get the blockchain to copy over without coredump
265 2013-01-27 02:13:29 <JWU42> ACTION grumbles
266 2013-01-27 02:13:41 <gmaxwell> JWU42: you must cleantly shut down with detachdb before moving the databases.
267 2013-01-27 02:13:52 <JWU42> gmaxwell: this I do know
268 2013-01-27 02:14:06 <gmaxwell> (ah note: I didn't look at the scrollback, sorry if I'm being clueless)
269 2013-01-27 02:14:08 <JWU42> but understand the need for saying so
270 2013-01-27 02:14:37 <JWU42> oh well - will waste the night away getting the blockchain
271 2013-01-27 02:50:25 <JWU42> well - this new rig has a larger blockchain than two others
272 2013-01-27 02:50:36 <JWU42> went up to blk004
273 2013-01-27 02:50:48 <JWU42> other two rigs stop at blk003
274 2013-01-27 02:52:42 <gmaxwell> sounds like you deleted the indexes without deleting the blockfiles.
275 2013-01-27 02:53:32 <JWU42> yep
276 2013-01-27 02:53:39 <JWU42> might have
277 2013-01-27 02:53:46 <JWU42> brain is fried
278 2013-01-27 04:56:58 <etotheipi_> in "getpeerinfo" what is "startingheight"?
279 2013-01-27 04:57:38 <etotheipi_> I would expect it to be that peer's latest block, but they are all quite different (and all more than 500 blocks old)
280 2013-01-27 04:57:52 <gmaxwell> etotheipi_: they are the height the peer reported in their version messag on connect.
281 2013-01-27 04:58:04 <etotheipi_> ooh
282 2013-01-27 04:58:16 <etotheipi_> so is that essentially an "age" of the connection?
283 2013-01-27 04:59:49 <etotheipi_> gmaxwell: what criteria does Bitcoin-Qt use to show the checkmark (fully sync'd)?
284 2013-01-27 05:03:23 <gmaxwell> etotheipi_: fuzzy memory at 1am.. uhh.. I think it's the latest block has a timestamp within the last two hours.
285 2013-01-27 05:04:16 <etotheipi_> not the "median topblock of 11 peers" criteria?
286 2013-01-27 05:04:44 <gmaxwell> (generally we want to avoid griefing... someone making nodes show that they're not synced can be astonishingly distruptive??? people will spaz out and do all kinds of awful things to their nodes when they show out of sync (we used to trigger it after a half hour or something short like that))
287 2013-01-27 05:05:16 <gmaxwell> etotheipi_: no thats used produce the estimate in the download progress bar, but that gets hidden when its too close.
288 2013-01-27 08:49:55 <ThomasV> 0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c0000000017a914f815b036d9bbbce5e9f2a00abd1bf3dc91e9551087ffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac0000000001000000
289 2013-01-27 08:50:26 <kuzetsa> yikes ---> [22:52:58] <@gmaxwell> sounds like you deleted the indexes without deleting the blockfiles.
290 2013-01-27 08:50:29 <ThomasV> is this the correct string that I need to verify, in gavinandresen's p2sh example?
291 2013-01-27 08:50:40 <kuzetsa> so it just started adding blocks blindly to the blk00x files?
292 2013-01-27 08:51:00 <ThomasV> I'm refering to this example: https://gist.github.com/3966071
293 2013-01-27 08:51:45 <ThomasV> I'm trying to verify the signatures, with no success
294 2013-01-27 08:52:51 <petertodd> ThomasV: something is wrong in your script, notice how the scriptSig for the txin is set to OP_HASH160 f815b036d9bbbce5e9f2a00abd1bf3dc91e95510 OP_EQUAL? basically it doesn't have a signature at all
295 2013-01-27 08:53:13 <petertodd> what's tx 3c9018e8d5615c306d72397f8f5eef44308c98fb576a88e030c25456b4f3a7ac? I don't see it in my mempool
296 2013-01-27 08:54:53 <ThomasV> petertodd: no, I am trying to verify the signature, so that's normal
297 2013-01-27 08:55:26 <ThomasV> petertodd: http://blockchain.info/tx-index/30888901
298 2013-01-27 08:55:53 <ThomasV> well, the input is http://blockchain.info/tx-index/30888899/0
299 2013-01-27 08:57:12 <ThomasV> I am learning how to build a multisig transaction, so I want to know which string I need to sign. from what I understand, it is the string I pasted above
300 2013-01-27 08:57:19 <ThomasV> but it does not work
301 2013-01-27 08:58:24 <ThomasV> I am mostly relying on https://en.bitcoin.it/w/images/en/7/70/Bitcoin_OpCheckSig_InDetail.png
302 2013-01-27 08:58:26 <petertodd> try looking at 837dea37ddc8b1e3ce646f1a656e79bbd8cc7f558ac56a169626d649ebe2a3ba, which does spend that input, and you'll see what I mean
303 2013-01-27 08:58:52 <petertodd> remember the scriptSig is what is being provided to the scriptPubKey; your tx has a scriptPubKey as the scriptSig
304 2013-01-27 09:00:21 <ThomasV> petertodd: I extracted the signatures from 837dea37ddc8b1e3ce646f1a656e79bbd8cc7f558ac56a169626d649ebe2a3ba, and I am trying to verify them...
305 2013-01-27 09:01:23 <petertodd> ah, so that tx you pasted, where did that come from?
306 2013-01-27 09:01:33 <ThomasV> petertodd: what I pasted is not a tx, it is what is getting verified (step 10 on the figure)
307 2013-01-27 09:01:46 <petertodd> ah, I missed that part of the conversation then
308 2013-01-27 09:01:59 <ThomasV> :)
309 2013-01-27 09:02:10 <ThomasV> <ThomasV> I am learning how to build a multisig transaction, so I want to know which string I need to sign. from what I understand, it is the string I pasted above
310 2013-01-27 09:02:29 <ThomasV> so, I made it manually
311 2013-01-27 09:02:38 <ThomasV> but all verifications fail
312 2013-01-27 09:02:53 <ThomasV> I must have missed something, and I don't know what
313 2013-01-27 09:03:50 <petertodd> yeah, I don't understand checksig quite well enough to comment
314 2013-01-27 09:04:09 <petertodd> myself I'd get out a debugger and look into what's going on at that level
315 2013-01-27 09:04:22 <ThomasV> lol
316 2013-01-27 09:04:41 <petertodd> I think pynode can verify p2sh too, which may be an easier way to debug
317 2013-01-27 09:18:32 <ThomasV> ok, I'll try pynode
318 2013-01-27 09:18:33 <ThomasV> bbl
319 2013-01-27 09:35:52 <sipa> kuzetsa: 0.7 and before always just append, indeed
320 2013-01-27 09:43:42 <sipa> anyone know whether posix_fallocate is available on OSX/BSD ?
321 2013-01-27 09:45:19 <SomeoneWeird> i've heard you have to pay to use that on OSX
322 2013-01-27 09:45:20 <SomeoneWeird> >.>
323 2013-01-27 09:46:00 <Scrat> yep, $0.999999999 per call
324 2013-01-27 09:46:13 <Scrat> because we're too cool to make it cost 1 dollar
325 2013-01-27 09:48:17 <sipa> loi
326 2013-01-27 10:10:41 <CodeShark> sipa, I can try to compile and run a test program if you want
327 2013-01-27 10:11:06 <CodeShark> I'm guessing it is available
328 2013-01-27 10:11:18 <CodeShark> since OS X is practically 100% posix compliant
329 2013-01-27 10:11:51 <sipa> CodeShark: a short tour on the interwebz colnvinced me it's not available on either
330 2013-01-27 10:12:00 <CodeShark> hmm
331 2013-01-27 10:14:13 <SomeoneWeird> {OSX,BSD}--
332 2013-01-27 10:16:24 <CodeShark> there must be a way to hack something equivalent, sipa
333 2013-01-27 10:20:16 <sipa> sure, we already have the hack: writing zeroes to the file
334 2013-01-27 10:21:52 <Scrat> hm, doesn't leveldb handle that?
335 2013-01-27 10:22:11 <sipa> this is about the block files
336 2013-01-27 10:22:57 <sipa> which are not handled by a database
337 2013-01-27 15:18:36 <jgarzik> I love the Avalon-ASICs-shipped thread
338 2013-01-27 15:18:47 <jgarzik> the trolls are now questioning whether or not I exist
339 2013-01-27 15:19:06 <sipa> well did you receive anything? :p
340 2013-01-27 15:19:20 <jgarzik> jgarzik ASIC arrival FAQ of the day, https://bitcointalk.org/index.php?topic=137534.msg1478626#msg1478626
341 2013-01-27 15:19:27 <jgarzik> ACTION pastes :)
342 2013-01-27 15:20:41 <sipa> jgarzik: ok so we can infer either Avalon doesn't exist, or you don't!
343 2013-01-27 15:26:10 <MC1984> cartesian trolling
344 2013-01-27 15:27:50 <jgarzik> hah
345 2013-01-27 15:31:30 <MC1984> did you get the thing yet
346 2013-01-27 15:36:34 <sipa> lol
347 2013-01-27 15:39:15 <MC1984> oh wow its being shipped from china
348 2013-01-27 15:39:48 <MC1984> mysterious ASIC circitury shipped from the reds to a seemingly unassuming american software developer
349 2013-01-27 15:40:13 <MC1984> enjoy your watchlist
350 2013-01-27 15:43:33 <jgarzik> ACTION posts a history lesson, a nothing-new-has-happened Avalon ASIC update: https://bitcointalk.org/index.php?topic=137534.msg1483252#msg1483252
351 2013-01-27 15:44:22 <MC1984> lol yeah
352 2013-01-27 15:44:26 <jgarzik> sadly, I imagine I've been noticed by the FBI, DEA and others simply because I am listed as a bitcoin core developer
353 2013-01-27 15:44:57 <MC1984> the forum is so retarded sometimes it wraps right the fuck back around into philisophical and insightful
354 2013-01-27 15:45:05 <D34TH> jgarzik, why not request a copy of your file?
355 2013-01-27 15:45:16 <jgarzik> D34TH: I've long thought I should
356 2013-01-27 15:45:27 <D34TH> its free until 30+ pages
357 2013-01-27 15:45:42 <MC1984> jgarzik humour is the most common way people make themselves feel better about very real situations
358 2013-01-27 15:45:45 <TD> i doubt there's any file
359 2013-01-27 15:45:46 <D34TH> mine is full of stuff i hope never reaches the light of day
360 2013-01-27 15:46:19 <MC1984> re: electronics from the reds, see the huwai network equipment hooha
361 2013-01-27 15:46:24 <D34TH> that was worded poorly
362 2013-01-27 15:46:31 <D34TH> now i seem really bad
363 2013-01-27 15:46:53 <MC1984> we all got secrets
364 2013-01-27 15:46:54 <jgarzik> MC1984: indeed
365 2013-01-27 15:47:33 <D34TH> MC1984: lets put it this way. I was young, dumb, and had access and know how to make people mad.
366 2013-01-27 15:47:37 <jgarzik> TD: did you see the FBI report on bitcoin that was leaked?  Someone obviously spent a lot of time researching the details.  It was quite accurate, and not damning at all IMNSHO.
367 2013-01-27 15:47:46 <TD> i did
368 2013-01-27 15:48:03 <MC1984> jgarzik they dont have to spin up the hysteria so much internally, presumably
369 2013-01-27 15:49:35 <sipa> well it means at least some division inside the FBI is interested
370 2013-01-27 15:50:18 <MC1984> they should be interested about how useful it would be to them
371 2013-01-27 15:53:26 <TD> for what?
372 2013-01-27 15:55:12 <kjj> yeah, FBI doesn't care about money
373 2013-01-27 16:49:54 <petertodd> jgarzik: for your safety, if the FBI ever asks me, I'm telling them I have no concrete proof that you exist
374 2013-01-27 16:51:15 <MC1984> theres no concrete proof that anyone exists, man
375 2013-01-27 16:51:45 <MC1984> oh wait i made that joke 2 hours ago
376 2013-01-27 16:52:53 <petertodd> MC1984: you mean, the irc chatbot MC1984 doesn't initialize its PRNG correctly, and was restarted?
377 2013-01-27 16:53:21 <MC1984> yes i did
378 2013-01-27 16:53:24 <MC1984> how was your day?
379 2013-01-27 16:53:39 <petertodd> ACCESSING MEMORY BANKS: good
380 2013-01-27 16:54:19 <MC1984> im glad you think so!
381 2013-01-27 16:54:44 <petertodd> lol
382 2013-01-27 16:54:46 <petertodd> nah,
383 2013-01-27 16:55:15 <petertodd> I was pissing around with my new testnet-seeder; I can see why no-one has gotten one up yet, it's surprisingly easy to get sucked into silly sysadmin stuff with it
384 2013-01-27 16:56:23 <sipa> PC LOAD LETTER
385 2013-01-27 16:56:39 <sipa> petertodd: poke me if you have problems
386 2013-01-27 16:56:51 <MC1984> Could you rephrase the question?
387 2013-01-27 16:58:07 <petertodd> sipa: will do. I setup some thing to get it loaded within a screen session - how do you leave yours running? it doesn't exactly have a --daemon switch
388 2013-01-27 17:00:52 <sipa> petertodd: yeah, mine runs in a screen as well
389 2013-01-27 17:01:24 <sipa> there's sort of a bug where it tends to be become very slow/locked up after a while
390 2013-01-27 17:01:42 <sipa> i've been wanting to rewrite a part of it, but hasn't happened so far
391 2013-01-27 17:01:59 <petertodd> huh, how long is awhile?
392 2013-01-27 17:02:05 <sipa> weeks, maybe
393 2013-01-27 17:02:26 <petertodd> a weekly reboot is probably fine then
394 2013-01-27 17:02:27 <sipa> rather days probably
395 2013-01-27 17:02:40 <sipa> seems to be worse if you have many crawler threads
396 2013-01-27 17:02:42 <petertodd> ok, daily reboot :P
397 2013-01-27 17:02:50 <petertodd> it's not a memleak right?
398 2013-01-27 17:02:53 <sipa> no
399 2013-01-27 17:02:58 <RBecker> petertodd: there's a way to send a program to background without screen
400 2013-01-27 17:03:22 <sipa> petertodd: mine uses 120 MiB RES memory now, after a few days
401 2013-01-27 17:03:25 <petertodd> RBecker: yeah, but screen lets you see the output of the program
402 2013-01-27 17:03:37 <sipa> petertodd: for mainnet, with 422k IPs loaded
403 2013-01-27 17:03:38 <RBecker> and this program logs it all to a file
404 2013-01-27 17:04:04 <petertodd> RBecker: nohup? see, sipa's seeder gives output every second, you don't want that all logged
405 2013-01-27 17:04:14 <RBecker> yeah, was thinking nohup
406 2013-01-27 17:04:16 <petertodd> sipa: ah, testnet might not exhibit the problem
407 2013-01-27 17:04:21 <sipa> perhaps not
408 2013-01-27 17:04:56 <petertodd> sipa: I started an instance on mainnet w/o DNS to collect my own uptime data; I'll see how it does
409 2013-01-27 17:05:18 <petertodd> sipa: also, I was thinking you could expose Tor addrs with CNAME, as you've probably already thought of...
410 2013-01-27 17:06:24 <sipa> petertodd: yes, but it would mean adding a dns resolver to bitcoin
411 2013-01-27 17:06:47 <sipa> and the normal system resolver doesn't expose cname's
412 2013-01-27 17:07:01 <petertodd> sipa: good point :(
413 2013-01-27 17:07:19 <sipa> petertodd: what would work is embedding it in an AAAA record onioncat-style
414 2013-01-27 17:07:28 <sipa> like is done on the P2P network
415 2013-01-27 17:08:16 <petertodd> sipa: yeah, might lead to some odd issues with dns filtering though, could be worth a try on testnet first though
416 2013-01-27 17:10:10 <gmaxwell> https://news.ycombinator.com/item?id=5124784
417 2013-01-27 17:10:21 <gmaxwell> ('China does man-in-the-middle attack on Github')
418 2013-01-27 17:12:50 <petertodd> gmaxwell: scary... I've been thinking it might be a worthwhile exercise to timestamp commit hashes for the bitcoin repo, so you'd at least be able to say things like "well, if bitcoin has been tojaned, it's been done recently", similarly for devel gpg keys (which I actually already timestamped awhile back)
419 2013-01-27 17:13:06 <petertodd> gmaxwell: you need a clean copy of bitcoind to begin with, but only once
420 2013-01-27 17:13:26 <Diablo-D3> [01:10:36] <gmaxwell> ('China does man-in-the-middle attack on Github')
421 2013-01-27 17:13:32 <Diablo-D3> doesnt github use https religiously?
422 2013-01-27 17:13:48 <gmaxwell> Diablo-D3: they're MITMing the HTTPS, thats why this is detectable.
423 2013-01-27 17:13:56 <Diablo-D3> goddamnit china =/
424 2013-01-27 17:14:34 <gmaxwell> without https you couldn't even tell they were doing it.
425 2013-01-27 17:14:59 <Diablo-D3> time to switch to ipsec I think
426 2013-01-27 17:15:36 <petertodd> china makes ipsec traffic slow and annoying these days
427 2013-01-27 17:15:54 <Diablo-D3> good, it'll be that much closer to a revolution then
428 2013-01-27 17:16:04 <petertodd> it's a general strategy of making communicating privately and organizing inconvenient
429 2013-01-27 17:16:32 <Diablo-D3> yes, and when most major sites in the world enable ipsec?
430 2013-01-27 17:16:43 <Diablo-D3> china is then disconnected from the internet forever and everyone is happy
431 2013-01-27 17:16:45 <petertodd> and they hold back just enough that a revolution isn't likely... sad to say, but they have succeeded in taming the web
432 2013-01-27 17:17:03 <wizkid057> go china
433 2013-01-27 17:17:18 <petertodd> how does ipsec help you if it's websites? that's the same as https
434 2013-01-27 17:17:33 <andytoshi> ;;bc,blocks
435 2013-01-27 17:17:34 <gribble> 218313
436 2013-01-27 17:18:04 <wizkid057> ;;bc,stats
437 2013-01-27 17:18:06 <gribble> Current Blocks: 218313 | Current Difficulty: 2968775.3320751 | Next Difficulty At Block: 219743 | Next Difficulty In: 1430 blocks | Next Difficulty In About: 1 week, 2 days, 17 hours, 34 minutes, and 0 seconds | Next Difficulty Estimate: 3035090.30936258 | Estimated Percent Change: 2.23374859562
438 2013-01-27 17:20:52 <Diablo-D3> petertodd: signed and/or encrypted at IP layer with the option of using preshared keys
439 2013-01-27 17:22:21 <petertodd> so what specifically is the advantage over https? you can preshare keys with https too (albeit UI support is terrible)
440 2013-01-27 17:25:52 <Diablo-D3> petertodd: you cant mitm ipsec if done right
441 2013-01-27 17:25:58 <Diablo-D3> https probably will never be done right
442 2013-01-27 17:27:17 <petertodd> why don't you think you can mitm ipsec? you an mitm any encryption system when the other side doesn't have a way of verifying the key
443 2013-01-27 17:28:02 <Diablo-D3> what if we switch to a standard where the key can be generated using a known passphrase, such as the domain name itself
444 2013-01-27 17:28:29 <petertodd> the private key, or the public key?
445 2013-01-27 17:28:40 <Diablo-D3> public
446 2013-01-27 17:28:51 <petertodd> so if you do that, how do you generate the private key?
447 2013-01-27 17:29:02 <petertodd> private->public is possible, public->private not...
448 2013-01-27 17:29:12 <Diablo-D3> private->public using brute force?
449 2013-01-27 17:29:23 <petertodd> but if that's possible, what value is the public key?
450 2013-01-27 17:29:38 <Diablo-D3> because they wont have the private key
451 2013-01-27 17:29:42 <Diablo-D3> thus cant fake it
452 2013-01-27 17:30:00 <petertodd> yeah, but they just see a public key weak enough to brute force, and brute force it themselves
453 2013-01-27 17:30:23 <petertodd> (incedentally, Freenet *does* use encryption by the 'domain name' itself, but that's a special case...)
454 2013-01-27 17:30:45 <Diablo-D3> I dont know. We just need a useful oob method for sharing the key
455 2013-01-27 17:31:28 <petertodd> well, we have one, they're called certificate authorities... web of trust has proven itself to be a failure in non-tech communities
456 2013-01-27 17:31:47 <Diablo-D3> yes, but we allow nontrustworthy entities become certificate authorities
457 2013-01-27 17:32:02 <Diablo-D3> and browsers arent as safe as, say, ssh with key signatures
458 2013-01-27 17:32:03 <petertodd> you can boost the security of CA's with alternate mechanisms like sticky keys and what not, and tamperproof logging
459 2013-01-27 17:32:36 <petertodd> what makes you think ssh is actually safe? people accept ssh key changes all the time
460 2013-01-27 17:32:40 <Diablo-D3> yes, but there are chinese CAs that are allowed to produce certs for non-.ch domains
461 2013-01-27 17:32:48 <Diablo-D3> petertodd: well
462 2013-01-27 17:32:54 <Diablo-D3> if a remote server is tampered with, I know about it
463 2013-01-27 17:33:25 <petertodd> yeah, the non-.ch thing is a big issue, but that's fixable with restrictions, politically hard though... more realistic is the tamperproof logging stuff probably
464 2013-01-27 17:33:56 <petertodd> only because ssh has sticky keys, and that can be added to https, and people are working on that
465 2013-01-27 17:33:59 <Diablo-D3> politically its not hard, just do it and let them sink
466 2013-01-27 17:34:15 <petertodd> (chrome special-cases google's https keys for instance)
467 2013-01-27 17:34:45 <petertodd> making CA's secure is politically hard because politics has an interest in them not being too secure
468 2013-01-27 17:34:46 <Diablo-D3> yeah, if browsers shipped with a list of server certs for well known sites it'd fix a lot of issues
469 2013-01-27 17:35:00 <petertodd> chrome does that!
470 2013-01-27 17:35:08 <Diablo-D3> chrome does it for google domains
471 2013-01-27 17:35:16 <gmaxwell> petertodd: naively implemented sticky keys just prevent proper key managment, replacing one problem with another.
472 2013-01-27 17:35:25 <petertodd> actually, I just looked, it's open to more than just google domains
473 2013-01-27 17:35:30 <Diablo-D3> chrome and firefox would need to do it for at least 3 key signature verifying servers
474 2013-01-27 17:35:39 <petertodd> gmaxwell: yup, it's *why* people click through ssh key changes
475 2013-01-27 17:35:55 <Diablo-D3> one would need to be google's, one would need to be mozilla's, and one would have to be an interested third party (apple? microsoft?)
476 2013-01-27 17:35:59 <gmaxwell> petertodd: they don't pin the certs themselves IIRC, they pin the CA keys for them.
477 2013-01-27 17:36:12 <petertodd> gmaxwell: but that's a UI problem, and, for instance, sticky keys + survailance (without user visibility at first) is one option
478 2013-01-27 17:36:41 <petertodd> gmaxwell: IE, if the key changes, notify the owner somehow, and retain an option to have the owner disallow
479 2013-01-27 17:36:44 <Diablo-D3> it'd only need to store the signature of the cert
480 2013-01-27 17:36:56 <gmaxwell> petertodd: its an insoluable one??? making it so that users are used to clicking past is why this china thing works.
481 2013-01-27 17:36:57 <Diablo-D3> ssl sents the cert chain on connection init or some shit like that
482 2013-01-27 17:37:09 <Diablo-D3> gmaxwell: my browser doesnt even alert me
483 2013-01-27 17:37:23 <petertodd> gmaxwell: right, and that's why I said *don't* notify the users, accept that a small number will be screwed over
484 2013-01-27 17:37:25 <Diablo-D3> it'd be a big step up if it did
485 2013-01-27 17:37:53 <gmaxwell> petertodd: Ah, I see what you're saying.
486 2013-01-27 17:38:00 <petertodd> Diablo-D3: wait, who do you want SSL to send the chain to?
487 2013-01-27 17:38:09 <Diablo-D3> petertodd: thats not what I mean
488 2013-01-27 17:38:23 <petertodd> gmaxwell: Google's running a SSL cert survailance program apparently doing something like that.
489 2013-01-27 17:38:26 <Diablo-D3> a remote verifying server would only need to store the signature of the server cert and the date of expiry of the cert
490 2013-01-27 17:38:32 <gmaxwell> Some of the google folks wrote a spec for pinning a CA signing key per key with a pinning duration field??? so you could keep the signing key offline and still rotate keys.... but afaik that proposal has gone nowhere.
491 2013-01-27 17:39:03 <Diablo-D3> a browser then could use built in server keys to that remote verifying server and then check the server key
492 2013-01-27 17:39:05 <petertodd> Yeah, that's a good proposal too. the EFF had some with hash chains of certs too I thought?
493 2013-01-27 17:39:07 <Diablo-D3> er, server cert
494 2013-01-27 17:39:44 <petertodd> All the proposals do have the disadvantage that they make it easier to get into a situation where the SSL certs for your site are all hosed of course... but competent sysadmins are an option.
495 2013-01-27 17:40:03 <Diablo-D3> SSL doesnt allow cert killing?
496 2013-01-27 17:40:20 <petertodd> yes, it's called revocation, but no-one operates revocation servers that actually work
497 2013-01-27 17:40:33 <Diablo-D3> then google, mozilla, and another third party would need to
498 2013-01-27 17:40:39 <Diablo-D3> as part of the solution
499 2013-01-27 17:41:01 <petertodd> Revocation servers need very good uptime and to be effective, and cert authorities would rather just ignore the issue.
500 2013-01-27 17:41:21 <Diablo-D3> yes, thus google and mozilla could fix this
501 2013-01-27 17:41:36 <Diablo-D3> have revocation servers, have verify servers
502 2013-01-27 17:41:57 <petertodd> Which means google and mozilla have a switch to turn the https internet off...
503 2013-01-27 17:42:07 <Diablo-D3> yup, they do
504 2013-01-27 17:42:18 <petertodd> And I'll bet you we'd see the likes of China just blocking access to the revocation servers from day 1.
505 2013-01-27 17:42:19 <Diablo-D3> the eff would probably have to also manage a server as well
506 2013-01-27 17:42:33 <Diablo-D3> yup, and then china cant browse the internet
507 2013-01-27 17:42:40 <Diablo-D3> because both mozilla and google will push for https everywhere
508 2013-01-27 17:42:53 <petertodd> No, then chinese people disable the revocation server feature of Mozilla and go on with their insecure lives.
509 2013-01-27 17:42:56 <Diablo-D3> and then eventually remove http support in some form
510 2013-01-27 17:43:41 <petertodd> before they do that they could at least silently accept non-self-signed certs (with no change in the UI experience)
511 2013-01-27 17:43:56 <petertodd> Ridiculous that hasn't been done yet...
512 2013-01-27 17:44:07 <Diablo-D3> I dont understand why the internet wasnt built securely to begin with
513 2013-01-27 17:44:49 <petertodd> The internet as we know it was designed in the early 90's; back then encryption was actually slow.
514 2013-01-27 17:45:00 <petertodd> People used to use 384bit RSA keys, for speed!
515 2013-01-27 17:46:12 <Diablo-D3> so?
516 2013-01-27 17:46:14 <Diablo-D3> thats no excuse
517 2013-01-27 17:47:38 <petertodd> it's a damn good excuse: too slow, don't even know if it works, how is this going to help us market our product?
518 2013-01-27 17:47:53 <petertodd> selling good excryption as a feature is really hard
519 2013-01-27 17:48:46 <kjj> selling is easy.  making is hard
520 2013-01-27 17:49:53 <kjj> what usually happens is that auditors make compliance checks, and make sure you are using a certified algorithm, so you pay a lot for it.
521 2013-01-27 17:49:59 <petertodd> no, selling is hard too, people don't understand why it's worth it "I've never been hacked", and when they do understand they want it, they have no way of determining what security is or isn't snakeoil
522 2013-01-27 17:50:55 <kjj> there are now laws and regulations everywhere, and auditors too.
523 2013-01-27 17:50:55 <petertodd> anyway, I gotta go out into the real world :P later
524 2013-01-27 17:51:16 <Diablo-D3> but how do you know you've never been hacked if you're not secure?
525 2013-01-27 18:04:19 <etotheipi_> sipa: gmaxwell: Bitcoin-Qt shows the download status bar with the number of blocks left to download... is this data available in some way from the RPC interface?
526 2013-01-27 18:05:03 <etotheipi_> if I'm going to bundle/manage bitcoind, I'd like to be able to notify the user how much download is left, just like if they were using bitcoin-qt
527 2013-01-27 18:05:51 <gmaxwell> etotheipi_: it's only a vague guess, and it's hidden when it gets close to current.  No, not in the rpc. You could estimate it yourself the same with bitcoind does, getpeerinfo median of starting heights.
528 2013-01-27 18:05:56 <MC1984> that bar means nothing though
529 2013-01-27 18:06:01 <MC1984> because blocks arnt equal
530 2013-01-27 18:06:43 <MC1984> it wouldnt be so bad if its progess could be made linear somehow
531 2013-01-27 18:06:57 <MC1984> lots of people come in here assuming bitcoin is actually stuck
532 2013-01-27 18:07:22 <etotheipi_> that's fine... I know it's not exact
533 2013-01-27 18:07:32 <etotheipi_> I was planning to do something similar
534 2013-01-27 18:07:35 <kjj> it would be nice if there was a way to find out if bitcoin thinks it is current or not
535 2013-01-27 18:07:37 <etotheipi_> assume it's within 100 blocks or something
536 2013-01-27 18:08:07 <sipa> etotheipi_: it's not within 100 blocks
537 2013-01-27 18:08:23 <etotheipi_> "startingheight" tells you the starting height of the *peer* when you first connect? or your own top block
538 2013-01-27 18:08:26 <sipa> etotheipi_: it's either the last checkpoint (in which case it can be 10000's off) or pretty accurate
539 2013-01-27 18:09:01 <etotheipi_> sipa: hmmm
540 2013-01-27 18:09:03 <sipa> but peers can lie, and before there are enough, the value they claim is ignored, i think
541 2013-01-27 18:09:14 <gmaxwell> etotheipi_: Of your peer, as I said before: it's the height they report in their version message.
542 2013-01-27 18:10:09 <etotheipi_> gmaxwell: okay, thanks
543 2013-01-27 18:10:15 <gmaxwell> kjj: bitcoin doesn't really have an opinion about being current. The UI has some heuristics but it's not used for anything except the ui.
544 2013-01-27 18:10:30 <kjj> yeah.  I gave up on trying to figure it out
545 2013-01-27 18:10:38 <etotheipi_> sounds like I might have to create a heuristic combining multiple information sources
546 2013-01-27 18:10:48 <kjj> back in the day, I used to lose hours of mining to it, but I don't think I do any more
547 2013-01-27 18:10:49 <etotheipi_> well, one real source, but multiple features
548 2013-01-27 18:10:59 <gmaxwell> it's somewhat intractable at least if you want to know precisely.
549 2013-01-27 18:11:09 <etotheipi_> gmaxwell: I don't need to know precisely
550 2013-01-27 18:11:18 <gmaxwell> And it's risky to report non-current to users because it makes them freak out.
551 2013-01-27 18:11:22 <etotheipi_> unless precise means "within 1000 blocks"
552 2013-01-27 18:11:35 <kjj> my application is a self-contained p2pool distribution
553 2013-01-27 18:11:44 <sipa> the best heuristic is probably taking the last block's timestamp, and adding one block per 10 minutes clock time after that
554 2013-01-27 18:11:53 <gmaxwell> kjj: p2pool can tell you when bitcoin is non-current)
555 2013-01-27 18:11:55 <kjj> it waits until bitcoind stops reporting that it is downloading, and then starts p2pool
556 2013-01-27 18:11:56 <etotheipi_> sipa: exactly
557 2013-01-27 18:12:15 <etotheipi_> I was planning to use "getwork" to tell when it's really not sync'd (error code=-1
558 2013-01-27 18:12:20 <etotheipi_> *=-10)
559 2013-01-27 18:12:40 <kjj> gmaxwell: it doesn't seem to.  I had ~3 hours of 100% stales the other day because my bitcoind wasn't current and p2pool didn't notice
560 2013-01-27 18:12:50 <gmaxwell> etotheipi_: uh. that only tells you if you're below the checkpoint IIRC.
561 2013-01-27 18:12:51 <etotheipi_> and after that, look to see if the last block was within the last day
562 2013-01-27 18:13:10 <gmaxwell> kjj: p2pool will agressivly log SKIPPING BLOCK during that time.
563 2013-01-27 18:13:18 <etotheipi_> gmaxwell: will bitcoind respond with top-block information while it is rapidly downloading and sync'ing?
564 2013-01-27 18:13:33 <gmaxwell> etotheipi_: sure.
565 2013-01-27 18:13:35 <kjj> meh.  I'm not so concerned about the logs, I'm concerned about the 100% stales
566 2013-01-27 18:13:36 <etotheipi_> I just tried it, and it was like 5sec latency just calling for "getwork"
567 2013-01-27 18:13:45 <sipa> etotheipi_: which version?
568 2013-01-27 18:13:55 <gmaxwell> that sounds odd.
569 2013-01-27 18:13:56 <etotheipi_> sipa: that was 0.72
570 2013-01-27 18:13:59 <etotheipi_> err.. 0.71
571 2013-01-27 18:14:01 <gmaxwell> oh.
572 2013-01-27 18:14:39 <sipa> etotheipi_: there's a bulky global lock on the main data structures, and both block validation and RPC grab it
573 2013-01-27 18:14:44 <etotheipi_> I have been running 0.8, but switched temporarily, becuase I needed an unsync'd bitcoind instance to test its response while sync'ing
574 2013-01-27 18:15:04 <sipa> etotheipi_: so if bitcoin is slow in verifying, it means it becomes slow in responding to RPCs too
575 2013-01-27 18:15:14 <kjj> I just converted to bfgminer, and that seems to poll every pool up front, so it can tell if the preferred pool isn't current
576 2013-01-27 18:15:34 <etotheipi_> maybe I'll just stick with timestamps
577 2013-01-27 18:16:17 <andytoshi> TheBlueMatt, I'm having a bit of trouble with your test
578 2013-01-27 18:16:40 <andytoshi> I can connect to a remote node with "./bitcoind addnode 192.168.0.201 add"
579 2013-01-27 18:16:47 <andytoshi> but after a minute or so, my debug.log show
580 2013-01-27 18:16:56 <etotheipi_> so, "getblockcount" should immediately return what bitcoind's longest chain currently is?
581 2013-01-27 18:16:59 <andytoshi> socket no message in first 60 seconds, 0 1
582 2013-01-27 18:17:02 <andytoshi> disconnecting node 192.168.0.201:8333
583 2013-01-27 18:17:21 <andytoshi> what needs to be set on the remote node to make it talk?
584 2013-01-27 18:20:29 <etotheipi_> and "getpeerinfo" tells me the "getblockcount" of each current peer when we first connected to it
585 2013-01-27 18:22:42 <andytoshi> oh, the rpc passwords are different...probably that is the issue?
586 2013-01-27 18:22:56 <kjj> no
587 2013-01-27 18:23:13 <sipa> andytoshi: was the addnode rpc pulled?
588 2013-01-27 18:23:28 <andytoshi> sipa: no, i'm jus testing it
589 2013-01-27 18:23:32 <andytoshi> https://github.com/bitcoin/bitcoin/pull/1549#issuecomment-12611079
590 2013-01-27 18:23:37 <sipa> ok
591 2013-01-27 18:23:59 <sipa> andytoshi: what needs to be set on the other node... it should work
592 2013-01-27 18:24:02 <sipa> that's about it
593 2013-01-27 18:24:19 <andytoshi> well, it connects okay
594 2013-01-27 18:24:28 <andytoshi> and reconnects after i kill/restart the remote node
595 2013-01-27 18:24:30 <sipa> it clearly doesn't work, though
596 2013-01-27 18:24:32 <andytoshi> it just disconnects after a minute
597 2013-01-27 18:24:46 <andytoshi> alright, i'll post a comment
598 2013-01-27 18:24:54 <sipa> is the other node working?
599 2013-01-27 18:25:11 <sipa> does it have connections of its own?
600 2013-01-27 18:25:16 <sipa> is it synchronized?
601 2013-01-27 18:25:41 <andytoshi> the other node is synchronizing, about 1000 blocks behind
602 2013-01-27 18:25:45 <andytoshi> at height=216358
603 2013-01-27 18:25:59 <sipa> hmm
604 2013-01-27 18:26:09 <andytoshi> the log is a flood of SetBestChains, i don't see anything else
605 2013-01-27 18:27:23 <sipa> only setbestchains?
606 2013-01-27 18:27:27 <sipa> or also processblock?
607 2013-01-27 18:27:28 <andytoshi> correct
608 2013-01-27 18:27:41 <sipa> yes/no?
609 2013-01-27 18:27:51 <andytoshi> there is no processblock
610 2013-01-27 18:27:54 <andytoshi> i copied the blockchain from my main node
611 2013-01-27 18:28:00 <sipa> that explains
612 2013-01-27 18:28:08 <sipa> it's rebuilding the coin database, it's not up
613 2013-01-27 18:28:13 <andytoshi> oh, cool
614 2013-01-27 18:28:15 <andytoshi> my bad :}
615 2013-01-27 18:28:35 <sipa> you copied blktree/ and blocks/, but not coins/ ?
616 2013-01-27 18:28:42 <andytoshi> correct
617 2013-01-27 18:28:55 <sipa> yup, that's perfectly expected in that case :)
618 2013-01-27 18:29:19 <andytoshi> excellent
619 2013-01-27 18:31:06 <gmaxwell> hm. perhaps coins is poorly named and will be mistaken for the wallet.
620 2013-01-27 18:31:39 <andytoshi> i thought, 'coins' somehow holds the history of all the addresses that bitcoind tracks
621 2013-01-27 18:31:47 <andytoshi> and since i wasn't copying wallet.dat, i didn't want that history
622 2013-01-27 18:31:57 <gmaxwell> ah ha!
623 2013-01-27 18:31:59 <andytoshi> if that's correct, it's not misleading
624 2013-01-27 18:32:10 <gmaxwell> thats not correct at all.
625 2013-01-27 18:32:32 <gmaxwell> coins holds the unspent transaction set used to validate blocks??? nothing to do with the wallet.
626 2013-01-27 18:32:41 <gmaxwell> (It will rebuild it if lost)
627 2013-01-27 18:32:55 <andytoshi> oh, i wouldn't have guessed that
628 2013-01-27 19:00:24 <sipa> also, bitcoin doesn't ever track addresses :)
629 2013-01-27 19:04:28 <andytoshi> i meant, the chain of txouts leading to any txout whose script requires it be signed with an address you own (?)
630 2013-01-27 19:04:49 <sipa> any data related to you or your wallet is in wallet.dat
631 2013-01-27 19:04:59 <sipa> and the only thing being tracked is unspent outputs
632 2013-01-27 19:05:16 <andytoshi> oh, makes sense
633 2013-01-27 19:05:22 <sipa> as those are validated as the chain is verified, the wallet only gets to see transactions that are verified
634 2013-01-27 19:05:26 <sipa> so no need to track anything there
635 2013-01-27 19:06:01 <andytoshi> oh, of course
636 2013-01-27 19:14:27 <Diapolo> sipa: are there new files with -txindex or is that index created IN the existing files
637 2013-01-27 19:14:41 <sipa> Diapolo: in blktree/
638 2013-01-27 19:17:06 <sipa> andytoshi: blocks+blktree contains all information about the block tree (so, all blocks whose ancestry from genesis is known) and where they are store
639 2013-01-27 19:17:24 <sipa> andytoshi: coins contains all information about the currently active best chain through the block tree
640 2013-01-27 19:17:45 <andytoshi> okay, cool
641 2013-01-27 19:17:48 <sipa> they're generally independent, so you can copy them separately
642 2013-01-27 19:17:55 <sipa> and unknowingly, you did that :p
643 2013-01-27 19:18:04 <andytoshi> if you consider renaming it, 'chain' would maybe be better than 'coins'
644 2013-01-27 19:18:16 <sipa> but it contains no chain
645 2013-01-27 19:18:21 <andytoshi> but i'm glad everything is well -- you can consider that a test of separate copying
646 2013-01-27 19:18:30 <sipa> just all state information relating to the currently best chain
647 2013-01-27 19:18:54 <sipa> (which means a list of unspent transaction outputs, aka coins)
648 2013-01-27 19:19:09 <andytoshi> yeah, i see where 'coins' comes from
649 2013-01-27 19:19:35 <andytoshi> maybe blkbest/ or blkhead/
650 2013-01-27 19:19:57 <sipa> it contains nothing relating to blocks :)
651 2013-01-27 19:20:01 <gmaxwell> 'chainhead' ?
652 2013-01-27 19:20:17 <andytoshi> haha, this is hard
653 2013-01-27 19:20:19 <sipa> chainhead or chaintip or utxos or state or ...
654 2013-01-27 19:21:04 <andytoshi> open_uxtos?
655 2013-01-27 19:21:27 <gmaxwell> I like it having 'chain' in it because even though it doesn't contain the chain that at least means something to the user.
656 2013-01-27 19:21:28 <sipa> the u in utxo means unspent :)
657 2013-01-27 19:21:52 <andytoshi> oh :P
658 2013-01-27 19:22:00 <gmaxwell> utxo is opaque, and when you learn it means unspent transactions its misleanding "oh thats my coins" :P
659 2013-01-27 19:22:35 <andytoshi> i think it's okay if it's opaque, as long as it doesn't suggest that it's wallet-related
660 2013-01-27 19:23:29 <gmaxwell> andytoshi: I think unspent implies that it's wallet related.
661 2013-01-27 19:23:37 <gmaxwell> (in the same way 'coins' did)
662 2013-01-27 19:24:15 <andytoshi> hmm, yeah
663 2013-01-27 19:24:41 <gmaxwell> chaintip chainbest chainhead chainsum chaincheck chainagg chainvalid  all sound okay to me (note the theme?)
664 2013-01-27 19:25:09 <sipa> why is cha invalid?
665 2013-01-27 19:25:15 <andytoshi> haha
666 2013-01-27 19:25:39 <andytoshi> i think chainbest is the most suggestive
667 2013-01-27 19:26:10 <andytoshi> we could say something like 'leaf_txos', but nobody uses the term "leaf txo" so that's not really understandable
668 2013-01-27 19:27:11 <sipa> sum_of_the_remainder_of_an_equation_inherent_to_the_programming_of_the_chain
669 2013-01-27 19:27:37 <andytoshi> haha
670 2013-01-27 19:27:57 <gmaxwell> But it's not unbalanced!
671 2013-01-27 19:28:01 <andytoshi> dont_copy_me_but_dont_delete_me_either
672 2013-01-27 19:28:18 <sipa> there is maybe something important
673 2013-01-27 19:28:25 <sipa> copying blocks/ and blktree/ is always safe
674 2013-01-27 19:28:38 <gmaxwell> mystery_substance_1
675 2013-01-27 19:28:41 <sipa> but copying (or rather accepting) coins/ from someone isn't
676 2013-01-27 19:28:55 <gmaxwell> chain_secrets
677 2013-01-27 19:28:57 <sipa> you should only copy the coins/ dir from a location you trust
678 2013-01-27 19:30:01 <andytoshi> i wonder if dropping a README into ./bitcoin would cover all this
679 2013-01-27 19:30:08 <andytoshi> ~/.bitcoin i mean
680 2013-01-27 19:30:44 <sipa> that's a good idea
681 2013-01-27 19:33:43 <sipa> gmaxwell: you think it's worth it to change directory names, before rc's are released?
682 2013-01-27 19:33:56 <Diapolo> sipa: Why are we using CImportingNow imp; when reindexing?
683 2013-01-27 19:34:08 <sipa> Diapolo: because you're importing?
684 2013-01-27 19:35:11 <sipa> Diapolo: reindexing is implemented as an import-from-existing files
685 2013-01-27 19:35:24 <gmaxwell> sipa: Probably. I guess it would also go well removing the undo checksum backwards compatiblity.
686 2013-01-27 19:35:29 <Diapolo> sipa: okay, but you distinguish for gui between reindex and import ... and it seems all cases use both flags with an OR
687 2013-01-27 19:35:56 <Diapolo> Diapolo: that OR thing is wrong sorry ^^
688 2013-01-27 19:35:57 <sipa> Diapolo: yeah, could be improved, but meh
689 2013-01-27 19:36:14 <Diapolo> sipa: that's why I'm asking :-P
690 2013-01-27 19:36:16 <Diapolo> meh meh
691 2013-01-27 19:40:38 <andytoshi> baller, the addnoderpc stuff worked
692 2013-01-27 19:40:44 <andytoshi> will post a test report on github..
693 2013-01-27 19:45:05 <andytoshi> done, report at http://download.wpsoftware.net/code/bitcoin-1549/
694 2013-01-27 19:48:20 <BlueMatt> andytoshi: awesome, thanks
695 2013-01-27 19:49:02 <andytoshi> np, learned some good stuff about copying blockchains
696 2013-01-27 20:55:01 <sipa> gmaxwell: i'm tempted to make a poll on the forums to vote for the directory names then :p
697 2013-01-27 20:57:43 <gmaxwell> sipa: create N addresses, the one that recieves the most bitcoin wins. :P
698 2013-01-27 20:58:06 <rdymac> ^ lol
699 2013-01-27 20:58:41 <sipa> gmaxwell: i fear we'll end up with directories named after bitcoin companies or rich bitcoiners with a sense of vanity...
700 2013-01-27 20:58:59 <gmaxwell> /HankTheAngryDrunkenDwarf/
701 2013-01-27 20:59:16 <andytoshi> oops, there were 403 errors on the debug.log files i posted earlier
702 2013-01-27 20:59:18 <gmaxwell> sipa: prefab options solves that. :P   but sure a forum poll.
703 2013-01-27 20:59:21 <andytoshi> fixed permissions and gzipped them
704 2013-01-27 20:59:24 <rdymac> Hank from Breaking Bad?
705 2013-01-27 21:01:12 <gmaxwell> rdymac: http://en.wikipedia.org/wiki/Hank_the_Angry_Drunken_Dwarf#Most_Beautiful_Person_poll
706 2013-01-27 21:09:07 <sipa> gmaxwell: perhaps it even makes sense to make blktree a subdirectory of blocks, as they should be moved/copied/... together
707 2013-01-27 21:11:30 <gmaxwell> well, I'd say  blockchain/blktree blockchain/coins but as you point out, coins has somewhat different copying semantics.. but I don't think we really want to support copying the blocktree in any case.
708 2013-01-27 21:12:24 <sipa> i'm sure people will play with it, and putting the block index inside the blocks directory will certainly convey the idea that they're linked
709 2013-01-27 21:12:40 <sipa> blocks/ and blocks/index/ perhaps
710 2013-01-27 21:13:16 <sipa> how about chaindata/
711 2013-01-27 21:13:18 <sipa> for coins
712 2013-01-27 21:14:38 <andytoshi> i like it
713 2013-01-27 21:15:12 <sipa> it might even be chaincache/, as it can be rebuilt
714 2013-01-27 21:15:31 <sipa> but that's sort of lying, it's not a cache for chain data
715 2013-01-27 21:15:48 <andytoshi> yeah, i think that's misleading..if you delete it, it costs you a few hours
716 2013-01-27 21:15:59 <andytoshi> most things called 'cache' you delete and don't even notice
717 2013-01-27 21:16:14 <sipa> it takes me 6m53s here to get to block 210000 :)
718 2013-01-27 21:16:32 <andytoshi> yeah, it was real fast up to there
719 2013-01-27 21:16:39 <andytoshi> the last 3-5000 blocks were slow
720 2013-01-27 21:16:47 <sipa> yes, signature checking
721 2013-01-27 21:17:45 <Luke-Jr> /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/tuple:484:63: error: no match for ???operator<??? in ???std::get [with unsigned int __i = 2u, _Elements = {long int, void*, std::function<void()>}, typename std::__add_c_ref<typename std::tuple_element<__i, std::tuple<_Elements ???> >::type>::type = const std::function<void()>&](((const std::tuple<long int, void*, std::function<void()> >&)((const std::tuple<long int, void*, std::
722 2013-01-27 21:17:47 <Luke-Jr> function<void()> >*)__u))) < std::get [with unsigned int __i = 2u, _Elements = {long int, void*, std::function<void()>}, typename std::__add_c_ref<typename std::tuple_element<__i, std::tuple<_Elements ???> >::type>::type = const std::function<void()>&](((const std::tuple<long int, void*, std::function<void()> >&)((const std::tuple<long int, void*, std::function<void()> >*)__t)))???
723 2013-01-27 21:17:50 <Luke-Jr> ^ can anyone explain in English? :/
724 2013-01-27 21:23:35 <andytoshi> i would guess, somewhere you put a less-than operator, when you meant something different
725 2013-01-27 21:23:37 <andytoshi> like <...>
726 2013-01-27 21:29:48 <Luke-Jr> :/
727 2013-01-27 21:29:56 <Luke-Jr> auto & k = std::get<1>(top);
728 2013-01-27 21:30:02 <Luke-Jr> how else am I supposed to put it?
729 2013-01-27 21:34:54 <pjorrit> damn c++ is so lovely
730 2013-01-27 21:34:56 <andytoshi> looks like a C++11 feature
731 2013-01-27 21:35:04 <andytoshi> there is code at http://www.cplusplus.com/reference/tuple/get/ similar to yours
732 2013-01-27 21:35:16 <andytoshi> when i compile it, gcc 4.7.2 gives...
733 2013-01-27 21:35:23 <andytoshi> In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/tuple:35:0,
734 2013-01-27 21:35:25 <andytoshi> from std-get.cpp:3:
735 2013-01-27 21:35:27 <andytoshi> /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
736 2013-01-27 21:35:32 <Luke-Jr> so a G++ bug? :/
737 2013-01-27 21:35:42 <andytoshi> adding -std=gnu++11 makes it work
738 2013-01-27 21:35:47 <andytoshi> i would say so, yeah
739 2013-01-27 21:36:16 <sipa> andytoshi: and -std=c++11 ?
740 2013-01-27 21:36:25 <andytoshi> also works
741 2013-01-27 21:36:29 <andytoshi> sorry, shoulda tried that one first
742 2013-01-27 21:36:37 <sipa> Luke-Jr: do you specify any of those?
743 2013-01-27 21:37:11 <Luke-Jr> sipa: gnu++0x
744 2013-01-27 21:38:00 <sipa> Luke-Jr: it may be that your compiler is simply older than that part of the standard
745 2013-01-27 21:38:06 <sipa> or was lagging behind at the time
746 2013-01-27 21:38:11 <Luke-Jr> :/
747 2013-01-27 21:38:35 <D34TH> needs more bleeding edge?
748 2013-01-27 21:39:45 <Luke-Jr> hmm
749 2013-01-27 21:39:51 <HM> std::tuple is a bit of a disappointment
750 2013-01-27 21:39:53 <Luke-Jr> looks like 4.6 is considered stable now, I just need to switch to it
751 2013-01-27 21:40:01 <HM> boosts fusion fuples are iterable for instance, and streamable
752 2013-01-27 21:40:16 <HM> tuples even
753 2013-01-27 21:41:08 <HM> Luke-Jr: you should compile with Clang, the errors are a lot more legible
754 2013-01-27 21:41:12 <Luke-Jr> 4.6 has the same problem, sigh
755 2013-01-27 21:41:23 <Luke-Jr> HM: I don't comprehend clang yet, and I like GNU extensions
756 2013-01-27 21:41:34 <HM> Clang supports most gnu extensions, supposedly
757 2013-01-27 21:41:45 <HM> it has to, it compiles GNU libstdc++
758 2013-01-27 21:42:21 <HM> the command line is compatible as well
759 2013-01-27 21:42:24 <Luke-Jr> ACTION wonders what problems he'd get by using 4.7
760 2013-01-27 21:42:32 <Luke-Jr> is it?
761 2013-01-27 21:42:51 <HM> do you have a snippet i can test?
762 2013-01-27 21:42:57 <HM> i have 4.7.2 and clang here
763 2013-01-27 21:43:11 <HM> also codepad.org lets you compile C++ code online
764 2013-01-27 21:43:15 <HM> no signup
765 2013-01-27 21:44:57 <HM> ah no c++11 though :/
766 2013-01-27 21:45:13 <Luke-Jr> not really??? I'm porting from Python, and most of it doesn't work yet.
767 2013-01-27 21:45:50 <sipa> CodeShark: did you manage to test whether posix_fallocate is available on OSX?
768 2013-01-27 21:46:02 <sipa> or someone else?
769 2013-01-27 21:48:17 <HM> sipa: https://hg.mozilla.org/mozilla-central/file/3d846420a907/xpcom/glue/FileUtils.cpp#l61 mozilla don't seem to think so
770 2013-01-27 21:49:25 <sipa> HM: that does show a nice workaround on OSX though!
771 2013-01-27 21:50:11 <sipa> LGPL code, though
772 2013-01-27 21:52:04 <HM> http://lists.apple.com/archives/darwin-dev/2007/Dec/msg00040.html
773 2013-01-27 21:52:08 <HM> how about this
774 2013-01-27 21:52:15 <HM> is that cleanroom enough
775 2013-01-27 21:52:58 <sipa> i guess so
776 2013-01-27 21:53:07 <HM> he does say it's to help some poor soul
777 2013-01-27 21:53:18 <HM> on a public mailing list, sounds like public domain to me :P
778 2013-01-27 22:01:32 <sipa> HM: i doubt that - copyright tends to be quite automatic
779 2013-01-27 22:01:56 <sipa> still, public enough i guess
780 2013-01-27 22:04:33 <andytoshi> HM: clang++ 3.2 won't compile this either
781 2013-01-27 22:04:59 <andytoshi> wait, i'm lying
782 2013-01-27 22:05:12 <sipa> liar!
783 2013-01-27 22:05:15 <andytoshi> it needs -std=c++11 also
784 2013-01-27 22:05:54 <andytoshi> haha
785 2013-01-27 22:08:22 <Luke-Jr> hmm
786 2013-01-27 22:08:39 <Luke-Jr> I get the error even if I take out everything but the initializer :|
787 2013-01-27 22:11:00 <Luke-Jr> http://codepad.org/LHcgs67N
788 2013-01-27 22:13:25 <Luke-Jr> hmm, std::function<void()> doesn't like being inside a tuple? :o
789 2013-01-27 22:13:52 <Luke-Jr> hmm, just not inside a tuple inside a priority_queue
790 2013-01-27 22:13:54 <Luke-Jr> O.o
791 2013-01-27 22:16:41 <D34TH> >.>
792 2013-01-27 22:16:48 <Luke-Jr> aha, it's all because priority_queue's default comparison is trying to compare the std::function, which is impossible
793 2013-01-27 22:18:27 <HM> yeah a comparison on a tuple compares element by element
794 2013-01-27 22:19:15 <HM> priority_queue is a bit of a bizarre STL template
795 2013-01-27 22:19:29 <sipa> Luke-Jr: better use a good-old-C style function pointer, those are comparable :p
796 2013-01-27 22:19:44 <Luke-Jr> sipa: but those can't be bound :P
797 2013-01-27 22:20:06 <sipa> hmm?
798 2013-01-27 22:20:39 <HM> I'm guessing that void* parameter is being cast to an object type inside his function and then calls a member function somewhere
799 2013-01-27 22:20:59 <sipa> i suppose he menas std::bind
800 2013-01-27 22:23:06 <HM> Luke-Jr: codepad compiled that code without error
801 2013-01-27 22:23:19 <HM> oh you used a typedef
802 2013-01-27 22:24:15 <HM> weird
803 2013-01-27 22:24:21 <HM> I guess codepad does do c++11
804 2013-01-27 22:32:25 <Luke-Jr> sipa: right
805 2013-01-27 22:32:31 <Luke-Jr> struct epoll_event ev = { .events = eventmask, }; <-- is this not valid C++ ? O.o
806 2013-01-27 22:33:37 <HM> no
807 2013-01-27 22:33:43 <HM> the dot syntax for members isn't part of C++
808 2013-01-27 22:34:17 <HM> unless it was adopted for c++11
809 2013-01-27 22:34:22 <sipa> not afaik
810 2013-01-27 22:34:40 <upb> its also some gnu gcc C extension
811 2013-01-27 22:35:53 <HM> they are in C99 right
812 2013-01-27 22:36:00 <HM> they should have been adopted for C++11...
813 2013-01-27 22:36:29 <Luke-Jr> upb: pretty sure it's valid C99
814 2013-01-27 22:36:51 <HM> oh damn didn't make it in to C++11
815 2013-01-27 22:37:10 <HM> https://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=550
816 2013-01-27 22:37:25 <Luke-Jr> ACTION grumbles
817 2013-01-27 22:39:34 <Luke-Jr> epoll_event ev{} ev.events = eventmask;
818 2013-01-27 22:39:38 <Luke-Jr> almost as good, I guess
819 2013-01-27 22:39:42 <Luke-Jr> plus a semicolon???
820 2013-01-27 22:39:47 <upb> "In ISO C99 you can give the elements in any order, specifying the array indices or structure field names they apply to, and GNU C allows this as an extension in C90 mode as well. This extension is not implemented in GNU C++."
821 2013-01-27 22:43:49 <HM> roll on C++17
822 2013-01-27 22:43:58 <HM> or 14, or whatever it is
823 2013-01-27 22:49:56 <D34TH> HM: more like C++666
824 2013-01-27 22:53:17 <HM> just give us modules