change of name
This commit is contained in:
@ -31,7 +31,7 @@ ruby core/std-lib
|
||||
|
||||
Off course the ruby-core and std libs were designed to do for ruby what libc does for c. Unfortunately they are badly designed and suffer from above brainwash (designed around c calls)
|
||||
|
||||
Since kide is pure ruby there is a fair amount of functionality that would be nicer to provide straight in ruby. As gems off course, for everybody to see and fix.
|
||||
Since salama is pure ruby there is a fair amount of functionality that would be nicer to provide straight in ruby. As gems off course, for everybody to see and fix.
|
||||
For example, even if there were to be a printf (which i dislike) , it would be easy to code in ruby.
|
||||
|
||||
What is needed is the underlying write to stdout.
|
||||
@ -39,7 +39,7 @@ What is needed is the underlying write to stdout.
|
||||
Solution
|
||||
--------
|
||||
|
||||
To get kide up and running, ie to have a "ruby" executable, there are really very few kernel calls needed. File open, read and stdout write, brk.
|
||||
To get salama up and running, ie to have a "ruby" executable, there are really very few kernel calls needed. File open, read and stdout write, brk.
|
||||
|
||||
So the way this will go is to write syscalls where needed.
|
||||
|
||||
|
@ -25,5 +25,5 @@ assmbler i found a fibonachi in 10 or so instructions.
|
||||
To summarise, function definition and calling (including recursion) works.
|
||||
If and and while structures work and also some operators and now it's easy to add more.
|
||||
|
||||
So we have a Fibonacchi in ruby using a while implementation that can be executed by kide and outputs the
|
||||
So we have a Fibonacchi in ruby using a while implementation that can be executed by salama and outputs the
|
||||
correct result. After a total of 7 weeks this is much more than expected!
|
||||
|
@ -24,7 +24,7 @@ And what are these funtions? get_instance_variable or set too. Same for function
|
||||
|
||||
This functionality, ie getting the n'th data in an object, is essential, but c makes such a good point of of it having no place in a public api. So it needs to be implemented in a "private" part and used in a save manner. More on the layers emerging below.
|
||||
|
||||
The Kernel is a module in kide that defines functions which return function objects. So the code is generated, instead of parsed. An essential destinction.
|
||||
The Kernel is a module in salama that defines functions which return function objects. So the code is generated, instead of parsed. An essential destinction.
|
||||
|
||||
#### System
|
||||
|
||||
@ -50,7 +50,7 @@ Some few machine functions return Blocks, or append their instructions to blocks
|
||||
|
||||
The Kernel functions return function objects. Kernel functions have the same name as the function they implement, so Kernel::putstring defines a function called putstring. Function objects (Vm::Function) carry entry/exit/body code, receiver/return/argurmt types and a little more.
|
||||
|
||||
The important thing is that these functions are callable from ruby code. Thus they form the glue from the next layer up, which is coded in ruby, to the machine layer. In a way the Kernel "exports" the machine functionality to kide.
|
||||
The important thing is that these functions are callable from ruby code. Thus they form the glue from the next layer up, which is coded in ruby, to the machine layer. In a way the Kernel "exports" the machine functionality to salama.
|
||||
|
||||
##### Parfait
|
||||
|
||||
@ -60,22 +60,22 @@ Parfait is heavy on Object/Class/Metaclass functionality, object instance and me
|
||||
|
||||
Stdlib would be the next layer up, implementing the whole of ruby functionality in terms of what Parfait provides.
|
||||
|
||||
The important thing here is that Parfait is written completely in ruby. Meaning it get's parsed by kide like any other code, and then transformed into executable form and written.
|
||||
The important thing here is that Parfait is written completely in ruby. Meaning it get's parsed by salama like any other code, and then transformed into executable form and written.
|
||||
|
||||
Any executable that kide generates will have Parfait in it. But only the final version of kide as a ruby vm, will have the whole stdlib and parser along.
|
||||
Any executable that salama generates will have Parfait in it. But only the final version of salama as a ruby vm, will have the whole stdlib and parser along.
|
||||
|
||||
#### Kide
|
||||
#### Salama
|
||||
|
||||
Kide uses the Kernel and Machine layers straight when creating code. Off course.
|
||||
The closest equivalent to kide would be a compiler and so it is it's job to create code (machine layer objects).
|
||||
Salama uses the Kernel and Machine layers straight when creating code. Off course.
|
||||
The closest equivalent to salama would be a compiler and so it is it's job to create code (machine layer objects).
|
||||
|
||||
But it is my intention to keep that as small as possible. And the good news is it's all ruby :-)
|
||||
|
||||
##### Extensions
|
||||
|
||||
I just want to mention the idea of extensions that is a logical step for a minimal system. Off course they would be gems, but the integesting thing is they (like kide) could:
|
||||
I just want to mention the idea of extensions that is a logical step for a minimal system. Off course they would be gems, but the integesting thing is they (like salama) could:
|
||||
|
||||
- use kides existing kernel/machine abstraction to define new functionality that is not possible in ruby
|
||||
- use salamas existing kernel/machine abstraction to define new functionality that is not possible in ruby
|
||||
- define new machine functionality, adding kernel type api's, to create wholly new, possibly hardware specific functionality
|
||||
|
||||
I am thinking graphic accellaration, GPU usage, vector api's, that kind of thing. In fact i aim to implement the whole floating point functionality as an extensions (as it clearly not essential for OO).
|
||||
|
Reference in New Issue
Block a user