nodo: Call Node.js from Ruby

9 points by Kerrick


swifthand

This is neat. It looks like arguments are passed as json and responses parsed from json. It isn’t explicitly stated in the README so I went digging to be sure, rather than assume.

During the 2010’s, I often would look at a related area: rendering HandlebarsJS templates in Ruby. Of the gems I found, they tended to be wrappers around calling node in a one-off manner via system, and had a variety of downsides. I had a small project to try and build one that used a persistent node process. However, before I reached a the point where I was satisfied with it, the flavour_saver gem had come along and solved the problem entirely.

I’m tempted to find that old code, dust it off, and apply some of the ideas from this.

hibachrach

For comparison, there is also schmooze. Not sure if there are other gems as well.

ilyash

Somewhat related project - https://github.com/aws/jsii

“jsii allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the AWS Cloud Development Kit to deliver polyglot libraries from a single codebase! “