Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
piscisaureus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
New io.js features that you may not be using
(strongloop.com)
6 points
by
piscisaureus
11y ago
|
0 comments
32.
▲
by
piscisaureus
12y ago
Similar situation here; this "peninsula" doesn't really exist: https://www.google.com.ph/maps/place/23%C2%B047'02.5%22S+35%... I always assumed that google uses some kind of algorithm to detect
33.
▲
by
piscisaureus
12y ago
A Zone object could be a "subclass" of a Promise. It's something I have considered but I didn't think it'd be necessary for the first release. > But Promises already provide asynchronous try/catch blocks The
34.
▲
by
piscisaureus
12y ago
I'm sorry if it wasn't clear enough from the blog, but the attempt here is not to write a flow control library that solves the callback hell problem like promises does. You should think of it more as an asynchronous try-catch bloc
35.
▲
by
piscisaureus
12y ago
Note that the comparison page doesn't have the "zone" library we just announced on it. Zone.js is conceptually a bit different and it targets browsers.
36.
▲
by
piscisaureus
12y ago
> I'm really unclear on how the zone library is doing the magical interception of errors It monkey patches the entry points into javascript from the binding layer (some wrapping happens at a higher level), for the purpose of keepin
37.
▲
by
piscisaureus
12y ago
When control reaches there we know something went wrong within the zone that's sending the response, so it's nice to send a HTTP 500 error back. However it could be that some data has already been sent back, in which case writeHea
38.
▲
by
piscisaureus
12y ago
> I'm having a really hard time seeing how this is an actual improvement on the status quo What we're doing is make it unnecessary to add error handlers everywhere and still get caught by surprising failure modes. If the zone c
39.
▲
Zones – Robust error handling and flow control for Node.js
(strongloop.com)
30 points
by
piscisaureus
12y ago
|
19 comments
40.
▲
by
piscisaureus
12y ago
Node statically links OpenSSL and uses gyp (the chromium build system) to build it. Initially we used the chromium project OpenSSL fork which had these flags set [1]; when we moved to maintain our own gyp-ified fork we kept these flags [2],
41.
▲
by
piscisaureus
13y ago
Well, there you go: https://github.com/joyent/libuv/pull/1015#issuecomment-29568...
42.
▲
by
piscisaureus
13y ago
Well sure you could do that. But I don't believe that reading say 50 bytes at a time is very efficient even when you factor in automatic syscall batching. But this is all speculation. I didn't any consideration for this problem in
43.
▲
by
piscisaureus
13y ago
The way they do mp_read() is not right IMO. If you have to pass a target buffer every time you call mp_read, that ends up using a lot of memory in a scenario where there are a lot of connections open but traffic is sparse. Since data might