Reva: Libraries

"Libraries" are bits of code Reva can load to expand the words it knows about. Unlike strictly compiled languages like "C", and in common with fully interpreted languages like "Perl", Reva's libraries are source-code which is interpreted as needed.

All libraries reside in the "lib" folder of the Reva distribution, and the path from there to the library is the name to use to load and use it. For example, to use the SQLite database library, enter a line like:

        needs db/sqlite

To make your own libraries, pick one of the Reva libraries and follow its general layout. In particular, note the use of "push~" and "pop~" to save and restore the context order. Also note in format of embedded help, in the event you want to document the words in your library (always a good idea).

Before you hare off to make your own, it's a good idea to know what already exists. Type help libraries to see which libraries are known to Reva. You can also use help/ to search for words which might be useful to you, and you can also just "grep" the "lib" folder... don't be afraid to explore!