none albert
unread,May 23, 2023, 6:59:14 AM5/23/23You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have an programmable editor that could benefit of rewritten in Forth.
At present it is written in c.
Coupling a function to <ESC>A] is remembering the key in a structure
and a word that is defined as example
cup cup cup cup
that moves the cursor up 4 times.
It is almost
: <ESC>A] cup cup cup cup ;
The idea is to couple a Forth with it and migrate piecemeal functions
to Forth with it.
Forth would have to known only a few datastructures and then be able to
perform already a lot of functions.
For example knowing the descriptor structure of a file to be edited
it could move the cursor up by
: cup -1 CURRENTFILE @ files[] @ ->currentline +! ;
where CURRENTFILE files are imported from c.
As soon as all functions pertaining to e.g. CURRENTFILE are moved,
CURRENTFILE is defined within the forth area and deleted from c.
In the end only coupling to an X-system library remains, and migrated
to dynamic library calls.
Has this been done or tried before? Any ideas whether this is feasible?
Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -