12:59:22 <evilaliv3> #startmeeting 12:59:22 <MeetBot> Meeting started Thu May 21 12:59:22 2015 UTC. The chair is evilaliv3. Information about MeetBot at http://wiki.debian.org/MeetBot. 12:59:22 <MeetBot> Useful Commands: #action #agreed #help #info #idea #link #topic. 12:59:27 <evilaliv3> halo! 12:59:33 <evilaliv3> here the pad of today 12:59:37 <evilaliv3> http://piratepad.net/OqzI7cpyVU 13:00:15 <evilaliv3> i've already fileld mine that sadly is not so complete due to a power outage that today prevented me to work all the morning long :/ 13:00:32 <evilaliv3> getting a super coffee to be super proficient starting by now 18:19:05 <hellais> evilaliv3: I don't think it's a good idea to replace Buffer with something else as buffers are a requirement to using node.js streams 18:19:21 <hellais> replacing them is a bunch of work and I am not sure it's a good idea 18:19:32 <hellais> I believe this is documented inside of the ticket 19:41:00 <evilaliv3> i know hellais 19:41:12 <evilaliv3> but this would mean making a fork of openpgp.js 19:41:49 <evilaliv3> cause you know the position of @tanx on this 19:43:49 <evilaliv3> anyhow i'm now working on this and evaluating the possibilities 19:52:55 <evilaliv3> thanks for the clarification :) 19:53:04 <evilaliv3> how are things? still in venezia? 20:06:45 <hellais> hum, you will have to then fork node.js streams library 20:07:00 <hellais> or reimplement your own Buffer compatible interface 20:07:08 <hellais> venezia? 20:11:06 <evilaliv3> damn cannes sorry :) 20:11:51 <hellais> ah Canne! 20:11:58 <hellais> yeah it was good 20:12:01 <hellais> lot's of sketch 20:12:22 <hellais> managed to social engineer my way into all sorts of funny places 20:12:48 <evilaliv3> ehehe 20:13:01 <evilaliv3> wanna know more 20:13:21 <evilaliv3> anyway i've clear your point on Buffers 20:13:59 <evilaliv3> anyhow from what i'm viewing (for my basic understaning) we may use something really simple 20:14:16 <evilaliv3> an object that would offer a: 20:14:39 <evilaliv3> obj = Object(onData, onEnd) 20:15:04 <evilaliv3> that would to call on it: 20:15:08 <evilaliv3> obj.write() 20:15:15 <evilaliv3> obj.endWrite() 20:16:47 <evilaliv3> got my point hellais? that would work like a charm and would make @tanx happy 20:16:54 <hellais> you mean not making it an actual node.js stream? 20:17:20 <evilaliv3> yep 20:17:29 <hellais> sure you can do it 20:17:36 <hellais> but I don't believe it's a good idea 20:17:55 <hellais> say tomorrow we want to have gzip compressiong support 20:18:08 <hellais> instead of getting an off the shelve library that you can plug and play 20:18:12 <hellais> you have to re-implement it customly 20:18:43 <evilaliv3> so and so 20:18:47 <evilaliv3> i mean you are right 20:19:00 <evilaliv3> but let's now do this step and get OpenPGP insert this 20:19:26 <hellais> did you verify with tanx that he doesn't want Buffer? 20:19:47 <hellais> I think it may be easier to argue for getting buffer included than to implement a hackish workaround 20:19:59 <evilaliv3> then eventaully when having to attach Gzip we will have the possibility to wrap what you have done around this simpel implementation 20:20:07 <evilaliv3> and get the perfect streaming api 20:20:17 <hellais> I mean if the goal is to build a general purpose openpgp javascript library it's only logical to support something standard 20:20:18 <evilaliv3> but wriing this object do not change this 20:20:21 <hellais> like node.js streams 20:20:21 <evilaliv3> you got the poin ? 20:20:37 <evilaliv3> i'm simply calling the _transform you written in a write() 20:20:46 <evilaliv3> and the _flush in and endWrite() 20:21:29 <evilaliv3> when openPGP will have integrated them, we will be able to put a wrapper around it doing a perfect Buffer compliany object 20:21:42 <hellais> let me pull up the code again 20:21:58 <evilaliv3> what do you mean with pull up ? 20:23:13 <hellais> evilaliv3: look at it :P 20:23:14 <evilaliv3> 22:18 < hellais> did you verify with tanx that he doesn't want Buffer? 20:23:19 <hellais> I was going by memory 20:23:24 <hellais> ok I am now looking at the code 20:23:29 <evilaliv3> yep he written this 20:23:36 <hellais> evilaliv3: link? 20:23:41 <evilaliv3> he is paranoin about having a small footprint 20:23:57 <evilaliv3> https://github.com/openpgpjs/openpgpjs/pull/306 20:23:58 <hellais> the main problem I see with not using streams is that you don't have all the event dispatching that streams support 20:24:11 <hellais> so you will at the very least have to implement your own little event emitter 20:24:36 <hellais> which isn't necessarily something that big (I once wrote one that is less than 30 lines) 20:24:58 <hellais> but it's extra work 20:25:25 <evilaliv3> i understand 20:25:37 <evilaliv3> but do you see any additional functionality missing here: 20:25:38 <evilaliv3> 22:13 < evilaliv3> obj = Object(onData, onEnd) 20:25:39 <evilaliv3> 22:14 < evilaliv3> that would to call on it: 20:25:39 <evilaliv3> 22:14 < evilaliv3> obj.write() 20:25:39 <evilaliv3> 22:14 < evilaliv3> obj.endWrite() 20:25:41 <evilaliv3> ?? 20:25:58 <hellais> evilaliv3: I don't see that he says Buffer is a no no 20:26:02 <evilaliv3> or you agree that having those would make possible to make the wrapper around it? 20:26:36 <evilaliv3> https://github.com/openpgpjs/openpgpjs/pull/260 20:26:47 <hellais> evilaliv3: yes there is missing functionality in what you describe above 20:26:53 <evilaliv3> Please do not use node apis. This would introduce a runtime dependency of the browserify node shims of buffer, stream, crypto and others. 20:26:55 <hellais> you need a callback that tells you when the data has been written 20:26:56 <evilaliv3> Not only is the code quality of these shims lacking, it would increase the size of the minified build quite a bit making it nearly impossible to do a security audit of the code. 20:27:01 <hellais> that is the data has been processed 20:27:07 <hellais> or encrypted in our case 20:27:22 <evilaliv3> onEnd 20:27:27 <evilaliv3> is the end callback 20:27:59 <evilaliv3> onData is the i've encrypted somethings, this is the encrypted text 20:28:13 <evilaliv3> so one would do: 20:28:20 <evilaliv3> obj.write(Hello) 20:28:28 <evilaliv3> obj.write(World) 20:28:32 <evilaliv3> obj.end() 20:28:39 <evilaliv3> and would get back: 20:29:00 <evilaliv3> this.onData(encrypted_chunk) 20:29:11 <evilaliv3> this.onData(encrypted_chunk) 20:29:19 <evilaliv3> this.onData(encrypted_chunk) 20:29:24 <evilaliv3> this.onEnd() 20:29:42 <hellais> https://github.com/openpgpjs/openpgpjs/pull/306#issuecomment-104412431 20:29:43 <hellais> here we go 20:29:52 <hellais> if he says no, then I will not argue anymore 20:30:29 <evilaliv3> :* 20:30:30 <evilaliv3> lovely 20:30:35 <evilaliv3> eheheh, i like it 20:32:45 <hellais> now I added the cherry and cake too 20:32:49 <hellais> he can't resist 20:33:22 <hellais> https://www.youtube.com/watch?v=AyenRCJ_4Ww 20:33:51 <hellais> https://www.youtube.com/watch?v=WZEJ4OJTgg8 20:34:04 <evilaliv3> lol 20:34:56 <evilaliv3> ahahahhahahaha 20:39:54 <evilaliv3> hellais: https://github.com/hellais/openpgpjs/blob/feature/deterministic_streamed/src/stream/crypto.js#L172 20:40:14 <evilaliv3> i think here in the flush there is an error 20:40:47 <hellais> why? 20:40:54 <evilaliv3> with a flush one want to complete the encryption and close 20:41:17 <evilaliv3> but 0 up to the offeset you will re-encrypt something already encrypted 20:41:24 <evilaliv3> am i wrong? 20:41:59 <hellais> no, because the buffer is consumed 20:42:12 <hellais> so you will flush everything that is left in the buffer 20:42:22 <evilaliv3> ah ok ok 20:42:28 <evilaliv3> i was intending wrongly the buffer 20:42:41 <evilaliv3> it's always sliced 20:42:42 <evilaliv3> right 20:42:51 <hellais> correct 20:43:04 <hellais> sliced and diced 20:43:05 <evilaliv3> thanks 20:43:20 <evilaliv3> anyway i've applied really small changes, very cool work 20:43:32 <hellais> excellent 20:45:42 <evilaliv3> hellais: https://github.com/chojar?tab=activity 20:45:48 <evilaliv3> we will be assimilated 21:01:08 <evilaliv3> https://github.com/hellais/openpgpjs/blob/feature/deterministic_streamed/src/stream/crypto.js#L162 21:01:32 <evilaliv3> ah no, understood :) 21:04:49 <hellais> I would not fuck around too much with this guy: https://avatars0.githubusercontent.com/u/10237474?v=3&s=400 21:05:29 <hellais> evilaliv3: there I initialise the buffer to be an empty buffer 21:05:52 <hellais> IRC recent node versions supports empty initialization, but older ones don't 23:04:47 <evilaliv3> hellais: lol 06:48:35 <evilaliv3> #endmeeting