Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 635 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 635 Bytes

Julia for Ruby

This is an attempt to embed the julia language in ruby. Actually, very basic julia types are converted to ruby objects.

Install

[sudo] gem install jl4rb

Test

Then, in a irb console:

require 'jl4rb'			# => true
Julia << 'LOAD_PATH'

Example

Once you haved installed RDatasets package in julia.

require 'jl4rb'
Julia << 'using RDatasets'  

# A multilines call
a=Julia << <<JLEND
iris=dataset("datasets","iris")
convert(Array,iris[2])
JLEND

# a is then a ruby object
p a

# another call
Julia << 'map(string,names(iris))'