Replies: 4 comments
-
On Wed, Jul 24, 2024 at 12:05 PM mcctuxic ***@***.***> wrote:
Hi,
on the internet I read more than once, that one advantage of FORTH systems
is the ability to be adapted/corrected while running. I remember a story I
read somewhere, that NASA "telnetted" into a satellite to correct a part of
its FORTH system while running.
On the other hand I also read, that words, which are already defined
always take the "old" (unadapted or faulty) version of the
word and only words defined when the new version of that word is already
in the dictionary benefit from the correction/adaptation.
Has NASA told us an urban legend? Was the red pill the blue one in
reality? How can both be true?
Cheers!
Tuxic
This can be achieved through forgetting old code, whether with the old word
FORGET (zeptoforth only supports it for the RAM dictionary for reasons),
and the newer works MARKER and CORNERSTONE (which create words that, when
executed, trigger erasing the dictionary after, and for MARKER, including
them). Also, hooks can be used which can be reset to point to new code. So
what one could do is have dummy words that do nothing already created,
reset the hooks to point to the dummy words, forget the old code (if the
space is needed), compile new code, and then reset the hooks to point to
the new code.
Travis
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On 07/24 01:37, tabemann wrote:
On Wed, Jul 24, 2024 at 12:05 PM mcctuxic ***@***.***> wrote:
> Hi,
>
> on the internet I read more than once, that one advantage of FORTH systems
> is the ability to be adapted/corrected while running. I remember a story I
> read somewhere, that NASA "telnetted" into a satellite to correct a part of
> its FORTH system while running.
>
> On the other hand I also read, that words, which are already defined
> always take the "old" (unadapted or faulty) version of the
> word and only words defined when the new version of that word is already
> in the dictionary benefit from the correction/adaptation.
>
> Has NASA told us an urban legend? Was the red pill the blue one in
> reality? How can both be true?
>
> Cheers!
> Tuxic
>
This can be achieved through forgetting old code, whether with the old word
FORGET (zeptoforth only supports it for the RAM dictionary for reasons),
and the newer works MARKER and CORNERSTONE (which create words that, when
executed, trigger erasing the dictionary after, and for MARKER, including
them). Also, hooks can be used which can be reset to point to new code. So
what one could do is have dummy words that do nothing already created,
reset the hooks to point to the dummy words, forget the old code (if the
space is needed), compile new code, and then reset the hooks to point to
the new code.
Travis
Thank you for the explanation! :)
ok...patching a running forth system is forgetting the wrong
stuff and replacing it with fixed stuff or just going a different path... :)
I always thought, the patch would only effect the buggy word and was
wondering, how that could be done
…
--
Reply to this email directly or view it on GitHub:
#119 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On Thu, Jul 25, 2024 at 10:03 PM mcctuxic ***@***.***> wrote:
Thank you for the explanation! :)
ok...patching a running forth system is forgetting the wrong
stuff and replacing it with fixed stuff or just going a different path...
:)
I always thought, the patch would only effect the buggy word and was
wondering, how that could be done
Nah, by default all words in Forth call words defined before them unless
you use hooks or deferred words (a word can call itself with RECURSE, which
is a special case that is needed unless one uses a deferred word in that
case). And even deferred words have their limitations in cases (e.g. you
can't change a deferred word in zeptoforth that is compiled into flash
after the fact once it has been set, because the word address is already
programmed into flash).
Travis
… Message ID: <tabemann/zeptoforth/repo-discussions/119/comments/10154989@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On 07/26 10:27, tabemann wrote:
On Thu, Jul 25, 2024 at 10:03 PM mcctuxic ***@***.***> wrote:
> Thank you for the explanation! :)
>
> ok...patching a running forth system is forgetting the wrong
> stuff and replacing it with fixed stuff or just going a different path...
> :)
> I always thought, the patch would only effect the buggy word and was
> wondering, how that could be done
>
Nah, by default all words in Forth call words defined before them unless
you use hooks or deferred words (a word can call itself with RECURSE, which
is a special case that is needed unless one uses a deferred word in that
case). And even deferred words have their limitations in cases (e.g. you
can't change a deferred word in zeptoforth that is compiled into flash
after the fact once it has been set, because the word address is already
programmed into flash).
Travis
> Message ID: <tabemann/zeptoforth/repo-discussions/119/comments/10154989@
> github.com>
>
Hi,
"Nah, by default all words in Forth call words defined before them"->
-> yes...that's the reason, why this question had popped up in my head. ;)
…
--
Reply to this email directly or view it on GitHub:
#119 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
on the internet I read more than once, that one advantage of FORTH systems is the ability to be adapted/corrected while running. I remember a story I read somewhere, that NASA "telnetted" into a satellite to correct a part of its FORTH system while running.
On the other hand I also read, that words, which are already defined always take the "old" (unadapted or faulty) version of the
word and only words defined when the new version of that word is already in the dictionary benefit from the correction/adaptation.
Has NASA told us an urban legend? Was the red pill the blue one in reality? How can both be true?
Cheers!
Tuxic
Beta Was this translation helpful? Give feedback.
All reactions