User Tools

Site Tools


lazynut_scripting_language:reference:keywords

_lazyNut_ interpreter keywords

Most lazyNut lines have the format object-name method-name .... The following are the strings that are interpreted in a special way by lazyNut if they occur at the beginning of a line. They should not be used for object names.

query or any string beginning with a digit

query any-command...
10 any-command...

exectues any-command The whole command, including the query string is echoed in the BEGIN and END strings.

xml

xml any-command...

Excecutes any-command with the requests that any command ANSWERs are emitted in computer-readable xml.

xmllint

xmllint 1

Request all future xml is emitted with newlines and indentation for human readability.

xmllint 0

Rescind a prior request for readability.

quietly

quietly any-command...

Sets the loglevel to error, executes any-command, and reinstates the prior loglevel.

loglevel

loglevel loglevel-string

Sets the loglevel to loglevel-string. The loglevel determines the minimum severity level of message to be emitted. Valid levels, in decreasing severity, are: answer, r, error, ok, warning, info, debug.

CRASH

CRASH

Deliberately produce an abnormal program termination event for testing purposes.

recently_created

recently_created

Emit the list of all (non-anonymous) objects that have been recently created.

recently_created base_type_name

Emit the list of all (non-anonymous) objects whose base type is base_type_name that have been recently created.

clear_recently_created

clear_recently_created

Clear the list of all (non-anonymous) objects that have been recently created.

clear_recently_created base_type_name

Clear the list of all (non-anonymous) objects whose base type is base_type_name that have been recently created.

recently_destroyed

recently_destroyed

Emit the list of all (non-anonymous) objects that have been recently destroyed.

recently_destroyed base_type_name

Emit the list of all (non-anonymous) objects whose base type is base_type_name that have been recently destroyed.

clear_recently_destroyed

clear_recently-destroyed

Clear the list of all (non-anonymous) objects that have been recently destroyed.

clear_recently-destroyed base-type-name

Clear the list of all (non-anonymous) objects whose base type is base-type-name that have been recently destroyed.

recently_modified

recently_modified

Emit the list of all (non-anonymous) objects that have been recently modified.

recently_modified base-type-name

Emit the list of all (non-anonymous) objects whose base type is base-type-name that have been recently modified.

clear_recently_modified

clear_recently-modified

Clear the list of all (non-anonymous) objects that have been recently modified.

clear_recently-modified base-type-name

Clear the list of all (non-anonymous) objects whose base type is base-type-name that have been recently modified.

version

version

Emit a version string.

shush

shush

Shorthand for: loglevel error

unshush

unshush

Shorthand for: loglevel info

include

include filename...

Load the file filename and process each of its lines as lazyNut commands.

create

create type object-name

Create an object with name object-name and type type. type may either be a base type, in which case the object is created with no facets; or it may be a subtype, in which case the corresponding base type object is created and populated with facets appropriate to the type. If the interpreter is not currently aware of a type or subtype called type, it will attempt to load the module type.so to resolve the problem.

destroy

destroy object-name

Destroy the object object-name. Only objects that have been created may be destroyed.

load

load index so-name

Load the module so-name from disk and store with name index. index should be unique.

until

until truth-object any-command...

Repeatedly excute any-command until truth-object can be interpreted as true. Normally only observer objects or explicit logic operations (less; or; etc…) are interpretable as truth values.

if

if truth-object any-command...

Execute any-command if (any only if) truth-object can be intrepreted as true.

exists

exists test-object

Returns an object that will be interpreted as true if the expression test-object returns an object, otherwise returns an object that will be interpreted as false.

not

not truth-object

Returns an object that will have the opposite truth-value-interpretation to truth-object.

list

list type

Lists known base types.

list library

Lists loaded libraries.

list type

Lists all objects with base type type.

list facet

Lists all objects that have a facet of facet type facet.

facets

facets facet-role

Lists all known facets that can be used in a facet slot of role facet-role.

loop

loop integer-count any-commmand...

Execute any-command integer-count times.

less

less pattern1 pattern2

Return a truth value indicating whether the pattern ordering of pattern1 and pattern2 has pattern1 before pattern2.

or

or truth1 truth2

Return a truth value that is the logical OR of truth1 and truth2

and

and truth1 truth2

Return a truth value that is the logical AND of truth1 and truth2

default_model

default_model

Return the currently default model.

set_default_model

set_default_model model-object

Set the currently default model to model-object

named_loop

named_loop integer-count name any-commmand...

Execute any-command integer-count times, setting a local macro variable name to 1 during the first execution and incrementing on each execution.

creators

creators type

List the commands that directly or indirectly create an object of type type, which may be a base type or a subtype.

subtypes

subtypes base-type

List all known subtypes of base type base-type.

aesthetic or any string beginning with #

aesthetic blah
# blah

No-op.

stop

stop

Renders all future commands no-ops, until the nesting level returns to zero. This will, for instance, ignore all further lines in an included file.

watchlist

watchlist stalkee

Emit information about which objects have requested notification when stalkee is modified or destroyed.

limit_descriptions and unlimit_descriptions

limit_descriptions
unlimit_descriptions

No-op.

set

set macro-name value

Globally set the macro variable macro-name to have value value. value may begin with a $ symbol and may refer to an existing macro, which is evaluated immediately, or a yet-to-exist macro, which is evaluate at time-of-use.

get

get macro-names...

Emit the global values of macro variables listed in macro-names.

unset

unset macro-names...

Delete the global macro variables listed in macro-names.

R

R << R-commmand
R | R-command
R cmd R-command

Send R-command to the attached R interpreter. Be aware that implicit print is off in R; if output is desired, print(…) must be used.