correct parfait module

parfait only needs to be in a module when it is used in the vm, not
when it is parsed.
The parsed parfait must be without namespace.
This commit is contained in:
Torsten Ruger 2015-03-25 17:16:20 +02:00
parent 451b1c409c
commit d758a23eb6
2 changed files with 7 additions and 17 deletions

View File

@ -1,25 +1,16 @@
### Parfait: a thin layer ### Parfait: a thin layer
(not everbody likes onion) Parfait is the run-time of the vm.
To be more precise, it is that part of the run-time that can be expressed in ruby.
Here we have a placeholder for things i am currently developing. The run-time needs to contain quite a lot of functionality for a dynamic system.
And a large part of that functionality must actually be used at compile time too.
Basically Parfait is the smallest amount of code needed to make a ruby-like OO system work. We reuse the Parfait code at compile-time, by inlining it.
A work in progress that started from here : http://salama.github.io/2014/06/10/more-clarity.html went on here A work in progress that started from here : http://salama.github.io/2014/06/10/more-clarity.html went on here
http://salama.github.io/2014/07/05/layers-vs-passes.html http://salama.github.io/2014/07/05/layers-vs-passes.html
And i finally came to the conclusion that Parfait is the ruby runtime. Aha
Run - time
not
compile - time
always mixing those up: As such it is not loaded at compile time. On the other hand, we need to create data
at compile time that matches the expectation of the code we create..
A step back: the code (program) we compile runs at run - time. A step back: the code (program) we compile runs at run - time.
And so does parfait. So all we have to do is compile it with the program. And so does parfait. So all we have to do is compile it with the program.

View File

@ -1,7 +1,6 @@
# almost simplest hash imaginable. make good use of arrays # almost simplest hash imaginable. make good use of arrays
module Parfait
end class Hash
class Parfait::Hash
def initialize def initialize
@keys = Array.new() @keys = Array.new()
@values = Array.new() @values = Array.new()