interactive
HTML and JavaScript plots
that can be displayed in your
browser.
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
Mapnya
Nyaplot3D
Bionya
Map visualizations with inbuilt country charts.
Three Dimensional interactive plots.
Biology plots for visualizing relationships of genes.
Slide 35
Slide 35 text
daru
(Data Analysis in RUby)
Slide 36
Slide 36 text
daru
==
(Hindi)
ददार
sake
alcohol
Slide 37
Slide 37 text
library for
analysis, cleaning, manipulation and
visualization
of data.
Slide 38
Slide 38 text
Read/write many data sources
Ephemeral statistics functions
Works well with 'wild' data
Data indexing
Slide 39
Slide 39 text
Acts as glue between other
SciRuby libraries.
Slide 40
Slide 40 text
Daru::Vector
Heterogenous Array that can be indexed on
any Ruby object.
Name
Label(0)
Label(1)
Label(2)
...
Label(n-1)
Slide 41
Slide 41 text
Daru::DataFrame
2D spreadsheet like data structure indexed by
rows or columns.
Col0
Label(0)
Label(1)
Label(2)
...
Label(n-1)
Col1 Col2 Col(n-1)
....
Slide 42
Slide 42 text
New Ideas for better Ruby
Slide 43
Slide 43 text
“Any sufficiently advanced
technology is indistinguishable
from magic.”
Arthur C. Clarke
Slide 44
Slide 44 text
Writing C extensions
●
FFI gem.
●
Rice.
●
SWIG.
●
Writing C bindings manually.
Slide 45
Slide 45 text
Rubyist!
Write me a C extension!
Slide 46
Slide 46 text
def factorial n
n > 1 ? n*factorial(n-1) : 1
end
Slide 47
Slide 47 text
unsigned long long int
calc_factorial(unsigned long long int n)
{
return (n > 1 ? n*calc_factorial(n-1) : 1);
}
static VALUE
cfactorial(VALUE self, VALUE n)
{
return ULL2FIX(
calc_factorial(NUM2ULL(n)));
}
Big Problems
●
Difficult and irritating to write.
●
Time consuming to debug.
●
Tough to trace memory leaks.
●
Change mindset from high level to low
level language.
●
Need to care about small things.™*
*Matz – Keynote at Red Dot Ruby Conf 2016, Singapore.
Slide 51
Slide 51 text
Rubex
Slide 52
Slide 52 text
Rubex is a Crystalinspired superset of
Ruby that compiles to C.
Slide 53
Slide 53 text
class Fact
def factorial(unsigned long long int n)
n > 1 ? n*factorial(n-1) : 1
end
end
Slide 54
Slide 54 text
# Create a C static array and return a Ruby Array
def adder(n)
a = StaticArray(i32, n)
i32 i = 0
i32 sum = 0
a.each(n) { a[i] = i*5 }
for 0 <= i < n do
sum += a[i]
end
sum
end
Slide 55
Slide 55 text
Received the
Ruby Association Grant 2016
for development of Rubex
Slide 56
Slide 56 text
https://github.com/v0dro/rubex
Slide 57
Slide 57 text
Scientific Computing on
JRuby
Slide 58
Slide 58 text
NMatrix and NArray are a linear
algebra libraries for Ruby similar to
numpy.
Slide 59
Slide 59 text
NMatrix
C/C++ core
CRuby
interpreter
Numo::NArray
C core
CRuby
interpreter
Slide 60
Slide 60 text
JRuby backend for the NMatrix
Ruby API –
Sci. Computing on JVM.
Slide 61
Slide 61 text
Allows interfacing JRuby libraries
with jBLAS for performance.
Uses Apache Commons Math
library for storage and operations on
internal Java arrays.