2015-07-18 12:06:42 +02:00
|
|
|
[![Build Status](https://travis-ci.org/salama/salama.svg?branch=master)](https://travis-ci.org/salama/salama)
|
|
|
|
[![Gem Version](https://badge.fury.io/rb/salama.svg)](http://badge.fury.io/rb/salama)
|
|
|
|
[![Code Climate](https://codeclimate.com/github/salama/salama/badges/gpa.svg)](https://codeclimate.com/github/salama/salama)
|
|
|
|
[![Test Coverage](https://codeclimate.com/github/salama/salama/badges/coverage.svg)](https://codeclimate.com/github/salama/salama)
|
2014-05-30 13:49:34 +02:00
|
|
|
|
2015-07-18 12:06:42 +02:00
|
|
|
# Salama
|
2014-04-14 14:51:44 +02:00
|
|
|
|
2015-03-15 12:58:17 +01:00
|
|
|
Salama is about native code generation in and of ruby.
|
2014-04-14 15:46:17 +02:00
|
|
|
|
2015-05-17 19:07:52 +02:00
|
|
|
It is probably best to read the [The Book](http://dancinglightning.gitbooks.io/the-object-machine/content/) first.
|
2015-03-15 12:58:17 +01:00
|
|
|
|
2015-10-23 13:22:55 +02:00
|
|
|
The current third rewrite adds a system language, with the idea of compiling ruby to that language, Soml.
|
|
|
|
The original ruby parser has been remodeled to parse Soml and later we will use whitequarks
|
|
|
|
parser to parse ruby. Then it will be ruby --> Soml --> assembler --> binary .
|
2015-03-15 12:58:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Done
|
|
|
|
|
2015-11-30 19:25:17 +01:00
|
|
|
Some things that are finished, look below for current status / work
|
|
|
|
|
|
|
|
### Soml
|
|
|
|
|
|
|
|
A working of the [system language](http://salama-vm.org/soml/soml.html) is done. It is
|
|
|
|
strongly typed, but leans more towards ruby style syntax.
|
|
|
|
|
|
|
|
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](http://salama-vm.org/soml/parfait.html)
|
2015-10-07 10:32:48 +02:00
|
|
|
|
|
|
|
### Interpreter
|
|
|
|
|
|
|
|
After doing some debugging on the generated binaries i opted to write an interpreter for the
|
|
|
|
register layer. That way test runs on the interpreter reveal most issues.
|
|
|
|
|
|
|
|
### Debugger
|
|
|
|
|
|
|
|
And after the interpreter was done, i wrote a [visual debugger](https://github.com/salama/salama-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.
|
2015-05-17 19:07:52 +02:00
|
|
|
|
2015-10-07 10:32:48 +02:00
|
|
|
## Status
|
2015-05-17 19:07:52 +02:00
|
|
|
|
2015-11-30 19:25:17 +01:00
|
|
|
Having finished Soml, it's time to compile ruby to it.
|
2014-04-16 11:45:36 +02:00
|
|
|
|
2015-11-30 19:25:17 +01:00
|
|
|
This will mean more work on the type front.
|
2014-04-16 11:45:36 +02:00
|
|
|
|
2014-05-27 18:19:55 +02:00
|
|
|
|
2015-03-15 12:58:17 +01:00
|
|
|
### Stary sky
|
2014-05-30 13:49:34 +02:00
|
|
|
|
2015-03-15 12:58:17 +01:00
|
|
|
Iterate:
|
2014-05-30 13:49:34 +02:00
|
|
|
|
|
|
|
1. more cpus (ie intel)
|
|
|
|
2. more systems (ie mac)
|
|
|
|
3. more syscalls, there are after all some hundreds
|
|
|
|
5. A lot of modern cpu's functionality has to be mapped to ruby and implemented in assembler to be useful
|
|
|
|
6. Different sized machines, with different register types ?
|
|
|
|
7. on 64bit, there would be 8 bits for types and thus allow for rational, complex, and whatnot
|
|
|
|
8. Housekeeping (the superset of gc) is abundant
|
2014-09-19 18:39:08 +02:00
|
|
|
9. Any amount of time could be spent on a decent digital tree (see judy). Or possibly Dr.Cliffs hash.
|
|
|
|
10. Also better string/arrays would be good.
|
|
|
|
11. The minor point of threads and hopefully lock free primitives to deal with that.
|
2015-05-17 19:07:52 +02:00
|
|
|
12. Other languages, python at least, maybe others
|
|
|
|
13. translation of the vm instructions to another vm, say js
|
2014-05-30 13:49:34 +02:00
|
|
|
|
|
|
|
And generally optimize and work towards that perfect world (we never seem to be able to attain).
|
|
|
|
|
2014-04-16 11:45:36 +02:00
|
|
|
|
2014-04-14 15:46:17 +02:00
|
|
|
|
2014-07-29 17:33:11 +02:00
|
|
|
Contributing to salama
|
2014-04-14 15:46:17 +02:00
|
|
|
-----------------------
|
2015-05-17 19:07:52 +02:00
|
|
|
|
2014-04-27 21:19:32 +02:00
|
|
|
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.
|
2014-04-14 15:46:17 +02:00
|
|
|
|
|
|
|
== Copyright
|
|
|
|
|
2015-11-30 19:25:17 +01:00
|
|
|
Copyright (c) 2014/5 Torsten Ruger.
|
|
|
|
See LICENSE.txt for further details.
|