remove deprecated words

FossilOrigin-Name: e999bdb76459148c72894cde22abd88422e5b79fb822fbd83d037892c4c232b0
This commit is contained in:
crc 2020-12-31 15:04:06 +00:00
parent dc0aa0cb21
commit e31cc82656
11 changed files with 65 additions and 83 deletions

View file

@ -123,14 +123,16 @@ bin/retro-repl: vm/nga-c/repl.c vm/nga-c/image.c
# retro on unix # retro on unix
update-extensions: bin/retro
cd package/extensions && ../../bin/retro -f ../../tools/generate-extensions-list.retro >../load-extensions.retro
vm/nga-c/retro-image.c: ngaImage bin/retro-embedimage bin/retro-extend interface/filesystem.retro interface/floatingpoint.retro interface/unix.retro interface/rng.retro interface/sockets.retro interface/scripting.retro interface/retro-unix.retro interface/clock.retro vm/nga-c/retro-image.c: ngaImage bin/retro-embedimage bin/retro-extend interface/filesystem.retro interface/floatingpoint.retro interface/unix.retro interface/rng.retro interface/sockets.retro interface/scripting.retro interface/retro-unix.retro interface/clock.retro
cp ngaImage rre.image cp ngaImage rre.image
./bin/retro-extend rre.image interface/scripting.retro interface/filesystem.retro interface/floatingpoint.retro interface/unix.retro interface/rng.retro interface/sockets.retro interface/scripting.retro interface/retro-unix.retro interface/clock.retro ./bin/retro-extend rre.image interface/scripting.retro interface/filesystem.retro interface/floatingpoint.retro interface/unix.retro interface/rng.retro interface/sockets.retro interface/scripting.retro interface/retro-unix.retro interface/clock.retro
./bin/retro-embedimage rre.image >vm/nga-c/retro-image.c ./bin/retro-embedimage rre.image >vm/nga-c/retro-image.c
bin/retro: vm/nga-c/retro-image.c vm/nga-c/retro-unix.c vm/nga-c/bsd-strl.c vm/nga-c/config.h vm/nga-c/dev-clock.c vm/nga-c/dev-files.c vm/nga-c/dev-floatingpoint.c vm/nga-c/dev-image.c vm/nga-c/dev-rng.c vm/nga-c/dev-sockets.c vm/nga-c/dev-unix.c vm/nga-c/prototypes.h bin/retro: vm/nga-c/retro-image.c vm/nga-c/retro-unix.c vm/nga-c/bsd-strl.c vm/nga-c/config.h vm/nga-c/dev-clock.c vm/nga-c/dev-files.c vm/nga-c/dev-floatingpoint.c vm/nga-c/dev-image.c vm/nga-c/dev-rng.c vm/nga-c/dev-sockets.c vm/nga-c/dev-unix.c vm/nga-c/prototypes.h package/list.forth package/load-extensions.retro
cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro-unix.c $(LIBM) cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro-unix.c $(LIBM)
cd package/extensions && ../../bin/retro -f ../../tools/generate-extensions-list.retro >../load-extensions.retro
cd package && ../bin/retro -f list.forth cd package && ../bin/retro -f list.forth
./bin/retro-embedimage rre.image >vm/nga-c/retro-image.c ./bin/retro-embedimage rre.image >vm/nga-c/retro-image.c
rm rre.image rm rre.image

View file

@ -1372,15 +1372,6 @@ Store a value into the specified address and return the next address.
swap D: nm-mn A: - F: - swap D: nm-mn A: - F: -
Exchange the position of the top two items on the stack Exchange the position of the top two items on the stack
sys:argc D: -n A: - F: -
Return the number of arguments passed to the program. Deprecated. Use script:arguments
sys:argv D: n-s A: - F: -
Given an argument number, return the argument as a string. Deprecated. Use script:get-argument instead.
sys:name D: -s A: - F: -
Return the filename of the program being run. Deprecated. Use script:name instead.
tab D: - A: - F: - tab D: - A: - F: -
Display a tab (`ASCII:HT`) Display a tab (`ASCII:HT`)

View file

@ -456,9 +456,6 @@ sp D: - A: - F: -
store D: na- A: - F: - store D: na- A: - F: -
store-next D: na-a A: - F: - store-next D: na-a A: - F: -
swap D: nm-mn A: - F: - swap D: nm-mn A: - F: -
sys:argc D: -n A: - F: -
sys:argv D: n-s A: - F: -
sys:name D: -s A: - F: -
tab D: - A: - F: - tab D: - A: - F: -
times D: nq- A: - F: - times D: nq- A: - F: -
tri D: xqqq-? A: - F: - tri D: xqqq-? A: - F: -

View file

@ -3517,27 +3517,6 @@
</div> </div>
<p>Exchange the position of the top two items on the stack</p> <p>Exchange the position of the top two items on the stack</p>
<table><tr><td><b>Class:</b> </td><td>class:primitive</td></tr><tr><td><b>Namespace:</b> </td><td>global</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/> <table><tr><td><b>Class:</b> </td><td>class:primitive</td></tr><tr><td><b>Namespace:</b> </td><td>global</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<h2>sys:argc</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> -n<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Return the number of arguments passed to the program. Deprecated. Use script:arguments</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>sys</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>sys:argv</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> n-s<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Given an argument number, return the argument as a string. Deprecated. Use script:get-argument instead.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>sys</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>sys:name</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> -s<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Return the filename of the program being run. Deprecated. Use script:name instead.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>sys</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>tab</h2> <h2>tab</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> -<br> <div style='margin-left: 1em;'><p><b>Data:</b> -<br>
<b>Addr:</b> -<br> <b>Addr:</b> -<br>

View file

@ -5398,39 +5398,6 @@ Exchange the position of the top two items on the stack
Class: class:primitive | Namespace: global | Interface Layer: all Class: class:primitive | Namespace: global | Interface Layer: all
------------------------------------------------------------------------ ------------------------------------------------------------------------
sys:argc
Data: -n
Addr: -
Float: -
Return the number of arguments passed to the program. Deprecated. Use script:arguments
Class: class:word | Namespace: sys | Interface Layer: rre
------------------------------------------------------------------------
sys:argv
Data: n-s
Addr: -
Float: -
Given an argument number, return the argument as a string. Deprecated. Use script:get-argument instead.
Class: class:word | Namespace: sys | Interface Layer: rre
------------------------------------------------------------------------
sys:name
Data: -s
Addr: -
Float: -
Return the filename of the program being run. Deprecated. Use script:name instead.
Class: class:word | Namespace: sys | Interface Layer: rre
------------------------------------------------------------------------
tab tab
Data: - Data: -

View file

@ -456,9 +456,6 @@ sp - - - Display a space (`ASCII:SPACE`) class:word :spaces (n-) [ sp ] t
store na- - - Store a value into the specified address. class:primitive 'Base var\n #10 &Base store {n/a} global all store na- - - Store a value into the specified address. class:primitive 'Base var\n #10 &Base store {n/a} global all
store-next na-a - - Store a value into the specified address and return the next address. class:word {n/a} {n/a} global all store-next na-a - - Store a value into the specified address and return the next address. class:word {n/a} {n/a} global all
swap nm-mn - - Exchange the position of the top two items on the stack class:primitive {n/a} {n/a} global all swap nm-mn - - Exchange the position of the top two items on the stack class:primitive {n/a} {n/a} global all
sys:argc -n - - Return the number of arguments passed to the program. Deprecated. Use script:arguments class:word {n/a} {n/a} sys rre
sys:argv n-s - - Given an argument number, return the argument as a string. Deprecated. Use script:get-argument instead. class:word {n/a} {n/a} sys rre
sys:name -s - - Return the filename of the program being run. Deprecated. Use script:name instead. class:word {n/a} {n/a} sys rre
tab - - - Display a tab (`ASCII:HT`) class:word {n/a} {n/a} global all tab - - - Display a tab (`ASCII:HT`) class:word {n/a} {n/a} global all
times nq- - - Run the specified quote the specified number of times. class:word #12 [ $- c:put ] times {n/a} global all times nq- - - Run the specified quote the specified number of times. class:word #12 [ $- c:put ] times {n/a} global all
tri xqqq-? - - Apply q1 against x, then q2 against a copy of x, and finally q3 against another copy of x. class:word {n/a} {n/a} global all tri xqqq-? - - Apply q1 against x, then q2 against a copy of x, and finally q3 against another copy of x. class:word {n/a} {n/a} global all

Can't render this file because it contains an unexpected character in line 14 and column 96.

View file

@ -14,7 +14,7 @@ Well this is really easy. I begin by creating an array of potential values.
~~~ ~~~
#100000 [ I n:inc , ] #100000 [ I n:inc , ]
'Potentials d:create over , times<with-index> 'Potentials d:create over , indexed-times
~~~ ~~~
Then a simple `palindrome?` word to convert the number to a string and return a flag indicating if it's a palindrome. Then a simple `palindrome?` word to convert the number to a string and return a flag indicating if it's a palindrome.
@ -49,6 +49,6 @@ In my tests, this isn't memory efficient, as I'm keeping both the list of potent
:value I n:inc dup ; :value I n:inc dup ;
:process [ n:put nl ] &drop choose ; :process [ n:put nl ] &drop choose ;
#100000 [ value palindrome? process ] times<with-index> #100000 [ value palindrome? process ] indexed-times
This only uses 74 memory locations. This only uses 74 memory locations.

View file

@ -1,6 +1,7 @@
Put extensions into this directory. When rebuilding via: Put extensions into this directory and run:
make clean; make make update-extensions
make
Any extensions here will be placed in a file named Any extensions here will be placed in a file named
`package/load-extensions.retro` for compilation into the `package/load-extensions.retro` for compilation into the

View file

@ -1,3 +1,12 @@
# Custom Extensions
This is a system for allowing you to easily add your own
extensions to RETRO on Unix systems.
There are two options:
## Manual Additions
Add files to include to the code block below. Use a form Add files to include to the code block below. Use a form
like: like:
@ -11,14 +20,24 @@ also use any Retro code directly.
'dict-words-listing.forth include 'dict-words-listing.forth include
~~~ ~~~
~~~ ## Automatic Extensions
'compat.retro include
~~~ This does not require manual editing of this file. To use
this:
- copy (or symlink) the extensions into the `extensions` subdirectory
- run `make update-extensions`
- run `make`
This will build RETRO, generate a new `load-extensions.retro` and
then rebuild, including the extensions.
~~~ ~~~
'load-extensions.retro include 'load-extensions.retro include
~~~ ~~~
## Final Bits
Save the image with anything loaded here added in. The Save the image with anything loaded here added in. The
`retro` binary will be rebuilt using the extended image. `retro` binary will be rebuilt using the extended image.

View file

@ -2,8 +2,8 @@
#ifndef CELL #ifndef CELL
#define CELL int32_t #define CELL int32_t
#endif #endif
CELL ngaImageCells = 15393; CELL ngaImageCells = 15966;
CELL ngaImage[] = { 1793,14768,15377,15392,202101,0,10,1,10,2,10,3,10,4,10,5,10,6,10, CELL ngaImage[] = { 1793,14768,15923,15965,202101,0,10,1,10,2,10,3,10,4,10,5,10,6,10,
7,10,8,10,9,10,10,11,10,12,10,13,10,14,10,15,10,16,10,17, 7,10,8,10,9,10,10,11,10,12,10,13,10,14,10,15,10,16,10,17,
10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,10,68223234,1,2575, 10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,10,68223234,1,2575,
85000450,1,656912,141,140,268505089,63,62,285281281,0,63,2063,10,101384453,0,9,10,2049,56,25, 85000450,1,656912,141,140,268505089,63,62,285281281,0,63,2063,10,101384453,0,9,10,2049,56,25,
@ -160,7 +160,7 @@ CELL ngaImage[] = { 1793,14768,15377,15392,202101,0,10,1,10,2,10,3,10,4,10,5,10,
983556,1793,3087,1,21,2049,2100,10,1,3082,2049,2100,4100,10,3065,3105,146,118,58,117, 983556,1793,3087,1,21,2049,2100,10,1,3082,2049,2100,4100,10,3065,3105,146,118,58,117,
112,100,97,116,101,0,4,1793,3112,15,4,8,10,1,3108,2049,2110,16,10,3093, 112,100,97,116,101,0,4,1793,3112,15,4,8,10,1,3108,2049,2110,16,10,3093,
3126,146,99,111,112,121,0,1793,3135,285278725,1,33951492,268767489,1,6,10,1,3128,2049,2275, 3126,146,99,111,112,121,0,1793,3135,285278725,1,33951492,268767489,1,6,10,1,3128,2049,2275,
771,10,3118,3154,146,83,99,111,112,101,76,105,115,116,0,15211,15263,10,3141,3163, 771,10,3118,3154,146,83,99,111,112,101,76,105,115,116,0,15829,15881,10,3141,3163,
146,123,123,0,2049,1570,2,1,3154,2049,59,16,10,3157,3188,146,45,45,45,114, 146,123,123,0,2049,1570,2,1,3154,2049,59,16,10,3157,3188,146,45,45,45,114,
101,118,101,97,108,45,45,45,0,2049,1570,1,3154,2049,2890,16,10,3172,3202,146, 101,118,101,97,108,45,45,45,0,2049,1570,1,3154,2049,2890,16,10,3172,3202,146,
125,125,0,1,3154,2049,56,4,15,11,1793,3216,3841,3154,4097,2,10,1,3211,1793, 125,125,0,1,3154,2049,56,4,15,11,1793,3216,3841,3154,4097,2,10,1,3211,1793,
@ -179,7 +179,7 @@ CELL ngaImage[] = { 1793,14768,15377,15392,202101,0,10,1,10,2,10,3,10,4,10,5,10,
21,2049,2100,4097,3256,10,1,3458,2049,2100,4097,3265,10,3433,3487,133,84,101,109,112, 21,2049,2100,4097,3256,10,1,3458,2049,2100,4097,3265,10,3433,3487,133,84,101,109,112,
83,116,114,105,110,103,115,0,32,3472,3505,133,84,101,109,112,83,116,114,105, 83,116,114,105,110,103,115,0,32,3472,3505,133,84,101,109,112,83,116,114,105,
110,103,77,97,120,0,512,3488,3517,146,83,84,82,73,78,71,83,0,2049,1543, 110,103,77,97,120,0,512,3488,3517,146,83,84,82,73,78,71,83,0,2049,1543,
3841,3487,3841,3505,19,18,10,3506,3537,133,67,117,114,114,101,110,116,0,20,10, 3841,3487,3841,3505,19,18,10,3506,3537,133,67,117,114,114,101,110,116,0,16,10,
3526,3552,146,115,58,112,111,105,110,116,101,114,0,3841,3537,3841,3505,19,2049,3517, 3526,3552,146,115,58,112,111,105,110,116,101,114,0,3841,3537,3841,3505,19,2049,3517,
17,10,3539,3571,146,115,58,110,101,120,116,0,1,3537,2049,2988,3841,3537,3841,3487, 17,10,3539,3571,146,115,58,110,101,120,116,0,1,3537,2049,2988,3841,3537,3841,3487,
11,1793,3587,1,0,4097,3537,10,1,3582,9,10,3506,3601,146,115,58,116,101,109, 11,1793,3587,1,0,4097,3537,10,1,3582,9,10,3506,3601,146,115,58,116,101,109,
@ -772,4 +772,33 @@ CELL ngaImage[] = { 1793,14768,15377,15392,202101,0,10,1,10,2,10,3,10,4,10,5,10,
105,110,110,105,110,103,45,119,105,116,104,0,2049,1874,2049,4648,1793,15342,2049,164, 105,110,110,105,110,103,45,119,105,116,104,0,2049,1874,2049,4648,1793,15342,2049,164,
2049,15282,10,1,15337,2049,7454,10,15305,15359,146,115,121,115,58,97,114,103,99,0, 2049,15282,10,1,15337,2049,7454,10,15305,15359,146,115,121,115,58,97,114,103,99,0,
2049,13691,10,15347,15374,146,115,121,115,58,97,114,103,118,0,2049,13723,10,15362,15389, 2049,13691,10,15347,15374,146,115,121,115,58,97,114,103,118,0,2049,13723,10,15362,15389,
146,115,121,115,58,110,97,109,101,0,2049,13770,10,0 }; 146,115,121,115,58,110,97,109,101,0,2049,13770,10,15377,15403,146,100,58,119,111,
114,100,115,0,1793,15412,2049,164,2049,9248,2049,9222,10,1,15405,2049,7454,10,15392,15433,
146,100,58,119,111,114,100,115,45,119,105,116,104,0,2049,1874,2049,4648,1793,15464,
2049,164,2,2049,1874,2049,4162,1793,15453,2049,9248,2049,9222,10,1,15448,1793,15459,3,10,
1,15457,2049,64,10,1,15439,2049,7454,10,15417,15488,146,100,105,115,112,108,97,121,
45,105,102,45,108,101,102,116,0,2,2049,1874,2049,4598,1793,15500,2049,9248,2049,9222,
10,1,15495,1793,15506,3,10,1,15504,2049,64,10,15417,15537,146,100,58,119,111,114,
100,115,45,98,101,103,105,110,110,105,110,103,45,119,105,116,104,0,2049,1874,
2049,4648,1793,15548,2049,164,2049,15488,10,1,15543,2049,7454,10,15511,15565,146,115,121,115,
58,97,114,103,99,0,2049,13691,10,15553,15580,146,115,121,115,58,97,114,103,118,
0,2049,13723,10,15568,15595,146,115,121,115,58,110,97,109,101,0,2049,13770,10,15583,
15609,146,100,58,119,111,114,100,115,0,1793,15618,2049,164,2049,9248,2049,9222,10,1,
15611,2049,7454,10,15598,15639,146,100,58,119,111,114,100,115,45,119,105,116,104,0,
2049,1874,2049,4648,1793,15670,2049,164,2,2049,1874,2049,4162,1793,15659,2049,9248,2049,9222,10,
1,15654,1793,15665,3,10,1,15663,2049,64,10,1,15645,2049,7454,10,15623,15694,146,100,
105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,2,2049,1874,2049,4598,
1793,15706,2049,9248,2049,9222,10,1,15701,1793,15712,3,10,1,15710,2049,64,10,15623,15743,
146,100,58,119,111,114,100,115,45,98,101,103,105,110,110,105,110,103,45,119,
105,116,104,0,2049,1874,2049,4648,1793,15754,2049,164,2049,15694,10,1,15749,2049,7454,10,
15717,15771,146,115,121,115,58,97,114,103,99,0,2049,13691,10,15759,15786,146,115,121,
115,58,97,114,103,118,0,2049,13723,10,15774,15801,146,115,121,115,58,110,97,109,
101,0,2049,13770,10,15789,15815,146,100,58,119,111,114,100,115,0,1793,15824,2049,164,
2049,9248,2049,9222,10,1,15817,2049,7454,10,15804,15845,146,100,58,119,111,114,100,115,
45,119,105,116,104,0,2049,1874,2049,4648,1793,15876,2049,164,2,2049,1874,2049,4162,1793,
15865,2049,9248,2049,9222,10,1,15860,1793,15871,3,10,1,15869,2049,64,10,1,15851,2049,
7454,10,15829,15900,146,100,105,115,112,108,97,121,45,105,102,45,108,101,102,116,
0,2,2049,1874,2049,4598,1793,15912,2049,9248,2049,9222,10,1,15907,1793,15918,3,10,1,
15916,2049,64,10,15829,15949,146,100,58,119,111,114,100,115,45,98,101,103,105,110,
110,105,110,103,45,119,105,116,104,0,2049,1874,2049,4648,1793,15960,2049,164,2049,15900,
10,1,15955,2049,7454,10,0 };