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