It might be less complicated to use tokens or hashes
instead of memory addresses in high-level Forth code.
All dictionaries, data or VM code sequences could then
be localised exclusively via a central token table or
hash table. Replacing/modifying a word would be very
simple by patching the token/hash table.
IIRC in HolonForth it was also possible to access and
modify code and even sources on the fly, and were
immediately active after commitment. I don't know how
Wolf Weijgaard implementd that,
perhaps he was once inspired by Smalltalk.
On Tue, 27 May 2025 20:23:02 +0000, minforth wrote:
It might be less complicated to use tokens or hashes
instead of memory addresses in high-level Forth code.
All dictionaries, data or VM code sequences could then
be localised exclusively via a central token table or
hash table. Replacing/modifying a word would be very
simple by patching the token/hash table.
Not when a word is vectored and/or using ` ' woord , ` and the like.
Of course you know better. In my fantasy, xt's have no
relation to physical addresses, only to table slots.
--
Lispification of Forth means that all parts of Forth are dynamically allocated. This means that all parts can be changed independantly,
headers, names high and low level code, without affecting the whole.
Once this is accomplished you want to expand the header with a source field. This contains a heavily commented source of this word.
Now you can edit the source, and compile it to replace the code,
lispy and risky.
Of course you cannot lengthen any data item without dynamic
allocation.
This leans heavily on the circular allocation
wordlist facility. Any free space can be configured as a heap.
Also this wordset has SIZE, such that a single address determines
a string.
You need sufficient heap space, reserve a 1 Gbyte file for this.
(However you could easily expand it later.)
Use memmap() to map this in a fixed location in Forth, not
conflicting with the memory map. Now this space can be
configured for a heap. For each step you must close
and consolidate those heap file. Then you can continue
where you left off, for next steps.
albert@spenarnc.xs4all.nl wrote:<SNIP>
Lispification of Forth means that all parts of Forth are dynamically
allocated. This means that all parts can be changed independantly,
headers, names high and low level code, without affecting the whole.
Once this is accomplished you want to expand the header with a source field. >> This contains a heavily commented source of this word.
Now you can edit the source, and compile it to replace the code,
lispy and risky.
Of course you cannot lengthen any data item without dynamic
allocation.
This leans heavily on the circular allocation
wordlist facility. Any free space can be configured as a heap.
Also this wordset has SIZE, such that a single address determines
a string.
You need sufficient heap space, reserve a 1 Gbyte file for this.
(However you could easily expand it later.)
Use memmap() to map this in a fixed location in Forth, not
conflicting with the memory map. Now this space can be
configured for a heap. For each step you must close
and consolidate those heap file. Then you can continue
where you left off, for next steps.
You have rather specific idea here. Note however, that for
To summarize: if you really want Lisp features, you are likely
to get rater different system than Forth.
BTW: I am not sure what 1 GB is supposed to mean? Do you need
that much to rebuild ciforth with your changes? FYI, the system
I outlined above is extremaly bloated by Forth standards, but
runs happily in few MB. Recompilation needs more memory, but
currently main "memory eater" is C compilation of few support
files.
--
Waldek Hebisch
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 504 |
Nodes: | 16 (2 / 14) |
Uptime: | 244:40:13 |
Calls: | 9,891 |
Files: | 13,794 |
Messages: | 6,294,410 |