Fn Ruby(Rust) -> Rusby?


#1

So I came across Redox (http://www.redox-os.org/) a project to write a [U|Li]nux like OS in Rust.

Then today, in Linux Pro Magazine (April 2016), I read about Crystal (http://crystal-lang.org/) a project to write a compiled/typed Ruby-like language.

Since I’m a Rubyist, first there was the original MRI (CRuby), and JRuby (Java), and Rubinius, etc.

It would seem natural, since Ruby was first written in C (not C++), and Rust aims to be a better C, eventually we’ll get Rusby (Ruby in Rust).

I give up all rights to the name. :grin:


#2

Unfortunately Ruby’s implementations are not so well tested and RubySpec is dead. So I’m not completely sure how this would help the Ruby community without adding more fragmentation.


#3

You may not be familiar with the Ruby ecosystem, but its not really fragmented.

It’s founder Matz (Yukihiro Matsumoto) originally wrote it in C, but other projects (like JRuby, Rubinius, etc) still defer to Matz’s design, though they may not have all its functionality. However, most people in the community don’t see this as fragmentation in a negative sense, but variations on a theme.

So Crystal seems to want to be Ruby-like in look, feel, and use, but provide users a closer relationship to the hardware.

Elixir (http://elixir-lang.org/), created by a former Ruby on Rails (RoR) developer, wants to leverage Erlang’s Functional Programming (FP) and concurrency features into a Ruby-like feel and use.

Since MRI (Matz’s Reference Interpreter) Ruby is written in C, and Rust is supposed to be a better C (system development language) there should be no theoretical reasons it couldn’t be used to write Ruby in (assuming when Rust becomes stable).

Of course, just writing a 1-to-1 replacement of C with Rust wouldn’t be that interesting (to users).
However, Rust could bring to the game a better/secure way to do realistic parallelism, faster executions, and maybe lesson the need for (or speedup) garbage collection (GC).

As a Ruby user, and a Rubgem creator (https://rubygems.org/gems/primes-utils) I would love an easy way to get to bare hardware within standard Ruby to get parallelism, et al, without having to use (and rely on) JRuby to get some of those features.

Ruby is currently at 2.3, but 3.0 is currently in early, early development. Matz is trying to figure out how to (and to what extent) remove its GIL (https://en.wikipedia.org/wiki/Global_interpreter_lock ) to allow general concurrency/parallelism within the core language. I can’t help but think that Rust would be able to allow this to be done better than C.

So anyway, I just threw out the idea for fun, but maybe someone with play with doing it.


#4

Trust me, I know about the ecosystem. I know what you mean by the fact that these projects don’t contribute to fragmentation in a negative way. And I know that they mostly don’t. Ruby has a pretty friendly community with a lot of passionate people working on it.

It’s just that I wish that Ruby wasn’t losing popularity which it seems to be, and I see no other reason apart from the fact that people prefer the more integrated Python ecosystem.

Since you mentioned it, I’ve been working on an mruby binding for Rust.


#5

I think the single biggest frustration with the current Ruby design is the ubiquity of the GIL. One of the main marketing points of JRuby, Rubinius, and Elixir is they provide native mechanism for true concurrency and parallelism. This is a high priority Matz is working on in 3.0.

The beauty of Ruby is it’s just fun to use to get work done in. That’s why Python is becoming more Ruby-like, by adding OOP (object oriented programming) features, and things like Django (as its alternative to Rails).

But Python has so much more money, people, and resources (books, videos) behind it than Ruby currently has. And Ruby has more conceptual competition now than just 10 years ago. But I think once it solves it GIL issues, and achieves the 3x performance for 3.0 Matz has a goal, it will retain more users and mindshare again.


#6

I don’t consider Ruby’s GIL or lack of performance an issue. I honestly love Ruby the way it is now. I think you can do awesome things with Ruby, like game engine scripting which I’m trying to achieve here. :smiley:


#7

@jzakiya did you ever look into https://usehelix.com/?