00:02:49  * bnoordhuisquit (Ping timeout: 252 seconds)
00:16:38  * C-Manquit (Quit: Connection reset by beer)
00:34:03  * joshthecoderquit (Quit: Leaving...)
01:34:32  * joshthecoderjoined
02:21:46  * lohkeypart
05:14:41  * eoh|joined
05:15:17  * eoh-joined
05:15:19  * eoh|quit (Read error: Connection reset by peer)
05:15:23  * eohquit (Read error: Connection reset by peer)
06:52:55  * rendarjoined
07:41:16  * joshthecoderquit (Quit: Linkinus - http://linkinus.com)
08:10:52  * [[zzz]]joined
08:12:19  * [[zz]]quit (Read error: Connection reset by peer)
08:24:21  * [[zzz]]changed nick to [[zz]]
09:27:13  * C-Manjoined
10:31:44  * bnoordhuisjoined
11:51:38  * C-Manquit (Quit: Connection reset by beer)
12:06:52  * bnoordhuisquit (Read error: Operation timed out)
12:14:09  * bnoordhuisjoined
12:19:07  * TheJHquit (Read error: Operation timed out)
12:23:22  * bnoordhuisquit (Ping timeout: 252 seconds)
12:35:25  * TheJHjoined
12:37:58  * bnoordhuisjoined
12:48:00  * TheJHquit (Ping timeout: 240 seconds)
14:24:43  * TheJHjoined
15:32:54  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
16:13:44  * C-Manjoined
16:19:09  * milanijoined
16:19:52  <milani>can anyone please explain or send me a link about Local and Persistent differences?
16:20:15  <milani>like Local<Function> or Persistent<Function>, what is the difference. where should I use each.
16:21:21  * joshthecoderjoined
16:35:52  <alex4nder>milani: Persistent where you want to manage the existence of the handle beyond a handle scope
16:36:16  <milani>alex4nder, then I should destroy it manually?
16:36:18  <alex4nder>so you're responsible for disposing of it when you're done.. it also has the upshot that if you make it weak, you can do things like manage resources that are associated with that Value (e.g. backend C++ objects).
16:36:28  <alex4nder>milani: well if you created it, you should be disposing of it.
16:37:06  <milani>I'm passing a callback from node to c++ addon that goes into many c++ objects .
16:37:48  <milani>I defined it as local, I got segfault, I defined as persistent I didn't get any. can I still use Local function and somehow add a reference to it?
16:38:13  <milani>so when I'm done, I decrease the ref and gc can collect it.
16:38:44  <alex4nder>right, so you make it persistent as long as it's needed
16:38:48  <alex4nder>and then dispose of it
16:41:04  <milani>thx.
17:24:59  <milani>can I convert v8 handles to void* and get them back in another function?
17:37:10  * mordy__part
17:45:00  * maltopic: see #chromium, http://code.google.com/p/v8/
17:53:44  * lohkeyjoined
18:12:06  * evilpiejoined
18:13:27  <evilpie>somebody knows some cases where IndexHash for Strings is useful besides for (x in [1, 2, 3]) a[i] ?
18:28:36  * evilpiepart
18:35:34  * xan_quit (Ping timeout: 240 seconds)
18:37:40  * xan_joined
19:00:44  <bnoordhuis>milani: Persistent* p = new Persistent<Object>(); *p = Persistent<Object>::New(...); void* v = static_cast<void*>(p);
19:14:26  <joshthecoder>I think you can also just store the Object* then just create a Persistent from it when you need it: Object* o = *handle; Persistent<Object> h(o);
19:14:39  <joshthecoder>Can avoid the extra heap allocation I guess.
19:27:01  <milani>hmmm, yeah. thx.
19:27:26  <bnoordhuis>joshthecoder: if you need to carry the object across functions / methods / handle scopes, it needs to be persistent all the way
19:27:58  <joshthecoder>bnoordhuis: the storage cell remains the same if you just rewrap it.
19:28:51  <joshthecoder>bnoordhuis: we have been using this in our v8->jni bridge to stash Object* in a Java long field.
19:29:22  <joshthecoder>Seems to work fine, but I would be interested to hear if there could be unseen issues with this method.
19:29:56  <bnoordhuis>joshthecoder: i would think that you're dead if any gc'ing happens
19:30:26  <joshthecoder>bnoordhuis: the storage cell out lives any Persistent handle that references it.
19:30:31  <bnoordhuis>or are you taking the Object* out of the Persistent?
19:30:37  <joshthecoder>it won't go away until you do a dispose on it.
19:30:41  <joshthecoder>bnoordhuis: yes
19:30:44  <bnoordhuis>ah right
19:30:59  <bnoordhuis>it bends the intent of the api somewhat but i guess it'll work
19:33:23  <joshthecoder>bnoordhuis: the header docs seem to say it is okay. But yeah it isn't exactly clear if this is by design or we just get lucky here. :)
20:25:13  * joshthecoderquit (Read error: Connection reset by peer)
20:36:01  * joshthecoderjoined
20:39:56  * TheJHquit (Ping timeout: 260 seconds)
20:48:06  * joshthecoderquit (Ping timeout: 272 seconds)
20:51:16  * joshthecoderjoined
22:13:39  * rendarquit
22:19:40  * RT|Chatzillajoined
23:08:02  * grantgjoined
23:13:51  * milanipart ("Ex-Chat")
23:14:03  * milanijoined
23:14:22  * milanipart ("Ex-Chat")
23:46:30  * bnoordhuisquit (Ping timeout: 244 seconds)