add new example w/colored d:words; describe added to library/

FossilOrigin-Name: f921df78f23ff7a699fd63595601a340e1b618af5f06d69548aef40e10ed507d
This commit is contained in:
crc 2023-12-11 23:39:47 +00:00
parent e0a9701691
commit 7780f9a3dd
4 changed files with 28 additions and 3 deletions

View file

@ -1,6 +1,4 @@
Currently Active:
- Porting Konilo's (termina) words
- Completing port of Konilo's block editor
- Adding missing source data for existing vocabularies
- Improving the D implementation of Nga

View file

@ -56,6 +56,7 @@
the device handlers
- support loading extensions at runtime via `library:load`
(searches ./library/ and ~/.config/retroforth/library/)
- library contents: block-editor termina x11
- library contents: block-editor describe termina x11
- new example: colored-dwords.retro
================================================================

View file

@ -0,0 +1,19 @@
This show use of the termina color words to display the contents
of the dictionary, using colors for various word classes.
~~~
'termina library:load
:d:words/c
[ dup d:class fetch
[ &class:data [ fg:magenta ] case
&class:macro [ fg:red ] case
&class:primitive [ fg:yellow ] case
drop fg:green
] call d:name s:put sp vt:reset ] d:for-each ;
~~~
```
d:words/c
```

7
library/describe.retro Normal file
View file

@ -0,0 +1,7 @@
This adds a `describe` word which runs retro-describe(1). It's
a useful tool for looking up glossay data in an interactive
session.
~~~
:describe (s-) 'retro-describe_%s s:format unix:system ;
~~~