00:57:36  * plutoniixjoined
01:00:26  * cstipkovic_joined
01:01:10  * cstipkovic_quit (Client Quit)
01:01:32  * cstipkovicjoined
01:22:08  * xaxxonjoined
02:14:32  * plutoniixquit (Quit: Leaving)
03:09:39  * cstipkovicquit (Quit: Connection closed for inactivity)
03:11:49  * xaxxonquit (Quit: xaxxon)
03:20:22  * plutoniixjoined
03:21:19  * plutoniixquit (Max SendQ exceeded)
03:22:00  * plutoniixjoined
05:30:50  <devsnek>how come initialize takes const char* instead of int[] or something
07:28:04  * xaxxonjoined
09:13:06  * not-an-aardvarkquit (Quit: Connection closed for inactivity)
09:57:03  * xaxxonquit (Read error: Connection reset by peer)
09:57:35  * xaxxonjoined
10:06:22  * xaxxonquit (Ping timeout: 260 seconds)
10:25:59  * plutoniixquit (Quit: Leaving)
11:25:11  * mylesborinsquit (Quit: farewell for now)
11:25:42  * mylesborinsjoined
12:25:34  * AtumTjoined
13:07:12  * Garbeejoined
14:28:58  * seventhjoined
15:20:04  * rwaldronjoined
16:08:28  * mmarchinijoined
16:50:47  * RT|Chatzillaquit (Quit: ChatZilla [Firefox])
17:48:57  * seventhquit (Ping timeout: 245 seconds)
17:56:20  * Wes-joined
17:57:22  * imeioujoined
17:57:38  * imeiouquit (Client Quit)
17:57:43  <Wes->If I want to execute two hunks of JS in the same v8 embedding in separate environments, what is the "right" scope? a new isolate for each job?
17:58:30  * seventhjoined
18:06:31  <caitp>Wes-: I think it depends on your requirements... e.g. do the 2 hunks of JS run in parallel?
18:07:16  <caitp>afaik if you need to be running JS code concurrently on different threads, you'd want to host your environments in separate Isolates, but if that's not a requirement, then a single Isolate with multiple Contexts should be ok
18:07:36  <caitp>that said, I just hack on the engine and have never fully embedded v8 in anything, so I'm not the best person to ask :(
18:17:08  * not-an-aardvarkjoined
18:31:19  <Wes->caitp: They run in serial. Did not realize v8 was threadsafe TBH. Was that always the case? (Thanks - sounds like multiple contexts is what I'm after)
18:32:27  <Wes->vaguely-related question, do I need to keep JS source paged in after the code has been executed, or can I munmap()? Not sure v8 keeps a reference, I think spidermonkey does for their decompiler (.toSource()) etc
18:32:38  <caitp>well hopefully it works out, but if you have any trouble you should come back or try the v8-users mailing list
18:33:41  <caitp>well, hmm.. the only case in the modern pipeline where we should need the source again is if Function.toString() is called, I _think_
18:33:43  <caitp>let me see
18:33:44  <Wes->(I guess v8::String::NewFromUtf8 insulates me from caring anyhow)
18:35:29  <caitp>it looks like SharedFunctionInfo holds onto the source code for you
18:37:36  <Wes->caitp: Thank you. I've embedded JS before, but getting up to speed on v8 is a lot like having a drink from a firehose :)
19:35:01  <devsnek>I tried to make my own bin2c for the startup and natives blobs
19:35:11  <devsnek>it gives a unsigned char array
19:35:21  <devsnek>then I reinterpret_cast to const char*
19:35:27  <devsnek>and v8 isn't liking it
19:37:17  <devsnek>it dumps out all the js code the engine uses into stderr and complains about not having a natives snapshot
19:37:19  * AtumTquit (Ping timeout: 252 seconds)
19:43:42  <Wes->devsnek: what interface are you using to specify those files? My embedding just loads them all by itself.
19:43:55  <devsnek>uhhh
19:44:13  <devsnek>well I was using the method that loaded them by filename
19:44:31  <devsnek>sorry I'm mobile rn so I don't remember the exact method
19:44:41  <Wes->Must be InitializeExternalStartupData stuff.
19:44:43  * Wes-googles
19:44:47  <devsnek>yea
19:45:00  <devsnek>it also accepts the blobs as const char* data
19:45:16  <devsnek>so I tried to load them at compile time into unsigned char arrrays
19:45:34  <devsnek>which appears to work but they are apparently invalid
19:48:35  <Wes->SetNativesDataBlob and SetSnapshotDataBlob? You're passing them a struct with a pointer and a size?
19:48:48  <devsnek>uhhhh
19:49:07  <devsnek>oof I wish my code was on github rn
19:49:19  <devsnek>in like 30min I can show you what I'm doing
19:49:41  <devsnek>it's a method call that takes both the snapshot and natives
19:50:17  <devsnek>v8::V8::SomethingInitializerSomething
19:56:06  <Wes->devsnek: the only one I can see that matches your description takes filenames, not blobs
19:56:19  <devsnek>did I do something stupid then :D
19:58:33  <devsnek>"by default the startup data is linked into the v8 library" how come it crashes when I don't load the bin then :/
20:00:23  <Wes->devsnek: "default" is probably not the embedders' case? :) I followed the directions in the wiki (as far as I could) and wound up with a library that wants them externally. If you are using the stock files, you might want to figure out how to disable external startup data.
20:02:23  * seventhquit (Quit: ...)
20:02:38  <devsnek>time to read over node's gyp configs
20:09:40  <Wes->devsnek: let me know if you learn anything. I've been thinking about building my own snapshot, was planning to embed the .bin files in the executable and load them that way.
20:53:02  <devsnek>that's what I'm trying to do 😢
21:30:23  <devsnek>Wes-:https://github.com/nodejs/node/blob/master/common.gypi#L36
21:31:12  <Wes->devsnek: aha! Thanks.
21:31:28  <devsnek>hehe
21:33:09  <devsnek>now the question is
21:33:14  <devsnek>using gn instead of gyp
21:33:17  <devsnek>where do i put this variable
21:37:13  * drakonisjoined
21:45:36  * drakonisquit (Read error: Connection reset by peer)
22:14:04  * rwaldronquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:22:45  * caitpquit (Ping timeout: 256 seconds)
22:23:16  * caitpjoined
22:30:07  * devsnekquit (Ping timeout: 256 seconds)
22:31:01  * devsnekjoined
23:07:26  * RT|Chatzillajoined