minor
This commit is contained in:
parent
0a7770b02a
commit
eb8099db31
@ -57,7 +57,7 @@ Quite a while before crystallizing into the idea of a new language, i already sa
|
||||
system. Off course, and this dates back to the first memory layouts. But i mean the need for a
|
||||
*strong typing* system, or maybe it's even clearer to call it compile time typing. The type that c
|
||||
and c++ have. It is essential (mentally, this is off course all for the programmer, not the computer)
|
||||
to be able to thing in a static type system, and then extend that and make it dynamic.
|
||||
to be able to think in a static type system, and then extend that and make it dynamic.
|
||||
Or possibly use it in a dynamic way.
|
||||
|
||||
This is a good example of this too big gap, where one just steps on quicksand if everything is
|
||||
|
4
arm.md
4
arm.md
@ -28,8 +28,10 @@ with code to generate code for constants.
|
||||
|
||||
And off course there is the overwhelming arm infocenter, [here with it's bizarre division](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CEGECDGD.html)
|
||||
|
||||
The full 750 page specification for the pi , the [ARM1176JZF-S is here](/arm/big_spec.pdf)
|
||||
The full 750 page specification for the pi , the [ARM1176JZF-S pdf is here](/arm/big_spec.pdf) or
|
||||
[online](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/BABFADHJ.html)
|
||||
|
||||
A nice list of [Kernel calls](http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html)
|
||||
## Virtual pi
|
||||
|
||||
And since not everyone has access to an arm, here is a description how to set up an [emulated pi](/arm/qemu.html)
|
||||
|
@ -15,7 +15,7 @@ Integers are not Objects like "normal" objects. They are Values, on par with Obj
|
||||
- constant for whole lifetime
|
||||
- pass by value semantics
|
||||
|
||||
If integers were normal objects, the first would mean they would be sindletons. The second means you can't change them, you can only change a variable to hold a different value. It also means you can't add instance variables to an integer, neither singleton_methods. And the third means that if you do change the variable, a passed value will not be changed. Also they are not garbage collected. If you noticed how weird that idea is (the gc), you can see how natural is that Value idea.
|
||||
If integers were normal objects, the first would mean they would be singletons. The second means you can't change them, you can only change a variable to hold a different value. It also means you can't add instance variables to an integer, neither singleton_methods. And the third means that if you do change the variable, a passed value will not be changed. Also they are not garbage collected. If you noticed how weird that idea is (the gc), you can see how natural is that Value idea.
|
||||
|
||||
Instead of trying to make this difference go away (like MRI) I think it should be explicit and indeed be expanded to all Objects that have these properties. Words for examples (ruby calls them Symbols), are the same. A Table is a Table, and Toble is not. Floats (all numbers) and Times are the same.
|
||||
|
||||
@ -35,8 +35,8 @@ That leaves the length open and we can use the 8th 4bits to store it. That gives
|
||||
|
||||
#### Continuations
|
||||
|
||||
But (i hear), ruby is dynamic, we must be able to add variables and methods to an object at any time. So the layout can't
|
||||
be fixed. Ok, we can change the Layout every time, but when any empty slots have been used up, what then.
|
||||
But (i hear), ruby is dynamic, we must be able to add variables and methods to an object at any time. So the layout can't
|
||||
be fixed. Ok, we can change the Layout every time, but when any empty slots have been used up, what then.
|
||||
|
||||
Then we use Continuations, so instead of adding a new variable to the end of the object, we use a new object and store it
|
||||
in the original object. Thus extending the object.
|
||||
@ -44,14 +44,14 @@ in the original object. Thus extending the object.
|
||||
Continuations are pretty normal objects and it is just up to the layout to manage the redirection.
|
||||
Off course this may splatter objects a little, but in running application this does not really happen much. Most instance variables are added quite soon after startup, just as functions are usually parsed in the beginning.
|
||||
|
||||
The good side of continuation is also that we can be quite tight on initial allocation, and even minimal with continuations. Continuations can be completely changed out after all.
|
||||
The good side of continuation is also that we can be quite tight on initial allocation, and even minimal with continuations. Continuations can be completely changed out after all.
|
||||
|
||||
### Pages and Spaces
|
||||
|
||||
Now we have the smallest units taken care of, we need to store them and allocate and manage larger chunks. This is much
|
||||
Now we have the smallest units taken care of, we need to store them and allocate and manage larger chunks. This is much
|
||||
simpler and we can use a fixed size Page, as say 256 lines.
|
||||
|
||||
The highest order is a Space, which is just a list of Pages. Spaces manage Pages in a very simliar way that Pages manage Objects, ie ie as liked lists of free Objects/Pages.
|
||||
The highest order is a Space, which is just a list of Pages. Spaces manage Pages in a very simliar way that Pages manage Objects, ie ie as liked lists of free Objects/Pages.
|
||||
|
||||
A Page, like a Space, is off course a normal object. The actual memory materialises out of nowhere, but then gets
|
||||
A Page, like a Space, is off course a normal object. The actual memory materialises out of nowhere, but then gets
|
||||
filled immediately with objects. So no empty memory is managed, just objects that can be repurposed.
|
||||
|
Loading…
Reference in New Issue
Block a user