fx icon indicating copy to clipboard operation
fx copied to clipboard

Add support for R language

Open flaviobarros opened this issue 7 years ago • 6 comments

How could I add support for the R language?

flaviobarros avatar Nov 16 '17 05:11 flaviobarros

@flaviobarros

You can checkout the images/ directory. let's take ruby for example.

images/ruby
├── Dockerfile
├── app.rb
└── fx.rb

you should prepare a Dockerfile and an entry programe (app.rb), then call a a simple function defined in fx.rb.

then if everything works well when you do docker run to test your function, you can make PR, I will include your change into fx.

metrue avatar Nov 16 '17 06:11 metrue

@flaviobarros I initialize it, but with some small issue, I will fix it soon. https://github.com/metrue/fx/tree/support-R/images/R

basically, it has some issues in package installation of R's install_packages('jug')

metrue avatar Nov 22 '17 17:11 metrue

@mbesancon

I am trying to support R, but I could make it work since dependencies issue. could you help check it when you have time and it happens you're a R programer.

basically, the problem is the i still could not find the library event they are installed. https://github.com/metrue/fx/tree/support-R/images/R

metrue avatar Nov 25 '17 13:11 metrue

Sorry for the delay. I guess the simplest solution would be a go server and an R app taking input from stdin and outputing to stdout

matbesancon avatar Nov 30 '17 04:11 matbesancon

@mbesancon

Yeah, I want to do in that way for other languages support at first, but when we do that it's not possible to deploy some function that has dependencies ( I mean when a function will require third party library installed first ) , but if we do it in independent Docker container, we have possibilities.

metrue avatar Nov 30 '17 07:11 metrue

I would also suggest to start a container passing stdin and then get the stdout+stderr when it closes (or is closed from fx by a timeout).

This would make callable functions any container handling I/O exchange

muka avatar Dec 12 '17 16:12 muka