Re: [colorforth] Dare I say ANS!
- Subject: Re: [colorforth] Dare I say ANS!
- From: Albert van der Horst <albert@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 16 Jan 2004 19:41:59 +0100 (MET)
On Thu, 15 Jan 2004, Howerd Oakford wrote:
> Hi All,
>
> I would like to make colorForth more standard. Some words make colorForth
> uneccessarily difficult for someone used to more conventional Forths :
I am kind of an expert in ISO Forth (but I contributed a macro to
easily express colorforth words in the assembler file once.)
Knowing little of colorforth I will only comment on the ISO aspect.
>
> colorForth ANS/conventional
> --------------------------------
> - invert
I dislike INVERT because it very verbose, but it is ISO
Is - a monadic ( a -- ) operator in colorforth?
> copy blk @ swap copy
There is no COPY in ISO, so you can define it to mean the same.
> pad n/a
PAD is in ISO
> erase erases n blocks starting at blk @
This is not true. In fact the ISO ERASE is the same than in
colorforth
> mark gild
Don't know either word, but GILD is not ISO
> i i 1 -
I doubt this. How can the current loop index be
different from I. It is like saying Ilias was not written
by Homer, but by a guy of the same name. (For the
classic-impaired, we don't know anything of Homer, except
that he wrote the Ilias.)
> ?dup ????
?DUP is ISO
> accept ????
ACCEPT is ISO, but there may be subtle differences.
>
> I think each word must be judged individually - how about :
>
> rename - as invert
> : negate invert 1+ ;
> : - negate + ;
> This restores compatibility. It is interesting to note that since "invert"
> fits into 28 bits, source size is not affected.
>
> rename pad as kpad:
> It begins a list of words to execute for each key, so a ":" seems right.
> : pad 2000 block ;
> The old idea of pad is still useful, I think.
>
> rename erase as bclr ( block clear )
> : erase ... the usual loop ... ;
>
> rename mark as gild ( do Forth, Inc. have copyright on that? ;)
>
> Make i return an index from 0 to n-1 instead of 1 to n. I presume this was
> intentional - does any one know why?
>
> ?dup - what is this?
> accept - ditto -
> use diferent names for these....
>
> I think we should use whatever the ANS form is for 1@, 2@ etc ( c@ w@ I
> think ).
> Does anyone know if "port fetch" has an ANS name? polyForth uses INPUT and
> OUTPUT, p@ and p! is fine by me.
I hope that you don't have the illusion that this will make colorforth
programs run on just any ISO system.
> Regards
> Howerd
Regards Albert.
Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS
One man-hour to invent,
One man-week to implement,
One lawyer-year to patent.
albert@xxxxxxxxxxxxxxxxxx http://home.hccnet.nl/a.w.m.van.der.horst
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com