00:06:13  * carif_quit (Ping timeout: 276 seconds)
00:11:50  * c4milojoined
00:17:29  * qenghoquit (Remote host closed the connection)
00:20:02  * Vbitzjoined
00:21:10  * qenghojoined
00:21:43  * C-Manquit (Quit: Connection reset by beer)
00:24:28  * C-Manjoined
00:27:47  * C-Manquit (Client Quit)
00:32:47  * c4miloquit (Remote host closed the connection)
00:38:04  * seventhquit (Ping timeout: 276 seconds)
00:43:31  * Vbitzquit (Ping timeout: 260 seconds)
00:47:30  * Vbitzjoined
00:51:53  * Vbitzquit (Ping timeout: 240 seconds)
01:09:18  * carif_joined
02:21:25  * carif_quit (Ping timeout: 276 seconds)
02:35:27  * carif_joined
02:37:57  * cha0squit (Ping timeout: 248 seconds)
03:18:13  * Vbitzjoined
03:18:16  * Vbitzquit (Max SendQ exceeded)
03:18:51  * Vbitzjoined
03:18:57  * Vbitzquit (Max SendQ exceeded)
03:19:36  * Vbitzjoined
03:19:39  * Vbitzquit (Max SendQ exceeded)
03:20:15  * Vbitzjoined
03:20:19  * Vbitzquit (Max SendQ exceeded)
03:20:57  * Vbitzjoined
03:42:12  * bnoordhuisquit (Ping timeout: 246 seconds)
03:44:55  * cha0sjoined
03:49:10  * carif_quit (Ping timeout: 276 seconds)
03:52:34  * vivekgjoined
03:57:39  * Vbitzquit (Quit: Computer has gone to sleep.)
07:24:41  * Lethalmanjoined
07:45:40  * iccthedraljoined
07:58:13  * jonaslundquit (Ping timeout: 252 seconds)
08:02:14  * jonaslundjoined
08:10:30  * juanjosanchezjoined
08:43:40  * C-Manjoined
08:49:12  * stamphojoined
09:17:43  * seventhjoined
09:18:09  * juanjosanchezquit (Ping timeout: 241 seconds)
09:19:30  * juanjosanchezjoined
09:26:26  * muellijoined
09:57:33  * xan_joined
10:58:12  * juanjosanchezquit (Ping timeout: 241 seconds)
11:01:46  * bnoordhuisjoined
11:18:12  * juanjosanchezjoined
11:55:01  * juanjosanchezquit (Ping timeout: 246 seconds)
12:06:21  * Mast3rPlanjoined
12:07:02  <Mast3rPlan>Hey guys, would anyone in here know if it's possible to get the Isolate beloning to an Object from an Object?
12:07:26  <Mast3rPlan>I'm implementing an EventEmitter that would work with multiple threads using multiple isolates.
12:09:35  * seventhquit (Read error: Connection reset by peer)
12:12:43  <bnoordhuis>Mast3rPlan: you can get the isolate with args.GetIsolate() unless i'm misunderstanding what you're trying to do
12:13:17  <Mast3rPlan>bnoordhuis, with args, you mean args I would get from a callback?
12:13:42  <Mast3rPlan>bnoordhuis, I want to store callbacks in a map of lists, when they need to be invoked I need to get the associated isolates of them
12:14:30  <Mast3rPlan>It might be a better idea to actually store them into map<eventid, map<isolate, list<listener>>>
12:14:39  <bnoordhuis>Mast3rPlan: oh, like that. there's no api functionality for that, you'll need to store the isolate when you add the callback to the list
12:14:39  <Mast3rPlan>this way i cna iterate them isolate by isolate
12:14:49  <bnoordhuis>yep, exactly
12:15:07  <Mast3rPlan>nice, do you think it's possible? Isolates can be used on different threads, right?
12:15:40  <Mast3rPlan>I really dislike that javascript only supports one thread, doing expensive operations in js itself would 'pause' the entire vm
12:15:58  <bnoordhuis>yes, with some caveats. you'll want to read up on the v8::Locker api
12:16:07  <Mast3rPlan>Anyway, thanks for the support bnoordhuis, I'll play around with it later.
12:16:14  <guor>You can use web workers in Chrome, and I think node also supports some sort of message passing
12:16:18  <bnoordhuis>okay, good luck :)
12:16:26  <Mast3rPlan>bnoordhuis, http://izs.me/v8-docs/classv8_1_1Locker.html
12:16:30  <Mast3rPlan>not alot of documentation... :p
12:16:45  * [[zz]]quit (Read error: Connection reset by peer)
12:16:47  <Mast3rPlan>guor, webworkers are actual threads?
12:16:58  <guor>as far as I can tell, yes
12:16:58  <bnoordhuis>no, but check its definition in v8.h and the tests in test/cctest/
12:17:01  <Mast3rPlan>node supports forking I believe
12:17:17  <bnoordhuis>yeah, node spawns child processes. it doesn't use isolates
12:17:20  <guor>they run on their own isolates
12:17:38  * [[zz]]joined
12:18:20  <Mast3rPlan>If I'm correct, there is one default isolate spawned on the main thread unless I explicitly create it before using v8?
12:19:20  <Mast3rPlan>bnoordhuis, what is the point of Isolate::Enter ?
12:19:34  <bnoordhuis>Mast3rPlan: to, well, enter the isolate
12:19:56  <guor>you can also just use the isolate scope as wrapper
12:20:03  <bnoordhuis>^ that
12:20:04  <Mast3rPlan>Would it act like a locker?
12:20:07  <bnoordhuis>no
12:20:12  <guor>no the locker is separate
12:20:25  <Mast3rPlan>okay, so entering the isolate does what exactly?
12:20:34  <bnoordhuis>it makes that isolate the active isolate
12:20:39  <Mast3rPlan>Do I need to enter the Isolate before I can use objects bound to it?
12:20:48  <bnoordhuis>when you exit it, the previous isolate becomes active again
12:20:49  <Mast3rPlan>Oh it set's the current isolate for the thread
12:20:50  <Mast3rPlan>correct?
12:20:53  <bnoordhuis>it's a stack really
12:20:55  <bnoordhuis>exactly
12:21:48  <Mast3rPlan>let's say I would emit an event that then calls in a certain js vm, that listener then emits an event to another js vm
12:22:05  <Mast3rPlan>I would have to enter the isolate but when emit is called from js I would have to exit the isolate?
12:22:20  <bnoordhuis>i assume each vm runs on its own thread?
12:22:23  <Mast3rPlan>Or would it be best to make some kind of threadpool for executing these events?
12:22:44  <Mast3rPlan>bnoordhuis, I want the eventemitter to be independent of vms
12:22:57  <Mast3rPlan>the event emitter will be the only way i interact with the js code
12:23:09  <Mast3rPlan>scripts will attach events and that's it
12:23:18  <Mast3rPlan>then in c++ i just dispatch events
12:23:19  <bnoordhuis>so the thing is you can't reenter a running vm
12:23:26  <Mast3rPlan>I understand
12:23:41  <Mast3rPlan>a vm isn't bound to a thread though, right?
12:23:42  <bnoordhuis>that is, if A emits an event to B but B is already executing js code, you can't call into it, you need to synchronize somehow
12:23:52  <bnoordhuis>that's correct, they can switch threads
12:24:15  <Mast3rPlan>so i can just create 10 vms, initialize objects on them by cycling trough the vms, and then I have 10 threads that do event dispatching and processing
12:24:32  <bnoordhuis>yes, but you still need to synchronize somehow
12:24:50  <Mast3rPlan>when there is an emit call from vm 1 it would push the event onto a stack of some sort for all the threads
12:25:08  <Mast3rPlan>they would then process it by calling the appropriate callbacks on the correct thread
12:25:19  <bnoordhuis>yes, in a nutshell
12:25:34  <Mast3rPlan>do you have any idea on how I would be able to share objects between vms?
12:25:39  <Mast3rPlan>just marshall them to json?...
12:26:11  <Mast3rPlan>the thing is that I would have vm A that emits an event (could be anything) and B receives it, so I have to copy the object over from A to B
12:26:26  <Mast3rPlan>this is a problem because obviously object A can have references to objects in vm A
12:26:35  <Mast3rPlan>maybe a nested object or something
12:26:43  <Mast3rPlan>how would I efficiently copy this over?
12:27:05  <bnoordhuis>well, you can't really
12:27:15  <bnoordhuis>objects are tied to their isolate/context
12:27:29  <bnoordhuis>you have to serialize and deserialize them
12:28:07  <Mast3rPlan>so the best way to go is JSON I imagene
12:28:16  <Mast3rPlan>or the easiest
12:28:34  <Mast3rPlan>I could look for a BSON implementation in js maybe as well
12:28:35  <bnoordhuis>json is probably easiest, yes
12:28:38  <bnoordhuis>it's what we use in node
12:28:39  <Mast3rPlan>since it's faster to parse
12:29:14  <bnoordhuis>v8's json serializer/deserializer is reasonably fast
12:29:26  <Mast3rPlan>yes but ofcours bson is 10 times faster, I'm sure
12:29:29  <bnoordhuis>if you're not sending really huge messages, that is
12:29:34  <Mast3rPlan>json requires tokenizing
12:29:38  <Mast3rPlan>bson doesn't
12:29:53  <guor>inb4 premature optimizations
12:29:54  <guor>:)
12:30:22  <Mast3rPlan>Well, if there's 1000's of events going on and they all have to be serialized it might have some inpact
12:30:30  <Mast3rPlan>and there will be 1000's of events
12:32:39  <Mast3rPlan>apparently it is extremely fast
12:35:06  <Mast3rPlan>~300 ms for 100000 on an i7
13:12:17  * carif_joined
13:19:06  * Net147joined
13:40:37  * juanjosanchezjoined
13:45:08  * c4milojoined
13:56:37  * bnoordhuisquit (Ping timeout: 240 seconds)
14:02:01  * bnoordhuisjoined
14:16:04  * muelli_joined
14:18:08  <muelli>If I have a MaybeObject (or an Object), how would I determine it's type, i.e. ConsString or SeqTwoByteString?
14:19:55  * Net147quit (Quit: HydraIRC -> http://www.hydrairc.com <-)
14:31:46  <bnoordhuis>muelli: Object* obj; if (maybe_object->To(&obj) && obj->IsConsString()) { /* ... */ }
14:32:01  * carif_quit (Ping timeout: 276 seconds)
14:33:02  <bnoordhuis>i guess you could also do maybe_object->ToObjectUnchecked() but then you need to check that maybe_object->IsFailure() == false first
14:38:21  <muelli_>hm bnoordhuis. I see. So there is no way to see straight from the object what type it is? I.e. in GDB?
14:41:45  * c4miloquit (Remote host closed the connection)
14:41:58  * c4milojoined
14:44:02  <bnoordhuis>muelli: if you compile with debugprint=on, you can `call maybe_object->Print()` in gdb
14:44:19  <bnoordhuis>sorry, i mean objectprint=on
14:45:08  <bnoordhuis>if gdb complains it can't find Print(), try maybe_object->Print(stdout) instead
14:46:19  * carif_joined
14:50:03  <muelli>ah! Wow. Merci beaucoup. I'll give it a shot. My GDB is very slow :-\ I accidentally hit the the tab key for completion and it's busy for several dozen minutes :-\
14:57:21  * jonaslundquit (Ping timeout: 246 seconds)
14:59:19  * carif_quit (Ping timeout: 276 seconds)
15:10:55  * carif_joined
15:12:47  * vivekgpart
15:15:40  * Chiffon35quit (Quit: Quitte)
15:28:19  * juanjosanchezquit (Quit: Leaving)
15:38:16  * xan_quit (Ping timeout: 268 seconds)
15:43:34  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
16:06:30  * hackygoluckyquit (Read error: Operation timed out)
16:08:19  * Alex_Gaynorquit (Ping timeout: 264 seconds)
16:09:31  * sanjoydquit (Ping timeout: 264 seconds)
16:18:39  * jonaslundjoined
16:20:08  * Alex_Gaynorjoined
16:50:50  * c4miloquit (Remote host closed the connection)
16:52:52  * Lethalmanquit (Quit: Sto andando via)
17:03:15  * sanjoydjoined
17:16:19  * bnoordhuisquit (Ping timeout: 246 seconds)
17:33:59  * bnoordhuisjoined
17:40:11  * xan_joined
17:42:57  * c4milojoined
17:45:38  * xan_quit (Quit: leaving)
18:06:14  * hackygolucky_joined
18:16:58  * c4miloquit (Remote host closed the connection)
18:44:01  * c4milojoined
18:45:46  * Lethalmanjoined
19:24:21  * muelliquit (Remote host closed the connection)
19:30:07  * muelli_quit (Ping timeout: 240 seconds)
19:39:37  * c4miloquit (Remote host closed the connection)
19:44:46  * c4milojoined
19:54:30  * bnoordhuisquit (Ping timeout: 246 seconds)
20:24:40  * Vbitzjoined
20:42:54  * Lethalmanquit (Ping timeout: 268 seconds)
20:50:35  * Vbitzquit (Quit: Computer has gone to sleep.)
21:01:22  * bnoordhuisjoined
21:06:02  * bnoordhuisquit (Ping timeout: 256 seconds)
21:28:40  * carif_quit (Ping timeout: 276 seconds)
21:40:23  * c4miloquit (Remote host closed the connection)
22:01:36  * mralephjoined
22:03:06  * mraleph1quit (Ping timeout: 264 seconds)
22:05:59  * Vbitzjoined
22:06:05  * Vbitzquit (Max SendQ exceeded)
22:06:39  * Vbitzjoined
22:06:43  * Vbitzquit (Max SendQ exceeded)
22:07:19  * Vbitzjoined
22:07:23  * Vbitzquit (Max SendQ exceeded)
22:08:01  * Vbitzjoined
22:08:07  * Vbitzquit (Max SendQ exceeded)
22:08:45  * Vbitzjoined
22:08:51  * Vbitzquit (Max SendQ exceeded)
22:09:29  * Vbitzjoined
22:09:34  * Vbitzquit (Max SendQ exceeded)
22:10:12  * Vbitzjoined
22:10:16  * Vbitzquit (Max SendQ exceeded)
22:24:50  * RT|Chatzillajoined
22:33:46  * c4milojoined
22:47:30  * MX80quit (Ping timeout: 264 seconds)
23:19:39  * c4miloquit (Remote host closed the connection)
23:51:11  * Mast3rPlanquit (Quit: Leaving)