00:21:58
| * C-Man | joined |
00:35:26
| * Vbitz | quit (Ping timeout: 252 seconds) |
00:38:14
| * Vbitz | joined |
02:01:59
| * C-Man | quit (Quit: Connection reset by beer) |
02:21:58
| * c4milo | quit (Remote host closed the connection) |
04:55:28
| * [[zz]] | quit (Read error: Connection reset by peer) |
05:10:14
| * [[zz]] | joined |
05:35:58
| * bnoordhuis | quit (Ping timeout: 246 seconds) |
06:03:28
| * Vbitz | quit (Quit: Computer has gone to sleep.) |
06:21:12
| * stalled | quit (Ping timeout: 264 seconds) |
08:26:29
| * slurp2 | joined |
08:26:29
| * mal | topic: see #chromium, http://code.google.com/p/v8/ |
08:27:09
| * xl0_ | quit (*.net *.split) |
08:27:10
| * slurp | quit (*.net *.split) |
08:27:10
| * lostc_ | quit (*.net *.split) |
08:27:10
| * RX80 | quit (*.net *.split) |
08:27:10
| * nierob__ | quit (*.net *.split) |
08:30:59
| * jewel | quit (*.net *.split) |
08:32:32
| * xl0_ | joined |
08:32:32
| * lostc_ | joined |
08:32:32
| * RX80 | joined |
08:36:34
| * xl0_ | quit (*.net *.split) |
08:36:35
| * lostc_ | quit (*.net *.split) |
08:36:35
| * RX80 | quit (*.net *.split) |
08:37:22
| * xl0_ | joined |
08:37:23
| * lostc_ | joined |
08:37:23
| * RX80 | joined |
08:50:32
| * C-Man | joined |
09:44:39
| * bnoordhuis | joined |
10:13:20
| * indutny | quit (Quit: IRCRelay - http://ircrelay.com) |
10:31:43
| * indutny | joined |
10:57:58
| * bnoordhuis | quit (Ping timeout: 246 seconds) |
11:12:08
| * C-Man | quit (Ping timeout: 260 seconds) |
11:12:10
| * C-Man | joined |
11:21:29
| * C-Man | quit (*.net *.split) |
11:25:14
| * bnoordhuis | joined |
11:25:18
| * C-Man | joined |
11:32:19
| * stalled | joined |
11:32:37
| * bnoordhuis | quit (Ping timeout: 246 seconds) |
11:56:06
| * Net147 | joined |
12:04:02
| * bnoordhuis | joined |
12:09:22
| * bnoordhuis | quit (Ping timeout: 276 seconds) |
12:16:57
| * Dervish | joined |
12:17:06
| * Dervish | part |
12:50:46
| * indutny | quit (*.net *.split) |
12:51:10
| * indutny | joined |
13:29:10
| * mraleph | quit (*.net *.split) |
13:38:41
| * mbroadst | joined |
13:42:20
| * mbroadst_ | quit (Ping timeout: 256 seconds) |
13:42:47
| * Net147 | quit (Quit: HydraIRC -> http://www.hydrairc.com <- Nine out of ten l33t h4x0rz prefer it) |
13:52:51
| * mbroadst | quit (Ping timeout: 255 seconds) |
13:52:59
| * mbroadst | joined |
13:54:21
| * nierob_ | joined |
13:55:17
| * mbroadst | quit (*.net *.split) |
13:55:48
| * C-Man | quit (*.net *.split) |
13:57:48
| * mbroadst | joined |
13:57:48
| * C-Man | joined |
14:00:53
| * c4milo | joined |
14:04:34
| * nierob | quit (Write error: Broken pipe) |
14:04:50
| * [[zz]] | quit (Excess Flood) |
14:05:49
| * [[zzz]] | joined |
14:06:45
| * nierob_ | quit (Changing host) |
14:06:45
| * nierob_ | joined |
14:35:50
| * c4milo | quit (Remote host closed the connection) |
14:39:56
| * c4milo | joined |
14:47:06
| * Poopoo | joined |
14:47:09
| * C-Man | quit (Disconnected by services) |
14:47:12
| * Poopoo | quit (Client Quit) |
14:47:20
| * C-Man | joined |
15:20:39
| * RT|Chatzilla | quit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014]) |
15:28:17
| * carif | joined |
15:37:35
| * [[zzz]] | changed nick to [[zz]] |
15:45:02
| * carif | quit (Quit: Ex-Chat) |
15:51:08
| * bnoordhuis | joined |
16:34:13
| * bnoordhuis | quit (Ping timeout: 248 seconds) |
16:42:20
| * [[zz]] | quit (Ping timeout: 252 seconds) |
16:43:35
| * [[zz]] | joined |
16:47:04
| * mbroadst_ | joined |
16:48:54
| * mbroadst | quit (Write error: Connection reset by peer) |
17:09:49
| * c4milo_ | joined |
17:11:55
| * nierob__ | joined |
17:16:01
| * xl0_ | changed nick to xl0 |
17:18:37
| * [[zz]] | quit (*.net *.split) |
17:18:46
| * c4milo | quit (*.net *.split) |
17:18:51
| * nierob_ | quit (*.net *.split) |
17:24:00
| * Venemo | joined |
17:30:05
| * bnoordhuis | joined |
17:31:13
| * mbroadst | joined |
17:34:43
| * [[zz]] | joined |
17:34:51
| * [[zz]] | quit (Max SendQ exceeded) |
17:35:25
| * [[zz]] | joined |
17:43:11
| * nierob__ | quit (*.net *.split) |
17:43:29
| * mbroadst_ | quit (*.net *.split) |
17:58:54
| * nierob__ | joined |
18:04:14
| * c4milo_ | quit (Remote host closed the connection) |
18:05:10
| * c4milo | joined |
18:11:49
| <Venemo> | hi guys |
18:12:40
| <Venemo> | I'd like to ask for some help with using V8 in a Node module. I'm looking for a way to implement zero-copy, but can't find it |
18:12:51
| <Venemo> | here is my question with more detail: http://stackoverflow.com/questions/16477385/how-can-i-maintain-zero-copy-in-a-native-node-module |
18:13:03
| * Venemo | quit (Remote host closed the connection) |
18:13:31
| <indutny> | and he just left |
18:13:35
| <indutny> | very nice |
18:13:48
| * Venemo | joined |
18:15:50
| <bnoordhuis> | Venemo: depends on the data. you could use SetIndexedPropertiesToExternalArrayData() for binary data |
18:17:39
| <Venemo> | bnoordhuis, the data is supposed to be basically anything, but it'd be enough if there was a way to do this with v8::Objects |
18:18:46
| <bnoordhuis> | Venemo: external array data (or maybe external strings) are your best bet |
18:19:01
| <bnoordhuis> | you're basically restricted to primitive types though |
18:19:35
| <Venemo> | bnoordhuis, as long as I can persist stuff that normally can be persisted to JSON, I'm good |
18:20:25
| * nierob__ | quit (*.net *.split) |
18:21:03
| <indutny> | I believe that's not possible right now |
18:21:27
| <indutny> | Venemo: objects are quite complex and have absolute addresses to their contents |
18:21:37
| <indutny> | so zero-copying is definitely impossible |
18:22:06
| <indutny> | but I'm not sure if there is no hope for your needs |
18:22:08
| <Venemo> | indutny, what does SetIndexedPropertiesToExternalArrayData does, then? |
18:22:17
| <indutny> | maps your binary data to array |
18:22:20
| <indutny> | like node's Buffer |
18:22:40
| <indutny> | so you receive const char* [0, 1, 2, 3, …] |
18:22:41
| <indutny> | in C++ |
18:22:49
| <indutny> | and convert it to External Array |
18:22:52
| <indutny> | and access it in js: |
18:22:54
| <indutny> | [0,1,2,3...] |
18:23:00
| <Venemo> | ah |
18:23:03
| <indutny> | but that works only for arrays of binary data |
18:23:08
| <indutny> | not for objects or anything else |
18:23:14
| <indutny> | and especially not for strings |
18:23:32
| <Venemo> | I see |
18:23:33
| <indutny> | because utf8 and ucs are really complicating all stuff |
18:23:34
| <indutny> | :) |
18:24:56
| <Venemo> | well, I was trying to think about something smart that'd at least achieve some "almost-zero-copy" behaviour, but couldn't really come up with anything easy |
18:24:57
| * nierob__ | joined |
18:25:44
| <indutny> | you see to make it truly zero copy you'll need to store much more data |
18:25:57
| <indutny> | because internal v8's representation is much bigger than JSON |
18:26:05
| <bnoordhuis> | Venemo: you know that spiel about premature optimization being the root of all evil, right? |
18:26:15
| <bnoordhuis> | copying is often much less expensive than people think it is |
18:26:20
| <Venemo> | bnoordhuis, I heard about that :) |
18:26:26
| <indutny> | I believe that zero-copy is possible |
18:26:32
| <indutny> | but v8 needs to introduce object fusing first |
18:26:55
| <indutny> | with relative references |
18:26:55
| <indutny> | or whatever |
18:27:00
| <bnoordhuis> | magic pixie dust? |
18:27:01
| <indutny> | but this will add overhead during execution |
18:27:36
| <indutny> | bnoordhuis: exactly, and rainbow unicorns |
18:29:00
| <Venemo> | my two ideas so far were using interceptors in a smart way, or just storing JSON and Script::Run'ning it - but not sure which'd perform better. it also seems to be a bad idea to run it instead of parsing |
18:29:49
| <Venemo> | neither of those feels like a good idea though |
18:31:26
| <Venemo> | what do you guys think? |
18:36:26
| <Venemo> | bnoordhuis, I agree with your suggestion about premature optimalization but then it also feels wrong to use a zero-copy database and then spoil it at the end by copying anyway |
18:39:54
| <Venemo> | my other question is, how do external strings behave? are they copy-on-write? |
18:40:28
| <bnoordhuis> | Venemo: no, strings are immutable |
18:41:16
| <indutny> | Venemo: using JSON.parse will most likely beat any tricks |
18:41:59
| <Venemo> | bnoordhuis, ah, I see. |
18:43:09
| <Venemo> | indutny, so I could just create an external string, JSON.parse it and be done with it? |
18:43:33
| <indutny> | I think yes |
18:44:15
| <Venemo> | indutny, and how can I call JSON.parse from C++? |
18:44:34
| <Venemo> | I saw this example here: https://groups.google.com/forum/?fromgroups=#!topic/v8-users/F8Q0rdUSDo0 |
18:44:56
| <Venemo> | but isn't there a way to invoke the JSON parser without having to run a script? |
18:45:19
| <indutny> | you can run function |
18:45:24
| <indutny> | I mean like do |
18:45:33
| <indutny> | mymodule.init(function(str) { return JSON.parse(str); }) |
18:45:43
| <indutny> | and call this function from C++ |
18:46:01
| <Venemo> | so you would pass the function from js to the module? |
18:46:08
| <Venemo> | hm |
18:46:18
| <Venemo> | and couldn't I create the function in C++? |
18:46:34
| <indutny> | you can |
18:46:40
| <indutny> | definitely |
18:47:05
| <Venemo> | indutny, and how can I do that? |
18:52:47
| <indutny> | using Script class |
18:56:32
| <Venemo> | indutny, something like this? http://stackoverflow.com/questions/11387015/calling-a-v8-javascript-function-from-c-with-an-argument |
18:56:56
| <indutny> | yes |
18:57:17
| <Venemo> | all right |
18:57:37
| <Venemo> | thank you for your help indutny & bnoordhuis :) |
18:59:10
| <indutny> | you're welcome |
18:59:38
| * mraleph | joined |
19:59:52
| * sanjoyd | joined |
20:23:03
| <bnoordhuis> | indutny: still around? |
20:26:46
| <bnoordhuis> | mraleph: mind if i bother you with a v8 question? https://github.com/bnoordhuis/v8/compare/dataview |
20:27:04
| <mraleph> | bnoordhuis: you can try |
20:27:05
| <mraleph> | :-) |
20:27:16
| <bnoordhuis> | i'm trying to implement DataView but i'm hitting this: |
20:27:16
| <bnoordhuis> | # Fatal error in ../src/builtins.cc, line 187 |
20:27:16
| <bnoordhuis> | # unreachable code |
20:27:24
| <bnoordhuis> | i can gist the full backtrace if you want |
20:27:48
| <bnoordhuis> | essentially, i'm hitting BUILTIN(Illegal) for some reason |
20:27:57
| <mraleph> | gist the back trace. |
20:28:02
| <bnoordhuis> | sure, one sec |
20:28:12
| <indutny> | bnoordhuis: yes |
20:28:32
| <mraleph> | is this the diff that you are applying? |
20:29:16
| <bnoordhuis> | mraleph: https://gist.github.com/bnoordhuis/4500154927db314a6db1 |
20:29:27
| <bnoordhuis> | and yes, compare/dataview is the patch |
20:29:40
| <bnoordhuis> | indutny: see above. comments welcome :) |
20:30:35
| <indutny> | so its basically a container for buf, off, len |
20:30:37
| <indutny> | right? |
20:30:42
| <indutny> | with some API methods on top of it |
20:30:52
| <bnoordhuis> | yep |
20:31:03
| <indutny> | em… is it some ES5-ES6 thing? |
20:31:11
| <bnoordhuis> | it's a typed array thing |
20:31:11
| <mraleph> | bnoordhuis: you probably forgot to makes sure that dataview.js is actually run. |
20:31:14
| <indutny> | ok |
20:31:14
| <mraleph> | see InstallExperimentalNatives |
20:31:28
| <bnoordhuis> | mraleph: ah... quite so |
20:31:30
| <indutny> | bnoordhuis: ok, generally it looks good to me |
20:31:41
| <indutny> | but I hadn't looked in details |
20:31:53
| <indutny> | and not aware of any typed array stuff |
20:31:58
| <mraleph> | the flow of the force is somewhat perverted here. |
20:32:08
| <mraleph> | so InstallExperimentalNatives is the dude. |
20:32:35
| <bnoordhuis> | thanks. yeah, that must be it - i hadn't touched that yet |
20:34:49
| <bnoordhuis> | okay, different error this time. it's progress :) |
20:34:52
| <bnoordhuis> | thanks again |
20:35:10
| <mraleph> | np |
20:38:10
| <bnoordhuis> | indutny: btw, in case you're wondering - we're currently shipping a custom typed arrays implementation in node |
20:38:28
| <bnoordhuis> | but now that v8 is slowly accreting native typed arrays, i thought it'd be nice if we could ditch that |
20:53:11
| <indutny> | yeah, I know |
21:06:17
| * nierob__ | quit (Changing host) |
21:06:17
| * nierob__ | joined |
21:38:38
| * c4milo | quit (Remote host closed the connection) |
21:39:14
| * jewel_ | quit (Ping timeout: 245 seconds) |
21:52:37
| * Vbitz | joined |