-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R Support #201
Comments
Shouldn't be very hard. Someone else was asking about this before, but I can't find the thread. |
The best way to get a new language added would be to first commit a new target binary which will be mapped to HTTP req / res. We have a separate binary for each language. Here is one used for python: https://github.com/bigcompany/hook.io/blob/master/bin/run-hook-python You'll see that certain command line arguments are passed into the binary, such as Once we have a new |
@NoahMarconi - A $100 bounty has been posted to add this feature. https://www.bountysource.com/issues/31490232-r-support :-) |
@Marak I'll take a look on Sunday. That Python example looks like something I can replicate in R. |
@NoahMarconi - Amazing! I appreciate the effort. I know $100 isn't very much for the work, but I hope it provides at least a small amount of incentive. If you get stuck on anything while trying to dev this, I'd suggest working around it. Get as much done as you can and I can collaborate with you. You could probably build a proof of concept without actually installing and configuring an entire You may be able to build a simple test using STDIN and STDOUT? https://github.com/bigcompany/run-service/blob/master/examples/console.js I'd suggest creating a fork of |
Is this all that's needed to match the Python support? https://gist.github.com/NoahMarconi/bf29ebc5f5a10017f5a3f4c6f3145bc5 Once those install steps are complete to install an R runtime and the relavant deps, you can run a command line test with something like: run-r -c "cat(rnorm(n=10, mean=0), '\n')" If that works I can submit a pull request. As an immediate follow up, what are the other arguments for (-s, -e)? I can look into adding support there and then follow up with some example R hooks. |
@NoahMarconi - I think that looks mostly good! It should actually be pretty easy to add new language support. You'll still want to generate a Some runtimes use global scope, others wrap in a function scope. You should figure out what is best practice for Best to look around a bit. You can test locally by simply passing in a json object, or individual generated command line arguments. see: https://hook.io/marak/examples-bash-hello-world/source |
@NoahMarconi - Quick google search tells me we probably will want to use the following library to parse incoming arguments JSON in https://cran.r-project.org/web/packages/jsonlite/vignettes/json-aaquickstart.html |
@Marak awesome, I'll add that in and submit a pull request. I might need a couple days but it looks like a quick addition |
Closing issue. This is no longer applicable, as all core spawning logic has been moved to: https://github.com/stackvana/stack If anyone is interested in adding R support, please file a new issue at: https://github.com/stackvana/stack/issues/new Any changes to |
Hi, any barriers to adding R support? What would be involved?
The text was updated successfully, but these errors were encountered: