fix typos

This commit is contained in:
Torsten Ruger 2018-03-20 15:52:16 +05:30
parent 5504eb4714
commit 6d0d9b39e1
4 changed files with 17 additions and 32 deletions

View File

@ -1,7 +1,6 @@
# Code Style and Conventions # Code Style and Conventions
Just few things that have become important enough to write down. Apart from what is written here Just few things that have become important enough to write down. Apart from what is written here standard blah applies (ie RoboCop/Reek stuff).
standard blah applies (ie RoboCop/Reek stuff).
## Formatting ## Formatting
@ -11,14 +10,10 @@ While the days of 80 are over, too big steps seems difficult. I've settled on 10
### Brackets ### Brackets
While ruby allows the ommision of brackets even with arguments, i try to avoid that because While ruby allows the omission of brackets even with arguments, i try to avoid that because
of readablity. There may be an exception for an assignment, a single call with a single arg. of readability. There may be an exception for an assignment, a single call with a single arg.
Brackets without arguments look funny though. Brackets without arguments look funny though.
### Hash
I still prefer 1.9 => style , it makes the association more obvious.
## Code style ## Code style
### Module functions are global ### Module functions are global

View File

@ -1,10 +0,0 @@
Features
--------
After having written a todo i thought it may be good to collect thoughts on where this is going.
(No real order here, just what pops when it pops)
- Multi cpu / architecture from the same parse. Ie by instantiation not module inclusion or things that can't
be undone during the execution time of ruby
- A minimal binary should be very very small (for Arduino). The program being created should determine features that are being "pulled in". Ie if it's not ruby we want to create, the parser should be left out etc. Libc only for programs that have an os to run on, dynamic memory dito.

View File

@ -1,4 +1,4 @@
Copyright (c) 2014 Torsten Ruger Copyright (c) 2014-8 Torsten Ruger
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

View File

@ -47,16 +47,16 @@ Mainly Mom is an easy to understand step on the way down. A mix of oo and machin
practise it means that the amount of instructions that need to be generated in vool practise it means that the amount of instructions that need to be generated in vool
is much smaller (easier to understand) and the mapping down to risc is quite straightforward. is much smaller (easier to understand) and the mapping down to risc is quite straightforward.
### RISC ### Risc
The risc cpu architecture approach was a simplification of the cpu instruction set to a The risc cpu architecture approach was a simplification of the cpu instruction set to a
minimum. Arm, our main target is a risc architecture, and the next level down. minimum. Arm, our main target is a risc architecture, and the next level down.
The Risc layer here abstract the Arm in a minimal and independent way. It does not model The Risc layer here abstracts the Arm in a minimal and independent way. It does not model
any real RISC cpu instruction set, but rather implements what is needed to for rubyx. any real RISC cpu instruction set, but rather implements what is needed for rubyx.
Instructions are derived from a base class, so the instruction set is extensible. This Instructions are derived from a base class, so the instruction set is extensible. This
way aditional functionality may be added by external code. way additional functionality may be added by external code.
Risc knows memory and has a small set of registers. It allows memory to register transfer Risc knows memory and has a small set of registers. It allows memory to register transfer
and back and inter register transfer. But has no memory to memory transfer like Mom. and back and inter register transfer. But has no memory to memory transfer like Mom.
@ -98,8 +98,8 @@ for this new Type.
In essence the Class always **has a** current Type and **many** Types implement (different In essence the Class always **has a** current Type and **many** Types implement (different
versions of) a Class. versions of) a Class.
All Objects have a Type (as their first member). The Type points to the Class that the All Objects have a Type, as their first member (also integers!). The Type points to the
object has in oo terms. Class that the object has in oo terms.
Classes are defined by ruby code, but the methods of a Type (that are executed) are defined Classes are defined by ruby code, but the methods of a Type (that are executed) are defined
by Mom and Risc only. by Mom and Risc only.
@ -109,13 +109,13 @@ by Mom and Risc only.
### Interpreter ### Interpreter
After doing some debugging on the generated binaries i opted to write an interpreter for the 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. risc layer. That way tests run on the interpreter reveal most issues.
### Debugger ### Debugger
And after the interpreter was done, i wrote a [visual debugger](https://github.com/ruby-x/rubyx-debugger). And after the interpreter was done, i wrote a [visual debugger](https://github.com/ruby-x/rubyx-debugger).
It is a simple opal application that nevertheless has proven great help both in figuring out It is a simple opal application that nevertheless has proven a great help, both in figuring
what is going on, and in finding bugs. out what is going on, and in finding bugs.
## Status ## Status
@ -138,12 +138,11 @@ Iterate:
12. Other languages, python at least, maybe others 12. Other languages, python at least, maybe others
13. translation of the vm instructions to another vm, say js 13. 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). And generally optimise and work towards that perfect world (we never seem to be able to attain).
Contributing to rubyx ## Contributing to rubyx
-----------------------
Probably best to talk to me, if it's not a typo or so. Probably best to talk to me, if it's not a typo or so.
@ -153,5 +152,6 @@ Fork and create a branch before sending pulls.
== Copyright == Copyright
Copyright (c) 2014/5 Torsten Ruger. Copyright (c) 2014-8 Torsten Ruger.
See LICENSE.txt for further details. See LICENSE.txt for further details.