#instantbird log on 05 21 2014

All times are UTC.

00:08:41 <-- mconley has quit (Input/output error)
00:13:22 <-- mpmc has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
00:21:10 <-- arlolra has quit (Quit: arlolra)
00:58:28 <-- Mook_as has quit (Quit: Mook_as)
01:10:23 <-- nhnt11 has quit (Ping timeout)
01:11:34 --> nhnt11 has joined #instantbird
01:45:57 <-- EionRobb has quit (Quit: Leaving.)
01:46:05 --> EionRobb has joined #instantbird
02:09:27 <-- clokep has quit (Ping timeout)
02:12:34 --> mconley has joined #instantbird
03:11:26 <-- mconley has quit (Input/output error)
03:11:56 --> mconley has joined #instantbird
03:13:41 <-- mconley has quit (Ping timeout)
03:37:21 <-- wnayes has quit (Quit: wnayes)
03:55:26 <-- Rym has quit (Ping timeout)
04:05:04 --> Rym has joined #instantbird
04:15:34 --> mconley has joined #instantbird
04:23:04 <-- mconley has quit (Input/output error)
04:43:09 --> gerard-majax_ has joined #instantbird
04:48:30 <-- gerard-majax_ has quit (Ping timeout)
05:03:50 <-- EionRobb has quit (Quit: Leaving.)
05:09:56 <-- Rym has quit (Ping timeout)
05:21:22 --> gerard-majax_ has joined #instantbird
05:47:30 --> mayanktg has joined #instantbird
06:01:02 <-- sukhe has quit (Ping timeout)
06:03:05 --> sukhe has joined #instantbird
06:10:49 --> Mic has joined #instantbird
06:10:49 * ChanServ sets mode +o Mic 
06:13:07 <Mic> mayanktg: I see you discussed details of the window with flo already :)
06:13:36 <mayanktg> Mic: Yeah. :)
06:14:22 <mayanktg> Mic: When shall I begin coding? I'm already trying with flo's patch.
06:14:47 <mayanktg> I mean to say for the project...
06:30:48 <nhnt11> Hi
06:46:01 --> EionRobb has joined #instantbird
07:01:13 --> Armada has joined #instantbird
07:07:45 <-- gerard-majax_ has quit (Ping timeout)
07:13:37 * Fallen|away is now known as Fallen
07:17:22 <Mic> mayanktg: you can call but not receive calls using flo's patch, right?
07:19:37 <mayanktg> Mic: Yeah. when I make a /call to other XMPP user account I can get the stream of my video..but not of the callee..wait let le share a screenshot of that
07:19:38 <Mic> I still haven't fixed my Ubuntu yet but if you like you could also try flo's idea for the toolbarbuttons yourself. It is to use a <children/> element to have them automatically added to the toolbar when they are added as child elements of the bound element. 
07:20:07 <Mic> You see your own video but not the one of the remote user?
07:20:14 <mayanktg> Mic: Yes
07:22:33 <mayanktg> Mic: caller's http://i.imgur.com/y6jbmMD.png .... callee: http://i.imgur.com/XJyRx3s.png
07:25:04 <Mic> Are there any errors? Maybe you've got a way to test with two different computers? Does it work to use the camera from two sources simultaneously?
07:25:44 <mayanktg> Mic: here's the diff http://pastebin.instantbird.com/713533 . I didn't change anything until now in the code. 
07:26:24 <mayanktg> That might be the case. I should try using it on two different computers
07:26:37 <Mic> There are "Take image using webcam" demos on the web as you know... can you try to run two (or the same twice) in two different Fx windows next to each other and see if that works?
07:26:48 <Mic> Maybe webcam access is exclusive?
07:27:09 <Mic> Doesn't explain why both large video frames are blank, though...
07:27:36 <Mic> I'd expect one to be blank while the other is actually showing something?
07:28:29 <mayanktg> Mic: I guess it isn't. The two tabs are running same video streams 
07:29:09 <Mic> Is that a "The two Firefox-tabs"?
07:31:14 <Mic> I need to run errands now btw... bbl.
07:32:09 <mayanktg> Hmm..yes at least it should have shown something. Maybe the RTCPeerConnection API hasn't been included rightly? though I performed a complete IB build after adding changes to installer/package-mainfest......... maybe its because the local stream uses gUM so its displayed correctly?
07:32:43 <mayanktg> Mic: Yes its the two ff tabs... same here .. bye :)
07:47:52 <flo-retina> Mic: "I'd expect one to be blank while the other is actually showing something?" if you haven't got the device on one side, you haven't got and SDP to send, so you haven't established a P2P connection yet.
07:49:02 <flo-retina> mayanktg: if I understand correctly the code in the diff you pastebinned, the "offer" SDP is supposed to be used by the code, and the message not displayed. On http://i.imgur.com/XJyRx3s.png the SDP is displayed as a message. That makes me think there may be an exception thrown by some of the code.
08:37:53 <mayanktg> flo-retina: ok. I should then figure out where the exception is coming..
08:38:09 <flo-retina> mayanktg: there's a try/catch hiding them all
08:38:13 <flo-retina> just dump the exception from there
08:38:19 <mayanktg> yes.
08:38:24 <flo-retina> the exception from JSON.parse is expected. Others aren't.
08:56:34 <-- flo-retina has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
09:05:16 * Fallen is now known as Fallen|away
09:06:58 --> mpmc has joined #instantbird
09:11:49 * Fallen|away is now known as Fallen
09:24:03 --> flo-retina has joined #instantbird
09:24:03 * ChanServ sets mode +qo flo-retina flo-retina 
09:28:04 --> chrisccoulson has joined #instantbird
09:31:47 <mayanktg> Mic: " ErrorTypeError: Argument 1 of mozRTCPeerConnection.setRemoteDescription does not implement interface mozRTCSessionDescription." is thrown when I make a /call . sdp is the 1st Argument 
09:34:57 <mayanktg> flo-retina: ^
09:35:12 <flo-retina> cool
09:35:43 <flo-retina> that's something that changed in the WebRTC API
09:35:48 <flo-retina> like a year or so ago ;)
09:37:22 <mayanktg> Hmm..So we have to change mozRTCSessionDescription? :-o Let me find that :D
09:38:14 <flo-retina> mayanktg: see how things look now: http://mxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html?force=1#44
09:40:22 * Fallen is now known as Fallen|away
09:41:26 <flo-retina> mayanktg: in http://pastebin.instantbird.com/713533 at line 23, just add |sdp = new mozRTCSessionDescription(sdp);|
09:43:54 --> BWMerlin has joined #instantbird
09:43:54 <mayanktg> flo-retina: Yeah. No error messages are displayed now.
09:44:33 <mayanktg> But I can't see the remote video. Maybe I should try it on two different computers?
09:46:37 * Fallen|away is now known as Fallen
09:50:04 <flo-retina> do you see the local video on both sides?
09:50:58 <mayanktg> Yes
09:51:11 <mayanktg> I can see the local videos. (bottom right)
09:52:02 <mayanktg> And I even hear echos of the audio... which means probably there is audio stream?
09:52:19 <flo-retina> not necessarily
09:52:45 <flo-retina> hmm, you have |localAudio.setAttribute("muted", "true");| in the code, so yes the audio is likely from the stream
09:53:29 <mayanktg> yeah. we get the audio stream from each of the ends..
10:17:32 --> clokep has joined #instantbird
10:17:32 * ChanServ sets mode +o clokep 
10:20:28 * Fallen is now known as Fallen|away
10:37:04 <-- EionRobb has quit (Quit: Leaving.)
10:41:08 <-- Mic has quit (Quit: Instantbird -- http://www.instantbird.com)
10:51:02 <-- mpmc has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
11:04:54 <-- clokep has quit (Ping timeout)
11:06:04 --> aleth has joined #instantbird
11:06:04 * ChanServ sets mode +o aleth 
11:13:56 <-- flo-retina has quit (Ping timeout)
11:15:14 --> flo-retina has joined #instantbird
11:15:15 * ChanServ sets mode +qo flo-retina flo-retina 
11:15:54 * Fallen|away is now known as Fallen
11:26:47 <aleth> nhnt11: Not sure if someone responded to this http://log.bezut.info/instantbird/140520/#m657 but the answer is "you can chain promises" ;)
11:27:40 <aleth> If you use promises, you shouldn't use callbacks.
11:27:46 <aleth> And OS.File uses promises, so...
11:28:33 <aleth> But maybe I am missing some context.
11:33:06 <aleth> Ping me if you still need to discuss this http://log.bezut.info/instantbird/140520/#m726
11:34:23 <aleth> You have to chain writes anyway.
11:54:42 <-- Gizmokid2005 has quit (Quit: ZNC - http://znc.sourceforge.net)
11:55:42 --> Gizmokid2005 has joined #instantbird
11:57:12 --> clokep_work has joined #instantbird
11:57:12 * ChanServ sets mode +o clokep_work 
11:58:36 <clokep_work> Good morning.
12:00:03 <nhnt11> aleth: Ahh yes I should be chaining it...
12:00:37 <nhnt11> I'm not /exactly/ sure if that's what I want though...
12:00:42 <aleth> I didn't read all the logs (there are so many) but it seems flo already pointed you at yield, function*, and task.js
12:00:51 <nhnt11> Yeah, I found yield.
12:01:41 <aleth> What I mean by chaining is that since writing is async, you can't assume the last write is complete when the next write request comes in. So an additional "wait until the file is created" at the beginning isn't really any different from what you need anyway
12:02:23 <nhnt11> aleth: Uh, aren't multiple write requests on the same OS.File object queued?
12:03:08 <aleth> nhnt11: I'm not sure what happens if you just call OS.File.write multiple times, but my guess is that's not the way you are supposed to use it?
12:03:23 <aleth> Worth checking anyway.
12:03:25 <nhnt11> "Not the way you are supposed to use it" why not?
12:03:33 <nhnt11> Yeah, I'll do more reading
12:03:58 <-- mayanktg has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
12:04:33 <aleth> My guess is that you do the next write in the success handler of the promise from the first write (Promise chaining)
12:05:01 <aleth> Task.js makes this kind of thing more legible.
12:05:38 * nhnt11 feels like OS.File is written to /avoid/ this kind of confusion and we're over thinking it
12:05:52 <nhnt11> I'm going to try and catch Yoric online at some point..
12:06:51 <aleth> That's a good idea.
12:08:21 <nhnt11> brb
12:09:51 <-- clokep_work has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
12:10:20 <aleth> nhnt11: I'd be extremely surprised if just calling OS.File.write multiple times in a row is the way to go here. For reasons of error handling if nothing else.
12:11:25 <aleth> Have you seen the example "copy a file by chunks" here https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread
12:15:45 --> clokep_work has joined #instantbird
12:15:45 * ChanServ sets mode +o clokep_work 
12:20:23 <-- BWMerlin has quit (Quit: BWMerlin)
12:28:11 <clokep_work> aleth, nhnt11: Can't you just chain them anyway though? If the promise has already resolved by the time you add them it'll just fire immediately right?
12:28:22 * clokep_work might be confusing JS Promises and Twisted Deferreds though. ;)
12:28:48 <aleth> clokep_work: Exactly.
12:29:05 <aleth> The whole philosophy of Promises is to use them that way.
12:30:01 <aleth> A promise chain /is/ a queue...
12:37:02 --> Rym has joined #instantbird
12:38:21 <aleth> Regression busted! :)
12:40:14 <clokep_work> flo-retina: What's the process for requesting uptake to aurora/beta?
12:40:23 <clokep_work> aleth: Looks like we're both dealing with regressions. ;)
12:40:35 <aleth> Yup.
12:51:16 <-- aleth has quit (Ping timeout)
12:51:37 --> aleth has joined #instantbird
12:51:37 * ChanServ sets mode +o aleth 
12:54:18 --> gerard-majax_ has joined #instantbird
13:00:14 --> mpmc has joined #instantbird
13:20:04 <-- gerard-majax_ has quit (Ping timeout)
13:21:48 * Fallen is now known as Fallen|away
13:22:07 * flo-retina wonders if someone else could review bug 1013236
13:22:10 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1013236 nor, --, ---, aleth, ASSI, [regression] Status indicator stretched in tooltips with user icon
13:25:01 * Fallen|away is now known as Fallen
13:26:40 <clokep_work> Maybe Mic or nhnt11?
13:26:53 <clokep_work> (I can rs it if nhnt11 reviews it.)
13:26:59 <clokep_work> s/can/will/
13:27:04 <clokep_work> I already looked it over and it looks sane.
13:27:36 <flo-retina> I looked very briefly, didn't see anything crazy, but didn't understand the changes well enough to r+, and would need to likely spend half an hour on it to build that understanding.
13:27:52 <flo-retina> so yeah, I would also be happy to rs if needed
13:32:08 --> gerard-majax_ has joined #instantbird
13:34:58 <-- gerard-majax_ has quit (Ping timeout)
13:35:37 * clokep_work wonders if any of our students woke up yet. :P
13:38:00 <flo-retina> by "woke up" do you mean write code? ;)
13:38:26 * flo-retina wonders what mayanktg is doing for bug 1011878
13:38:28 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1011878 nor, --, ---, nobody, NEW, mozGetUserMediaDevices doesn't work until getUserMedia is called
13:39:28 * aleth wonders what happened to the webcam usericon patch.
13:49:43 <nhnt11> Hi!
13:49:52 * nhnt11 went out to run an errand and got stuck in a storm
13:52:15 * nhnt11 looks at that bug
13:53:29 <aleth> nhnt11: Short explanation of the background: an !important was added to make things work in TB, but that !important causes a regression in IB. 
13:54:51 --> gerard-majax_ has joined #instantbird
13:57:09 --> iamjayakumars has joined #instantbird
14:01:28 <nhnt11> aleth: So instead of using important, you've moved the margin elsewhere to achieve the same effect?
14:01:58 <nhnt11> I haven't checked yet but I'm guessing displayNameMessageBox contains the other elements?
14:03:40 <aleth> nhnt11: The 4px margin previously on the right of the elements in the usericon area is now a left margin on the box containing the displayname etc
14:04:02 <nhnt11> Yeah, got it.
14:04:06 <aleth> That means it can't be overridden as that box only exists in tooltips.
14:04:45 <aleth> It's also independent of the various display: nones
14:05:45 <nhnt11> aleth: The userIconHolder stuff doesn't actually have anything to do with this bug, does it?
14:06:59 <nhnt11> Hmm wait, in the bug you say it was required.
14:07:04 * nhnt11 looks at it properly
14:09:12 <aleth> It's needed because the tooltips use the holder and one of the old non-holder rules in chat.css otherwise messes things up.
14:09:39 <aleth> The easiest way to fix that is simply to port it to make things consistent again.
14:11:13 <nhnt11> Right, looks like a side effect of sharing imtooltip.css but not the other conversation stuff...
14:12:11 <nhnt11> Alright, looks good to me.
14:12:26 <nhnt11> I don't have a Tb build to test though.
14:13:24 <aleth> I tested it.
14:13:36 * nhnt11 doesn't doubt that :)
14:13:44 <aleth> not a fun bug...
14:17:39 <-- flo-retina has quit (Ping timeout)
14:19:17 --> flo-retina has joined #instantbird
14:19:17 * ChanServ sets mode +qo flo-retina flo-retina 
14:20:33 <-- aleth has quit (Ping timeout)
14:23:37 <-- gerard-majax_ has quit (Ping timeout)
14:35:41 <clokep_work> aleth: If you push that bug, feel free to push mine too, but I think the tree is closed.
14:42:13 --> aleth has joined #instantbird
14:42:13 * ChanServ sets mode +o aleth 
14:45:43 --> mconley has joined #instantbird
14:57:58 * Fallen is now known as Fallen|away
15:08:45 * Fallen|away is now known as Fallen
15:14:46 --> CaptainCalliope has joined #instantbird
15:16:59 --> mayanktg has joined #instantbird
15:19:33 <-- nhnt11 has quit (Ping timeout)
15:19:59 --> nhnt11 has joined #instantbird
15:21:30 <mayanktg> aleth: Hello. Sorry I was out then got stuck :-/ Here's the diff of the Webcam usericon patch http://pastebin.instantbird.com/713689
15:22:43 <mayanktg> I have added clipping of the image to it to make the image of aspect ratio 1:1 . Mic reviewed about JS and XUL someone has to review about its CSS
15:24:20 <aleth> Are you happy with the way it looks now? Do you have a current screenshot?
15:25:04 <mayanktg> I like it cos its simple. I have tested it only on my screen. Yes wat a min
15:25:06 <mayanktg> *wait
15:26:42 <mayanktg> flo-retina: I tried the patch after building it on FF .. Still mozGetUserMediaDevices works inside the console but not on Scratchpad. i.e in Browser Environment. What should I do now?
15:26:57 <aleth> mayanktg: If you think it's ready, you should request review...
15:27:00 <flo-retina> does it work if you call gUM before?
15:29:44 <mayanktg> flo-retina: No it doesn't work in scratchpad even before calling gUM. It have an error 
15:29:44 <mayanktg> */ undefined /*  upon inspecting
15:30:01 <flo-retina> Isn't that the expected result?
15:30:36 <mayanktg> aleth: http://i.imgur.com/PhBpEP7.png
15:31:02 <mayanktg> flo-retina: Why? Shouldn't we get output about the number of devices? :-o
15:31:16 <flo-retina> isn't that asynchronous?
15:31:38 <flo-retina> what's the code you used in scratchpad again?
15:31:43 <mayanktg> Yes it is
15:33:05 <mayanktg> flo-retina: http://pastebin.instantbird.com/709176 It was one from Mic
15:34:16 <aleth> mayanktg: Some suggestions (flo-retina will likely have some too): 1) make the image preview border the same colour as that in the contact window 2) make the image preview the same size and position in all three cases. 3) make the two buttons the same size and position in all three cases
15:34:58 <aleth> I'm not sure about 3) but I don't like the buttons as they are.
15:35:39 <aleth> Mainly because I think they should be bigger and not 3D (just flat and with a slightly darker background and dividing line border like at the bottom of the FX hamburger menu)
15:35:40 <mayanktg> aleth: Ok. You want to have them like in the "Customize" and "sync account" button in FF menu right?
15:35:52 <aleth> Yes
15:36:03 <aleth> That way we give the user more clickable area.
15:36:05 <mayanktg> Yeah :)
15:36:18 <aleth> flo-retina comments?
15:36:56 * flo-retina agrees
15:37:49 <-- mayanktg has quit (Ping timeout)
15:38:37 --> mayanktg has joined #instantbird
15:38:44 <aleth> mayanktg: With flat buttons you'll want to add a hover state.
15:39:18 <aleth> You can grab the colour values and possibly even some of the CS from FX.
15:39:23 <aleth> CSS
15:40:25 <mayanktg> flo-retina, aleth: Ok. I'll change it now. The width of the border is okay? and the pixels should be 150 X 150(from main menu) ? or 180X180 (take picture panel)? 
15:40:28 <mayanktg> aleth: Ok
15:41:11 <aleth> mayanktg: The border width looks fine.
15:41:29 <aleth> For the size, see what looks better after you've done the buttons ;)
15:42:14 <mayanktg> aleth: Fine :) I'm trying to get the CSS from the FF.
15:44:00 <aleth> The CSS in FF is probably way more complicated than what you need (because that menu is all customizeable)
15:44:33 <aleth> But with the Inspector you might be able to grab the values you want.
15:45:33 <aleth> Or somewhere around here https://mxr.mozilla.org/mozilla-central/source/browser/themes/shared/customizableui/panelUIOverlay.inc.css#442
15:48:54 <mayanktg> yeah I have found that :) PanelUI-footer and PanelUI-footer-inner
15:49:14 <-- iamjayakumars has quit (Client exited)
15:52:54 <clokep_work> sawrubh: Any luck yesterday w/ that topic patch? I was hoping to be able to review it last night (and haven't heard from you yet today... )
15:58:17 --> wnayes has joined #instantbird
15:58:18 <aleth> nhnt11: Can you file a bug for the async-log-writing patch? Would be nice to see some sort of a WIP soon.
15:59:28 --> jb has joined #instantbird
15:59:37 <aleth> Just to see what kind of direction you are taking it...
15:59:58 <nhnt11> aleth: Will do. Haven't written much code so far tbh, but I plan to churn out a WIP tonight.
16:02:46 <aleth> Did you see the example I linked to earlier?
16:03:21 <aleth> (of successive OS.File.writes)
16:06:29 <-- jb has quit (Ping timeout)
16:07:50 --> iamjayakumars has joined #instantbird
16:09:34 <nhnt11> aleth: Yes, I've seen that before too. :)
16:09:57 <aleth> Obviously your case is harder than just chunked writes ;)
16:17:27 <nhnt11> aleth: Just to be clear, we /are/ okay with keeping the file open and queuing writes to it, right? (and closing it after some period of inactivity)
16:18:06 * Fallen is now known as Fallen|away
16:18:43 <aleth> nhnt11: Yes
16:28:51 <-- mpmc has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
16:29:44 <-- flo-retina has quit (Ping timeout)
16:30:37 --> mpmc has joined #instantbird
16:31:53 --> flo-retina has joined #instantbird
16:31:53 * ChanServ sets mode +qo flo-retina flo-retina 
16:32:26 --> Vigilante has joined #instantbird
16:32:37 <-- Vigilante has left #instantbird ()
16:32:44 <flo-retina> mayanktg: https://bugzilla.mozilla.org/show_bug.cgi?id=1011878#c5 after asking several times, I've finally done your work for you.
16:32:49 <instantbot> Bug 1011878 nor, --, ---, nobody, NEW, mozGetUserMediaDevices doesn't work until getUserMedia is called
16:33:00 --> gerard-majax_ has joined #instantbird
16:34:27 <-- flo-retina has quit (Ping timeout)
16:34:38 --> flo-retina has joined #instantbird
16:34:38 * ChanServ sets mode +qo flo-retina flo-retina 
16:38:31 <-- Rym has quit (Ping timeout)
16:38:46 <-- mpmc has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
16:40:30 <nhnt11> aleth: So I've been repeatedly tempted to use yield to "make" some OS.File stuff synchronous (especially in https://mxr.mozilla.org/comm-central/source/chat/components/src/logger.js#53 to create the folder if needed - I don't see why that needs to be async)
16:41:31 <aleth>  I don't understand what you mean when you say "make some OS.File stuff synchronous"
16:41:46 <nhnt11> aleth: Basically use yield to wait until the promise resolves
16:42:03 <-- gerard-majax_ has quit (Ping timeout)
16:42:04 <clokep_work> nhnt11: That seems wrong to me.
16:42:08 <nhnt11> Seems wrong to me
16:42:09 <nhnt11> too*
16:42:25 <clokep_work> nhnt11: Have you started writing any code?
16:42:31 <clokep_work> I'd like to see what you've done in order to comment further.
16:42:51 <nhnt11> clokep_work: I've repeatedly written stuff and promptly deleted it, trying to do something else
16:42:57 <nhnt11> Not sure why I'm so blocked.
16:43:20 <nhnt11> I could share what I've got but it's like +5 lines maybe :(
16:43:26 <aleth> nhnt11: Yield acts like return in that you leave the function, anyway. It doesn't wait. It's just also a reentry point.
16:44:26 <-- iamjayakumars has quit (Quit: )
16:44:47 <nhnt11> Then I don't understand how |pos += yield outFile.write(blabla| works in the copy file by chunks example
16:45:13 <flo-retina> nhnt11: "use yield to "make" some OS.File stuff synchronous" isn't really correct. yield doesn't make anything synchronous. It's just that using Task.js you can use yield to write code that's as readable as if it was synchronous.
16:45:27 <aleth> Yield gives you a way to write async code in a way very similar to the way you would have written sync code
16:45:48 <aleth> ah, I see flo-retina said the same thing :)
16:46:51 <nhnt11> aleth, flo-retina: So is there some magic that happens, that makes it so that the line I just quoted is equivalent to incrementing pos in the promise's success callback
16:47:42 --> gerard-majax_ has joined #instantbird
16:47:54 <flo-retina> nhnt11: yield exits the function until the promise is resolved
16:48:15 <aleth> nhnt11: outfile.write returns a promise. yield returns that promise when funciton() is called. When the promise resolves, pos gets incremented by the resolution value
16:48:20 <flo-retina> once the promise is resolved, the function will be reentered at the place the last yield happened, and the value will be what the promise resolved to
16:49:25 <aleth> The idea is the function containing yield (a generator function) is called multiple times: it is exited everytime a yield happens, and reentered when the promise yielded resolves
16:49:29 <nhnt11> Wow, I think I know what I was confused about
16:49:52 <aleth> Look at the Promise-based code above and compare to see how it works.
16:50:00 <nhnt11> this basically lets other stuff in the event loop proceed, while you wait for the write to finish
16:50:02 <nhnt11> right?
16:50:05 <aleth> Exactly!
16:50:07 <clokep_work> Yes.
16:50:08 <aleth> Hence async.
16:50:15 <nhnt11> :')
16:50:34 <-- gerard-majax_ has quit (Ping timeout)
16:50:46 <aleth> I was told at the summit that you should assume every file I/O action can take 30s ;)
16:51:42 <mayanktg> flo-retina: I'm sorry :(
16:51:43 <aleth> Because, sometimes, it does.
16:52:36 <nhnt11> Yeah
16:53:20 <aleth> yield is a very clever syntactical idea, I wonder who/which language came up with it
16:53:45 <nhnt11> I was very confused about how yield was working here, should've caught on long ago :-/
16:53:51 <nhnt11> Anyway, back to business!
16:53:51 <clokep_work> aleth: Do you have an example of this again? iw ant to look at it again...
16:54:06 --> gerard-majax_ has joined #instantbird
16:54:11 --> Rym has joined #instantbird
16:54:38 <clokep_work> aleth: You have something to check in? I'm going to do a push.
16:54:42 <aleth> clokep_work: We were talking about the chunked write example in https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread
16:55:19 <flo-retina> Task.js makes yield-based pseudo-asynchronicity quite nice. gloda also uses yield a lot but it's quite messy :-/.
16:55:29 <aleth> clokep_work: Yup, Bug 1013236 (metadata needs updating though)
16:55:32 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1013236 nor, --, ---, aleth, ASSI, [regression] Status indicator stretched in tooltips with user icon
16:55:35 <aleth> Thanks!
16:56:12 <clokep_work> aleth: Meh I find that example insanely confusing.
16:56:26 <aleth> nhnt11: Look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Generators.3A_a_better_way_to_build_Iterators to understand yield without the extra complication of promises
16:56:40 <nhnt11> aleth: I know how yield works for generators
16:56:47 <aleth> clokep_work: There's a real lack of pretty Task/Promise examples (at least I don't know any)
16:56:55 <nhnt11> I just didn't get how it was being used for Promises
16:56:58 <nhnt11> Makes sense now though
16:57:07 <clokep_work> Is there even documentation on task.js? :-D
16:57:15 <aleth> https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Task.jsm
16:57:46 <aleth> nhnt11: great :) This stuff is confusing at first. Maybe not just at first.
16:58:08 <clokep_work> nhnt11: You use "nhnt11" for reviews?
16:58:14 <nhnt11> clokep_work: Yes
16:59:57 --> arlolra has joined #instantbird
17:01:10 <instantbot> clokep@gmail.com changed the Resolution on bug 1013236 from --- to FIXED.
17:01:11 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1013236 nor, --, 1.6, aleth, RESO FIXED, [regression] Status indicator stretched in tooltips with user icon
17:02:18 <clokep_work> aleth: Thanks, the example on that page is pretty clear.
17:14:07 <-- gerard-majax_ has quit (Ping timeout)
17:17:38 <nhnt11> aleth: Okay, so I've got this: http://pastebin.instantbird.com/713719
17:17:57 <nhnt11> That returns a promise that resolves to the path of the log folder of the account, after creating the folder if required
17:18:37 <nhnt11> So now I'm wondering if, instead of returning a Promise, I can wait for the promise to resolve to the OS.File instance and directly return that instead
17:18:46 <aleth> Looks good at first glance.
17:18:54 <aleth> Why would you want to wait and make the whole thing sync again?
17:19:02 <nhnt11> Um, it wont' resolve into a OS.File instance
17:19:06 <nhnt11> It'll resolve to a string
17:19:11 <aleth> Oh, I see what you mean.
17:19:17 <nhnt11> aleth: Because the function that's calling this will need to wati anyway
17:19:25 <nhnt11> Yeah I want to "yield" the path :P
17:19:30 <aleth> Where is it called at the moment?
17:19:45 <nhnt11> It's called in init() at the very least
17:19:49 <nhnt11> one second
17:19:50 <aleth> Because really what's calling it should just chain what it wants to do next at the end of the returned promise.
17:19:58 <nhnt11> Yeah that would work.
17:20:08 <aleth> promise.then etc
17:20:11 <nhnt11> getLogFolderForAccount().then(blabla)..
17:20:12 <nhnt11> Yeah
17:20:48 <clokep_work> Which is essentially the same as yielding, no?
17:20:53 * nhnt11 is trying to avoid callbacks.
17:20:57 <aleth> I don't have an opinion on the best value to resolve to.
17:21:06 <aleth> Definitely no callbacks ;)
17:21:15 <aleth> Unless unavoidable.
17:21:41 <flo-retina> does http://pastebin.instantbird.com/713719 work at all?
17:22:05 <nhnt11> flo-retina: What's wrong with it?
17:22:06 <aleth> I'd suggest writing an xpcshell test for this new function in parallel.
17:22:13 <nhnt11> It returns a Promise that resolves to a String
17:22:26 <flo-retina> nhnt11: I would expect a yield keyword on each line that calls createIfNotExists 
17:22:40 <aleth> Indeed.
17:22:56 <nhnt11> Oh
17:22:58 <nhnt11> Thanks!
17:22:59 <nhnt11> Wow
17:23:47 <nhnt11> Nested yields, wow
17:24:14 <clokep_work> That createIfNotExists seems odd too...
17:24:22 <clokep_work> That function looks like it has variables that don't exist.
17:24:26 <aleth> There's probably a way to simplify it.
17:24:37 <nhnt11> clokep_work: Sorry. the aFile.exists() needs to be just "exists"
17:24:49 <clokep_work> nhnt11: And "aCreate"?
17:25:01 <nhnt11> That's a parameter for the overall function
17:25:15 <nhnt11> getLogFolderForAccount(aAccount, aCreate)
17:25:51 <clokep_work> Ah! I didn't looked beyond the Spawn call. :)
17:26:03 <aleth> You can test the function with https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests and add_task
17:26:11 <nhnt11> alright
17:26:22 <aleth> (well, other than testing it by hand of course)
17:26:33 <mayanktg> aleth: The changes aren't getting reflected in the buttons...I tried changing border-color, background-color ... but changes aren't getting reflected except for the width of the toolbarbutton. here's the pastebin of the diff http://pastebin.instantbird.com/713720
17:28:14 <mayanktg> The button appears still 3D . :-/
17:28:47 <aleth> There might be some attribute you have to set on the toolbarbutton element
17:29:00 * nhnt11 is trying to find good documentation on function*
17:29:01 <flo-retina> mayanktg: try -moz-appearance: none;
17:29:13 <flo-retina> nhnt11: use the word "generator" in your searches
17:29:26 <nhnt11> I'm looking at this now: http://wiki.ecmascript.org/doku.php?id=harmony:generators
17:29:52 <aleth> nhnt11: Some older examples just use "function", if you do that you'll get a warning telling you to use function*
17:30:06 <flo-retina> ah, there's a warning now?
17:30:27 <mayanktg> flo-retina: ok. Yes. It worked 
17:30:32 <flo-retina> :)
17:30:35 <nhnt11> Komodo tells me function* () is a syntax error
17:30:41 <nhnt11> :-/
17:30:53 <flo-retina> Komodo should know better
17:30:57 <arlolra> does Instantbird support XMPP account creation?
17:31:07 <flo-retina> no
17:31:23 <aleth> There's a bug open for it...
17:31:28 <aleth> Patches welcome.
17:31:38 <flo-retina> that's probably not very difficult to implement; once someone has a reasonable UI suggestion for it
17:32:03 <arlolra> ok, patches may be forthcoming
17:32:06 <clokep_work> nhnt11: File a bug with them.
17:32:18 <arlolra> flo-retina: any idea when you'll find some time to review?
17:32:41 <aleth> nhnt11: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
17:32:43 <arlolra> aleth: do you know the ticket number offhand?
17:32:51 <clokep_work> arlolra: bug 955317
17:32:52 <clokep_work> BOOM!
17:32:53 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=955317 enh, --, ---, nobody, NEW, Support XEP-0077 (In-Band Registration/Password Change)
17:32:58 * clokep_work was alrady looking it up.
17:33:07 <nhnt11> If I don't use function*, it says "TypeError: anonymous generator function returns a value"
17:33:14 <arlolra> clokep_work: thanks
17:33:27 <aleth> nhnt11: yeah, that's the warning I was talking about.
17:33:36 <aleth> Basically "if yield use function*"
17:33:55 <nhnt11> Alright
17:34:09 <flo-retina> arlolra: I may try tonight.
17:34:23 <arlolra> that'd be great. thanks
17:34:48 <flo-retina> arlolra: getting time to review easy patches happens frequently, but I don't think just giving you comments about cosmetic details would be useful here; so I need to focus on what the implementation needs to look like.
17:34:57 <flo-retina> if I want to give useful directions
17:35:28 <arlolra> flo-retina: I understand and respect that. sorry for pestering. I just want to keep things moving forward
17:35:48 <flo-retina> arlolra: you are welcome; This has been waiting way too long, I'm sorry about it.
17:35:49 --> qheaden has joined #instantbird
17:36:20 <flo-retina> my review queue kept refilling with work-related patches during the last few days
17:36:41 <clokep_work> Work, psh? That's not important. :-D
17:37:11 <arlolra> flo-retina: you can try out the otr extension https://github.com/arlolra/ctypes-otr#trying-it-out
17:39:08 <flo-retina> arlolra: ok
17:39:12 <flo-retina> arlolra: do you have any UI yet?
17:39:49 <clokep_work> arlolra: Using bundles is a better way to download mozilla-central btw.
17:39:51 <aleth> arlolra: what's the license on this library? Is it possible to land the code?
17:39:54 <flo-retina> I was thinking that bug 1004930 (which mayanktg is expected to work on soon) could also help you
17:39:57 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1004930 enh, --, ---, nobody, NEW, Generic way to add buttons for actions to a conversation
17:39:58 <aleth> (eventually)
17:40:01 <flo-retina> if you need to add a button in the conversation UI
17:40:39 <clokep_work> Ah, you do that already. :)
17:41:01 <clokep_work> aleth: MPL 2.0, at the bottom of that page.
17:41:14 <arlolra> flo-retina: encryption is enabled optimistically. so if you talk with another client that supports it, it'll generate keys and get you going right away.
17:41:14 <clokep_work> I think we want it to be an extension that we include automatically (and TB probably doesn't).
17:41:31 <arlolra> flo-retina: the only UI I added was a notification that you've "gone secure" https://github.com/arlolra/ctypes-otr/blob/master/chrome/content/otr.js#L179
17:42:11 <flo-retina> ah, and that's displayed in the conversation area, ok :)
17:42:27 <aleth> I wonder if we could use a little lock icon indicator somewhere
17:42:46 <clokep_work> :)
17:43:06 <clokep_work> arlolra: Is there a standard icon people use to show you're using an OTR thingy?
17:43:09 <aleth> clokep_work: Why don't you think TB would want this?
17:43:26 <clokep_work> aleth: libotr is LGPL, I don't know if they want/can distribute that automatically.
17:43:40 <aleth> That was kind of my question, yeah
17:44:03 <aleth> I guess arlolra thought I was asking about /his/ code
17:45:11 <nhnt11> Weird, Komodo isn't annoyed at function* elsewhere.. only in that function
17:45:20 <nhnt11> makes me think I'm doing something wrong...
17:45:40 <clokep_work> nhnt11: Btw Komodo just uses the build in JS engine for error checking so. . .generally stuff should "just work". :)
17:45:51 <nhnt11> I know
17:45:58 <nhnt11> Ah, it's annoyed at the /first/ function*
17:46:05 <nhnt11> if I comment the first one, the second one gets underlined..
17:47:17 <nhnt11> Ah!
17:47:29 <-- flo-retina has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
17:47:38 <nhnt11> I'm on a build of Komodo from Nov 19 2013
17:47:43 <aleth> oops!
17:47:48 <nhnt11> function* has been around since December 2013
17:47:58 <nhnt11> aleth: It's the current stable version, update check says none available. so...
17:48:11 <clokep_work> nhnt11: -> #komodo
17:48:13 <aleth> That's the problem with these cutting-edge features ;)
17:48:23 <nhnt11> clokep_work: Right sorry
17:48:27 <clokep_work> Yes. :)
17:48:30 <clokep_work> No problem.
17:48:35 <-- qheaden has quit (Input/output error)
17:49:12 --> qheaden has joined #instantbird
17:51:01 <arlolra> clokep_work: aleth: a lock icon is ok, but there're generally 3 states you want to represent. plaintext, encrypted, encrypted+authenticated (by some out-of-band mechanism or smp)
17:52:03 <aleth> arlolra: maybe a lock icon will make people think "https" anyway, so something else is better. Really all I meant was a one-glance indicator of the current state, not sure where would be best though
17:53:34 <aleth> We could also have a tooltip on it explaining the exact level of encryption currently used (even when otr is off)
17:53:36 <clokep_work> arlolra: Alright, so I guess there's no standard icons people use? :-D
17:53:43 <arlolra> aleth: yes. we definitely want some sort of visual indicator, especially one that doesn't scroll off the screen as it does now
17:55:17 <arlolra> clokep_work: I'm not positive. I'd have to do a survey of various clients. pidgin seems to use words
17:55:34 <-- qheaden has quit (Input/output error)
17:56:42 <aleth> FX uses a mask icon for privacy...
17:57:55 <arlolra> in any case, I think flo had the right idea with the patch above that mayanktg may be working on. at least to manually initiate an otr session
17:58:29 <aleth> Yup, a button there would be a clickable indicator.
17:58:41 <nhnt11> Hmm. OS.File.write() requires me to create an ArrayBufferView out of a string and there seems to be no "direct" way to do this...
17:59:22 <aleth> I think clokep_work ran into that recently? Something with ArrayBufferViews anyway
18:00:28 <aleth> Is this helpful? https://developer.mozilla.org/en-US/Add-ons/Code_snippets/StringView
18:01:26 <aleth> or this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding#Appendix.3A_Decode_a_Base64_string_to_Uint8Array_or_ArrayBuffer
18:02:41 <clokep_work> aleth: Just create an Int8Array.
18:03:08 <nhnt11> I was going to go with this.. https://stackoverflow.com/questions/6965107/converting-between-strings-and-arraybuffers
18:03:57 <nhnt11> (Uint8Array instead of 16 since we're using UTF8)
18:04:22 <aleth> Might be nice to encapsulate it in a function that can be reused elsewhere.
18:04:27 <nhnt11> Yeah.
18:05:28 * clokep_work was hoping https://mxr.mozilla.org/comm-central/source/chat/modules/ArrayBufferUtils.jsm had something
18:06:12 <aleth> So that's where it should go I guess ;)
18:07:06 <nhnt11> clokep_work: That might work actually. |let view = BytesToArrayBuffer(StringToBytes(blabla))|
18:07:09 * clokep_work forgets what mayanktg was trying to convert to an ArrayBuffer.
18:07:27 <clokep_work> nhnt11: Posisbly. you can ask qheaden if he ever needed to do that.
18:09:22 <mayanktg> clokep_work: I was using ArrayBufferView to input to OF.File.writeAtomic 
18:09:34 <clokep_work> mayanktg: Generating it from what?
18:10:30 <nhnt11> Ah! I can just use a TextEncoder
18:10:37 <mayanktg> canvas element.
18:11:35 <mayanktg> saving image in the canvas to tmp Dir.  
18:11:56 <aleth> nhnt11: nice
18:12:10 <nhnt11> aleth: I looked up what the stats service did ;)
18:16:52 <clokep_work> mayanktg: FROM not FOR. :)
18:18:21 <clokep_work> nhnt11: Guess that would work.
18:20:19 <clokep_work> mayanktg: Are you stuck or waiting for feedback or what?
18:20:20 --> qheaden has joined #instantbird
18:23:46 <mayanktg> aleth: http://i.imgur.com/nsTAfJS.png
18:24:13 --> KNTRO has joined #instantbird
18:24:52 <aleth> mayanktg: looks like progress!
18:24:57 <mayanktg> clokep_work: I'm almost done :) What font do we use? The padding is 5px? What's need to be changed more?
18:24:58 <clokep_work> Sweet. :)
18:25:07 <clokep_work> mayanktg: You shouldn't need to set the font I don't think.
18:25:12 <clokep_work> It should just magically be the right one.
18:25:44 <mayanktg> It wouldn't have been possible without setting -moz-appearance: none :D
18:25:52 <aleth> mayanktg: Are you working in a garden?
18:26:11 <aleth> mayanktg: Is it possible to make the buttons as wide as the panel?
18:26:44 <mayanktg> aleth: I'm trying on that..maybe I can do that by setting a negative margin :P
18:27:32 <clokep_work> aleth: Would that look nice? :-S
18:28:14 <aleth> clokep_work: Worth a try... would look like the menu in FX which we were aiming for I guess.
18:28:30 <clokep_work> aleth: Which menu?
18:28:43 <aleth> The Australis one.
18:28:54 <aleth> The bottom bit.
18:29:16 <clokep_work> aleth: Ah, I see. :)
18:29:20 <mayanktg> aleth: I'm giving it a try!
18:31:17 <mayanktg> aleth: Should I add an icon in the "take image from webcam" button? (its there in the mockup)
18:31:25 <aleth> I don't know if they use a XUL panel for that.
18:31:34 <nhnt11> aleth: In that case I feel like the left/right margins on the image are too large :-/
18:31:59 <aleth> mayanktg: If you have a nice one, use an icon if it's not too hard :)
18:32:53 <aleth> nhnt11: They could be adjusted I guess... or the image made larger or whatever
18:33:02 <nhnt11> yeah
18:33:22 <aleth> I'm sure mayanktg is experimenting :)
18:33:47 <mayanktg> aleth: http://hg.mozilla.org/mozilla-central/file/b9e1856deef1/mobile/android/base/resources/drawable-hdpi/alert_camera.png ?
18:34:26 <mayanktg> aleth: Sry I guess you can't view image from that link?
18:35:13 <aleth> mayanktg: Looks OK
18:36:23 <aleth> Just make sure it doesn't get rescaled ;)
18:37:02 <mayanktg> Ok :)
18:37:23 <aleth> It's hopefully 16x16 which would be standard.
18:38:59 <mayanktg> The icon appears to be 36X36 though :D
18:39:39 <nhnt11> mayanktg: That seems to be an android drawable, look in drawable-mdpi instead of hdpi
18:39:54 <nhnt11> (you'll possibly find a 16x16)
18:40:23 <nhnt11> mayanktg: Yup, it's 16x16: https://hg.mozilla.org/mozilla-central/raw-file/b9e1856deef1/mobile/android/base/resources/drawable-mdpi/alert_camera.png
18:40:24 <aleth> As long as it's even you can always make it half as big if necessary.
18:40:36 <aleth> Thanks nhnt11 :0
18:40:40 <aleth> umm :)
18:40:49 <mayanktg> aleth: yeah ..dound ..thanks :)
18:40:54 <mayanktg> *found
18:42:31 <nhnt11> mayanktg: You should probably use the 36x36 version for retina displays..
18:43:03 <aleth> (...when everything else is finished and working ;) )
18:43:13 <nhnt11> Just saying :)
18:43:56 <aleth> nhnt11: did you r?flo on that throbber fix btw?
18:44:04 <nhnt11> aleth: I did.
18:44:06 * mayanktg fears the look of the patch in retina displays :-|
18:44:19 <nhnt11> We were discussing whether -moz-image-region was the best fix..
18:44:31 <nhnt11> I couldn't get it to work with (min/max-)width/height
18:44:42 <nhnt11> I didn't try /too/ hard though
18:46:23 <aleth> I guess most of the icons on the tabs have no retina version yet :-/
18:48:04 <-- aleth has quit (Ping timeout)
18:51:34 <-- KNTRO has left #instantbird ()
19:01:19 --> Mic has joined #instantbird
19:01:20 * ChanServ sets mode +o Mic 
19:01:51 <-- arlolra has quit (Quit: arlolra)
19:05:35 <-- Mic has quit (Ping timeout)
19:15:41 <GeekShadow> hello
19:16:03 <GeekShadow> when it is planned to have x64 Linux version of IB ?
19:23:52 <-- qheaden has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
19:24:10 --> Vigilante has joined #instantbird
19:28:47 <clokep_work> GeekShadow: We don't even have 32-bit nightlies right now.
19:29:01 <clokep_work> But generally the answer is "When people who care enough to put the effort in do it" :P
19:29:08 <clokep_work> Hopefully for 1.6 we will though.
19:37:06 <GeekShadow> on ubuntu x64 I have :  error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
19:37:24 * GeekShadow follow https://groups.google.com/forum/#!topic/mozilla.support.instantbird/asRIeZvSayY
19:41:32 --> flo-retina has joined #instantbird
19:41:32 * ChanServ sets mode +qo flo-retina flo-retina 
19:43:12 <GeekShadow> hey flo-retina 
19:43:14 <-- Vigilante has left #instantbird ()
19:43:25 <GeekShadow> sorry to rush on you but I'm following this : https://groups.google.com/forum/#!topic/mozilla.support.instantbird/asRIeZvSayY
19:43:40 <GeekShadow> on ubuntu 14.04 x64
19:44:00 <GeekShadow> and I have ./instantbird-bin: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
19:44:06 <clokep_work> GeekShadow: I don't know if anyone has tried running it on 14.04 yet.
19:44:14 <clokep_work> You didn't really need to repeat everything again. :-\
19:44:21 <clokep_work> I suspect Florian is commuting home though.
19:44:54 <flo-retina> GeekShadow: I remember I recently needed to install Instantbird on ubuntu and had to install another few packages that weren't in that list
19:47:27 <GeekShadow> ok, I'm investigating ;)
19:47:58 <flo-retina> it's not really difficult to find what's missing
19:57:34 --> Mic has joined #instantbird
19:57:35 * ChanServ sets mode +o Mic 
19:58:57 <GeekShadow> flo-retina: clokep_work  libxt6:i386
19:59:09 <GeekShadow> and it work :)
19:59:15 <clokep_work> GeekShadow: Can you reply to that email thread? :)
20:01:21 <-- nhnt11 has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
20:01:27 --> nhnt11 has joined #instantbird
20:04:06 <GeekShadow> yep
20:05:54 <flo-retina> thanks
20:10:35 <GeekShadow> flo-retina: btw thanks for the gtk issue, it was an issue for me on my main computer
20:10:59 <GeekShadow> but I assume needed libraries can be put on the wiki
20:11:10 --> EionRobb has joined #instantbird
20:11:54 <GeekShadow> hmm on 1.5 when I click on "see all protocols" I have : FB, Gtalk, IRC, Odnoklassniki, Twitter
20:12:00 <GeekShadow> but no XMPP o_o ?
20:12:26 <GeekShadow> was it removed ?
20:13:37 <clokep_work> GeekShadow: No. If that's all you see it sounds like you're not running with libpurple for some reason.
20:15:41 <Mic> arlolra, aleth: regarding http://log.bezut.info/instantbird/today/#m470, what about an open lock, grey lock and green lock icon (imitating the colors of the lock icons on Firefox when a connection is "encrypted" /" "encrypted + the identity verified"?
20:16:39 <clokep_work> Mic: The only downside of that...is that we ALSO have a connection that could be in those states.
20:16:42 <clokep_work> So it could be a bit confusing.
20:16:57 <clokep_work> There's whether using SSL vs. whether your connection is secure end-to-end.
20:17:53 <flo-retina> GeekShadow: you need to install libxml2
20:18:46 <GeekShadow> oh ok
20:20:43 <Mic> nhnt11: I've never used it but the docs make it seem that the OS.File.makeDir options "ignoreExisting" and "from" might be useful for you?
20:22:49 <GeekShadow> yay it work
20:23:04 <nhnt11> Mic: I saw that, I've used ignoreExisting now. The from argument is listed but isn't shown in the interface definition above it so I left it for now.
20:23:15 <Mic> Additionally "exists" should be avoided for performance reasons. See the example in  the OS.File.exists paragraph.
20:23:20 <Mic> https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#OS.File.exists%28%29
20:23:33 <Mic> -example + Note
20:23:52 <nhnt11> Ah, good to know.
20:23:54 <nhnt11> Thanks!
20:24:13 <clokep_work> That's unfortunate. :(
20:25:57 <Mic> nhnt11: it sounds like "from" would rescue from having to check every part of the path for existence and creating them separately, so maybe it's worth to give it a shot.
20:26:04 <nhnt11> Yeah.
20:28:22 <clokep_work> I can't imagine it would be slower than checking the three individually. :-S
20:29:19 <nhnt11> Mic: Looks like from should be an attribute of the options object: https://mxr.mozilla.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_async_front.jsm#1066
20:29:26 <Mic> Yes!
20:29:38 <Mic> Like "ignoreExisting".
20:30:01 <nhnt11> I was confused because it was indented like a function parameter
20:30:07 <nhnt11> Figured it was worth making sure
20:30:30 <mayanktg> clokep_work: http://i.imgur.com/JJwuzBP.png does it look ok now? Without margins. (except for bottom ones in the take image panel :-/ )
20:31:47 <clokep_work> mayanktg: Looks reasonable to me, but I'm not the person you want to ask about UI! :-D
20:31:55 <clokep_work> (I self proclaim that I hate it. :))
20:32:03 <mayanktg> clokep_work: :D
20:32:09 <clokep_work> Mic: or aleth or flo-retina
20:33:40 <Mic> mayanktg: the buttons look a lot better now! :)
20:33:59 <mayanktg> Mic: :)
20:34:59 <Mic> mayanktg: imo it would be great if we'd always show a square image (even for the video feed) that almost completely covers the top part (i.e. either make the image larger, or the buttons narrower).
20:35:18 --> Mook_as has joined #instantbird
20:35:20 * Mic has sketches on paper that he didn't get to scan and post somewhere yet ;)
20:35:56 <nhnt11> This does look better :) http://pastebin.instantbird.com/713784
20:36:54 <Mic> nhnt11: does it work, too? :)
20:36:58 <mayanktg> Mic: Hmm.. For that we would have to clip the videos frame by frame right to display video as a square..right?
20:37:06 <-- dew has quit (Ping timeout)
20:37:14 <Mic> Yes, I wouldn't mind doing that.
20:37:14 <nhnt11> Mic: I'll write tests in a bit
20:38:14 --> dew has joined #instantbird
20:38:26 <Mic> flo-retina: do you have an opinion on this (=showing the central square of the video stream for taking an image with the webcam.)?
20:39:50 <flo-retina> yes, always show a square. And avoid the empty areas around the image
20:40:03 <-- clokep_work has quit (Ping timeout)
20:42:00 <Mic> mayanktg: ^ flo has spoken ;)
20:42:30 <mayanktg> Mic: Thy job shall be done :) I'm trying to implement that :)
20:43:35 * Fallen|away is now known as Fallen
20:44:00 <nhnt11> So I'm trying to figure out the best way to make a function "synchronized"
20:44:28 <nhnt11> i.e. prevent it from being called while it's "yielding", or make it wait until the first call is finished, or something
20:45:08 <mayanktg> Mic: I tried this example on FF and it works pretty well http://html5freecode.com/Canvas-_Play_Video_in_Graphical_Shapes.htm 
20:45:31 <nhnt11> Hmm. Since the function returns a Promise, I could store that Promise, yield until it resolves, and then continue.. if that makes sense
20:45:32 <Mic> nhnt11: I haven't read all of the log yet, maybe I ask anyways why that's necessary?
20:45:41 <mayanktg> It plays videos inside any shape ..
20:46:36 <nhnt11> Mic: It's important that if logMessage() was called on message A and then on message B, the I/O for A finishes before B
20:47:04 <nhnt11> (i.e. wait until we're done with A before moving on to B)
20:48:31 <Mic> hmm, I'm totally guessing now, but can't you store a promise of the most recent "message writing task" somewhere and attach the next one to it using "then"?
20:48:38 <nhnt11> Exactly
20:49:03 <nhnt11> Well, with yield instead of then
20:49:04 <Mic> Ah?
20:49:12 <nhnt11> one minute..
20:52:49 * Fallen is now known as Fallen|away
20:53:17 <nhnt11> Mic: Something like this: http://pastebin.instantbird.com/713795
20:54:02 <nhnt11> The check in line 4 is probably redundant
20:54:48 <Mic> I'm not familiar with Task.jsm, let me read MDN for a minute, please :)
20:55:07 <nhnt11> It took me more than a minute ;)
20:57:47 * nhnt11 wonders if he is overcomplicating/overthinking this
21:00:38 <flo-retina> nhnt11: that pastebin seems reasonable
21:01:31 <nhnt11> flo-retina: What if logMessage is called again with a third message, while it's yielding in line 5?
21:01:50 <-- CaptainCalliope has quit (Quit: CaptainCalliope)
21:01:57 * nhnt11 wonders if that will ever happen
21:02:16 <flo-retina> heh, indeed that code is broken :-P
21:02:40 <nhnt11> hmm, fun
21:03:06 <nhnt11> Looks like I'll have to use a proper queue of Promises or something
21:03:07 --> CaptainCalliope has joined #instantbird
21:03:23 <-- CaptainCalliope has quit (Quit: CaptainCalliope)
21:04:13 <flo-retina> nhnt11: what about http://pastebin.instantbird.com/713806 ?
21:05:18 <nhnt11> Ah, nice
21:05:44 <nhnt11> That eliminates the need to keep track of each promise
21:05:45 <nhnt11> thanks!
21:06:18 <nhnt11> hmm, time to write some comments
21:06:47 --> CaptainCalliope has joined #instantbird
21:07:30 <flo-retina> I wonder how much overhead there is with that chaining business, and if we may still want to queue the messages, and write all of the queued messages at once
21:09:45 <Mic> Until the function* change for generators, it would have been possible to use arrow functions for that and save the "bind"-call, wouldn't it?
21:09:56 <Mic> There are no arrow-generators (yet?), are they?
21:11:19 <Mic> http://esdiscuss.org/topic/generator-arrow-functions ...
21:11:35 <nhnt11> Mic: I was just reading the same page :)
21:11:48 <nhnt11> hmm
21:18:42 <nhnt11> A;rogjt. jere
21:18:48 <nhnt11> Um, sorry ^
21:19:10 <nhnt11> *Alright, here's what I've got so far: http://pastebin.instantbird.com/713809
21:19:53 <nhnt11> I think the changes for system logs should be quite similar (= shouldn't take too long)
21:20:18 <nhnt11> So I'll do that, test this stuff out, upload a WiP on a bug, write a blog post, and go to bed :)
21:21:35 <flo-retina> that would have been more readable colored as a diff
21:22:07 <nhnt11> Isn't it?
21:22:12 <nhnt11> Oh, wrong link. http://pastebin.instantbird.com/713810
21:22:13 <nhnt11> sorry.
21:23:33 <Mic> flo-retina, nhnt11: would the logMessage chaining be easier without Task.spawn?
21:23:42 <flo-retina> nhnt11: if you want to read a log, do you have to wait until the pending write operations are finished?
21:24:08 <-- wnayes has quit (Ping timeout)
21:24:45 * nhnt11 isn't sure
21:25:03 --> wnayes has joined #instantbird
21:25:55 <flo-retina> nhnt11: aren't _initCalled and  _logMessagePromise duplicating the same information?
21:26:12 <flo-retina> (in that the former will be true iif the latter isn't null)
21:26:59 <nhnt11> Ah yeah.
21:27:31 <nhnt11> (i've also used "inited" in one place, just removed it)
21:27:57 <flo-retina> this will need a careful review :)
21:28:11 <flo-retina> and could really do with xpcshell tests ;)
21:28:13 <nhnt11> Yeah, it needs more comments too.
21:28:16 <nhnt11> Yup
21:28:27 <Mic> flo-retina, mayanktg: http://pastebin.instantbird.com/713811
21:28:55 <Mic> Forgive me if that's non-sense. I've never used promises, actually ;)
21:29:28 <mayanktg> nhnt11: ^
21:29:44 <Mic> Thanks :)
21:29:47 <nhnt11> Mic: You've used the Promise like a function
21:30:02 <nhnt11> Afaik you can't supply a Promise to then()
21:30:12 <nhnt11> then() accepts success and failure callbacks
21:31:12 <Mic> hmm, I thought I saw chaining like that somewhere on MDN...
21:31:18 <nhnt11> Also stuff in writeLogMessage may start executing before line 4 is reached
21:31:19 <nhnt11> Really?
21:32:17 <flo-retina> promises are powerful, but will require reviewers to be extra careful ;)
21:33:15 <nhnt11> Mic: Afaik Promise chaining works like promise.then(function() {..}).then(function() {..}).then(...
21:40:50 <Mic> I saw that in an article about promises in the add-on SDK.
21:41:02 <EionRobb> promises are awesome
21:41:06 <Mic> Maybe they've got a competing promise implementation?
21:41:18 <Mic> I wouldn't be surprised ;)
21:41:29 <flo-retina> I think we have 2-3 promise implementations in the tree
21:41:37 <flo-retina> and some people were working hard to replace some of them
21:41:55 <Mic> bbl
21:46:01 <nhnt11> flo-retina: So I just realized if we want to be able to use _logMessagePromise to check if we're inited, logMessage needs to resolve into some value
21:46:16 * nhnt11 wonders how many other such intricacies he'll find
22:06:56 <nhnt11> flo-retina: aleth: I've attached a WIP to bug 955292. FYI I realize that I'm not using ArrayBufferUtils anywhere, and the T in Task.jsm should be capitalized. :)
22:06:58 <instantbot> Bug https://bugzilla.mozilla.org/show_bug.cgi?id=955292 enh, --, ---, nhnt11, ASSI, Write log messages asynchronously
22:07:08 <nhnt11> Also I didn't remove initCalled at line 93..
22:07:16 <nhnt11> Sigh. I'll just upload another diff.
22:09:23 <nhnt11> Done.
22:09:39 <nhnt11> I'm quite sleepy at the moment, so tests will have to wait till tomorrow..
22:14:10 --> mpmc has joined #instantbird
22:14:29 <-- Armada has quit (Connection reset by peer)
22:17:09 <flo-retina> makes sense to write tests while awake :)
22:28:02 <-- Mic has quit (Quit: Instantbird -- http://www.instantbird.com)
22:28:02 <nhnt11> I've published a blog post. Time for bed... Good night :)
22:29:07 <mayanktg> MIc: Do you know how to use requestAnimationFrame for video frame? (https://developer.mozilla.org/en/docs/Web/API/window.requestAnimationFrame)
22:30:02 <nhnt11> mayanktg: Are you trying to clip the video to make it square?
22:30:12 <mayanktg> nhnt11: Yes
22:30:31 <nhnt11> mayanktg: Just an idea for a simpler solution: set a square border on the UI element and use overflow:hidden
22:30:47 <mayanktg> Hmm... 
22:32:23 <nhnt11> Bye
22:33:32 <mayanktg> Bye...overflow should work btw..
22:56:59 --> arlolra has joined #instantbird
23:00:40 --> jb has joined #instantbird
23:01:25 <-- mayanktg has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
23:04:04 --> clokep has joined #instantbird
23:04:04 * ChanServ sets mode +o clokep 
23:27:08 <-- jb has quit (Connection reset by peer)
23:27:11 --> jb1 has joined #instantbird
23:27:43 <-- flo-retina has quit (Ping timeout)
23:31:38 <-- clokep has quit (Quit: Instantbird 1.6a1pre -- http://www.instantbird.com)
23:31:44 --> clokep has joined #instantbird
23:31:44 * ChanServ sets mode +o clokep 
23:38:22 --> flo-retina has joined #instantbird
23:38:23 * ChanServ sets mode +qo flo-retina flo-retina 
23:39:01 <flo-retina> arlolra: is this actionable? (I'm going to bed very soon)
23:40:34 * clokep suspects he has to refresh the page.
23:42:06 <arlolra> flo-retina: it's fine for my use case
23:42:20 <-- flo-retina has quit (Ping timeout)
23:42:35 <-- jb1 has quit (Ping timeout)
23:42:49 --> flo-retina has joined #instantbird
23:42:49 * ChanServ sets mode +qo flo-retina flo-retina 
23:43:21 <flo-retina> great :)
23:44:50 <-- mconley has quit (Input/output error)
23:45:50 <clokep> nhnt11: Your WIP looks somewhat reasonable. I didn't go over it w/ a fine toothed comb though. ;)