RubyX compiles ruby to binary (in ruby), hoping to be that X times faster
Go to file
2018-03-19 21:19:46 +05:30
lib bit of code docs 2018-03-19 21:19:46 +05:30
stash cleaning out stash 2018-03-19 16:25:27 +05:30
test move assignment test into own dir 2018-03-19 16:28:53 +05:30
.codeclimate.yml disable duplication engine 2017-04-08 19:31:48 +03:00
.gitignore small c programs to bench against 2015-11-20 19:12:13 +02:00
.reek tell reek to ignore ruby_compiler 2017-08-30 23:04:22 +03:00
.rubocop.yml remove test and stash from codeclimate and add vanilla rubocop 2016-12-17 13:25:20 +02:00
.ruby-version do not use 2.4 with its integer problems 2017-10-05 16:40:51 +03:00
.travis.yml more remote debugging 2017-04-14 14:38:23 +03:00
CNAME starting to rename to rubyx 2017-01-02 00:29:20 +02:00
CodeStyle.md rename register to risc 2017-01-19 09:02:29 +02:00
FEATURES.md moved to consitent md ending 2014-08-28 18:52:55 +03:00
Gemfile using sof again, now rxf 2017-10-05 16:41:45 +03:00
Gemfile.lock using sof again, now rxf 2017-10-05 16:41:45 +03:00
Guardfile fix guard file to pick up send tests correctly 2017-09-10 22:54:36 +03:00
LICENSE.txt jeweler generates its things 2014-04-14 15:58:59 +03:00
Rakefile remove traces of salama 2017-08-29 18:38:51 +03:00
README.md remove traces of salama 2017-08-29 18:38:51 +03:00
rubyx.gemspec using sof again, now rxf 2017-10-05 16:41:45 +03:00
ToDo.md starting to rename to rubyx 2017-01-02 00:29:20 +02:00

Build Status Code Climate Test Coverage

RubyX

RubyX is about native code generation in and of ruby.

X can be read as 10 times faster, or a decade away, depending on mindset.

The current (fourth) rewrite adds a typed intermediate representation layer (bit like c, but not as a language). The idea is to compile ruby to that typed representation.

We use whitequarks parser to parse ruby.

Processing is roughly: Ruby --> Vm --> Risc --> Arm --> binary .

Done

Some things that are finished, look below for current status / work

Typed representation

The fully typed syntax representation and compiler to the Risc level is done. It is remodeled after last years system language, which proved the concept and surprised with speed.

Completely object oriented, including calling convention. Not much slower than c.

A runtime: Parfait

In a dynamic system the distinction between compile-time and run-time is blurs. But a minimum of support is needed to get the system up, and that is Parfait

Interpreter

After doing some debugging on the generated binaries i opted to write an interpreter for the risc layer. That way test runs on the interpreter reveal most issues.

Debugger

And after the interpreter was done, i wrote a visual debugger. It is a simple opal application that nevertheless has proven great help both in figuring out what is going on, and in finding bugs.

Status

Most work on the statically typed layer should be done (and produces working binaries!).

Next up: compiling ruby and typing it :-)

Stary sky

Iterate:

  1. more cpus (ie intel)
  2. more systems (ie mac)
  3. more syscalls, there are after all some hundreds
  4. A lot of modern cpu's functionality has to be mapped to ruby and implemented in assembler to be useful
  5. Different sized machines, with different register types ?
  6. on 64bit, there would be 8 bits for types and thus allow for rational, complex, and whatnot
  7. Housekeeping (the superset of gc) is abundant
  8. Any amount of time could be spent on a decent digital tree (see judy). Or possibly Dr.Cliffs hash.
  9. Also better string/arrays would be good.
  10. The minor point of threads and hopefully lock free primitives to deal with that.
  11. Other languages, python at least, maybe others
  12. translation of the vm instructions to another vm, say js

And generally optimize and work towards that perfect world (we never seem to be able to attain).

Contributing to rubyx

Probably best to talk to me, if it's not a typo or so.

I do have a todo, for the adventurous.

Fork and create a branch before sending pulls.

== Copyright

Copyright (c) 2014/5 Torsten Ruger. See LICENSE.txt for further details.