Post by Rod PembertonOn Mon, 8 Apr 2019 10:20:41 -0700 (PDT)
Post by Helmar WodtkeDUP
DROP
SWAP
OVER
+
*
-
;
VALUE
And the last one, ... (we do not want to discuss)
Why are the words you chose "Holy"? What criterion?
What about R> and >R ?
What about CREATE ?
What about . and , and ' ?
What about [ and ] ?
What about : and ; ?
What about HERE and DP and LIT ?
etc.
Rod Pemberton
--
Once upon a time, many decades ago in a place far away, humble people
sought their freedom, and lost. "Ideas are bulletproof."
This issue has been studied over the years quite a lot. 10 seems to be a
very arbitrary number. You cannot buld a working system with only 10
words. Where's BRANCH? To be Turing complete, you need 0BRANCH too.
Knaggs & Bennett (2015) produced a list of 69 words which they believed
should be in every Forth system, desktop or embedded. I think they did a
great job of distilling the required words down into an essential list,
with enough words available to build new features/words on.
They note: "First, from a professional standpoint for those developing
critical controls, having a small system footprint that can be fully
verified and validated is beneficial. The workload in knowing you have
a good basis from which to springboard the application is reasonably
simple as it will not take a long time to perform certification confirmation
efforts. You can only certify from a known surface (surfaces are the interface
between lower level and upper level words)." (ibid.).
Here's the list they came up with (note: there's a couple of non-standardised
words in the list):
A Proposed minimal word set (Knaggs & Bennett, 2015).
1 Memory Access
6.1.0010 ! store
6.1.0150 , comma
6.1.0650 @ fetch
6.1.0705 ALIGN
6.1.0706 ALIGNED
6.1.0880 CELL+ cell-plus
6.1.0890 CELLS
6.1.0850 C! c-store
6.1.0860 C, c-comma
6.1.0870 C@ c-fetch
CALIGN c-allign
CALIGNED c-alligned
6.1.0897 CHAR+ char-plus
6.1.0898 CHARS chars
2 Arithmetic
6.1.0120 + plus
6.1.0090 * star
6.1.0320 2* two-star
6.1.0110 */MOD star-slash-mod
6.1.0160 - minus
6.1.0230 / slash
6.1.0330 2/ two-slash
6.1.1890 MOD
3 Logic
6.1.0270 0= zero-equals
6.1.0480 < less-than
6.1.0720 AND
6.1.1720 INVERT
6.2.2298 TRUE
6.1.1805 LSHIFT l-shift
6.1.0530 = equals
6.1.0540 > greater-than
6.1.1980 OR
6.1.2490 XOR x-or
6.2.1485 FALSE
6.1.2162 RSHIFT r-shift
4 Stack
6.1.1290 DUP dupe
6.1.2260 SWAP
6.1.0580 >R to-r
6.1.2070 R@ r-fetch
6.1.1260 DROP
6.1.1990 OVER
6.1.2060 R> r-from
6.1.2160 ROT rote
5 Flow Control
6.1.1700 IF
6.1.2270 THEN
6.1.2430 WHILE
6.1.2140 REPEAT
6.1.1240 DO
6.1.1680 I
6.1.0070 ' tick
6.1.1310 ELSE
6.1.0760 BEGIN
6.2.0700 AGAIN
6.1.2390 UNTIL
6.1.1800 LOOP
6.1.1730 J
6.1.1370 EXECUTE
6 Defnitions
6.1.0450 : colon
6.1.0950 CONSTANT
6.1.1000 CREATE
6.1.0460 ; semicolon
6.1.2410 VARIABLE
6.1.1250 DOES> does
7 Device
6.1.1750 KEY
6.1.1320 EMIT
10.6.1.1755 KEY? key-question
6.1.0990 CR c-r
8 Tools
6.1.0080 ( paren
15.6.1.0220 .S dot-s
-------------
Knaggs, P., Bennett, P. 2015. 'Minimal Forth'. EuroForth conference proceedings,
24th Septemeber, 2015.