In article <tnm4sm$1ntb$
[email protected]>, dxforth <
[email protected]> wrote: >On 18/12/2022 11:23 am, S Jack wrote:
On Friday, December 16, 2022 at 9:53:44 PM UTC-6, dxforth wrote:
Are screen users any less capable of improving on what they've done? After working with
same for many years I gravitated to a form that satisfied me. I won't say it's the only
or best way.
Forth blocks:
I camp often months at a time in all seasons contending with thunder
storms, freezing nights, blistering days but worst of all Mariah; not
to mention gnats, mosquitoes and flies that can bite through socks and
draw blood, poison plants, thorns that puncher through shoes and
briers that entangle and rip, spiders, snakes, wild pig (do my best to
avoid mountain lion and bear). Living in a house is much easier, but
all the other can be dealt with and life on trail provides many
lasting memories.
--
me
Here I was thinking screens for source code was an easier alternative
to having one large text file or a multitude of small ones. It wasn't >intended to be a punishment :)
I both use block and files. Each to their advantage.
Example.
I want to use /STRING (remove leading characters)
-LEADING ( remove leading blanks) and
DROP-WORD (remove first blank-delimited word from string)
I put them together in one screen and load that
screen as needed by e.g `` WANT /STRING ''
There is no end to what you want in your Forth and
the result is that you type WORD in gforth it even
overflows the scroll back area, which gives rise to
... more additional words.
Those similar words are nicely tucked away in a screen: ------------------------------------------
( /STRING -LEADING DROP-WORD ) \ AvdH B@aug12
\ From SC trim N char's
: /STRING >R R@ - SWAP R> + SWAP ;
\ Like -TRAILING sc-sc
: -LEADING BEGIN OVER C@ ?BLANK OVER 0= 0= AND
WHILE 1 - SWAP 1 + SWAP REPEAT ;
\ From a STRING remove the first word. Leave the rest STRING.
: DROP-WORD -LEADING BL $/ 2DROP ;
\ : DROP-WORD BEGIN BL $/ 0= WHILE DROP REPEAT DROP ;
------------------------------------------
How would you organize a directory with small files,
containing those three definitions?
Most give up and add it in the kernel right with the
kitchen sink.
On the other hand, if I attack an Euler problem,
I make a nice file with the description up front,
and loading object extension (or not), factorisation
auxiliary (or not), string extensions (or not),
string formatting (or not) by WANT.
Then there is the conditional loading e.g. with ?32 and
?64 that allows 32 bits and 64 bits to sit in the same
file.
With a library file of less than 300 K you will have
nearly all standard words, an assembler, loadable
floating point, binary search, sorting ...
Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n
http://home.hccnet.nl/a.w.m.van.der.horst
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)