-
Notifications
You must be signed in to change notification settings - Fork 167
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
Proof of concept: Rmarkdown support #397
Conversation
Fun fact: running it on JRuby with the Running with this in gollum's gem 'rinruby', :github => 'clbustos/rinruby'
gem 'gollum-lib', :path => '/Users/dawa/Code/gollum_project/gollum-lib' |
The difference between JRuby and MRI turns out to be that on JRuby, |
I wonder if we need |
I've wondered about this too. Three points:
The maintainability of the project does not look great, but maybe it's better than nothing for MRI? On Java, there seem to be some other options, and on Truffle there would be https://github.com/rbotafogo/galaaz. Another way to go would be using a TCP client to interact with RServe. There is an old ruby client for that by the same maintainer as |
Some more notes:
|
I should also clarify that when I say it works fine without interactive mode, that's on the |
Agreed, but we could try to render a useful message instead of either breaking or not rendering. |
Conceptually, for MRI, I actually like the approach taken by this old gem which leverages |
Also: we should probably disable R execution by default for security purposes. Users who want to use RMarkdown on a public instance of gollum should probably use something like https://github.com/jeroen/RAppArmor. |
Here's a way of capturing the output of |
Different implementation coming |
Resolves gollum/gollum#1553
I managed to implement support for RMarkdown relatively painlessly by modifying the code filter. Obviously this is only a proof of concept. The biggest problem is that this implementation relies on the RinRuby gem which seems to be no longer maintained. I can't get the
master
version of that gem to work (the app hangs on startup when Irequire 'rinruby'
), but the older released gem has a bug (fixed onmaster
) which means you can'tCtrrl-D
to interrupt the R process. :( Nevertheless, if there are different R-for-Ruby implementations, we would only have to modify therender_r
method in the code filter.Anyway, the end result on gollum is pretty cool:
For this source:
Tset
Test