Hacker News new | past | comments | ask | show | jobs | submit login

Hey substack,

The implicit callback is definitely my least favorite part in building NowJS. You can still pass in an additional callback to do any asynchronous I/O. We're trying to find ways to make this experience better for the next version




The solution I settled on for dnode is that a deep traversal finds all the functions in your argument list, pulls them out, and wraps them. This part of the protocol is a reusable module if you want to go with it:

https://github.com/substack/dnode-protocol

It's written for continuation-passing style but it shouldn't be too hard to retrofit it for other call styles if you want to preserve explicit returns for instance.


Awesome. I'm looking into this for next release


You guys have the hacker nature. I dig it.


I've just written JSON-RPC over SocketIO (for another project). I was going to open-source it. Is NowJS a superset of this? If so, I don't want to create noise by releasing a less-functional alternative.


It's not quite JSON-RPC but it does the same thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: