Hello,
So I was thinking about how we spend so much time writing C or Java extensions for our gems, and it seems that a viable way forward would be develop a Cython-like statically typed sub-language for Ruby that can be easily called from a Ruby script (the way Cython works with Python).
Yehuda Katz (Rails and Ember.js fame) has recently released the
Helix gem, which allows for very simple interaction between Ruby and Rust. If you have a look at the tutorial you'll notice that getting a Rust<-> Ruby bridge setup has now become an almost brainless activity.
I'm wondering if we can make some thing like these tools for work in SciRuby. It can have the following features:
- Should look and feel like Ruby.
- Should be able to compile to either C or Java depending on the interpreter it is being compiled for (maybe support just C initially).
- Will let one work trasparently work with the MRI/JRuby C/Java API (MRI API changes should not reflect in the language). This is especially important after the build failures caused on NMatrix after the Ruby 2.3.0 upgrade. That we can just modify the language and gems need not bother about the actual implementation.
- Be very easy to call that code from a Ruby script (like Helix lets one call Rust code).
Your ideas and leads will be much appreciated!