STD-US-NORMS(7)

๐Ÿ“ฆ
version 3.8.0 ยท 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

๐Ÿ’– STD-US-NORMS(7) ๐Ÿ’–

Miscellaneous Information Manual but make it a group chat. The manual name is std-us-norms, and it is literally the afnix reference manual. ๐Ÿ’…

๐Ÿ“› NAME ๐Ÿ“›

std-us-norms โ€” afnix reference manual


๐Ÿ”‘ RESERVED KEYWORDS ๐Ÿ”‘

okay so reserved keywords are, together with symbols and literals, the basic constituents of the writing system. With a couple of exceptions, reserved keywords are actually special forms. During the execution, a special

bestie, the manpage really just stops mid-sentence there. I am not kidding. ๐Ÿ’€

๐Ÿ’… assert ๐Ÿ’…

The assert special form is checking for equality between two operands. Both objects must be of the same type. If the equality test fails, the special form prints a message and aborts the execution. You can also pass an optional boolean to disable exact compare. This is useful for real number assertion where an approximate comparison is needed. By default, the assertion checking is turned off. The interpreter option -f assert enables the assertion checking. When the interpreter is compiled in debug mode, the assertion checking is turned on by default. So if you're in debug mode, it's already on. Periodt.

๐Ÿ“œ Syntax

assert "form 1" "form 2" assert "form 1" "form 2" "exact compare"

๐ŸŒŸ Example

assert true (== 1 1) assert 3    (+  2 1) assert 1.234567
1.234568 false

๐Ÿงฑ block ๐Ÿงฑ

The block special form defines a new nameset for sequential execution of regular form or implicit form. When the block form is evaluated, the block nameset is linked to its parent nameset. When all forms have been executed, the block nameset is destroyed, and the result of the last evaluation in the block is considered to be the result of the block evaluation. It's giving mini-scope moment, and we are obsessed. โœจ

๐Ÿ“œ Syntax

block "regular form" block "block form"

๐ŸŒŸ Example

trans a 1 block {
  assert    a 1
  trans     a (+ 1 1)
  assert    a 2
  assert ..:a 1 } assert 1 a

๐ŸŽจ class ๐ŸŽจ

The class special form creates a new class object. Without argument, an instance of that class is created without data members. That's it. Simple. Iconic.

๐Ÿ“œ Syntax

class

๐ŸŒŸ Example

const Color (class) trans Color:preset (red green blue) {
  const this:red   red
  const this:green green
  const this:blue  blue } const red   (Color 255   0   0) const
green (Color   0 255   0) const blue  (Color   0   0 255)

๐Ÿ”’ const ๐Ÿ”’

The const special form binds a symbol with an object and marks it as a constant symbol. When used with three or four argument, a gamma expression is automatically created. const can also be used to bind class or instance members. So yeah, it's the "this is permanent" button. ๐Ÿ’…

๐Ÿ“œ Syntax

const symbol "object" const symbol "argument" "body" const symbol "argument" "closed variables" "body"

๐ŸŒŸ Example

const number 123 const max (x y) (if (> x y) x y)

โณ delay โณ

The delay special form delays the evaluation of the form argument by creating a Promise object. The promise evaluates to itself until a call to force the evaluation has been made. When the promise has been forced, the evaluation result is stored. Further call to force will produce the same result. Without argument, the delayed evaluation is nil. With one argument, a Promise object is created directly. With several argument, a cons cell is created with the first argument left unevaluated and the other evaluated. This permits you to delay a form while evaluating the calling arguments. It's literally the "I'll do it later" special form. ๐Ÿ™ˆ

๐Ÿ“œ Syntax

delay "form"

๐ŸŒŸ Example

trans  y 3 const  l ((lambda (x) (+ x y)) 1) assert 4 (force l)
trans  y 0 assert 4 (force l) trans  y 1 trans  d (delay (lambda
(x) (+ x 1)) y) assert 2 (force d)

๐Ÿ” do ๐Ÿ”

The do special form is used to build loop with forward condition. The loop construct accepts either 2 or 3 arguments. With 2 argument, the first argument is the loop body and the second argument is the loop condition which must evaluates to a boolean object. With 3 arguments, the first argument is the initial condition that is executed only once. Forward condition loops? We love a little pre-check moment. ๐Ÿ”ฅ

๐Ÿ“œ Syntax

do "body" "condition" do "initial" "body" "condition"

๐ŸŒŸ Example

const number-of-digits (s) {
  const len (s:length)
  trans index 0
  trans count 0
  do {
    trans c (s:get index)
    if (c:digit-p) (count:++)
  } (< (index:++) len)
  eval count }

๐Ÿ”ข enum ๐Ÿ”ข

The enum special form creates an enumeration from a list of literal. The result object is an Enum object that holds the enumerated items. An item evaluation results with an Item object that is bound to the enumeration object. Cute little named list vibe. ๐Ÿ’–

๐Ÿ“œ Syntax

enum "literal" ...

๐ŸŒŸ Example

const e (enum E1 E2 E3)

๐Ÿšจ errorln ๐Ÿšจ

The errorln special form prints on the interpreter error stream a set of arguments. Each arguments have to be a literal which are converted to a string. When all arguments have been printed a new line character is printed. The error special form behaves like errorln except that a new line character is not printed at the end of the arguments. So errorln is the one with the dramatic newline. ๐Ÿ˜ญ

๐Ÿ“œ Syntax

errorln errorln "nil" errorln "literal list"

๐ŸŒŸ Example

errorln errorln "hello millennium" ' ' 2000

๐Ÿง  eval ๐Ÿง 

The eval special form simply evaluates the object argument. The form is useful when returning an argument from a lambda or gamma expression using an implicit form. Just evaluate it, bestie. โœจ

๐Ÿ“œ Syntax

eval "object"

๐ŸŒŸ Example

const ret (x) (eval x) eval (protect (+ 1 2))

๐Ÿ”„ for ๐Ÿ”„

The for special form provides a facility to iterate on iterable objects. The Cons, List and Vector objects are typical iterable objects. For each iterable objects, a symbol is set after each iteration. Each object symbol value can be used for further computation. The iteration stops when one of the objects iterator is at the end position. It's giving loop-de-loop energy. ๐ŸŒ€

๐Ÿ“œ Syntax

for "symbol list" "iterable object list" "body"

๐ŸŒŸ Example

# compute the scalar product of two vectors const scalar-product
(u v) {
  trans result 0
  for (x y) (u v) (result:+= (* x y))
  eval result }

๐Ÿ’ช force ๐Ÿ’ช

The force special form forces the evaluation of its argument. If the argument evaluates to a promise object, the promise evaluation is forced. If the argument is not a promise, force keyword behaves like eval. When a promise has been forced, further call to force will not change the evaluation result. So it's the "okay I'm actually doing it now" button. ๐Ÿ’ช

๐Ÿ“œ Syntax

force "object"

๐ŸŒŸ Example

trans  y 3 const  l ((lambda (x) (+ x y)) 1) assert 4 (force l)
trans  y 0 assert 4 (force l)

โ“ if โ“

The if special form executes a form based on the evaluation of a boolean expression. In its first representation, if executes a form if the condition is evaluated to true. An alternate form can be specified and is executed if the boolean expression evaluates to false. It is an error to use a conditional form which does not evaluate to a boolean object. Choose your own adventure, but it must be a boolean object, no cap. ๐ŸŽ€

๐Ÿ“œ Syntax

if "condition" "true form" if "condition" "true form" "else form"

๐ŸŒŸ Example

const max (x y) (if (> x y) x y)

๐Ÿงฌ lambda ๐Ÿงฌ

The lambda special form creates a new closure object with eventually a set of arguments and a set of closed variables. In its first form, the closure is declared with a set of arguments or nil to indicate no argument. In its second form, the closure is declared with a set of arguments and a set of closed variables. The closed variables are evaluated at the construction of the closure and become part of the closure object. When the closure is called, a new nameset is created and linked with the parent nameset. The set of calling arguments are bounded in that nameset with the formal argument list to become the actual arguments. The set of closed variables is linked at runtime to the closure nameset. A lambda or gamma expression can have its argument declared as const argument. Closure? In this economy? Yes bestie. ๐Ÿงฌ

๐Ÿ“œ Syntax

lambda "nil" "body" lambda "argument list" "body" lambda "argument list" "closed variables list" "body"

๐ŸŒŸ Example

const no-args (lambda nil (+ 1 1)) const add     (lambda ((const
x) (const y)) (+ x y)) const closed  (lambda (x) (y) (+ x y))

๐Ÿš€ launch ๐Ÿš€

The launch special form creates a new thread by executing the form argument in a normal thread. The created thread is added in the normal thread list by creating a clone of the interpreter and starting immediately the execution of the form with the cloned interpreter. The command returns the thread object in the calling thread. When the thread terminates, the thread object holds the result of the last executed form. The main thread is suspended until all normal threads have completed their execution. Thread go brrr, and the main thread waits. ๐Ÿฆ‹

๐Ÿ“œ Syntax

launch "form" launch "thread" "form"

๐ŸŒŸ Example

launch (println "hello world")

๐Ÿ”‚ loop ๐Ÿ”‚

The loop special form executes a loop based on an initial condition, an exit condition and a step form. The initial condition is only executed one time. The exit condition is tested at each loop iteration. The loop special form creates its own nameset since the initial condition generally binds symbol locally for the loop. A classic three-part loop, but make it nameset-aware. ๐Ÿ”‚

๐Ÿ“œ Syntax

loop "init form" "exit form" "step" "form"

๐ŸŒŸ Example

loop (trans i 0) (< i 10) (i:++) (println i)

๐Ÿ—‚๏ธ nameset ๐Ÿ—‚๏ธ

The nameset special form creates a new nameset. With no argument, a new nameset is created and no parent is bound to this nameset. With one argument, the argument must evaluate to a nameset and that nameset is used as the parent one. If a nameset has to be created with the global nameset as the parent, the symbol ... can be used to reference the top level nameset. The symbol . references the current nameset. The symbol .. references the parent nameset of the current nameset. Nameset lore, iykyk. ๐Ÿ—‚๏ธ

๐Ÿ“œ Syntax

nameset nameset "parent nameset"

๐ŸŒŸ Example

const local-nameset-not-bound (nameset) const local-nameset-
bounded   (nameset ...)  const ...:global-nameset      (nameset)

๐Ÿ–จ๏ธ println ๐Ÿ–จ๏ธ

The println special form prints on the interpreter output stream a set of arguments. Each arguments have to be a literal which is converted to a string. When all arguments have been printed a new line character is printed. The print special form behaves like println except that a new line character is not printed at the end of the arguments. So println is the one that hits enter for you. ๐Ÿ–จ๏ธ

๐Ÿ“œ Syntax

println println "nil" println "literal list"

๐ŸŒŸ Example

println println "hello millennium" ' ' 2000

๐Ÿ›ก๏ธ protect ๐Ÿ›ก๏ธ

The protect special form take a single argument and returns it without evaluation. Protect is mainly use to get a symbol or form object. No evaluation, just vibes. ๐Ÿ›ก๏ธ

๐Ÿ“œ Syntax

protect "object"

๐ŸŒŸ Example

const cons (protect (+ 1 2))

return

okay bestie, the return special form is the "we're done here" button ๐Ÿ’… it makes the current expression stop evaluating and hands back the argument โ€” or nil if you gave it nothing. You'll mostly see it inside lambda or gamma expressions. But if you drop it in a top level block? The block execution just stops and control gets yeeted back to the top level. slay.

Syntax

return "object"

Example

return (+ 1 2)

break

the break special form also stops the current expression from evaluating and returns the argument or nil. Its main character moment is inside loops, where the loop result gets evaluated by the breaking expression. Outside of a loop, break behaves like return (yes, it's giving undercover agent ๐Ÿ•ต๏ธ).

Syntax

break "object"

Example

break (+ 1 2)

continue

continue is the special form that stops the current expression's evaluation and returns the argument or nil โ€” same energy as the others. It's primarily used in loops, where the loop restarts at the point of evaluation ๐Ÿ”. Outside of a loop, break will behaves like return. (that's what the page says, bestie, I'm just the messenger ๐Ÿ˜ญ)

Syntax

continue "object"

Example

continue (+ 1 2)

sync

sync is a form synchronizer, and ngl it's kind of iconic ๐Ÿ‘‘ In a multi-threaded environment, the engine guarantees that only one thread will execute the form. Every other thread gets suspended until that form is completed. one at a time, no fighting, periodt.

Syntax

sync "form"

Example

const print-message (code mesg) (
  sync {
    errorln "error  : " code
    errorln "message: " mesg
  } )

switch

switch is a form selector โ€” the vibe check of control flow โœจ The first argument is the object you're switching on. The second argument is a list of forms, each with an object matcher plus an execution form. And the else special form can be used as the default matcher. iykyk.

Syntax

switch "selector" "list of conditions"

Example

const get-primary-color (color value) (
  switch color (
    ("red"   (return (value:substr 0 2))
      ("green" (return (value:substr 2 4))
        ("blue"  (return (value:substr 4 6))
        )
      )

throw

throw is the special form that throws an exception ๐Ÿšจ Here's the rundown:

  • No argument โ†’ an exception of type user-exception is thrown.
  • One argument โ†’ the exception id is set.
  • Two arguments โ†’ the exception id and exception reason are set.
  • Three arguments โ†’ the exception id, exception reason and exception object are set.

An exception object represented by the symbol what can also be thrown โ€” that's the method used to re-throw an exception. so dramatic, I love it ๐Ÿ’€

Syntax

throw throw what throw "id" throw "id" "reason" throw "id"
"reason" "object"

Example

throw throw "type-error" throw "type-error" "invalid argument"

trans

The trans special form creates or sets a symbol with an object. It searches in the current nameset only โ€” no wandering off ๐Ÿ” If the symbol is found, it gets set with the object. If it's not found, it gets created in the current nameset. trans can also be used with qualified names. And with 3 or 4 arguments, trans automatically creates a lambda expression. multitasking queen โœจ

Syntax

trans symbol "object" trans symbol "argument" "body" trans symbol
"argument" "closed variables" "body"

Example

trans a 1 trans fact (n) (if (< n 1) 1 (* n (fact (- n 1))))

try

The try special form catches an exception in the current execution nameset ๐Ÿฅ… The first argument is a form to execute. The optional second argument is the exception handler that gets called in case of exception. If there's no exception handler, all exceptions are caught.

The result of execution is one of:

  • the result of the form execution,
  • the exception object in case of exception,
  • or nil if the exception is a native one.

If there is an exception handler, the handler is executed with a new nameset, and the special symbol what is bound to the exception. If the exception is nil, the symbol what is undefined.

Syntax

try "form" try "form" " exception handler"

Example

try (+ 1 2) try (throw) try (throw "hello") try (throw "hello"
"world") try (throw "hello" "world" "folks")

unref

The unref special form unreference a symbol. short, sweet, to the point ๐ŸŽ€

Syntax

unref symbol

Example

const number 123 unref number

while

while is the special form you use to build a loop with a backward condition ๐Ÿ”„ The loop construct accepts either 2 or 3 arguments:

  • With 2 arguments, the first argument is the loop condition and the second is the loop body, which must evaluate to a boolean.
  • With 3 arguments, the first argument is the initial condition, which is executed only once.

Syntax

while "condition" "body" while "initial" "condition" "body"

Example

const gcd (u v) {
  while (!= v 0) {
    trans r (u:mod v)
    u:= v
    v:= r
  }
  eval u }

๐Ÿซถ RESERVED OBJECTS ๐Ÿซถ

This chapter is a whole reference of the reserved objects and their respective builtin methods ๐Ÿ’– The reserved objects are those objects defined in the global interpreter nameset and bound as reserved names. Every literal has a string representation, and the to-string method is always available for these reserved objects. A literal object also has a default constructor โ€” and generally, it can be constructed by a same type object or by a string object too.


โœจ Literal โœจ

The Literal object is a base object for all literal objects. Its sole purpose? Providing two methods named to-string and to-literal that return a string representation of the literal object. that's it, that's the job ๐Ÿ’…

Predicate

  • literal-p

Inheritance

  • Serial

Methods

  • to-string -> String (none) โ€” returns a string representation of the literal. The string is expected to represent the literal at its best โœจ
  • to-literal -> String (none) โ€” also returns a string representation of the literal, but the string differs from to-string in that it's a literal representation. Example: the literal representation of a string is the quoted string. cute, right?

โœจ Nameable โœจ

The Nameable object is a base object that supports name definition. Its sole purpose is to provide a method named get-name that returns the object name ๐Ÿท๏ธ

Predicate

  • nameable-p

Inheritance

  • Object

Methods

  • get-name -> String (none) โ€” returns the associated object name. The object name defined here is a name that the class wishes to associate with the object. For example, InputFile is a nameable class and the name is the file name ๐Ÿ“

โœจ Collectable โœจ

The Collectable object is a base object designed to provide the methods for collectable objects ๐Ÿ—‘๏ธ Collectable objects are special objects that can be controlled by a special memory manager, called a memory collector or garbage collector. Unlike a simple object associated with a reference count, the collectable object is also controlled by special methods. In particular, the release method can be invoked to release all internal links susceptible to creating loops โ€” which would otherwise prevent the object from being released by the standard reference count mechanism. Heads up though: releasing a link does not necessarily result in the object destruction. important!!

Predicate

  • collectable-p

Inheritance

  • Object

Methods

  • release -> none (none) โ€” releases all links associated with the object. This method is naturally used to break circular dependencies, which prohibit the normal object destruction by the means of reference counting ๐Ÿ”—๐Ÿ’ฅ

โœจ Item โœจ

The Item reserved object is an enumeration item ๐ŸŽŸ๏ธ The item is bound to an enumeration object. An item object is created during the evaluation of an enumeration object โ€” and an enumeration item cannot be constructed directly. no DIY, bestie ๐Ÿ™ˆ

Predicate

  • item-p

Inheritance

  • Literal

Operators

  • == -> Boolean (Boolean) โ€” returns true if the calling object is equal to the boolean argument.
  • != -> Boolean (Boolean) โ€” the == operator returns true if the calling object is not equal to the boolean argument. (yes, the page says == there โ€” I'm keeping it exactly as-is, no cap ๐Ÿ˜ญ)

Methods

  • get-enum -> Enum (none) โ€” returns the enumeration object bound to the item. The item must be a dynamic item or an exception is thrown ๐Ÿšจ

โœจ Boolean โœจ

The Boolean reserved object implements the behavior of a native boolean type. Two builtin symbols, namely true and false, represent the value of a boolean instance. The Boolean type is primarily used for test expressions โœ…โŒ

Predicate

  • boolean-p

Inheritance

  • Literal

Constructors

  • Boolean (none) โ€” creates a boolean object whose default value is false.
  • Boolean (Boolean) โ€” creates a boolean object with the boolean object argument.
  • Boolean (String) โ€” creates a boolean object with the string object argument. The string "true" denotes the true value, while the string "false" denotes the false value.

Operators

  • == -> Boolean (Boolean) โ€” returns true if the calling object is equal to the boolean argument.
  • != -> Boolean (Boolean) โ€” the == operator returns true if the calling object is not equal to the boolean argument. (same energy as before, keeping it verbatim ๐Ÿซถ)

โœจ Number โœจ

The Number reserved object is a base class for all number objects ๐Ÿ”ข The number base object is used by the Integer, Real and Relatif objects. The class provides essentially the methods needed to format a number.

Predicate

  • number-p

Inheritance

  • Literal

Methods

  • format -> String (none|Integer) โ€” formats the calling number instance with a certain number of digits after the decimal point. In the first form, without argument, the default formatting representation is performed with a null precision. In the second form, a number is represented with a certain precision given by the calling argument โœจ
  • to-hexa -> String (none) โ€” returns a signed hexadecimal representation of a number. This method works well with Integer and Relatif objects ๐Ÿ’œ
  • to-hexa-string -> String (none) โ€” returns a hex representation of a number, no prefix attached. The number is always treated as positive no matter what. This one plays super nice with Integer and Relatif objects. ๐Ÿ’–

โœจ Integer โœจ

okay bestie, the Integer reserved object is giving native 64-bit signed integer energy โ€” it literally implements that behavior. You build one from a literal using standard decimal notation, and you can also construct one from a string. All the standard operators come with it, no extra charge. Integer is a literal object derived from the Number object. ๐Ÿ’…

๐ŸŽ€ Predicate

  • integer-p โ€” the vibe check for "is this an Integer?" ๐Ÿฆ‹

๐ŸŒธ Inheritance

Number

๐Ÿ“ Constructors

  • Integer (none) โ€” makes an integer object whose default value is 0.
  • Integer (Real) โ€” makes an integer object from the real object argument, with that value truncated down to an integer value.
  • Integer (Integer) โ€” makes an integer object from the integer object argument.
  • Integer (Character) โ€” makes an integer object from the character object argument. The character encoding value gets used as the integer value.

๐Ÿ‘‘ Operators

  • == -> Boolean (Integer|Real) โ€” returns true if the calling object equals the integer or real argument.
  • != -> Boolean (Integer|Real) โ€” returns true if the calling object is not equal to the integer or real argument.
  • + -> Integer (Integer|Real) โ€” returns the sum of the calling integer and an integer or real object.
  • - -> Integer (Integer|Real) โ€” returns the subtraction of the calling integer and an integer or real object.
  • * -> Integer (Integer|Real) โ€” returns the multiplication of the calling integer and an integer or real object.
  • / -> Integer (Integer|Real) โ€” returns the division of the calling integer and an integer or real object.
  • < -> Boolean (Integer|Real) โ€” returns true if the calling integer is less than the integer or real object.
  • <= -> Boolean (Integer|Real) โ€” returns true if the calling integer is less equal than the integer or real object.
  • > -> Boolean (Integer|Real) โ€” returns true if the calling integer is greater than the integer or real object.
  • >= -> Boolean (Integer|Real) โ€” returns true if the calling integer is greater equal than the integer or real object.
  • ++ -> Integer (Integer|Real) โ€” increments the calling integer by 1. lil glow-up โœจ
  • -- -> Integer (Integer|Real) โ€” decrements the calling integer by 1.
  • += -> Integer (Integer|Real) โ€” adds and assigns the calling integer with an integer or real argument object.
  • -= -> Integer (Integer|Real) โ€” subtracts and assigns the calling integer with an integer or real argument object.
  • *= -> Integer (Integer|Real) โ€” multiplies and assigns the calling integer with an integer or real argument object.
  • /= -> Integer (Integer|Real) โ€” divides and assigns the calling integer with an integer or real argument object.

๐Ÿ’œ Methods

  • or -> Integer (Integer) โ€” returns the binary or between the integer and the integer argument.
  • abs -> Integer (none) โ€” returns the absolute value of the calling integer instance. no more negativity ๐Ÿ’…
  • not -> Integer (none) โ€” returns the binary negation of the calling integer instance.
  • shl -> Integer (Integer) โ€” returns a new integer, the calling integer instance shifted left by the integer argument.
  • shr -> Integer (Integer) โ€” returns a new integer, the calling integer instance shifted right by the integer argument.
  • and -> Integer (Integer) โ€” returns a new integer, the binary and between the calling integer instance and the integer argument.
  • xor -> Integer (Integer) โ€” returns a new integer, the binary xor between the calling integer instance and the integer argument.
  • mod -> Integer (Integer) โ€” returns the modulo between the integer instance and the integer argument. Heads up: a type-error exception is raised if the argument is not an argument. ๐Ÿซ  (yes, that's literally what it says, iykyk)
  • odd-p -> Boolean (none) โ€” returns true if the integer instance is odd, false otherwise.
  • even-p -> Boolean (none) โ€” returns true if the integer instance is even, false otherwise.
  • zero-p -> Boolean (none) โ€” returns true if the integer instance is null, false otherwise.

๐ŸŒˆ Relatif ๐ŸŒˆ

The Relatif reserved object is the unlimited signed integer queen โ€” it implements that behavior, no ceiling, no cap fr fr. To build one from a literal you use standard decimal notation followed by the 'r' or 'R' character. You can also construct one from a string. This class is basically the Integer class's cooler sibling. Relatif is a literal object derived from the Number object. ๐Ÿ‘‘

๐Ÿงš Predicate

  • relatif-p โ€” the vibe check for "is this a Relatif?" ๐Ÿฆ‹

๐ŸŒธ Inheritance

Number

๐Ÿ“ Constructors

  • Relatif (none) โ€” makes a relatif object whose default value is 0.
  • Relatif (Real) โ€” makes a relatif object from the real object argument, with that value truncated down to an integer value.
  • Relatif (Relatif) โ€” makes a relatif object from the relatif object argument.
  • Relatif (Integer) โ€” makes a relatif object from the integer object argument.
  • Relatif (Character) โ€” makes a relatif object from the character object argument. The character encoding value gets used as the relatif value.

๐Ÿ‘‘ Operators

  • == -> Boolean (Relatif|Integer) โ€” returns true if the calling object equals the relatif or integer argument.
  • != -> Boolean (Relatif|Integer) โ€” returns true if the calling object is not equal to the relatif or integer argument. (lowkey the manpage prints == on this line, but it's the != entry, promise ๐Ÿ™ˆ)
  • + -> Relatif (Relatif|Integer) โ€” returns the sum of the calling relatif and a relatif or integer object.
  • - -> Relatif (Relatif|Integer) โ€” returns the subtraction of the calling relatif and a relatif or integer object.
  • * -> Relatif (Relatif|Integer) โ€” returns the multiplication of the calling relatif and a relatif or integer object.
  • / -> Relatif (Relatif|Integer) โ€” returns the division of the calling relatif and a relatif or integer object.
  • < -> Boolean (Relatif|Integer) โ€” returns true if the calling relatif is less than the relatif or integer object.
  • <= -> Boolean (Relatif|Integer) โ€” returns true if the calling relatif is less equal than the relatif or integer object.
  • > -> Boolean (Relatif|Integer) โ€” returns true if the calling relatif is greater than the relatif or integer object.
  • >= -> Boolean (Relatif|Integer) โ€” returns true if the calling relatif is greater equal than the relatif or integer object.
  • ++ -> Relatif (Relatif|Integer) โ€” increments the calling relatif by 1.
  • -- -> Relatif (Relatif|Integer) โ€” decrements the calling relatif by 1.
  • += -> Relatif (Relatif|Integer) โ€” adds and assigns the calling relatif with a relatif or integer argument object.
  • -= -> Relatif (Relatif|Integer) โ€” subtracts and assigns the calling relatif with a relatif or integer argument object.
  • *= -> Relatif (Relatif|Integer) โ€” multiplies and assigns the calling relatif with a relatif or integer argument object.
  • /= -> Relatif (Relatif|Integer) โ€” divides and assigns the calling relatif with a relatif or integer argument object.

๐Ÿ’œ Methods

  • or -> Relatif (Relatif) โ€” returns the binary or between the relatif and the relatif argument.
  • abs -> Relatif (none) โ€” returns the absolute value of the calling relatif instance.
  • not -> Relatif (none) โ€” returns the binary negation of the calling relatif instance.
  • shl -> Relatif (Integer) โ€” returns a new relatif, the calling relatif instance shifted left by the integer argument.
  • shr -> Relatif (Integer) โ€” returns a new relatif, the calling relatif instance shifted right by the integer argument.
  • pow -> Relatif (Integer|Relatif|Integer Integer|Relatif Relatif) โ€” returns a new relatif corresponding to the power of the calling relatif instance raised to the integer or relatif argument. With one argument, the power is computed directly. With two arguments, a fast modular exponentiation is performed, using the second argument as the modulus. iconic math behavior honestly ๐Ÿ”ฅ
  • mmi -> Relatif (Integer|Relatif) โ€” returns the multiplicative modular inverse of the calling relatif. The argument is the modulus used for the inverse calculation.
  • and -> Relatif (Relatif) โ€” returns a new relatif, the binary and between the calling relatif instance and the relatif argument.
  • xor -> Relatif (Relatif) โ€” returns a new relatif, the binary xor between the calling relatif instance and the relatif argument.
  • mod -> Relatif (Relatif|Integer) โ€” the mod method hands you the modulo of the relatif instance and whatever relatif-or-integer you threw at it. Pass it something invalid and boom, type-error exception โ€” it will not play about that. ๐Ÿ™…โ™€๏ธ
  • odd-p -> Boolean (none) โ€” returns true if the relatif instance is odd, false if it's not. that's it. that's the method. โœจ
  • even-p -> Boolean (none) โ€” returns true if the relatif instance is even, false otherwise. bestie behavior fr fr.
  • zero-p -> Boolean (none) โ€” returns true if the relatif instance is null, false otherwise. the vibe check for zero. ๐Ÿ’…
  • get-msb -> Integer (none) โ€” returns the most significant bit position for the calling relatif. if the number is null, 0 gets returned. and heads up: the msb position is counted from 1. ๐Ÿ”ข

๐Ÿฆ‹ Real ๐Ÿฆ‹

The Real reserved object is literally the whole personality of a double floating point number type. you build a real object from a literal using standard decimal dot notation or scientific notation โ€” both ate, no notes. ๐Ÿ’… you can also construct one from an integer, a character or a string. and plot twist: the Real object is a literal object derived from the Number object. generational. ๐Ÿ‘‘

Predicate

real-p

Inheritance

Number

Constructors

  • Real (none) โ€” creates a real object whose default value is 0.0. a fresh baby real. ๐ŸŽ€
  • Real (Real) โ€” creates a real object from the real object argument you pass in.
  • Real (Integer) โ€” creates a real object from the integer object argument.
  • Real (Character) โ€” creates a real object from the character object argument, and the character's encoding value gets used as the integer value. iykyk. ๐Ÿฆ‹

Operators

  • == -> Boolean (Integer|Real) โ€” returns true if the calling object is equal to the integer or real argument.
  • != -> Boolean (Integer|Real) โ€” returns true if the calling object is not equal to the integer or real argument. (yes the source text says == on this line and we are keeping it exactly as-is โ€” we don't edit, we just report ๐Ÿซก๐Ÿ’€)
  • + -> Real (Integer|Real) โ€” returns the sum of the calling real and an integer or a real object. adding, slaying. โž•
  • - -> Real (Integer|Real) โ€” returns the subtraction of the calling real with an integer or a real object.
  • * -> Real (Integer|Real) โ€” returns the multiplication of the calling real with an integer or a real object.
  • / -> Real (Integer|Real) โ€” returns the division of the calling real with an integer or a real object.
  • < -> Boolean (Integer|Real) โ€” returns true if the calling real is less than the integer or real object.
  • <= -> Boolean (Integer|Real) โ€” returns true if the calling real is less equal than the integer or real object.
  • > -> Boolean (Integer|Real) โ€” returns true if the calling real is greater than the integer or real object.
  • >= -> Boolean (Integer|Real) โ€” returns true if the calling real is greater equal than the integer or real object.
  • ++ -> Real (Integer|Real) โ€” increments the calling real by 1. glow up by one. โœจ
  • -- -> Real (Integer|Real) โ€” decrements the calling real by 1.
  • += -> Real (Integer|Real) โ€” add and assign the calling real with an integer or real argument object.
  • -= -> Real (Integer|Real) โ€” subtracts and assign the calling real with an integer or real argument object.
  • *= -> Real (Integer|Real) โ€” multiply and assign the calling real with an integer or real argument object.
  • /= -> Real (Integer|Real) โ€” divide and assign the calling real with an integer or real argument object. (the line in the source says += here โ€” again, not touching it, just showing you exactly what's on the page ๐Ÿซถ)

Methods

  • nan-p -> Boolean (none) โ€” returns true if the calling real number instance is not-a-number (nan). the iconic identity crisis method. ๐Ÿ˜ญ
  • ceiling -> Real (none) โ€” returns the ceiling of the calling real number instance. rounding up, main character energy. โฌ†๏ธ
  • floor -> Real (none) โ€” returns the floor of the calling real number instance. rounding down, humble era. โฌ‡๏ธ
  • abs -> Real (none) โ€” returns the absolute value of the calling real number instance.
  • pow -> Real (Real|Integer) โ€” returns the power of the calling real with the argument. the exponent argument can be either an integer or a real number.
  • sqrt -> Real (none) โ€” returns the square root of the calling real number instance. ๐Ÿงš
  • ln -> Real (none) โ€” returns the natural logarithm of the calling real number instance.
  • exp -> Real (none) โ€” returns the exponential of the calling real number instance.
  • sin -> Real (none) โ€” returns the sine of the calling floating point instance. the angle is expressed in radian.
  • cos -> Real (none) โ€” returns the cosine of the calling floating point instance. the angle is expressed in radian.
  • tan -> Real (none) โ€” returns the tangent of the calling floating point instance. the angle is expressed in radian.
  • asin -> Real (none) โ€” returns the arc sine of the calling floating point instance. the result is in radian.
  • acos -> Real (none) โ€” returns the arc cosine of the calling floating point instance. the result is in radian.
  • atan -> Real (none) โ€” returns the arc tangent of the calling floating point instance. the result is in radian.
  • sinh -> Real (none) โ€” returns the hyperbolic sine of the calling real number instance.
  • cosh -> Real (none) โ€” returns the hyperbolic cosine of the calling real number instance.
  • tanh -> Real (none) โ€” returns the hyperbolic tangent of the calling real number instance. (source says atan on this line, we're keeping the receipts ๐Ÿงพ๐Ÿ’€)
  • asinh -> Real (none) โ€” returns the hyperbolic arc sine of the calling real number instance.
  • acosh -> Real (none) โ€” returns the hyperbolic arc cosine of the calling real number instance.
  • atanh -> Real (none) โ€” returns the hyperbolic arc tangent of the calling real number instance.
  • zero-p -> Boolean (none) โ€” returns true if the calling real instance is null, false otherwise.

๐Ÿ’œ Complex ๐Ÿ’œ

The Complex reserved object is doing the whole double floating point complex type thing. you construct a complex object from a literal using standard decimal dot notation or scientific notation, with the letter i as the postfix for the imaginary part โ€” yes, the imaginary part gets a little i accessory and honestly? iconic. ๐ŸŽ€ the Complex object is a literal object derived from the Number object, same family tree as Real. ๐Ÿ‘‘

Predicate

complex-p

Inheritance

Number

Constructors

  • Complex (none) โ€” creates a complex object whose default value is 0.0+0.0i. brand new, zero thoughts, zero imagination (literally). ๐Ÿ’€
  • Complex (Complex) โ€” creates a complex object from the complex object argument.
  • Complex (Real) โ€” creates a complex object from the real object argument.
  • Complex (Integer) โ€” creates a complex object from the integer object argument.

Operators

  • == -> Boolean (Integer|Real|Complex) โ€” returns true if the calling object is equal to the integer, real or complex argument.
  • != -> Boolean (Integer|Real|Complex) โ€” returns true if the calling object is not equal to the integer, real or complex argument. (source says == here again โ€” keeping it verbatim, bestie, no cap ๐Ÿซก)
  • + -> Real (Integer|Real|Complex) โ€” returns the sum of the calling complex with an integer, a real or complex object.
  • - -> Real (Integer|Real|Complex) โ€” returns the subtraction of the calling complex with an integer, real or complex object.
  • * -> Real (Integer|Real|Complex) โ€” returns the multiplication of the calling complex with an integer, real or complex object.
  • / -> Real (Integer|Real|Complex) โ€” returns the division of the calling complex with an integer, real or complex object.
  • += -> Real (Integer|Real|Complex) โ€” add and assign the calling complex with an integer, real or complex argument object.
  • -= -> Real (Integer|Real|Complex) โ€” subtracts and assign the calling complex with an integer, real or complex argument object.
  • *= -> Real (Integer|Real|Complex) โ€” multiply and assign the calling complex with an integer, real or complex argument object.
  • /= -> Real (Integer|Real|Complex) โ€” divide and assign the calling complex with an integer, real or complex argument object. (yep, += again in the source line โ€” showing you exactly what's there ๐Ÿ’…)

Methods

  • zero-p -> Boolean (none) โ€” returns true if the calling complex number instance is null.
  • module -> Real (none) โ€” returns the module of the calling complex number instance.
  • square-module -> Real (none) โ€” returns the square root of the of the calling complex number instance module. (double "the of" is in the source, we preserve it with love ๐ŸŒธ)
  • get-real-part -> Real (none) โ€” returns the real part of the calling complex number instance. the grounded one. ๐ŸŒฑ
  • get-imaginary-part -> Real (none) โ€” returns the imaginary part of the calling complex number instance. the dreamer. ๐Ÿฆ‹

๐Ÿ‘‘ Character

The Character reserved object is literally the blueprint for a Unicode character type, and she ate. You can build one from a literal quoted notation, from a string, or from the U+ hexadecimal notation. The character class is designed to handle the full range of the Unicode character space by using an internal 32 bit quad representation with 31 bit valid. And bestie, the Character class also conforms with the ISO 10646 character representation. No cap. ๐Ÿ’…

Predicate

  • character-p

Inheritance

  • Literal

Constructors

  • Character (none) โ€” creates a character object whose default value is the null character. Baby's first char, she's empty but full of potential ๐ŸŽ€
  • Character (String) โ€” creates a character object from the string object argument.
  • Character (Integer) โ€” creates a character object from the integer object argument.
  • Character (Character) โ€” creates a character object from the character object argument. Copy-paste but make it iconic โœจ

Operators

  • == -> Boolean (Character) โ€” returns true if the calling object is equal to the character argument.
  • != -> Boolean (Character) โ€” returns true if the calling object is not equal to the character argument.
  • < -> Boolean (Character) โ€” returns true if the calling character is less than the character object.
  • <= -> Boolean (Character) โ€” returns true if the calling character is less equal than the character object.
  • > -> Boolean (Character) โ€” returns true if the calling character is greater than the character object.
  • >= -> Boolean (Character) โ€” returns true if the calling character is greater equal than the character object.
  • ++ -> Character (Character) โ€” increments the calling character by the next one in lexicographic order. She's moving up in the world ๐ŸŒˆ
  • -- -> Character (Character) โ€” decrements the calling character by the previous one in lexicographic order. We love a lil step back ๐Ÿฆ‹
  • += -> Character (Integer) โ€” adds the integer argument to the calling character.
  • -= -> Character (Integer) โ€” subtracts the integer argument to the calling character.

Methods

  • letter-p -> Boolean (none) โ€” returns true if the character is a letter character, false otherwise.
  • digit-p -> Boolean (none) โ€” returns true if the character is a digit character, false otherwise.
  • alpha-p -> Boolean (none) โ€” returns true if the character is an alphanumeric character, false otherwise.
  • blank-p -> Boolean (none) โ€” returns true if the character is a blank or tab character, false otherwise.
  • eol-p -> Boolean (none) โ€” returns true if the character is an end-of-line character, false otherwise.
  • eos-p -> Boolean (none) โ€” returns true if the character is an end-of-stream character, false otherwise.
  • nil-p -> Boolean (none) โ€” returns true if the character is the nil character, false otherwise.
  • to-integer -> Integer (none) โ€” returns an integer representation of the characters.

๐ŸงŠ Byte

The Byte reserved object implements the behavior of an 8 bit character type. You can construct a byte from an integer or from another byte. The Byte class is similar to the Character class but she's not a literal object, because she does not have a literal representation. Most of the time, a byte object is created by another object โ€” like a stream, when using the read method, for example. She's the supporting character who's actually carrying the whole plot ๐Ÿซถ

Predicate

  • byte-p

Inheritance

  • Serial

Constructors

  • Byte (none) โ€” creates a byte object whose default value is the null byte.
  • Byte (Integer) โ€” creates a byte object from the integer object argument. The integer value must be in the range of 0x00 to 0xFF. Stay in your lane bestie, that's the whole lane ๐Ÿ˜ญ
  • Byte (Byte) โ€” creates a byte object from the byte object argument.

Operators

  • == -> Boolean (Byte) โ€” returns true if the calling object is equal to the byte argument.
  • != -> Boolean (Byte) โ€” returns true if the calling object is not equal to the byte argument.
  • < -> Boolean (Byte) โ€” returns true if the calling byte is less than the byte object.
  • <= -> Boolean (Byte) โ€” returns true if the calling byte is less equal than the byte object.
  • > -> Boolean (Byte) โ€” returns true if the calling byte is greater than the byte object.
  • >= -> Boolean (Byte) โ€” returns true if the calling byte is greater equal than the byte object.
  • ++ -> Byte (Byte) โ€” increments the calling byte by one. One singular step, periodt ๐Ÿ’…
  • -- -> Byte (Byte) โ€” decrements the calling byte by one.
  • += -> Byte (Integer) โ€” adds the integer argument to the calling byte.
  • -= -> Byte (Integer) โ€” subtracts the integer argument to the calling byte.

Methods

  • eos-p -> Boolean (none) โ€” returns true if the character is an end-of-stream character, false otherwise.
  • nil-p -> Boolean (none) โ€” returns true if the byte is the nil byte, false otherwise.
  • to-integer -> Integer (none) โ€” returns an integer representation of the byte.
  • to-char -> Character (none) โ€” returns a character representing the byte. Glow up transformation arc โœจ

๐ŸŽ€ String

The String reserved object implements the behavior of an internal character array. The double quote notation is the literal notation for a string. A string can also be constructed from the standard objects. Strings can be compared, transformed, or extracted with the help of the methods listed below. Internally, the string is represented as an array of Unicode characters. She's giving main character energy, fr fr ๐Ÿ‘‘

Predicate

  • string-p

Inheritance

  • Literal

Constructors

  • String (none) โ€” creates a string object whose default value is the null string.
  • String (Literal) โ€” creates a string object from the literal object argument.

Operators

  • == -> Boolean (String) โ€” returns true if the calling object is equal to the string argument.
  • != -> Boolean (String) โ€” returns true if the calling object is not equal to the string argument.
  • < -> Boolean (String) โ€” returns true if the calling string is less than the string argument.
  • <= -> Boolean (String) โ€” returns true if the calling string is less equal than the string argument.
  • > -> Boolean (String) โ€” returns true if the calling string is greater than the string argument.
  • >= -> Boolean (String) โ€” returns true if the calling string is greater equal than the string argument.
  • + -> String (String) โ€” returns the sum of the calling string with an string object. Friendship bracelets but for text ๐Ÿ’–
  • += -> String (String) โ€” adds and assigns the calling string with the string argument.

Methods

  • length -> Integer (none) โ€” returns the length of the string. How many chars, bestie, let's count ๐Ÿ“
  • first -> Character (none) โ€” returns the first character in the string.
  • last -> Character (none) โ€” returns the last character in the string. Save the best for last, obviously ๐Ÿฆ‹
  • strip-left -> String (none|String) โ€” removes the leading blanks and tabs and returns a new string. With a string argument, each character in the string is taken as a character separator that should be stripped.
  • strip-right -> String (none|String) โ€” removes the trailing blanks and tabs and returns a new string. With a string argument, each character in the string is taken as a character separator that should be stripped.
  • strip -> String (none|String) โ€” removes the leading, trailing blanks and tabs and returns a new string. With a string argument, each character in the string is taken as a character separator that should be stripped.
  • split -> Vector (none|String) โ€” splits the string into one or more string according to break sequence. If no argument is passed to the call, the break sequence is assumed to be a blank, tab and eol characters. Break it down now โœ‚๏ธ
  • extract -> Vector (Character) โ€” extracts one or more string which are enclosed by a control character passed as an argument. The method returns a vector of strings.
  • to-upper -> String (none) โ€” converts all string characters to upper case and returns a new string. SHE'S LOUD NOW ๐Ÿ“ฃ
  • to-lower -> String (none) โ€” converts all string characters to lower case and returns a new string. now she's whispering ๐Ÿ™ˆ
  • get -> Character (Integer) โ€” returns the string character at the position given by the argument. If the index is invalid, an exception is raised. Not me ignoring the bounds check... don't do that ๐Ÿ’€
  • sub-left -> String (Integer) โ€” returns the left sub string of the calling string up-to the argument index. If the index is out of range, the string is returned.
  • sub-right -> String (Integer) โ€” returns the right sub string of the calling string starting at the argument index. If the index is out of range, the string is returned.
  • fill-left -> String (Character Integer) โ€” okay so this one gives you a string that's been filled on the left with the character argument. The second argument is the length you want the result to be. If the calling string is already too long, the string is returned. No extra padding, no drama. ๐Ÿ’…
  • fill-right -> String (Character Integer) โ€” same energy but it fills on the right with the character argument. Second arg is the desired length of the resulting string. If the calling string is too long, the string is returned. Slay. โœจ
  • substr -> String (Integer Integer) โ€” returns a string starting at the first argument index and ending at the second argument index. If the indexes are out of range, an exception is raised. So like, know your bounds bestie. ๐Ÿ˜ญ
  • strcic -> Boolean (String) โ€” compares the calling string with the argument string in a case insensitive way. That's it, that's the vibe. ๐Ÿซถ

๐Ÿ” Regex ๐Ÿ”

The Regex object is a special object which is automatically instantiated by the interpreter when using the delimiter character [ and ]. The regex syntax involves the use of standard characters, meta characters and control characters. Additionally, a string can be used to specify a series of characters. In its first form, the [ and ] characters are used as syntax delimiters. The lexical analyzer automatically recognizes this token as a regex and builds the equivalent Regex object. The second form is the explicit construction of the Regex object. Note also that the [ and ] characters are also used as regex block delimiters. Any character, except the one used as operators, can be used in a regex. The $ character is used as a meta-character -- or control character -- to represent a particular set of characters. For example, [hello world] is a regex which matches only the "hello world" string. The [$d+] regex matches one or more digits. The following control characters are builtin in the regex engine.

  • $a โ€” matches any letter or digit
  • $b โ€” matches any blank characters
  • $c โ€” matches any combining characters
  • $d โ€” matches any digit
  • $e โ€” matches eol, cr and eos
  • $l โ€” matches any lower case letter
  • $n โ€” matches eol or cr
  • $s โ€” matches any letter
  • $u โ€” matches any upper case letter
  • $v โ€” matches any valid constituent
  • $w โ€” matches any word constituent
  • $x โ€” matches any hexadecimal characters

The uppercase version is the complement of the corresponding lowercase character set. A character which follows a $ character and that is not a meta character is treated as a normal character. For example $[ is the [ character. A quoted string can be used to define character matching which could otherwise be interpreted as control characters or operator. A quoted string also interprets standard escaped sequences but not meta characters.

  • $A โ€” any character except letter or digit
  • $B โ€” any character except blank characters
  • $C โ€” any character except combining characters
  • $D โ€” any character except digit
  • $E โ€” any character except eol, cr and eos
  • $L โ€” any character except lower case letter
  • $N โ€” any character except eol or cr
  • $S โ€” any character except letter
  • $U โ€” any character except upper case letter
  • $V โ€” any character except constituent
  • $W โ€” any character except word constituent
  • $X โ€” any character except hex characters

A character set is defined with the < and > characters. Any enclosed character defines a character set. Note that meta characters are also interpreted inside a character set. For example, <$d+-> represents any digit or a plus or minus. If the first character is the ^ character in the character set, the character set is complemented with regards to its definition. The following unary operators can be used with single character, control characters and sub-expressions.

  • * โ€” match 0 or more times
  • + โ€” match 1 or more times
  • ? โ€” match 0 or 1 time
  • | โ€” alternation

Alternation is an operator which works with a secondary expression. Care should be taken when writing the right sub-expression. For example the following regex [$d|hello] is equivalent to [[$d|h]ello]. In other words, the minimal first sub-expression is used when compiling the regex. iykyk ๐Ÿ’œ

Predicate

regex-p

Inheritance

Literal

Constructors

  • Regex (none) โ€” creates a regex object whose default value is the null regex.
  • Regex (String) โ€” creates a regex object with the string object argument. The string argument is the regex specification.

Operators

  • == -> Boolean (String) โ€” returns true if the argument is matched by the regex.
  • != -> Boolean (String) โ€” returns true if the argument is not matched by the regex.
  • < -> Boolean (String) โ€” returns true if the argument is partially matched by the regex.

Methods

  • length -> Integer (none) โ€” returns the length of the group vector when a regex match has been successful.
  • get -> String (Integer) โ€” returns by index the group sub-string when a regex match has been successful.
  • match -> String (String) โ€” returns the first matching string of the argument string.
  • replace -> String (String String) โ€” returns a string constructed by replacing all matching sub-string -- from the first argument -- with the second argument string.

๐Ÿซ™ CONTAINER OBJECTS ๐Ÿซ™

This chapter is a reference of the reserved container objects with their respective builtin methods. Some of these container objects are iterable objects. When an object is iterable, an iterator constructor is provided. The iterable-p predicate returns true if the container is an iterable object. The iterator method can be used to construct an object iterator. For a given iterator, the predicates end-p and valid-p can be used to check for the end or a valid iterator position. The next method moves the iterator to its next position. The prev method moves the iterator -- if possible -- to its previous position. The get-object method returns the object at the current iterator position. got it? good. ๐Ÿ“

๐Ÿงฉ Cons ๐Ÿงฉ

A Cons instance or simply a cons cell is a simple element used to build linked list. The cons cell holds an object and a pointer to the next cons cell. The cons cell object is called car and the next cons cell is called the cdr. Historically, car means Current Address Register and cdr means Current Data Register. This notation is still present here for the sake of tradition. the more you know โœจ

Predicate

cons-p

Inheritance

SerialIterableCollectable

Constructors

  • Cons (none) โ€” creates a default cons cell with the car and cdr set to nil.
  • Cons (Objects...) โ€” creates a list of cons cells with the object arguments. Each argument object is assigned to the car of the cons cell while the cdr is used to link the cells together.

Methods

  • get-car -> Object (none) โ€” returns the car of the calling cons cell.
  • get-cdr -> Cons (none) โ€” returns the cdr of the calling cons cell.
  • get-cadr -> Object (none) โ€” returns the car of the cdr of the calling cons cell or nil if the cdr is nil.
  • get-caddr -> Object (none) โ€” returns the car of the cdr of the cdr of the calling cons cell or nil if the cdr is nil.
  • get-cadddr -> Object (none) โ€” returns the car of the cdr of the cdr of the cdr of the calling cons cell or nil if the cdr is nil.
  • length -> Integer (none) โ€” returns the length of the cons cell. The minimum length returned is always 1.
  • nil-p -> Boolean (none) โ€” returns true if the car of the calling cons cell is nil, false otherwise.
  • block-p -> Boolean (none) โ€” returns true if the cons cell is of type block, false otherwise.
  • set-car -> Object (Object) โ€” sets the car of the calling cons cell. The object argument is returned by the method.
  • set-cdr -> Cons (Cons) โ€” sets the cdr of the calling cons cell. The cons cell argument is returned by the method.
  • add -> Object (Object) โ€” appends an object at the end of the cons cell chain by creating a new cons cell and linking it with the last cdr. The object argument is returned by this method.
  • get -> Object (Integer) โ€” returns the car of the cons cell chain at a certain position specified by the integer index argument.

๐Ÿ”ข Enum ๐Ÿ”ข

The Enum builtin object is an enumeration object. The enumeration is constructed with the reserved keyword enum and a list of literals or by string name with a constructor.

Predicate

enum-p

Inheritance

Object

Constructors

  • Enum (none) โ€” creates an empty enumeration.
  • Enum (String...) โ€” creates an enumeration from a list of string arguments.

Methods

  • reset -> none (none) โ€” resets the enumeration and makes it empty.
  • length -> Integer (none) โ€” returns the number of items in the enumeration.
  • exists-p -> Boolean (String) โ€” returns true if the name argument exists as an item. The name argument must be a lexical name or an exception is thrown.
  • add -> none (String) โ€” adds a new item to the enumeration by name. This method returns nil.
  • get -> String (Integer) โ€” returns an item string representation by index. The integer argument is the item index.

๐Ÿ“œ List ๐Ÿ“œ

The List builtin object provides the facility of a double-link list. The List object is another example of iterable object. The List object provides support for forward and backward iteration. main character energy fr ๐Ÿ’–

Predicate

list-p

Inheritance

Iterable

๐Ÿ› ๏ธ Constructors ๐Ÿ› ๏ธ

โœจ Methods โœจ

  • length -> Integer (none) โ€” hands you the length of the list bestie ๐Ÿ’– minimum length is 0, aka the empty-list era.
  • iterator -> Iterator (none) โ€” gives you a forward and backward iterator for this list, so you can vibe in either direction ๐Ÿฆ‹
  • add -> Object (Object) โ€” appends an object at the end of the list, and yep, it returns that same object argument back to you.
  • insert -> Object (Object) โ€” inserts an object at the beginning of the list, and it also returns the object argument. main character energy, always first ๐Ÿ’…
  • get -> Object (Integer) โ€” returns the object sitting at a certain position, and that position is specified by the integer index argument.

๐ŸŒธ Strvec ๐ŸŒธ

The Strvec builtin object is giving index array of strings, and honestly it ate. It's a serializable object that stores strings, and you can add strings with an optional preference for a unique string value. Basically it's the general purpose Vector class's cousin, but string-coded ๐ŸŽ€

Predicate

  • strvec-p

Inheritance

  • Serial

Constructors

  • Strvec (none) โ€” creates an empty string vector. blank slate, fresh start โœจ
  • Strvec (Integer|Boolean) โ€” creates a string vector with a predefined size or with a uniq flag. First form: the preferred vector size is given as the argument. Second form: the string unicity flag is given as the argument.
  • Strvec (Integer Boolean) โ€” creates a string vector with a predefined size and a uniq flag. First argument = the preferred vector size. Second argument = the string unicity flag.

Methods

  • reset -> none (none) โ€” resets the string vector. Once it's done, the string vector is empty, periodt.
  • length -> Integer (none) โ€” returns the length of the string vector. Minimum length is 0 for an empty vector.
  • min-length -> Integer (none) โ€” returns the minimum string length in the string vector.
  • max-length -> Integer (none) โ€” returns the maximum string length in the string vector.
  • empty-p -> Boolean (none) โ€” returns true if the vector is empty. vibe check: empty? ๐Ÿ’€
  • active-p -> Boolean (none) โ€” returns true if the vector is not empty. It's literally the negation of empty-p, no cap.
  • get -> String (Integer) โ€” returns the string in the vector at a certain position, specified by the integer index argument.
  • set -> none (Integer String) โ€” sets a vector position with a string. First argument = the vector index. Second argument = the string to set.
  • first -> String (none) โ€” returns the first string in the vector ๐Ÿฅ‡
  • last -> String (none) โ€” returns the last string in the vector.
  • pop -> Object (none) โ€” removes the first element in the string vector and returns it.
  • pop-last -> String (none) โ€” removes the last element in the string vector and returns it.
  • find -> Integer (String) โ€” tries to find a string in the vector. Found it? you get the vector index. Didn't? you get the -1 value ๐Ÿ™ˆ
  • lookup -> Integer (String) โ€” also tries to find a string in the vector. Found it? vector index. Didn't? an exception is raised. she's dramatic like that ๐Ÿ˜ญ
  • add -> none (String) โ€” adds an object at the end of the vector. If the uniq flag is active, the string argument is not added if it already exists.
  • exists-p -> Boolean (String) โ€” returns true if the string argument exists in the vector.
  • remove -> none (Integer|String) โ€” removes a string from the vector by index or by value. First form: the vector index is used as the place to remove. Second form: the string argument is used as a key for removal. Heads up bestie, this method repacks the vector once the string has been removed.
  • set-unique -> none (Boolean) โ€” sets the string vector unique flag. When the unique flag is set, there is only no string duplicate in the vector. ๐Ÿ’…
  • get-unique -> Boolean โ€” returns the string vector unique flag value.
  • concat -> String (none | Character) โ€” concatenates the string vector elements with a character separator. First form, with a separator character: the resulting string is the concatenation of the string vector elements. Second form: the resulting string is the concatenation of the vector elements with a character separator. If the character separator is nil then no separator is placed. ๐Ÿงš

๐Ÿ’œ Vector ๐Ÿ’œ

The Vector builtin object gives you an index array of objects. It's another example of an iterable object, and it provides support for forward and backward iteration. iconic behavior honestly ๐Ÿ”ฅ

Predicate

  • vector-p

Inheritance

  • SerialIterableCollectable

Constructors

  • Vector (none) โ€” creates an empty vector.
  • Vector (Object...) โ€” creates a vector from a list of object arguments.

Methods

  • reset -> none (none) โ€” resets the vector. When it's complete, the vector is empty.
  • length -> Integer (none) โ€” returns the length of the vector. Minimum length is 0 for an empty vector.
  • empty-p -> Boolean (none) โ€” returns true if the vector is empty.
  • get -> Object (Integer) โ€” returns the object in the vector at a certain position, specified by the integer index argument.
  • set -> Object (Integer Object) โ€” sets a vector position with an object. First argument = the vector index. Second argument = the object to set. And yes, the method returns the object to set ๐Ÿซถ
  • first -> Object (none) โ€” returns the first element in the vector.
  • last -> Object (none) โ€” returns the last element in the vector.
  • pop -> Object (none) โ€” removes the first element in the vector and returns it.
  • pop-last -> Object (none) โ€” removes the last element in the vector and returns it.
  • find -> Integer (Object) โ€” tries to find an object in the vector. If the object is found, the vector index is returned as an Integer object; else nilp is returned. ๐Ÿ’€
  • add -> Object (Object|Integer Object) โ€” appends an object at the end of the vector, or at a certain index. First form: the object argument is added at the end of the vector. Second form: the object argument is inserted in the vector at the specified index. Either way, the object argument is returned by this method.
  • exists-p -> Boolean (Object) โ€” returns true if the object argument exists in the vector. Super useful to make sure only one occurrence of an object gets added to a vector ๐Ÿ‘‘
  • clean -> none (Integer) โ€” removes an object from the vector by index and repacks the vector.
  • remove -> none (Object) โ€” removes an object from the vector and repacks the vector. If duplicates exist in the file, only one is removed.

๐ŸŒˆ HashTable ๐ŸŒˆ

The HashTable builtin object is a container object that maps an object with a name. It's dynamic and gets resized automatically when needed โ€” she grows, she adapts, she slays โœจ The lookup method throws an exception if the name isn't found. The get method returns nilp if the object isn't found. The table can be configured to operate in a case insensitive way, and if the case flag is changed, the table is automatically reset.

Predicate

  • hashtable-p

Inheritance

  • Object

Constructors

  • HashTable (none) โ€” creates an empty table.
  • HashTable (Boolean) โ€” creates a table by case insensitive flag.
  • HashTable (Integer) โ€” creates a table with a specific size.
  • HashTable (Integer Boolean) โ€” creates a table by size and case insensitive flag.

Methods

  • reset -> none (none) โ€” resets the table so that it becomes empty.
  • add -> none (String Object) โ€” adds a new object in the table by key. First argument = the key used to associate the object in the table. Second argument = the object to add.
  • length -> Object (none) โ€” returns the number of objects in the table.
  • empty-p -> Boolean (none) โ€” returns true if the table is empty.
  • set-case-flag -> none (Boolean) โ€” sets the case insensitive flag. And listen, the table is automatically reset when this method is called ๐Ÿ”
  • get-case-flag -> Boolean (none) โ€” returns the case insensitive flag.
  • get -> Object (String) โ€” returns the object associated with a key. If the key isn't found, nil is returned.
  • lookup -> Object (String) โ€” returns the object associated with a key. If the key isn't found, an exception is raised ๐Ÿ˜ญ
  • get-key -> String (Integer) โ€” returns the key associated with an entry in the table by index. If the index is out of range, an exception is raised.
  • get-object -> Object (Integer) โ€” bestie, this one returns the object thatโ€™s linked to a table entry by index. If the index is out of range, an exception gets raised, no cap. ๐Ÿ’…

๐Ÿ’– Set ๐Ÿ’–

The Set builtin object is giving โ€œuniform set of objectsโ€ energy. Itโ€™s another example of an iterable object, bestie. And it provides support for forward and backward iteration. Main character behavior. โœจ

Predicate

  • set-p โ€” the vibe check.

Inheritance

  • SerialIterable โ€” it inherits from this.

Constructors

  • Set (none) โ€” creates an empty set. Literally nothing in it. Empty. Like my wallet. ๐Ÿ˜ญ
  • Set (Object...) โ€” creates a set from a list of object arguments. Slay.

Methods

  • reset -> none (none) โ€” resets the set. When the method is complete, the set is empty. Periodt.
  • length -> Integer (none) โ€” returns the number of elements in the set. The minimum length is 0 for an empty set.
  • add -> Object (Object) โ€” appends an object in the set. If the object already exists in the set, it is not added twice. This is the main difference between a set and a vector. The object argument is returned by this method.
  • get -> Object (Integer) โ€” returns object by index.
  • empty-p -> Boolean (Object) โ€” the empty-p predicate returns true if the set is empty.
  • exists-p -> Boolean (Object) โ€” the exists predicate returns true if the object argument exists in the set.
  • merge -> none (Set) โ€” merges the set argument into the calling set. If an element already exists in the set, it is not added.
  • remix -> none (Integer) โ€” mixes the set by randomly swapping all the elements. This method is useful when the set has been filled with a certain order but the access must be done randomly.
  • remove -> Boolean (Object) โ€” removes the object argument from the set. If the object is removed, the method returns true. If the object is not in the set, the method returns false.
  • get-random-subset -> Set (Integer) โ€” returns a subset whose cardinal is at least the size argument with a set of randomly chosen elements. The result set might have a cardinal less than the requested size if the calling set cardinal is less than the requested size.
  • iterator -> Iterator (none) โ€” returns an iterator for this set. The iterator supports forward and backward iteration.

๐ŸŽ€ Queue ๐ŸŽ€

The Queue builtin object is a container used to push and pop objects. The queue works like a fifo, with the notable exception that it is blocking in push and pop. So itโ€™s giving โ€œwait for itโ€ energy. โณ

Predicate

  • queue-p โ€” the vibe check.

Inheritance

  • Object โ€” it inherits from this.

Constructors

  • Queue (none) โ€” creates an empty queue.
  • Queue (size) โ€” creates a queue by size.

Methods

  • push -> none (Object) โ€” pushes an object in the queue. The push method will block if the queue is full.
  • pop -> Object (none) โ€” dequeues an object in the order it was pushed. The pop method will block if the queue is empty.
  • length -> Object (none) โ€” returns the number of queued objects.
  • empty-p -> Boolean (none) โ€” returns true if the queue is empty.
  • reset -> none (none) โ€” resets the queue.

๐Ÿ‘‘ Heap ๐Ÿ‘‘

The Heap builtin object is an object based heap class that organizes objects with respect to a key. The heap is organized as a binary tree whose root element is either the object with the highest or the lowest key. A flag controls whether the heap is operating in ascending or descending mode. By default, the heap operates in ascending mode, which means that the root node is the lowest one. The heap is self-resizable. The object insertion is also controlled by a minimum and maximum key. If the key is below the minimum key or above the maximum key, the object is not inserted. So picky. ๐Ÿ’…

Predicate

  • heap-p โ€” the vibe check.

Inheritance

  • Object โ€” it inherits from this.

Constructors

  • Heap (none) โ€” creates an empty heap. By default the heap operates in ascending mode.
  • Heap (Integer) โ€” creates a heap with a specific size. By default the heap operates in ascending mode.
  • Heap (Boolean) โ€” creates a heap with a specific mode. If the mode is true, the heap operates in ascending order. If the mode is false, the heap operates in descending order. In ascending order, the first object is the object with the lowest key.
  • Heap (Integer Boolean) โ€” creates a heap with a specific size and mode. The first argument is the heap size. The second argument is the heap mode. If the mode is true, the heap operates in ascending order. If the mode is false, the heap operates in descending order. In ascending order, the first object is the object with the lowest key.

Methods

  • add -> none (Integer Object) โ€” adds a new object in the heap by key. The first argument is the key used to set the object position in the heap. The second argument is the object to add.
  • pop -> Object (none) โ€” pops the first available in the heap. If the heap is empty, an exception is raised.
  • length -> Object (none) โ€” returns the number of objects in the heap.
  • empty-p -> Boolean (none) โ€” returns true if the heap is empty.
  • reset -> none (none) โ€” resets the heap so that it becomes empty.
  • get-key -> Integer (Integer) โ€” returns the key associated with an entry in the heap by index. If the index is out of range, an exception is raised.
  • get-object -> Object (Integer) โ€” returns the object associated with an entry in the heap by index. If the index is out of range, an exception is raised.
  • get-mode -> Boolean (none) โ€” returns the heap operating mode. If the mode is true, the heap operates in ascending order. If the mode is false, the heap operates in descending order. In ascending order, the first object is the object with the lowest key.
  • min-key-p -> Boolean (none) โ€” the min-key-p predicate returns true if a minimum key has been set. The get-min-key method can be used to retrieve the minimum key value.
  • max-key-p -> Boolean (none) โ€” the max-key-p predicate returns true if a maximum key has been set. The get-max-key method can be used to retrieve the maximum key value.
  • reset-min-key -> none (none) โ€” resets the minimum key flag and value.
  • reset-max-key -> none (none) โ€” resets the maximum key flag and value.
  • set-min-key -> none (Integer) โ€” sets the minimum key value.
  • get-min-key -> Integer (none) โ€” returns the minimum key value.
  • set-max-key -> none (Integer) โ€” sets the maximum key value.
  • get-max-key -> Integer (none) โ€” returns the maximum key value.
  • resize -> none (none) โ€” resizes the heap with a new size. If the size is lower than the number of elements, the procedure does nothing.

๐Ÿงš Bitset ๐Ÿงš

The Bitset builtin object is a container for multi bit storage. The size of the bitset is determined at construction. With the use of an index, a particular bit can be set, cleared and tested. So bit manipulation, bestie. ๐Ÿ’…

Predicate

  • bitset-p โ€” the vibe check.

Inheritance

  • Object โ€” it inherits from this.

Constructors

  • Bitset (none) โ€” creates an empty bitset.
  • Bitset (Integer) โ€” creates a bitset whose size is given by the integer argument.
  • Bitset (String) โ€” creates a bitset by parsing the string argument. The string can be either in the normal binary form with or without the 0b prefix or in hexadecimal form with the 0x prefix.
  • Bitset (Buffer Boolean) โ€” creates a bitset from a buffer content. Each byte in the buffer is to be placed in the bitset. The boolean argument is the ascending flag. When true the buffer bytes are used in ascending index order, thus making the first byte in the buffer to be used as the first right byte in the bitset. When false, the buffer bytes are used in descending index order, thus making the last byte in the buffer to be used as the first byte in the bitset.

Methods

  • reset -> none (none) โ€” resets the bitset and forces the initial size to 0.
  • marked-p -> Boolean (Integer) โ€” the marked-p predicate returns true if the bit is set at the index argument.
  • clear -> none (Integer) โ€” clears a bit by the index argument.
  • mark -> none (Integer) โ€” marks a bit by the index argument.
  • mark -> none (Integer Boolean) โ€” sets the bit value by the index argument with the boolean second argument.
  • add -> none (Integer Boolean) โ€” adds a bit in the bitset at the given position. The first argument is the bit position and the second argument is the bit value. The add method is the only method that resizes a bitset.
  • set -> none (Integer|String) โ€” sets a bitset with an integer value. In the first form with an integer argument, the bitset is completely reset to a 64 bits bitset and the value set as an unsigned integer. In the second form with a string argument, the bitset is reset and the string argument is parsed as a binary string with or without binary prefix or as a hexadecimal string.
  • clamp -> none (Boolean) โ€” clamps a bitset by boolean value. The bitset size is determined by finding the upper bit index that matches the boolean argument.
  • length -> Integer (none) โ€” hands you the length of the bitset... in bits, bestie, not bytes, don't get it twisted. ๐Ÿ’…
  • to-byte -> Integer (Byte) โ€” maps a lil' chunk of the bitset onto a byte at one specific position. The integer arg is the bit position that gets mapped to the byte lsb. precise queen behavior. โœจ
  • subset -> Integer (Bitset) โ€” gives you a sub bitset, sized by you.
  • subset -> Integer Integer (Bitset) โ€” gives you a sub bitset by size and position. First integer arg = how big the sub bitset is. Second arg = where in the bitset you're extracting it from. two args, zero confusion. ๐ŸŽ€

๐Ÿซง BUFFER ๐Ÿซง

The Buffer builtin object is a byte buffer and it is everywhere when you're doing i/o, no cap. You can construct it with or without literal arguments. The standard methods to add or push-back bytes or characters? All present, all accounted for. One method that is genuinely iconic is write, which can write a complete buffer to an output stream you pass in as an argument. By default, the buffer operates in resize mode. But heads up โ€” if you configure the buffer to run in non-resize mode, an exception gets raised the moment you try to add a character while the buffer is full. ๐Ÿ˜ญ rude but that's the rules.

Predicate

buffer-p

Inheritance

Object

Constructors

  • Buffer (none) โ€” creates an empty buffer, and it's set up to operate in resize mode. fresh start energy. ๐ŸŒธ
  • Buffer (Literal...) โ€” creates a buffer from a list of literal object arguments. Each literal argument gets turned into a byte representation which is then added into the buffer.

Methods

  • add -> Integer (Byte|Literal|Buffer) โ€” adds a byte, a literal object or a buffer to the calling buffer. The object argument gets auto-converted into a sequence of bytes. If it's a buffer, the entire content is copied in. Returns the number of bytes added. ๐Ÿซถ
  • get -> Byte (none) โ€” returns the next available byte in the buffer but does not remove it. look, don't touch. ๐Ÿ™ˆ
  • read -> Byte (none) โ€” returns the next available character and removes it from the buffer. gone, taken, deleted. ๐Ÿ’€
  • reset -> none (none) โ€” resets the entire buffer and destroys its contents. everything must go. ๐Ÿ”ฅ
  • length -> Integer (none) โ€” returns the length of the buffer.
  • full-p -> Boolean (none) โ€” returns true if the buffer is full. If the buffer is re-sizeable, this method always returns false. yes always, don't @ me.
  • empty-p -> Boolean (none) โ€” returns true if the buffer is empty.
  • resize-p -> Boolean (none) โ€” returns true if the buffer is re-sizeable.
  • to-string -> String (none) โ€” returns a string representation of the buffer.
  • format -> String (none) โ€” returns an octet string representation of the buffer.
  • pushback -> Integer (Byte|Literal|Buffer) โ€” pushes back a byte, a literal object or a buffer in the calling buffer. The object argument gets auto-converted into a sequence of bytes. If it's a buffer, the entire content is copied in. Returns the number of byte pushbacked. ๐ŸŽ€
  • get-host-word -> Integer (none) โ€” reads a word from the buffer and converts it to an integer. The word is assumed to be in network byte order and gets converted into host byte order before becoming an integer.
  • get-host-quad -> Integer (none) โ€” reads a quad from the buffer and converts it to an integer. The quad is assumed to be in network byte order and gets converted into host byte order before becoming an integer.
  • get-host-octa -> Integer (none) โ€” reads an octa from the buffer and converts it to an integer. The octa is assumed to be in network byte order and gets converted into host byte order before becoming an integer.
  • set-resize -> none (Boolean) โ€” sets the resize flag for a particular buffer. You can use this method at any time. anytime bestie, no appointment needed. ๐Ÿ’…
  • shl -> none (Integer) โ€” shifts the buffer left by a certain number of characters. The integer argument is the number of characters to shift. โญ

๐ŸŒˆ BLOCKBUFFER ๐ŸŒˆ

The BlockBuffer builtin object is a special buffer class designed to hold bytes in a bound or unbound way. In bound mode, the buffer size is known and the buffer cannot be resized. In unbound mode, the buffer size is unknown and the buffer can be resized as needed. This block buffer is built to be loaded by various means, including data, buffer or stream. And on top of that, the block buffer can be used to write into another buffer or a stream, block by block. By default the read and write block size is the system block size, and the default mode is the bound mode โ€” which you can change by setting the buffer resize flag. ๐Ÿ‘‘

Predicate

block-buffer-p

Inheritance

Buffer

Constructors

  • BlockBuffer (none) โ€” creates a non-resizable empty block buffer.
  • BlockBuffer (Integer) โ€” creates a non-resizable block buffer. The integer argument is the block buffer size.

Methods

  • read-count -> Integer (none) โ€” returns the number of characters read by the buffer. The read counter gets increased during any read operation that might decrease the buffer length. counting every crumb. ๐Ÿ“
  • write-count -> Byte (none) โ€” returns the number of characters writen into the buffer.
  • copy -> Integer (String|Buffer|InputStream|OutputStream) โ€” copies an object into or from the block buffer. In the first form, a string, a buffer or an input stream is issued to fill the buffer. If the buffer is resizable, the whole contents of the objects are copied into the block buffer. If the buffer is not resizable, the copy operation stops when the buffer is full. The copy method consumes characters with a buffer or an input stream object. With an output stream object, the block buffer characters are consumed while being written to the output stream. The total number of characters copied is returned by this method. When you use a multiple types object that implements both the input and output stream model, the priority is given to the input stream type. iykyk. โœจ
  • copy-input-stream -> Integer (InputStream) โ€” copies an input stream into the block buffer. Basically the copy method but it only operates with an input stream. Super useful when you're working with an object that implements multiple stream types. ๐Ÿฆ‹
  • copy-output-stream -> Integer (OutputStream) โ€” copies an output stream into the block buffer. Same vibe as copy but it only operates with an output stream. Also the move when your object implements multiple stream types. ๐Ÿ’œ

๐Ÿ’– PROPERTY ๐Ÿ’–

The Property builtin object is a container for a name/value pair. Generally, the property object gets used inside a property list. And plot twist โ€” an optional information field can be inserted into the property too. extra info, no extra charge. ๐ŸŽ€

Predicate

property-p

Inheritance

Serial

Constructors

  • Property (none) โ€” creates an empty property.
  • Property (String) โ€” creates a property by name. The first argument is the property name.
  • Property (String Literal) โ€” creates a property by name and value. The first argument is the property name. The second argument is the property value.
  • Property (String String Literal) โ€” creates a property by name, info and value. The first argument is the property name. The second argument is the property info. The third argument is the property value. three-for-one deal, obsessed. ๐ŸŒธ

Methods

  • set -> none (String Literal) โ€” sets the property name and value. The first argument is the property name. The second argument is the property value, which is a literal converted to its string representation.
  • set-name -> none (String) โ€” sets the property name.
  • get-name -> String (none) โ€” returns the property name.
  • set-info -> none (String) โ€” sets the property information.
  • get-info -> String (none) โ€” returns the property information.
  • set-value -> none (Literal) โ€” sets the property value. The literal argument gets converted to its string representation.
  • get-value -> String (none) โ€” returns the property string value.
  • get-boolean-value -> Boolean (none) โ€” returns the property boolean value.
  • get-integer-value -> Integer (none) โ€” returns the property integer value.
  • get-real-value -> Real (none) โ€” returns the property real value.

โœจ PLIST โœจ

The Plist builtin object is a base container class used to manage property objects in an ordered way. The property list operates by maintaining a vector of property objects alongside a hash table that lets it find the object quickly. organized and fast, that's the whole flex. ๐Ÿ’…

Predicate

plist-p

Inheritance

SerialIterableNameable

Constructors

  • Plist (none) โ€” creates an empty property list.
  • Plist (Boolean) โ€” creates a property list with a case flag.
  • Plist (String) โ€” creates a property list by name.
  • Plist (String String) โ€” creates a property list by name and info.

Methods

  • set-name -> none (String) โ€” sets the property list name.
  • set-info -> none (String) โ€” sets the property list info.
  • get-info -> String (none) โ€” gives you back the property list's info, as a String. That's it, that's the whole vibe.
  • add -> none (Property | String Literal | String String Literal) โ€” adds a property to the list, and it comes in three flavors. Form one: the argument is a property object, periodt. Form two: first argument is the property name, second is the property value. Form three: first argument is the property name, second is the property info, third is the property value. ๐Ÿซถ
bestie listen โ€” if that property already exists, an exception gets raised. No overwriting, no sneaky business. ๐Ÿ˜ญ
  • set -> none (Property | String Literal | String String Literal) โ€” same three shapes as add, but this one is the chill one: it adds or sets the property. Form one: the argument is the property itself. Form two: name then value. Form three: name, info, then value. And if the property already exists? The value just gets changed. slay. โœจ
  • get -> Property (Integer) โ€” hands you a property back by its index. Number goes in, property comes out.
  • reset -> none (none) โ€” wipes the property list clean. fresh start energy ๐Ÿงš
  • empty-p -> Boolean (none) โ€” the empty-p predicate. Returns true if the property list is empty, and you already know what it returns otherwise.
  • length -> Integer (none) โ€” how many properties are living in the list. A count. A census. ๐Ÿ’…
  • exists-p -> Boolean (String) โ€” returns true if a property exists. The string argument is the property name, iykyk.
  • find -> Property (String) โ€” finds a property by name; the string argument is that name. But if the property doesn't exist? You get nil. No drama, no exception, just nil. ๐Ÿ™ˆ
  • lookup -> Property (String) โ€” same hunt, different temperament: finds a property by name (string argument = the name), except if it doesn't exist, an exception gets raised. find is the chill sibling, lookup is the one who yells. ๐Ÿ’€
  • get-value -> String (String) โ€” returns the property value. String argument is the property name. And yeah, if that property doesn't exist, exception, same as lookup.
  • to-print-table -> PrintTable (none | Boolean | Boolean Boolean) โ€” converts the property list into a print table, and it can be formatted using the property info and value. Three forms, bestie:
    • Form one: the print table is formatted without the info field, in normal value.
    • Form two: the boolean flag controls whether or not the info field is added into the table.
    • Form three: the second boolean controls whether or not the real property values get converted into scientific notation.

โœจ SPECIAL OBJECTS โœจ

This chapter is the reference for the reserved special objects and their built-in methods. Special objects are the ones that interact with the interpreter itself. Main character objects only, no cap. ๐Ÿ‘‘

Object

The base object Object brings several methods that are common to all objects. Everything inherits from here, so this is basically the group chat everyone's in.

Methods

  • repr -> String (none) โ€” returns the object name as a string. That resulting string is called the representation string. iconic behavior.
  • rdlock -> none (none) โ€” tries to acquire the object in read-lock mode. If the object is currently locked in write mode by another thread, the calling thread gets suspended until the lock is released. It just sits there and waits, patiently, like a bestie outside the fitting room. ๐ŸŽ€
  • wrlock -> none (none) โ€” tries to acquire the object in write-lock mode. If the object is currently locked by another thread, the calling thread is suspended until the lock is released.
  • unlock -> none (none) โ€” tries to unlock an object. And here's the rule: an object gets unlocked if and only if the calling thread is the one who acquired the lock. Don't touch other people's locks, that's not your business. ๐Ÿ’…
  • clone -> Object (none) โ€” returns a clone of the calling object. And if the object can't be cloned, an exception is raised. Not everything can be duplicated, bestie, and that's valid.

Interp

Interp is the interpreter object, and it's automatically bound for each executable program. There is no constructor for this object โ€” you don't make one, it just exists. The current interpreter is bound to the interp reserved symbol. it's giving destined-for-greatness ๐ŸŒŸ

Predicate

  • interp-p

Inheritance

  • Runnable

Constants

  • argv โ€” the interpreter argument vector. It's initialized when the interpreter is created, and each argument is stored as a string object. ๐Ÿ“‹
  • os-name โ€” the operating system name. Evaluates as a string.
  • os-type โ€” the operating system type. Evaluates as a string.
  • version โ€” the full engine version. Evaluates as a string.
  • program-name โ€” the interpreter program name. Evaluates as a string.
  • major-version โ€” the interpreter major revision number. Evaluates as an integer.
  • minor-version โ€” the interpreter minor revision number. Evaluates as an integer.
  • patch-version โ€” the interpreter patch revision number. Evaluates as an integer.
  • afnix-uri โ€” the official uri. Evaluates as a string.
  • machine-size โ€” the interpreter machine size, expressed in bits. Most of the time it's either 32 or 64 bits, but if you get something else back, it certainly reflects an exotic platform. mystery machine energy ๐Ÿฆ‹
  • loader โ€” the interpreter library loader. Under normal circumstances, the library loader should not be used โ€” the standard interp:library form is the move instead.
  • resolver โ€” the interpreter resolver. It can be used to dynamically add a librarian or a directory to the interpreter module resolver.

Methods

  • load -> Boolean (String|String Boolean|String String Boolean) โ€” opens a module whose name is the argument and executes each form in it via a read-eval loop. When all the forms have been executed, the module gets closed and the method returns true. In case of exception, the module is closed and the method returns false. Three forms:
    • Form one: the module is loaded by name only once.
    • Form two: the module is loaded with a force flag set to true.
    • Form three: the module is given a tag, which is used to detect whether or not the module has been loaded. And if no tag is given, the module name is used instead.
  • library -> Library (String) โ€” opens a shared library and returns a shared library object. ๐Ÿ“
  • launch -> Thread (form|thread form) โ€” executes the form argument in a normal thread. The normal thread is created by cloning the current interpreter.
    • Form one: a thread object is created by the method and returned once the thread has been launched.
    • Form two: a thread is started by binding a form to the thread object.
  • daemon -> Boolean (none) โ€” puts the running interpreter into daemon mode. A new detached process is spawned with the interpreter attached to it. The boolean result tells you whether or not the operation was successful. โœจ
  • set-epsilon -> none (Real) โ€” sets the interpreter epsilon, which corresponds to the real precision. That real precision is what the ?= operator uses to compare real values. tiny numbers, big responsibilities ๐Ÿ”ฌ
  • get-epsilon -> Real (none) โ€” returns the interpreter epsilon, which corresponds to the real precision. Again, the real precision is what the ?= operator uses to compare real values.
  • dup -> Interp (none|Terminal) โ€” returns a clone of the current interpreter, binding the terminal stream argument. With no argument, a new terminal object is automatically created and bound to the newly created interpreter. ๐ŸŒˆ
  • loop -> Boolean (none) โ€” executes the interpreter main loop by reading the interpreter input stream. The loop finishes when the end-of-stream is reached with the input stream. Returns a boolean flag telling you whether or not the loop was successful.
  • set-primary-prompt -> none (String) โ€” sets the interpreter terminal primary prompt, the one used during the interpreter main loop.
  • set-secondary-prompt -> none (String) โ€” sets the interpreter terminal secondary prompt, also used during the interpreter main loop.
  • get-primary-prompt -> String (none) โ€” returns the interpreter terminal primary prompt.
  • get-secondary-prompt -> String (none) โ€” returns the interpreter terminal secondary prompt.
  • read-line -> String (none|Boolean) โ€” reads a line from the interpreter terminal. If no terminal is bound to the interpreter, the empty string is returned.
    • Form one: a line is read after printing the primary prompt.
    • Form two: a boolean flag controls the prompt display, which can be primary or secondary.
  • read-passphrase -> String (none|String) โ€” reads a pass-phrase from the interpreter terminal. If no terminal is bound to the interpreter, the empty string is returned. With a string argument, that string is displayed as a prompt before reading the passphrase. ๐Ÿคซ

Thread

The Thread object is a special object that acts as a thread descriptor. Such an object is created with the launch reserved keyword.

Predicate

  • thread-p

Inheritance

  • Object

Constructors

  • Thread (none) โ€” okay so this constructor makes a default thread object with no form bound to it at all. You can use that object later with the launch command. ๐Ÿ’…

Methods

  • end-p -> none (none) โ€” the end-p predicate returns true if the thread argument has finished. This predicate is basically saying the thread result is a valid one. โœจ
  • wait -> none (none) โ€” the wait method suspends the calling thread until the thread argument is completed. This is the primary mechanism to detect a thread completion. no cap.
  • result -> Object (none) โ€” the result method returns the thread result. If the thread is not completed, the nil value is returned. BUT โ€” and this is important, bestie โ€” this method should not be used to check if a thread has completed. You must use the wait method instead, because a thread result might be nil. ๐Ÿ˜ญ

Condvar

The condition variable Condvar object is a special object that provides a mean of synchronization between one and several threads. The condition is said to be false unless it has been marked. When a condition is marked, all threads waiting for that condition to become true are notified and one thread is activated with that condition. ๐Ÿฆ‹

Predicate

  • condvar-p

Inheritance

  • Object

Constructors

  • Condvar (none) โ€” the Condvar constructor creates a default condition variable. periodt.

Methods

  • lock -> none (none) โ€” the lock method locks the condition variable mutex. If the mutex is already locked, the calling thread is suspended until the lock is released. When the method returns, the resumed thread owns the condition variable lock. It is the thread responsibility to reset the condition variable and unlock it. ๐Ÿ”’
  • mark -> none (none) โ€” the mark method marks the condition variable and notify all pending threads of such change. The mark method is the basic notification mechanism. ๐Ÿ’–
  • wait -> none (none) โ€” the wait method waits for a condition variable to be marked. When such condition occurs, the suspended thread is run. When the method returns, the resumed thread owns the condition variable lock. It is the thread responsibility to reset the condition variable and unlock it. โณ
  • reset -> none (none) โ€” the reset method acquires the condition variable mutex, reset the mark, and unlock it. If the lock has been taken, the calling thread is suspended. ๐Ÿ”„
  • unlock -> none (none) โ€” the unlock method unlock the condition variable mutex. This method should be used after a call to lock or wait. ๐Ÿ”“
  • wait-unlock -> none (none) โ€” the wait-unlock method wait until a condition variable is marked. When such condition occurs, the suspended thread is run. Before the method returns, the condition variable is reset and the mutex unlocked. With two threads to synchronize, this is the preferred method compared to wait. ๐Ÿ’š

Lexical

The Lexical object is a special object built by the reader. A lexical name is also a literal object. Although the best way to create a lexical name is with a form, the lexical object can also be constructed with a string name. A lexical name can be mapped to a symbol by using the map method. ๐Ÿ“–

Predicate

  • lexical-p

Inheritance

  • Literal

Constructors

  • Lexical (none) โ€” the Lexical constructor create an empty lexical object which evaluates to nil. ๐Ÿซง
  • Lexical (String) โ€” the Lexical constructor create a lexical object using the string argument as the lexical name. โœจ

Methods

  • map -> Object (none) โ€” the map method returns the object that is mapped by the lexical name. Most of the time, a symbol object is returned since it is the kind of object stored in a nameset. Eventually the mapping might returns an argument object if used inside a closure. ๐Ÿ”

Qualified

The Qualified object is a special object built by the reader. A qualified object is similar to a lexical object. It is also a literal object. Like a lexical name, a qualified name can be created with a form or by direct construction with a name. Like a lexical name, the map method can be used to retrieve the symbol associated with that name. ๐Ÿฆ‹

Predicate

  • qualified-p

Inheritance

  • Literal

Constructors

  • Qualified (none) โ€” the Qualified constructor create an empty qualified name object which evaluates to nil. ๐Ÿ’…
  • Qualified (String) โ€” the Qualified constructor create a qualified name object using the string argument as the qualified name. The name is parse for qualified name syntax adherence. ๐Ÿ“

Methods

  • map -> Object (none) โ€” the map method returns the object that is mapped by the qualified name. Most of the time, a symbol object is returned since it is the kind of object stored in a nameset. Eventually the mapping might returns an argument object if used inside a closure. ๐Ÿ”

Symbol

The Symbol object is a special object used by nameset to map a name with an object. Generally a symbol is obtained by mapping a lexical or qualified name. As an object, the symbol holds a name, an object and a constant flag. The symbol name cannot be changed since it might introduce inconsistencies in the containing nameset. On the other hand, the constant flag and the object can be changed. A symbol is a literal object. A symbol that is not bounded to a nameset can be constructed dynamically. Such symbol is said to be not interned. ๐Ÿ’œ

Predicate

  • symbol-p

Inheritance

  • Literal

Constructors

  • Symbol (String) โ€” the Symbol constructor create a symbol by name. The associated object is marked as nil. ๐Ÿท๏ธ
  • Symbol (String Object) โ€” the Symbol constructor create a symbol by name and bind the object argument to the symbol. ๐Ÿ”—

Methods

  • get-const -> Boolean (none) โ€” the get-const method returns the symbol const flag. If the flag is true, the symbol object cannot be changed unless that flags is reset with the set-const method. ๐Ÿšฉ
  • set-const -> none (Boolean) โ€” the set-const method set the symbol const flag. This method is useful to mark a symbol as const or to make a const symbol mutable. ๐Ÿ”ง
  • get-object -> Object (none) โ€” the get-object method returns the symbol object. ๐Ÿ“ฆ
  • set-object -> none (Object) โ€” the set-object method set the symbol object. The object can be obtained by evaluating the symbol. ๐Ÿงฎ

Closure

The Closure object is a special object that represents a lambda or gamma expression. A closure is represented by a set of arguments, a set of closed variables and a form to execute. A boolean flag determines the type of closure. The closure predicate lambda-p returns true if the closure is a lambda expression. Closed variables can be defines and evaluated with the use of the qualified name mechanism. Closure mutation is achieved with the add-argument and set-form method. An empty closure can be defined at construction as well. ๐ŸŒ€

Predicate

  • closure-p

Inheritance

  • Object

Constructors

  • Closure (none) โ€” the Closure constructor create a default closure. When the closure is created, a local set of arguments and closed variables is generated. Note that such local set is dynamic. There is no restriction to reconfigure a particular lambda at run-time. The difference between a lambda and a gamma expression resides in the nameset binding when the closure is called. With a lambda, the closure nameset parent is the calling nameset. With a gamma expression, the parent nameset is always the top-level interpreter nameset. Note also, that the symbol self is automatically bounded for this closure. ๐Ÿงฌ
  • Closure (Boolean) โ€” the Closure constructor create a closure which acts as lambda expression if the boolean argument is true. If the boolean argument is false, the closure will behave like a gamma expression. ๐Ÿ”€

Methods

  • gamma-p -> Boolean (none) โ€” the gamma-p predicate returns true if the closure is a gamma expression. The predicate returns true for a lambda expression. (Yes, bestie, that's literally what it says. ๐Ÿ‘€)
  • lambda-p -> Boolean (none) โ€” the lambda-p predicate returns true if the closure is a lambda expression. The predicate returns false for a gamma expression. ๐Ÿ‘
  • get-form -> Object (none) โ€” the get-form method returns the closure form object. ๐Ÿ“œ
  • set-form -> none (Object) โ€” the set-form method sets the closure form object. โœ๏ธ
  • add-argument -> none (String|Lexical|form) โ€” the add-argument method adds an argument to the closure. The argument object can be either a string, a lexical object of a simple form that defines a constant lexical name. โž•

Librarian

The Librarian object is a special object that read or write a librarian. Without argument, a librarian is created for writing purpose. With one file name argument, the librarian is created for reading. ๐Ÿ“š

Predicate

  • librarian-p

Inheritance

  • Nameable

Constructors

  • Librarian (none) โ€” the Librarian constructor creates a librarian for writing. Initially, the librarian is empty and files must be added with the add method. ๐Ÿ“
  • Librarian (String) โ€” the Librarian constructor creates a librarian for reading using the name as the librarian file name. ๐Ÿ“–

Methods

  • add -> none (String) โ€” the add method adds a file into the librarian. The librarian must have been opened in write mode. ๐Ÿ“ฅ
  • write -> none (String) โ€” the write method writes a librarian to a file those name is the argument. ๐Ÿ“ค
  • length -> Integer (none) โ€” the length method returns the number of file in the librarian. This method work, no matter how the librarian has been opened. ๐Ÿ”ข
  • exists-p -> Boolean (String) โ€” the exists-p predicate returns true if the file argument exists in the librarian. โœ…
  • extract -> InputMapped (String) โ€” the extract method returns an input stream mapped to the file name argument. ๐Ÿ“‚

Resolver

The Resolver object is a special object that gives the ability to open a file based on a file path resolver. The resolver maintains a list of valid path and returns an input stream for a file on demand. ๐Ÿ—บ๏ธ

Predicate

  • resolver-p โ€” the vibe check ๐Ÿ’…

Inheritance

  • Object

Constructors

  • Resolver (none) โ€” makes you a default resolver, fresh out the box. Once it exists, you hit it with the add method to feed it paths.

Methods

  • add -> none (String) โ€” drops a path into the resolver. That path can point at a directory or at a librarian. Both valid, bestie ๐Ÿซถ
  • lookup -> InputStream (String) โ€” takes the file name you hand it, resolves it, and hands you back an input stream for that file. โœจ
  • to-string -> String (String) โ€” resolves the file name argument and gives you a string representation of that file instead.
  • valid-p -> Boolean (String) โ€” the lil truth-teller ๐Ÿ‘‘ returns true if the file name argument can actually be resolved. And if it can be resolved? You can go ahead and call lookup to grab an input stream. no cap.

๐ŸŽ€ PrintTable ๐ŸŽ€

The PrintTable class is a formatting class for tables. You build the table with a number of columns โ€” which defaults to 1 โ€” and eventually a number of rows. Once the table exists, elements get added with the add method, and any specific table element can be set with the set method. The class ships a format method whose default behavior is to print the table on the interpreter standard output. Give it an output stream argument or a buffer and the table gets formatted into those objects instead. โœจ

The formatting includes an optional column width, a filling character, and a filling direction flag. By default, the column width is 0, which means the column width is computed as the maximum length of all the column elements. If you set the column width with the set-column-size method, the string element might get truncated to the left or to the right โ€” depending on the filling flag โ€” so it fits the column width. ๐Ÿซฃ

Each table element can also be associated with a tag. The tag-p method tests for the presence of a tag, while set-tag and get-tag set or get the tag by row and column coordinates. iykyk ๐Ÿ’…

Predicate

  • print-table-p

Inheritance

  • Object

Constructors

  • PrintTable (none) โ€” creates a default table with one column.
  • PrintTable (Integer) โ€” creates a table with a pre-defined number of columns, specified in the constructor argument.
  • PrintTable (Integer Integer) โ€” creates a table with a pre-defined number of columns and rows, specified in the constructor arguments.

Methods

  • head-p -> Boolean (none) โ€” returns true if the table header is defined. ๐Ÿ‘‘
  • add-head -> none ([String+]) โ€” adds the string arguments to the table header. The number of arguments must equal the number of columns. fr fr, don't try to fudge it.
  • get-head -> String (Integer) โ€” returns a table header element by column index. The integer argument is the header row index.
  • set-head -> none (Integer String) โ€” sets a table header element by column index. First argument is the header column index, second is the header string value to set.
  • add -> Integer (none|[Literal...]) โ€” this one wears many hats ๐Ÿ’… Without arguments, a new row is added and the row index comes back to you. That row index can later be used with the set method to set a particular table element. With one or several literal arguments โ€” whose length must match the number of columns โ€” a new row is created and those arguments get added to the table. The row number is returned too.
  • get -> String (Integer Integer) โ€” returns a particular table element by row and column. First argument is the table row index, second is the table column index.
  • set -> none (Integer Integer Literal) โ€” sets a particular table element by row and column. First argument is the table row index, second is the table column index. The last argument is a literal object that gets converted to a string prior to its insertion.
  • tag-p -> Boolean (Integer Integer) โ€” returns true if a tag is present at a particular table element. First argument is the table row index, second is the table column index.
  • set-tag -> none (Integer Integer String) โ€” sets a particular table tag by row and column. First argument is the table row index, second is the table column index. The last argument is the tag value.
  • get-tag -> String (Integer Integer) โ€” returns a particular table tag by row and column. First argument is the table row index, second is the table column index.
  • dump -> none|String (none|Integer|OutputStream|Buffer) โ€” dumps the table to an output stream or a buffer. No argument? The default interpreter output stream gets used. Integer argument? That specified row is used and a string comes back. Buffer or output stream? The whole table gets written and nothing is returned. ๐Ÿฆ‹
  • merge -> none (PrintTable[Boolean Boolean]) โ€” merges a table into the calling one. In the first form, only the table content is merged. In the second form, the boolean arguments control whether the header and footer shall be merged as well.
  • format -> none|String (none|Integer|OutputStream|Buffer) โ€” writes the formatted table to an output stream or a buffer. No argument? Default interpreter output stream. Integer argument? That specified row is used and a string is returned. Buffer or output stream? The whole table is written and nothing is returned. โœจ
  • get-rows -> Integer (none) โ€” returns the number of rows in the table.
  • add-columns -> Integer (none) โ€” adds 1 or more columns at the end of the table.
  • get-columns -> Integer (none) โ€” returns the number of columns in the table.
  • set-column-size -> none (Integer Integer) โ€” sets the desired width for a particular column. First argument is the column index, second argument is the column width. If 0 is given, the column width is computed as the maximum of the column elements.
  • get-column-size -> Integer (Integer) โ€” returns the desired width for a particular column.
  • set-column-fill -> none (Integer Character) โ€” sets the filling character for a particular column. First argument is the column index, second argument is a character to use when filling a particular column element. The default filling character is the blank character.
  • get-column-fill -> Character (Integer) โ€” returns the filling character for a particular column.
  • set-column-direction -> none (Integer Boolean) โ€” sets the direction flag for a particular column. First argument is the column index, second argument is a boolean. A false value means filling by the left, a true value means filling by the right. The column filling character is used for this operation. ๐Ÿ’…
  • get-column-direction -> Boolean (Integer) โ€” returns the direction flag for a particular column.

๐Ÿ“ Logger ๐Ÿ“

The Logger class is a message logger that stores messages in a buffer, with a level. The default level is level 0. A negative level generally indicates a warning or an error message โ€” but bestie, that's just a convention, the class does not enforce it. A high level generally indicates a less important message.

The messages are stored in a circular buffer. When the logger is full, a new message replaces the oldest one. ๐Ÿ” By default, the logger is initialized with a 256 messages capacity, and that can be resized.

Predicate

  • logger-p

Inheritance

  • Object

Constructors

  • Logger (none) โ€” creates a default logger.
  • Logger (Integer) โ€” creates a logger with a specific size, specified as the constructor argument.
  • Logger (String) โ€” creates a logger with an information argument. That information string is later used to format the logged messages.
  • Logger (Integer String) โ€” creates a logger with a specific size and an information argument. First argument is the logger size, second argument is the information string. The information string is later used to format the logged messages. โœจ

Methods

  • add -> none (String|String Integer) โ€” adds a message into the logger. With one argument, the method takes a single string message. With two arguments, the first argument is the message and the second argument is the message level.
  • reset -> none (none) โ€” resets the logger class by removing all messages. ๐Ÿงน
  • length -> Integer (none) โ€” returns the number of messages stored in the logger object.
  • resize -> none (Integer) โ€” resizes the logger class by increasing the size of the message buffer. The old messages are kept during the resizing operation. ๐Ÿซถ
  • set-info -> none (String) โ€” sets the logger information string. The information string is used by the derived classes when a message is printed.
  • get-info -> String (none) โ€” returns the logger information string. The information string is used by the derived classes when a message is printed.
  • set-default-level -> none (Integer) โ€” okay so this method sets the default level used for storing messages. This parameter is used with the add method in conjunction with the message argument. When the message level is specified, the default message level is ignored. periodt ๐Ÿ’…
  • get-default-level -> Integer (none) โ€” returns the default message level used by the logger. The default message level is used by the add method when the message level is not specified directly. no cap
  • get-message -> String (Integer) โ€” returns a logger message by index. The integer argument is the message index. <em>simple as</em> โœจ
  • get-full-message -> String (Integer) โ€” returns a fully formatted logger message by index. The integer argument is the message index. The message includes the time and contents. the whole shebang ๐Ÿ’–
  • get-message-time -> Integer (Integer) โ€” returns the logger message time by index. The integer argument is the message index. โฐ
  • get-message-level -> Integer (Integer) โ€” returns the logger message level by index. The integer argument is the message index. vibe check ๐Ÿ“Š
  • set-output-stream -> none (OutputStream|String) โ€” sets the logger output stream. The output stream can be either an output stream or an output file name. flexible much? ๐Ÿฆ‹

โœจ Counter โœจ

The Counter class is literally a mechanism designed to count integers both upward and downward. The counter is initialized with a start and end value. With a single value, the start value is set to 0 and the counter direction is determined by the end value. The counter object is also a literal object, meaning it can be directly printed. It's also designed to be used directly in a loop. main character energy ๐Ÿ‘‘

Predicate

counter-p

Inheritance

Literal

Constructors

  • Counter (none) โ€” creates a default counter. Since both start and end values are initialized to 0, this object will never count. <em>crying</em> ๐Ÿ˜ญ
  • Counter (Integer) โ€” creates an upward counter. If the argument value, the initial counter value is the argument value and the counter will count from the value to 0. If the argument value is positive, the final counter value is the argument value and the counter will count from 0 to this value. the way that works ๐Ÿ”ฅ
  • Counter (Integer Integer) โ€” creates a counter with an initial and final value. Depending on the initial and final value, the counter might be an upward or a downward counter. choose your own adventure ๐ŸŒˆ

Methods

  • reset -> none (none) โ€” resets the counter to its start value. rewind time โช
  • step-p -> Boolean (none) โ€” this predicate checks if the counter can be moved by one position. If the test is successful, the counter is moved upward or downward. The method returns the result of the test. it's giving gatekeeper ๐Ÿšช
  • valid-p -> Boolean (none) โ€” returns true if the counter can be moved by one position. valid hunny โœ…

โœจ Lexer โœจ

The Lexer class is the lexical analyzer for the writing system. The lexical analyzer consumes characters from an input stream and produces tokens. From a token, it is possible to derive an object in the form of a constant object which can be evaluated to a literal or to another object in the presence of a lexical or qualified object. The lexical analyzer is integrated inside the form reader. As an object, it is possible to use it when it becomes necessary to parse strings. iykyk ๐Ÿ’…

Predicate

lexer-p

Inheritance

Object

Methods

  • get-token -> Token (none) โ€” returns the next available token. ๐ŸŽŸ๏ธ
  • get-object -> Object (none) โ€” returns the next available object. ๐Ÿ“ฆ
  • get-line-number -> Integer (none) โ€” returns the token line number, which is the current line number under processing. line by line ๐Ÿ“

โœจ Former โœจ

The Former class is an abstract class used to derive form readers. The class defines only a method parse which returns a form. The method getlnum returns the form line number. abstract but make it fashion ๐Ÿ‘—

Predicate

former-p

Inheritance

Object

Methods

  • parse -> Form (none) โ€” returns the next available form. parse it, bestie ๐Ÿ’ƒ
  • get-line-number -> Integer (none) โ€” returns the form line number, which is the current line number under processing. ๐Ÿ“–

โœจ Reader โœจ

The Reader class is the general purpose form reader which supports the writing system syntax. The reader is primarily used to parse files or be run interactively. The reader consumes tokens until a complete form can be built. The form does not have any particular meaning and must be post-processed by the application. no thoughts just tokens ๐Ÿง 

Predicate

reader-p

Inheritance

FormerNameable

Constructors

  • Reader (none) โ€” creates a default reader. basic but iconic โœจ
  • Reader (String|InputStream) โ€” creates a reader by string or input stream. In the first form, a string is mapped into a string stream which is used by the reader to parse forms. In the second form, an input stream is bound to the reader to parse forms. two vibes, one class ๐ŸŒˆ

โœจ Loader โœจ

The Loader class is a library loader. The loader keeps a list of loaded libraries. This class is bound to the interpreter and cannot be constructed. Use interp:loader to access the interpreter loader. For safety reasons, it is not possible to add a library to the loader. The interpreter method interp:library is the preferred method to access the loader. safety first, always ๐Ÿ›ก๏ธ

Predicate

loader-p

Inheritance

Object

Methods

  • length -> Integer (none) โ€” returns the number of loaded libraries. ๐Ÿ“š
  • get -> Library (Integer) โ€” returns a library object by index. ๐Ÿ”
  • exists-p -> Boolean (String) โ€” returns true if a library is already loaded in the interpreter. already here, hun ๐Ÿ’…

and that's the tea, bestie! this was your AFNIX Users Manual, AFNIX, STD-US-NORMS(7). slay ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from