|
|
|
nicl is a network server that provides each client with its own Ficl virtual machine with network extensions. (The name NICL was originally used for a similar, I/O event dispatcher-based Tcl program that was later superseded by gentle.) Although each client has its own VM, word definitions, non-local variables, and constants, etc. are global to all clients' VMs; what's defined by one VM is known to all VMs.
nicl creates its own I/O event dispatcher and assigns its
handle to Forth constant G-DISPATCHER
. Clients and scripts
should use this dispatcher instead of creating their own via the
IOX-CREATE
word.
Ficl's default dictionary size is 12,288 cells, of which standard Ficl uses
about 7,500 cells. The dictionary size can be changed by setting environment
variable FICL_DICTIONARY_SIZE
to the desired number of cells.
As with finc,
telnet(1) in line-by-line mode is an obvious choice for a
remote client. Forth words BYE
or QUIT
can be used
to gracefully exit a client session.
% nicl [-debug] [-Debug] [-evaluate code] [-listen port] [file(s)]
where
-debug
-Debug
- enable debug output (written to stdout). Capital "
-Debug
" generates more voluminous debug.-evaluate code
- passes the argument string to the Forth interpreter.
-listen port
- specifies a network server port at which nicl will listen for and accept client connection requests. A separate Ficl virtual machine is created for each new client and I/O is redirected to the client.
file(s)
- are one or more Forth files to load and execute. The "
-evaluate
" option can be used to push arguments on the stack for use by the code in the file. If multiple files are being loaded, a different "-evaluate
" option can be specified before each one.