00:02:25
| * xaxxon | joined |
00:15:03
| * bradleymeck | joined |
00:15:03
| * bradleymeck | quit (Client Quit) |
00:24:10
| * watilde | joined |
00:28:34
| * watilde | quit (Ping timeout: 240 seconds) |
00:35:00
| * xaxxon | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:38:23
| * xaxxon | joined |
00:54:59
| * xaxxon | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:56:14
| * xaxxon | joined |
01:01:20
| * xaxxon | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:02:03
| * xaxxon | joined |
01:06:02
| * Fishrock123 | joined |
01:07:11
| <Fishrock123> | littledan__: heya, Ali said I should ask you about this. I'm hoping there is a way I can get the reject value of a promise from c++ (Where the Promise is a Local) |
01:09:35
| <littledan__> | Fishrock123: Yeah, call the Catch method |
01:10:22
| <littledan__> | the C++ interface is just like the JavaScript one; there's no synchronous way to get the contents out |
01:10:54
| <Fishrock123> | littledan__: hmm, well what we are doing for JS is making a debug context and pulling it out of that |
01:11:16
| <littledan__> | I don't quite understand, could you explain more? |
01:11:25
| <Fishrock123> | do you mean (Local)->Catch()? |
01:11:31
| <Fishrock123> | one sec, i'll get a link |
01:11:43
| <littledan__> | yes |
01:12:42
| <Fishrock123> | littledan__: https://github.com/nodejs/node/blob/master/lib/util.js#L204 |
01:13:04
| <Fishrock123> | where Debug is https://github.com/nodejs/node/blob/master/lib/util.js#L191 |
01:13:44
| <Fishrock123> | hmm yeah, I need something that is synchronous |
01:13:54
| <littledan__> | oh, huh.:e :e |
01:13:56
| <Fishrock123> | at the point that we are at we are exiting the program |
01:14:26
| <Fishrock123> | or well, hoping to |
01:15:40
| <littledan__> | oops, some of that was supposed to go to vim :) |
01:16:00
| <Fishrock123> | XD |
01:17:47
| <littledan__> | so if you want to get at the debug information, Runtime::GetInternalProperties will give you an array of secret internal properties, which includes [[PromiseValue]]. But this is not guaranteed to be a stable interface, and not high performance! It would not be useful for someone writing a module outside of node core. Let me see how/if that's exposed via the |
01:17:48
| <littledan__> | API... |
01:19:38
| <Fishrock123> | That is fine |
01:19:43
| <littledan__> | in include/v8-debug.h, Debug::GetInternalProperties will do the trick |
01:19:47
| <Fishrock123> | I am writing something for node core :) |
01:19:59
| <littledan__> | (I wrote that disclaimer more for other people who might be listening in; you're good for this use case I think) |
01:20:13
| <Fishrock123> | ah |
01:20:44
| <Fishrock123> | is that v8::Debug::GetInternalProperties? |
01:20:51
| <Fishrock123> | Sorry, my C++ is not very good lol |
01:21:03
| <littledan__> | yep |
01:22:17
| <littledan__> | The internal properties exposed here are meant to match the ES2016 draft spec. But we don't have quite as good tests for them as we do for other aspects of spec compliance, so let me know if anything ends up working differently than what you expect. |
01:23:33
| <Fishrock123> | littledan__: do I need to iterate to find [[PromiseValue], or? |
01:23:49
| <littledan__> | yes, I think it gives you an array of key-value pairs, and you iterate through it |
01:24:23
| <littledan__> | oh, sorry, it gives you an array of [key, value, key, value, ...] |
01:24:40
| * watilde | joined |
01:24:43
| <Fishrock123> | oh ok, key is like a Local<String>? |
01:24:56
| <Fishrock123> | and I'm looking for one that has "PromiseValue"? |
01:25:29
| <Fishrock123> | or MaybeLocal<String>... I don't really know the difference |
01:27:32
| * C-Man | quit (Quit: Connection reset by beer) |
01:28:29
| <littledan__> | Sorry, I'm actually not an expert on the external API either. But you're looking for one that has "[[PromiseValue]]" in an even-numbered position. You can just pass this value out to JS and do the iteration there. |
01:29:16
| <Fishrock123> | Yeah, I guess that is the easiest route for now, I really have no idea how to iterate on this in c++ |
01:29:40
| <littledan__> | it's probably better long-term to do as much as possible in JS too |
01:30:37
| * petka____ | quit (Quit: Connection closed for inactivity) |
01:30:59
| * watilde | quit (Ping timeout: 240 seconds) |
01:34:32
| <Fishrock123> | littledan__: To use `bool ToLocal(Local<S>* out)` I need to pass in an empty Local? How do I make one that is empty? |
01:34:58
| <littledan__> | eh, I'm not the best one to answer these questions, maybe Ali knows better |
01:35:03
| <littledan__> | or someone else here |
01:35:05
| <Fishrock123> | ok |
01:35:11
| <Fishrock123> | ofrobots: ^ |
01:35:22
| <littledan__> | does Local<S> out; work? |
01:35:40
| <littledan__> | and then you pass in a reference to that? |
01:35:46
| <Fishrock123> | Basically I need to get a local out of a MaybeLocal |
01:35:50
| <Fishrock123> | I think |
01:36:23
| <Fishrock123> | I probably should have been more specific about that |
01:38:36
| <ofrobots> | littledan__ thanks for the pointers.. I wasn't familar with GetInternalProperties |
01:39:09
| <ofrobots> | Fishrock123 let me take a look at this.. I can probably code up an example for you to look at |
01:39:17
| <ofrobots> | I don't want you to be flailing with C++ |
01:39:36
| <ofrobots> | (is tomorrow okay?) |
01:40:41
| <Fishrock123> | ofrobots: I suppose. I can do the rest for now so long as I can get a Local<Value> out of the MaybeLocal |
01:41:16
| <ofrobots> | For that you can do maybe_local.ToLocalChecked() <-- assumes that the local is non-empty |
01:41:23
| <ofrobots> | *maybe_local is non-empty |
01:41:38
| <ofrobots> | if emptiness is possible, you will need to test upfront for emptiness |
01:42:17
| <ofrobots> | something like if (maybe_local.IsEmpty()) { /* do something */} else { Local<Value> promise = maybe_local.ToLocalChecked();.. |
01:42:20
| <Fishrock123> | ok uh |
01:42:26
| <Fishrock123> | I don't this will be empty |
01:42:29
| <Fishrock123> | we shall see! |
01:45:40
| <Fishrock123> | ofrobots: yup, that worked, thanks! |
01:46:27
| <ofrobots> | Fishrock123 To answer your question about how to use ToLocal, here are some examples from Node: https://github.com/nodejs/node/blob/master/src/node_contextify.cc#L340 |
01:47:23
| <Fishrock123> | oh shoot you can literally just do `Local<Value> context_external_v;`? doh |
01:49:11
| <Fishrock123> | cool, well, I'll try to work this out more tomorrow, thanks both for your help :) |
01:49:29
| <ofrobots> | Basically MaybeLocal returns you a value or null. You must deal with the nullness before you can access the value. This avoids null pointer crashes. |
01:50:09
| <Fishrock123> | right |
01:58:15
| * evanlucas | quit (Read error: Connection reset by peer) |
01:58:16
| * evanluca_ | joined |
02:10:11
| * evanluca_ | quit (Ping timeout: 248 seconds) |
02:10:26
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
02:13:37
| * Fishrock123 | quit (Remote host closed the connection) |
02:15:16
| * ofrobots | joined |
02:19:48
| * evanlucas | joined |
02:26:27
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
03:22:33
| * ofrobots | joined |
03:35:10
| * phpnode | quit (Ping timeout: 244 seconds) |
03:48:38
| * phpnode | joined |
04:04:00
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:10:55
| * ofrobots | joined |
04:16:03
| * Fishrock123 | joined |
04:21:03
| * Fishrock123 | quit (Ping timeout: 240 seconds) |
04:25:13
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:28:37
| * watilde | joined |
04:33:33
| * watilde | quit (Ping timeout: 250 seconds) |
04:50:48
| * ofrobots | joined |
05:20:53
| <trungl-bot> | Tree closed by [email protected]: Tree is closed (Automatic: "Check" on http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/6812 "V8 Linux - nosnap" from a40830577d80f699282dd83864619656b7a7966c: [email protected]) |
05:30:05
| * watilde | joined |
05:30:55
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:34:39
| * watilde | quit (Ping timeout: 250 seconds) |
05:58:58
| * ofrobots | joined |
06:10:02
| * Fishrock123 | joined |
06:14:09
| <trungl-bot> | Tree opened by [email protected]: open (reverted breaking patch) |
06:18:41
| * Fishrock123 | quit (Quit: Leaving...) |
06:30:18
| * watilde | joined |
06:34:53
| * watilde | quit (Ping timeout: 250 seconds) |
07:47:01
| * watilde | joined |
07:57:13
| * bnoordhuis | joined |
07:58:12
| * watilde | quit (Remote host closed the connection) |
08:01:05
| * rendar | joined |
08:24:20
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:33:59
| * bnoordhuis | quit (Ping timeout: 240 seconds) |
08:51:24
| * ofrobots | joined |
08:58:45
| * watilde | joined |
09:03:59
| * watilde | quit (Ping timeout: 240 seconds) |
09:10:09
| * behelit | joined |
09:12:46
| * petka____ | joined |
09:19:04
| * C-Man | joined |
09:31:57
| <behelit> | hi guys. when i attempted to build v8 on my dev machine this morning i get an error when linking mksnapshot |
09:32:01
| <behelit> | http://dpaste.com/2PKJC53 |
09:32:10
| <behelit> | "unsupported reloc 42" |
09:32:41
| <behelit> | i'm guessing i updated my system in between builds and that something (clang or whatnot) is not compatible |
09:32:50
| <behelit> | any ideas? |
09:33:20
| * cjihrig_ | joined |
09:35:01
| * esas | quit (Ping timeout: 240 seconds) |
09:35:01
| * cjihrig | quit (Ping timeout: 240 seconds) |
09:35:02
| * cjihrig_ | changed nick to cjihrig |
09:35:33
| <behelit> | might be bundled binutils |
09:35:35
| * JoWie | joined |
09:38:23
| <behelit> | attempting to build without bundled binutils |
09:40:18
| * bnoordhuis | joined |
09:44:29
| * bnoordhuis | quit (Ping timeout: 240 seconds) |
09:53:17
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:57:42
| <xaxxon> | behelit sorry, no clue. this place is almost always dead |
09:59:49
| * watilde | joined |
10:02:43
| <behelit> | ah |
10:04:59
| * watilde | quit (Ping timeout: 240 seconds) |
10:17:54
| * xiinotulp | joined |
10:21:16
| * plutoniix | quit (Ping timeout: 252 seconds) |
10:42:03
| * xiinotulp | changed nick to plutoniix |
11:00:44
| <behelit> | -Dlinux_use_bundled_binutils=0 seems to have solved it, for reference |
11:01:03
| * watilde | joined |
11:06:43
| * watilde | quit (Ping timeout: 255 seconds) |
11:37:05
| * bnoordhuis | joined |
12:02:44
| * watilde | joined |
12:08:00
| * watilde | quit (Ping timeout: 276 seconds) |
12:11:38
| * xaxxon | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:03:47
| * watilde | joined |
13:08:09
| * watilde | quit (Ping timeout: 244 seconds) |
13:14:51
| * bnoordhuis | quit (Ping timeout: 250 seconds) |
14:04:44
| * watilde | joined |
14:09:01
| * watilde | quit (Ping timeout: 250 seconds) |
14:21:07
| * bnoordhuis | joined |
14:25:29
| * bnoordhuis | quit (Ping timeout: 240 seconds) |
14:43:16
| * davi | joined |
14:43:16
| * davi | quit (Changing host) |
14:43:16
| * davi | joined |
14:44:34
| * jugglinmike | joined |
14:48:54
| * davi | quit (Ping timeout: 244 seconds) |
14:50:27
| * ofrobots | joined |
15:05:02
| * watilde | joined |
15:09:59
| * watilde | quit (Ping timeout: 240 seconds) |
15:13:53
| * bnoordhuis | joined |
15:25:14
| * davi__ | joined |
15:33:16
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:50:50
| * ofrobots | joined |
15:59:10
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:07:10
| * jugglinmike1 | joined |
16:07:11
| * jugglinmike | quit (Quit: Leaving.) |
16:09:45
| * Fishrock123 | joined |
16:12:21
| * ofrobots | joined |
16:20:58
| * davi__ | quit (Ping timeout: 252 seconds) |
16:38:19
| * ofrobots | quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:42:29
| * RT|Chatzilla | quit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2010030309]) |
16:44:01
| * ofrobots | joined |