eo
eo copied to clipboard
object "ram" and refactoring of "heap"
Let's introduce a new object ram
, which will have just two sub-atoms:
[size] > ram
[p b] > write /bool
[p] > read /bytes
It should be possible to create a block of random-access byte array and then write a few bytes there and read them back:
ram 1024 > m
m.write 100 ("hello".as-bytes)
(m.read 100).eq ("hello".as-bytes)
And then refactor the object heap
so that it doesn't have any atoms, but only encapsulate this new ram
.
@andreoss what do you think about this?
@yegor256 Please, assing
@yegor256 Should there be one more parameter indication the length for read?
[size] > ram
[p b] > write /bool
[p l] > read /bytes
@andreoss yes, you are right
@yegor256 @andreoss I believe we can close it. The next step is to solve #684
@Graur ok, closing