The april Reference Manual

This is the april Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 03:18:30 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 april

April is a subset of the APL programming language that compiles to Common Lisp.

Author

Andrew Sengul

License

Apache-2.0

Version

1.0.0

Dependencies
  • vex (system).
  • aplesque (system).
  • array-operations (system).
  • lparallel (system).
  • alexandria (system).
  • cl-ppcre (system).
  • random-state (system).
  • parse-number (system).
  • symbol-munger (system).
  • prove (system).
  • simple-date-time (system).
  • trivia (system).
  • cl-unicode (system).
  • varray (system).
Source

april.asd.

Child Components

2.2 vex

A set of templates for implementing a vector programming language that compiles to Common Lisp.

Author

Andrew Sengul

License

Apache-2.0

Version

1.0.0

Dependencies
  • alexandria (system).
  • array-operations (system).
  • maxpc-apache (system).
  • cl-ppcre (system).
  • symbol-munger (system).
  • prove (system).
Source

vex.asd.

Child Components

2.3 maxpc-apache

Max’s Parser Combinators: a simple and pragmatic library for writing parsers and lexers based on combinatory parsing.

Author

Max Rottenkolber <>

License

Apache-2.0

Source

maxpc-apache.asd.

Child Components

2.4 aplesque

A collection of array manipulation functions patterned after functions from the APL language.

Author

Andrew Sengul

License

Apache-2.0

Version

1.0.0

Dependencies
  • cl-ppcre (system).
  • alexandria (system).
  • array-operations (system).
  • parse-number (system).
  • symbol-munger (system).
  • lparallel (system).
Source

aplesque.asd.

Child Components

2.5 varray

Varray implements virtual arrays - objects representing deferred array transformations.

Author

Andrew Sengul

License

Apache-2.0

Version

1.0.0

Dependencies
  • aplesque (system).
  • serapeum (system)., for feature (:not :clasp)
  • lparallel (system).
  • random-state (system).
Source

varray.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 april/april.asd

Source

april.asd.

Parent Component

april (system).

ASDF Systems

april.


3.1.2 vex/vex.asd

Source

vex.asd.

Parent Component

vex (system).

ASDF Systems

vex.


3.1.3 maxpc-apache/maxpc-apache.asd

Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

ASDF Systems

maxpc-apache.


3.1.4 aplesque/aplesque.asd

Source

aplesque.asd.

Parent Component

aplesque (system).

ASDF Systems

aplesque.


3.1.5 varray/varray.asd

Source

varray.asd.

Parent Component

varray (system).

ASDF Systems

varray.


3.1.6 april/package.lisp

Source

april.asd.

Parent Component

april (system).

Packages

april.


3.1.7 april/utilities.lisp

Dependency

package.lisp (file).

Source

april.asd.

Parent Component

april (system).

Packages
Public Interface
Internals

3.1.8 april/functions.lisp

Dependency

utilities.lisp (file).

Source

april.asd.

Parent Component

april (system).

Internals

3.1.9 april/grammar.lisp

Dependency

functions.lisp (file).

Source

april.asd.

Parent Component

april (system).

Internals

3.1.10 april/spec.lisp

Dependency

grammar.lisp (file).

Source

april.asd.

Parent Component

april (system).

Public Interface
Internals

3.1.11 april/novelties.lisp

Dependency

spec.lisp (file).

Source

april.asd.

Parent Component

april (system).

Public Interface

april-print-progress-bar (function).

Internals

3.1.12 vex/package.lisp

Source

vex.asd.

Parent Component

vex (system).

Packages

vex.


3.1.13 vex/vex.lisp

Dependency

package.lisp (file).

Source

vex.asd.

Parent Component

vex (system).

Public Interface
Internals

3.1.14 maxpc-apache/packages.lisp

Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Packages

3.1.15 maxpc-apache/input.lisp

Dependency

packages.lisp (file).

Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface

3.1.16 maxpc-apache/input/index.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface
Internals

3.1.17 maxpc-apache/input/list.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface
Internals

3.1.18 maxpc-apache/input/vector.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface
Internals

3.1.19 maxpc-apache/input/stream.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface
Internals

3.1.20 maxpc-apache/interface.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface
Internals

3.1.21 maxpc-apache/primitives.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface

3.1.22 maxpc-apache/more.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface

3.1.23 maxpc-apache/char.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface

3.1.24 maxpc-apache/digit.lisp

Dependencies
Source

maxpc-apache.asd.

Parent Component

maxpc-apache (system).

Public Interface

3.1.25 aplesque/package.lisp

Source

aplesque.asd.

Parent Component

aplesque (system).

Packages

aplesque.


3.1.26 aplesque/forms.lisp

Dependency

package.lisp (file).

Source

aplesque.asd.

Parent Component

aplesque (system).

Packages

aplesque.forms.

Internals

3.1.27 aplesque/aplesque.lisp

Dependency

forms.lisp (file).

Source

aplesque.asd.

Parent Component

aplesque (system).

Public Interface
Internals

3.1.28 varray/package.lisp

Source

varray.asd.

Parent Component

varray (system).

Packages

varray.


3.1.29 varray/macros.lisp

Dependency

package.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Internals

intraverser (macro).


3.1.30 varray/base.lisp

Dependency

macros.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.31 varray/index.lisp

Dependency

base.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Internals

3.1.32 varray/primal.lisp

Dependency

index.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.33 varray/derived.lisp

Dependency

primal.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.34 varray/calculate.lisp

Dependency

derived.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.35 varray/select.lisp

Dependency

calculate.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.36 varray/logic.lisp

Dependency

select.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Internals

3.1.37 varray/composed.lisp

Dependency

logic.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Public Interface
Internals

3.1.38 varray/effectors/x86.lisp

If Feature

(:and :sbcl :x86-64)

Dependency

composed.lisp (file).

Source

varray.asd.

Parent Component

varray (system).

Internals

4 Packages

Packages are listed by definition order.


4.1 maxpc.char

Utility parsers for character inputs.

Source

packages.lisp.

Use List
Public Interface

4.2 maxpc.input.index

Source

packages.lisp.

Use List
Used By List
Public Interface
Internals

4.3 vex

Source

package.lisp.

Use List

common-lisp.

Used By List

april.

Public Interface
Internals

4.4 april.demo-definition-tools

Source

utilities.lisp.


4.5 varray

Source

package.lisp.

Use List

common-lisp.

Used By List

april.

Public Interface
Internals

4.6 maxpc.input.stream

Implements support for _input sources_ of _type_ {stream}. Input from _streams_ is copied into a temporary buffer lazily as required by the parser. _Streams_ of _type_ {file-stream} are read in as chunks of customizable size.

Source

packages.lisp.

Use List
Public Interface
Internals

4.7 maxpc.input

The generic _input_ interface allows extensions to parse other _types_ of _input sources_. To add a new _input source type_, {make-input} has to be specialized on that _type_. The following methods have to be defined for _inputs_:

+ {input-empty-p}
+ {input-first}
+ {input-rest}

The following methods can optionally be defined for _inputs_:

+ {input-position}
+ {input-element-type}
+ {input-sequence}

Source

packages.lisp.

Use List

common-lisp.

Used By List
Public Interface

4.8 maxpc.digit

Parsers for digit numerals in character inputs.

Source

packages.lisp.

Use List
Public Interface

4.9 april

Source

package.lisp.

Use List
Public Interface
Internals

4.10 maxpc.input.vector

Source

packages.lisp.

Use List
Internals

4.11 aplesque.forms

Source

forms.lisp.


4.12 april.idiom-extension-tools

Source

utilities.lisp.


4.13 maxpc.input.list

Source

packages.lisp.

Use List
Internals

4.14 maxpc

_Max’s Parser Combinators_¹ is a simple and pragmatic library for writing
parsers and lexers based on combinatory parsing. MaxPC is capable of
parsing deterministic, context-free languages, provides powerful tools for
parse tree transformation and error handling, and can operate on
_sequences_ and _streams_. It supports unlimited backtracking, but does not implement [Packrat Parsing](http://pdos.csail.mit.edu/~baford/packrat/thesis/). Instead, MaxPC achieves good performance through its optimized primitives,
and explicit separation of matching and capturing input. In practice, MaxPC
parsers perform better on typical computer languages—when compared to
Packrat parsers—at the expense of not producing linear-time parsers.²

+ 1. MaxPC is a complete rewrite of [MPC](https://github.com/eugeneia/mpc)
with was in turn a fork of Drew Crampsie’s [Smug](http://smug.drewc.ca/).
+ 2. See [MaxPC: Why? How? / Packrat Parsing](http://mr.gy/blog/maxpc.html#section-3-1) on why the book keeping costs of Packrat parsing diminish the gain in execution time for typical grammars and workloads.

< Basic Concepts

MaxPC _parsers_ are _functions_ that accept an [input](#section-4) as
their only argument and return three values: the remaining _input_ or
{nil}, a _result value_ or {nil}, and a _generalized boolean_ that
indicates if a _result value_ is present. The _type_ of a parser is:

{(function (}_input_{) (or} _input_ {null) * boolean)}

A parser can either succeed or fail when applied to an input at a given
position. A succeeding parser is said to _match_. When a parser matches it
can optionally produce a _result value_, which may be processed by its
parent parsers. New parsers can be created by composing existing parsers
using built-in or user defined _parser combinators_. A parser combinator
is a higher-order _function_ that includes one or more parsers as its
arguments and returns a parser.

By convention, all parsers are defined as higher-order _functions_ that
return the respective parser, even if they are nullary. For instance, the
{?end} parser is obtained using the form “{(?end)}”.

A lexical convention is used to make three different types of parsers
easily distinguishable:

+ Parsers whose names start with a question mark ({?}) never produce a
result value.
+ Parsers whose names start with an equals sign ({=}) always produce a
result value.
+ Parsers whose names start with a percent symbol ({%}) may produce a
result value depending on their arguments.

>

< Example

We will define a parser for a simplistic grammar for Email addresses of
the form:

_email‑address_ := _user_ {@} _host_

First we define a parser for the valid characters in the _user_ and _host_
parts of an address. Just for this example, we choose these to be
alphanumeric characters and then some. {?address-character} uses the {%or} combinator to form the union of two instances of {?satisfies} that match
different sets of characters.

#code#
(defun ?address-character ()
(%or (?satisfies ’alphanumericp)
(?satisfies (lambda (c)
(member c ’(#\- #\_ #\. #\+))))))
#

Then we use {?address-character} to implement our address parser which
matches two sequences of “address characters” separated by an {@}
character, and produces a list of user and host components as its result
value. We match {?address-character} one or more times using {%some}, and
produce the matched subsequence as the result value using {=subseq}. Both
parts of the address separated by an _@_ character are matched in sequence
using {=list}, whose result value is finally transformed by
{=destructure}.

#code#
(defun =email-address ()
(=destructure (user _ host)
(=list (=subseq (%some (?address-character)))
(?eq #\@)
(=subseq (%some (?address-character))))
(list user host)))
#

We can now apply {=email-address} using {parse}:

#code#
(parse "foo_bar@example.com" (=email-address))
⇒ ("foo_bar" "example.com"), T, T
(parse "!!!@@@.com" (=email-address))
⇒ NIL, NIL, NIL
(parse "foo_bar@example.com@baz" (=email-address))
⇒ ("foo_bar" "example.com"), T, NIL
#

>

< Overview

{parse} is the entry point of {MaxPC}. It applies a parser to an input and
returns the parser’s result value, and two _boolean_ values indicating if
the parser matched and if there is unmatched input remaining,
respectively.

< Basic Parsers

+ {?end} matches only when there is no further input.
+ {=element} unconditionally matches the next element of the input _sequence_.
+ {=subseq} produces the subsequence matched by its argument as its
result value.
+ {?satisfies}, {?test}, and {?eq} match input conditionally.
+ {%maybe} matches, even if its argument fails to match.

>

< Logical Combinators

+ {%or} forms the union of its arguments.
+ {%and} forms the intersection of its arguments.
+ {%diff} forms the difference of its arguments.
+ {?not} negates its argument.

>

< Sequence Combinators

+ {?seq} matches its arguments in sequence.
+ {=list} matches its arguments in sequence and produces a list of their
results as its result value.
+ {%any} matches its argument repeatedly any number of times.
+ {%some} matches its argument repeatedly one or more times.

>

< Transformation

+ {=transform} produces the result of applying a _function_ to its
argument’s result value as its result value.
+ {=destructure} is a convenient destructuring _macro_ on top of {=transform}.

>

< Error Handling

+ {?fail} never matches and evaluates its body when it is called.
+ {%handler-case} and {%restart-case} allow you to set up _handlers_ and _restarts_ across parsers.
+ {get-input-position} can be called in error situations to retrieve the
current position in the input.

>

>

< Caveat: Recursive Parsers

A recursive parser can not refer to itself by its constructor, but must
instead call itself by _symbol_—calling its constructor would otherwise
result in unbounded recursion. In order to do so the parser _function_
needs to be _bound_ in the _function namespace_ using {setf}. The example
below implements a parser for balanced parentheses, and illustrates how to
avoid this common caveat.

#code#
(defun ?parens ()
(?seq (?eq #\() (%maybe ’?parens/parser) (?eq #\))))

(setf (fdefinition ’?parens/parser) (?parens))

(parse "((()))" (?parens)) ⇒ NIL, T, T
#

>

Source

packages.lisp.

Use List
Used By List
Public Interface
Internals

4.15 aplesque

Source

package.lisp.

Use List

common-lisp.

Used By List

april.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *bound*

*Description:*

{*bound*} can be set to limit the number of elements read from _stream inputs_ in a single call to to {parse}.

Package

maxpc.input.stream.

Source

input/stream.lisp.

Special Variable: *chunk-size*

*Description:*

{*chunk-size*} controls the size by which the buffer used for _stream inputs_ grows, and the number of elements read at a time when parsing from _streams_ of _type_ {file-stream}.

Package

maxpc.input.stream.

Source

input/stream.lisp.

Special Variable: *element-type*

*Description:*

{*element-type*} can be set to enforce a specific stream element type when reading from _stream inputs_. This can be useful when dealing with bivalent streams.

Package

maxpc.input.stream.

Source

input/stream.lisp.

Special Variable: *whitespace*

*Value Type:*

a _list_ of _characters_.

*Description:*

The _value_ of {*whitespace*} is a _list_ of _characters_ considered to be _whitespace characters_.

Package

maxpc.char.

Source

char.lisp.


5.1.2 Macros

Macro: %handler-case (parser &body clauses)

_clauses_::= {{}↓_error‑clause_{\}}\*

_error‑clause_::=
{(}_typespec_ {([}_var_{])}
{{}_declaration_{\}}\* {{}_form_{\}}\* _parser‑form_{)}

*Arguments and Values:*

_parser_—a _parser_.

_typespec_—a _type specifier_.

_var_—a _variable name_.

_declaration_—a {declare} _expression_; not evaluated.

_form_—a _form_.

_parser‑form_—a _form_ that evaluates to a _parser_.

*Description:*

{%handler-case} executes _parser_ in a _dynamic environment_ where handlers are active as if by {handler-case}. If a _condition_ is handled by {%handler-case}, _parser‑form_ is evaluated and the resulting _parser_ is applied.

*Examples:*

#code#
(defun assert-digit (c)
(or (digit-char-p c)
(error "Not a digit: ~c" c)))

(parse "01x2"
(%any (%handler-case (%and (?satisfies ’assert-digit) (=element))
(error (e)
(format t "Error at position ~a: ~a~%" (get-input-position) e)
(?seq (=element))))))
▷ Error at position 2: Not a digit: x
→ (#\0 #\1 #\2), T, T
#

*See Also:*

{handler-case}.

Package

maxpc.

Source

interface.lisp.

Macro: %restart-case (parser &rest clauses)

_clauses_::= {{}↓_restart‑clause_{\}}\*

_restart‑clause_::=
{(}_case‑name_ {([}_lambda‑list_{])}
〚{:interactive} _interactive‑expression_ |
{:report} _report‑expression_ |
{:test} _test‑expression_〛
{{}_declaration_{\}}\* {{}_form_{\}}\* _parser‑form_{)}

*Arguments and Values:*

_parser_—a _parser_.

_case‑name_—a _symbol_ or {nil}.

_lambda‑list_—an _ordinary lambda list_.

_interactive‑expression_—a _symbol_ or a _lambda expression_.

_report‑expression_—a _string_, a _symbol_, or a _lambda expression_.

_test‑expression_—a _symbol_ or a _lambda expression_.

_declaration_—a {declare} _expression_; not evaluated.

_form_—a _form_.

_parser‑form_—a _form_ that evaluates to a _parser_.

*Description:*

{%restart-case} executes _parser_ in a _dynamic environment_ where restarts are active as if by {restart-case}. If control is transferred to a _restart‑clause_, _parser‑form_ is evaluated and the resulting _parser_ is applied.

*Examples:*

#code#
(parse "012x3"
(%any (%restart-case
(=transform
(=element)
(lambda (c)
(if (digit-char-p c)
c
(error "Not a digit: ~c" c))))
(skip-element ()
:report "Skip character."
(?seq (=element))))))
▷ Error: Not a digit: x
▷ To continue, type :CONTINUE followed by an option number:
▷ 1: Skip non-digit character.
▷ 2: Return to Lisp Toplevel.
▷ Debug> :continue 1
▷ Invoking restart: Skip character.
→ (#\0 #\1 #\2), T, T
#

*See Also:*

{restart-case}.

Package

maxpc.

Source

interface.lisp.

Macro: =destructure ((&rest lambda-list) parser &body forms)

*Arguments and Values:*

_lambda‑list_—a _destructuring lambda list_.

_parser_—a _parser_.

_forms_—an _implicit progn_.

*Description:*

{=destructure} matches _parser_ and destructures its result value as if by {destructuring-bind}. The {_} (underscore) symbol can occur in _lambda‑list_ any number of times, and is substituted with a _fresh_, _uninterned symbol_ and declared {ignorable}. If _parser_ matches {=destructure} evaluates _forms_ and produces the value of the last _form_ as its result value. If no _forms_ are supplied the value of the last, _interned_ variable defined in _lambda‑list_ is produced as the result value instead.

*Examples:*

#code#
(parse ’(10 % 3) (=destructure (x _ y)
(=list (=element) (?eq ’%) (=element))
(mod x y)))
→ 1, T, T

(parse "a," (=destructure (x _)
(=list (=element) (?eq #\,))))
→ #\a, T, T

(parse ’(a b c) (=destructure (x &rest xs)
(%some (=element))))
→ ’(B C), T, T
#

*Exceptional Situations:*

If the result value of _parser_ does not match the destructuring pattern, an _error_ of _type_ {program-error} is signaled.

*See Also:*

{destructuring-bind}

Package

maxpc.

Source

more.lisp.

Macro: ?fail (&body forms)

*Arguments and Values:*

_forms_—_forms_.

*Description:*

{?fail} always fails to match, and evaluates _forms_ when it is applied.

*Examples:*

#code#
(parse ’(a b c) (?fail (format t "Position: ~a~%" (get-input-position))))
▷ Position: 0
→ NIL, NIL, NIL
#

Package

maxpc.

Source

primitives.lisp.

Macro: ?test ((test &rest arguments) &optional parser)

*Arguments and Values:*

_test_—a _designator_ for a _function_ that returns a _generalized boolean_.

_arguments_—_objects_.

_parser_—a _parser_. The default is {(=element)}.

*Description:*

{?test} matches _parser_ if its result value _satisfies the test_ with _arguments_ as additional arguments to _test_.

*Examples:*

#code#
(parse ’(a) (?test (’member ’(a b)))) ⇒ NIL, T, T
(flet ((power-of-p (n e) (= (mod n e) 0)))
(parse ’(42) (?test (#’power-of-p 2)))) ⇒ NIL, T, T
#

*Notes:*

#code#
(?test ({fun} {args}*}))
≡ (?satisfies (lambda (x)
(funcall {fun} x {args}*)))
#

*Exceptional Situations:*

If _test_ accepts less arguments than the number of _arguments_ plus one an _error_ of _type_ {program-error} is signaled.

*See also:*

{?satisfies}

Package

maxpc.

Source

more.lisp.

Macro: april (g317 &optional g318)
Package

april.

Source

spec.lisp.

Macro: april-c (g317 &rest g320)
Package

april.

Source

spec.lisp.

Macro: april-clear-workspace (g326)
Package

april.

Source

spec.lisp.

Macro: april-create-workspace (g326)
Package

april.

Source

spec.lisp.

Macro: april-f (&rest g317)
Package

april.

Source

spec.lisp.

Macro: april-load (g317 &optional g321)
Package

april.

Source

spec.lisp.

Macro: boolean-op (operation)

Wrap a boolean operation for use in a vector language, converting the t or nil it returns to 1 or 0.

Package

vex.

Source

vex.lisp.

Macro: extend-vex-idiom (symbol &rest subspecs)

Wraps the idiom-spec macro for an extension of a Vex idiom.

Package

vex.

Source

vex.lisp.

Macro: matrix-print (input &rest options)

Print a character matrix generated by array-impress.

Package

aplesque.

Source

aplesque.lisp.

Macro: reverse-op (is-dyadic &optional operation)

Wrap a function so as to reverse the arguments passed to it and (- 5 10) will thus result in 5.

Package

vex.

Source

vex.lisp.

Macro: specify-vex-idiom (symbol &rest subspecs)

Wraps the idiom-spec macro for an initial specification of a Vex idiom.

Package

vex.

Source

vex.lisp.

Macro: with-april-context (g317 &rest g319)
Package

april.

Source

spec.lisp.

Macro: ws-assign-fun (symbol value)

Assignment macro for use with (:store-fun) directive.

Package

vex.

Source

utilities.lisp.

Macro: ws-assign-val (symbol value)

Assignment macro for use with (:store-val) directive.

Package

vex.

Source

utilities.lisp.

Macro: xdotimes (object clause-params &body body)

Macro to perform array operations in parallel provisioning threads according to the type of array being assigned to.

Package

aplesque.

Source

aplesque.lisp.

Macro: ydotimes (object clause &body body)

As xdotimes, but no provision is made for integer arrays with elements smaller than 7 bits; these are processed single-threaded.

Package

aplesque.

Source

aplesque.lisp.


5.1.3 Ordinary functions

Function: %and (&rest parsers)

*Arguments and Values:*

_parsers_—_parsers_.

*Description:*

{%and} applies _parsers_, and matches the last _parser_ only if all previous _parsers_ succeed. If the last _parser_ produces a result value then {%and} produces that value as its result value. It can be said that {%and} forms the set intersection of _parsers_.

*Examples:*

#code#
(parse ’(:foo) (%and (?satisfies ’symbolp)
(?satisfies ’keywordp)))
→ NIL, T, T
(parse ’(foo) (%and (?satisfies ’symbolp)
(?satisfies ’keywordp)))
→ NIL, NIL, NIL
(parse ’(foo) (%and))
→ NIL, NIL, NIL
(parse ’(foo) (%and (?satisfies ’symbolp) (=element)))
→ FOO, T, T
(parse ’() (%and (%maybe (?fail (princ ’foo)))
(%maybe (?fail (princ ’bar)))
(%maybe (?fail (princ ’baz)))))
▷ FOOBARBAZ
→ NIL, T, T
#

Package

maxpc.

Source

primitives.lisp.

Function: %any (parser)

*Arguments and Values:*

_parser_—a _parser_.

*Description:*

{%any} matches _parser_ in sequence any number of times. If _parser_ produces a result value and matches at least once then {%any} produces a _list_ of the values as its result value.

*Examples:*

#code#
(parse ’(a b c) (%any (=element))) → (A B C), T, T
(parse ’() (%any (=element))) → NIL, T, T
#

Package

maxpc.

Source

primitives.lisp.

Function: %diff (parser &rest not-parsers)

*Arguments and Values:*

_parser_—a _parser_.

_not‑parsers_—_parsers_.

*Description:*

{%diff} matches _parser_ only if applying _not‑parsers_ fails. If _parser_ produces a result value then {%diff} produces that value as its result value. It can be said that {%diff} forms the set difference of _parser_ and the union of _not‑parsers_.

*Examples:*

#code#
(parse ’(foo) (%diff (?satisfies ’symbolp)
(?satisfies ’keywordp)))
→ NIL, T, T
(parse ’(:foo) (%diff (?satisfies ’symbolp)
(?satisfies ’keywordp)))
→ NIL, NIL, NIL
(parse ’(foo) (%diff (?satisfies ’symbolp)))
→ NIL, T, T
(parse ’(:foo) (%diff (?satisfies ’symbolp)))
→ NIL, T, T
#

Package

maxpc.

Source

primitives.lisp.

Function: %maybe (parser)

*Arguments and Values:*

_parser_—a _parser_.

*Description:*

{%maybe} matches _parser_ or nothing all, but always succeeds. If _parser_ matches and produces a result value then {%maybe} produces that value as its result value.

*Examples:*

#code#
(parse ’(a) (%maybe (=element))) → A, T, T
(parse ’() (%maybe (=element))) → NIL, T, T
(parse ’(42) (%maybe (?satisfies ’evenp))) → NIL, T, T
#

Package

maxpc.

Source

more.lisp.

Function: %or (&rest parsers)

*Arguments and Values:*

_parsers_—_parsers_.

*Description:*

{%or} attempts to successfully apply _parsers_, and matches the first succeeding _parser_, if any. If that _parser_ produces a result value then {%or} produces that value as its result value. It can be said that {%or} forms the set union of _parsers_.

*Examples:*

#code#
(parse ’(a) (%or (?eq ’a) (?eq ’b))) → NIL, T, T
(parse ’(b) (%or (?eq ’a) (?eq ’b))) → NIL, T, T
(parse ’(a) (%or)) → NIL, NIL, NIL
(parse ’(a) (%or (=element)
(?fail (format t "No element.~%"))))
→ A, T, T
(parse ’() (%or (?fail (princ ’foo))
(?fail (princ ’bar))
(?fail (princ ’baz))))
▷ FOOBARBAZ
→ NIL, NIL, T
#

Package

maxpc.

Source

primitives.lisp.

Function: %some (parser)

*Arguments and Values:*

_parser_—a _parser_.

*Description:*

{%some} matches _parser_ in sequence one or more times. If _parser_ produces a result value then {%some} produces a _list_ of the values as its result value.

*Examples:*

#code#
(parse ’(a b c) (%some (=element))) → (A B C), T, T
(parse ’() (%some (=element))) → NIL, NIL, T
#

Package

maxpc.

Source

more.lisp.

Function: =element ()

*Description:*

{=element} matches the next element and produces that element it as its result value.

*Examples:*

#code#
(parse ’(a) (=element)) → A, T, T
(parse ’() (=element)) → NIL, NIL, T
#

Package

maxpc.

Source

primitives.lisp.

Function: =integer-number (&optional radix)

*Arguments and Values:*

_radix_—a _number_ of _type_ {(integer 2 36)}. The default is {10}.

*Description:*

{=integer-number} matches one or more digit _characters_ in the specified _radix_, optionally lead by a sign character, in sequence, and produces the _integer_ represented by that sequence as its result value. The leading sign can be {#\\+} and {#\\-} for positive and negative values respectively. The default is a positive value.

*Examples:*

#code#
(parse "101010" (=integer-number 2)) → 42, T, T
(parse "+101010" (=integer-number 2)) → 42, T, T
(parse "-101010" (=integer-number 2)) → -42, T, T
(parse "x101010" (=integer-number 2)) → NIL, NIL, NIL
#

*Exceptional Situations:*

If an element attempted to be matched is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.digit.

Source

digit.lisp.

Function: =line (&optional keep-newline-p)

*Arguments and Values:*

_keep‑newline‑p_—a _generalized boolean_. The default is _false_.

*Description:*

{=line} matches zero or more _characters_ in sequence followed by a {#\\Newline} _character_ or the end of input, and produces the _string_ of _characters_ as its result value. The terminating {#\\Newline} _character_ is not included in _string_ unless _keep‑newline‑p_ is _true_.

*Examples:*

#code#
(parse (format nil "foo~%bar~%baz") (%any (=line)))
→ ("foo" "bar" "baz"), T, T
#

*Exceptional Situations:*

If an element attempted to be matched is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.char.

Source

char.lisp.

Function: =list (&rest parsers)

*Arguments and Values:*

_parsers_—_parsers_.

*Description:*

{=list} matches _parsers_ in sequence, and produces a _list_ of the result values of _parsers_ as its result value.

*Examples:*

#code#
(parse ’(a) (=list (=element) (?end)))
→ (A NIL), T, T
(parse ’(a b) (=list (=element) (?end)))
→ NIL, NIL, NIL
(parse ’(a) (=list))
→ NIL, T, NIL
#

Package

maxpc.

Source

primitives.lisp.

Function: =natural-number (&optional radix)

*Arguments and Values:*

_radix_—a _number_ of _type_ {(integer 2 36)}. The default is {10}.

*Description:*

{=natural-number} matches one or more digit _characters_ in the specified _radix_ in sequence, and produces the natural _number_ represented by that digit sequence as its result value.

*Examples:*

#code#
(parse "234" (=natural-number 2)) → NIL, NIL, NIL
(parse "101010" (=natural-number 2)) → 42, T, T
#

*Exceptional Situations:*

If an element attempted to be matched is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.digit.

Source

digit.lisp.

Function: =subseq (parser)

*Arguments and Values:*

_parser_—a _parser_.

*Description:*

{=subseq} matches _parser_, and produces the subsequence matched by _parser_ as its result value.

*Examples:*

#code#
(parse ’(1 2 3) (=subseq (%any (?satisfies ’numberp))))
→ (1 2 3), T, T
(parse "123" (=subseq (%any (?satisfies ’digit-char-p))))
→ "123" T, T
#

Package

maxpc.

Source

primitives.lisp.

Function: =transform (parser function)

*Arguments and Values:*

_parser_—a _parser_.

_function_—a _designator_ for a _function_ of one argument.

*Description:*

{=transform} matches _parser_ and produces the result of applying _function_ to the result value of _parser_ as its result value.

*Examples:*

#code#
(parse ’(41) (=transform (=element) ’1+)) → 42, T, T
(parse ’() (=transform (=element) ’1+)) → NIL, NIL, T
#

Package

maxpc.

Source

primitives.lisp.

Function: ?char (char &optional case-sensitive-p)

*Arguments and Values:*

_char_—a _character_.

_case‑sensitive‑p_—a _generalized boolean_. The default is _true_.

*Description:*

{?char} matches _char_. {?char} is case sensitive unless _case‑sensitive‑p_ is _false_.

*Exceptional Situations:*

If the next element is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.char.

Source

char.lisp.

Function: ?digit (&optional radix)

*Arguments and Values:*

_radix_—a _number_ of _type_ {(integer 2 36)}. The default is {10}.

*Description:*

{?digit} matches a single digit _character_ in the specified _radix_.

*Exceptional Situations:*

If the next element is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.digit.

Source

digit.lisp.

Function: ?end ()

*Description:*

{?end} matches the end of input.

*Examples:*

#code#
(parse ’() (?end)) → NIL, T, T (parse ’(a) (?end)) → NIL, NIL, NIL #

Package

maxpc.

Source

primitives.lisp.

Function: ?eq (x &optional parser)

*Arguments and Values:*

_x_—an _object_.

_parser_—a _parser_. The default is {(=element)}.

*Description:*

{?eq} matches _parser_ if its result value is {eq} to _x_.

*Examples:*

#code#
(parse ’(a) (?eq ’a)) ⇒ NIL, T, T
(parse ’(b) (?eq ’a)) ⇒ NIL, NIL, NIL
#

*See also:*

{?satisfies}

Package

maxpc.

Source

more.lisp.

Function: ?newline ()

*Description:*

{?newline} matches the {#\\Newline} _character_.

Package

maxpc.char.

Source

char.lisp.

Function: ?not (parser)

*Arguments and Values:*

_parser_—a _parser_.

*Description:*

{?not} matches the next element unless _parser_ matches.

*Examples:*

#code#
(parse ’(:foo :baz) (?not (?seq (?eq :foo) (?eq :bar)))) → NIL, T, NIL
(parse ’() (?not (?eq :baz))
→ NIL, NIL, NIL
#

Package

maxpc.

Source

more.lisp.

Function: ?satisfies (test &optional parser)

*Arguments and Values:*

_test_—a _designator_ for a _function_ of one argument that returns a _generalized boolean_.

_parser_—a _parser_. The default is {(=element)}.

*Description:*

{?satisfies} matches _parser_ if its result value _satisfies the test_.

*Examples:*

#code#
(parse ’(1) (?satisfies ’numberp)) → NIL, T, T
(parse ’(a) (?satisfies ’numberp)) → NIL, NIL, NIL
(parse ’(a b c)
(?satisfies (lambda (s)
(intersection s ’(b c d)))
(%any (=element))))
⇒ NIL, T, T
#

Package

maxpc.

Source

primitives.lisp.

Function: ?seq (&rest parsers)

*Arguments and Values:*

_parsers_—_parsers_.

*Description:*

{?seq} matches _parsers_ in sequence.

*Examples:*

#code#
(parse ’(a) (?seq (=element) (?end))) → NIL, T, T
(parse ’(a b) (?seq (=element) (?end))) → NIL, NIL, NIL
(parse ’(a) (?seq))
→ NIL, T, NIL
#

Package

maxpc.

Source

primitives.lisp.

Function: ?string (string &optional case-sensitive-p)

*Arguments and Values:*

_string_—a _string_.

_case‑sensitive‑p_—a _generalized boolean_. The default is _true_.

*Description:*

{?string} matches the _characters_ in _string_ in sequence. {?string} is case sensitive unless _case‑sensitive‑p_ is _false_.

*Exceptional Situations:*

If an element attempted to be matched is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.char.

Source

char.lisp.

Function: ?whitespace ()

*Description:*

{?whitespace} matches an element that is a member of {*whitespace*}.

*Exceptional Situations:*

If the next element is not a _character_ an _error_ of _type_ {type-error} is signaled.

Package

maxpc.char.

Source

char.lisp.

Function: across (input function &key elements indices reverse-axes count ranges foreach finally depth dimensions)

Iterate across a range of elements in an array, with the option of specifying which elements within each dimension to process.

Package

aplesque.

Source

aplesque.lisp.

Function: alpha-compare (compare-by)

Compare the contents of a vector according to their positions in an array, as when comparing an array of letters by their positions in the alphabet.

Package

aplesque.

Source

aplesque.lisp.

Function: apl-array-prototype (array)

Returns the default element for an array based on that array’s first element (its prototype in array programming terms); blank spaces in the case of a character prototype and zeroes for others.

Package

aplesque.

Source

aplesque.lisp.

Function: apply-scalar (function omega &optional alpha axes is-boolean is-non-scalar-function meta-table)

Apply a scalar function over an array or arrays as appropriate for the shape of the argument(s).

Package

aplesque.

Source

aplesque.lisp.

Function: april-print-progress-bar (count &key increments width glyphs)

Print a progress bar that will grow toward completion as a process advances.

Package

april.

Source

novelties.lisp.

Function: array-compare (item1 item2 &optional comparison-tolerance)

Perform a deep comparison of two APL arrays, which may be multidimensional or nested.

Package

aplesque.

Source

aplesque.lisp.

Function: array-depth (input &optional layer uniform possible-depth)

Find the maximum depth of nested arrays within an array.

Package

aplesque.

Source

aplesque.lisp.

Function: array-grade (compare-by input)

Grade an array.

Package

aplesque.

Source

aplesque.lisp.

Function: array-impress (input &key prepend append collate unpadded format segment)

Render the contents of an array into a character matrix or, if the collate option is taken, an array with sub-matrices of characters.

Package

aplesque.

Source

aplesque.lisp.

Function: array-inner-product (alpha omega function1 function2 &optional threaded function1-nonscalar)

Find the inner product of two arrays with two functions.

Package

aplesque.

Source

aplesque.lisp.

Function: array-outer-product (omega alpha function &optional threaded)

Find the outer product of two arrays with a function.

Package

aplesque.

Source

aplesque.lisp.

Function: array-promote (input)

Promote an array to the next rank. The existing content will occupy 1 unit of the new dimension.

Package

aplesque.

Source

aplesque.lisp.

Function: array-to-list (input)

Convert array to list.

Package

aplesque.

Source

aplesque.lisp.

Function: assign-element-type (item)

Find a type suitable for an APL array to hold a given item.

Package

aplesque.

Source

aplesque.lisp.

Function: binomial (n k)

Generalized binomial function. For complex and fractional numbers uses Gamma function.

Package

aplesque.

Source

aplesque.lisp.

Function: catenate (a1 a2 axis)

Join two arrays along the specified axis.

Package

aplesque.

Source

aplesque.lisp.

Function: choose (input indices &key set set-by set-nil reference modify-input)

Select indices from an array and return them in an array shaped according to the requested indices, with the option to elide indices and perform an operation on the values at the indices instead of just fetching them and return the entire altered array.

Package

aplesque.

Source

aplesque.lisp.

Function: copy-nested-array (array)

Copy an array along with nested sub-arrays within it.

Package

aplesque.

Source

aplesque.lisp.

Function: count-segments (value precision &optional segments)

Count the lengths of segments a number will be divided into when printed using (array-impress), within the context of a column’s existing segments if provided.

Package

aplesque.

Source

aplesque.lisp.

Function: disclose (array)

Disclose a scalar nested array.

Package

aplesque.

Source

aplesque.lisp.

Function: disclose-unitary (item)

If the argument is an array with only one member, disclose it, otherwise do nothing.

Package

aplesque.

Source

aplesque.lisp.

Function: duplicate (object)

Return a copy of the argument if it is an array, otherwise pass the argument back.

Package

aplesque.

Source

aplesque.lisp.

Function: enclose (item)

Enclose an item as per APL’s [⊂ enclose].

Package

aplesque.

Source

aplesque.lisp.

Function: enclose-atom (item)

Enclose non-array values, passing through arguments that are already arrays.

Package

aplesque.

Source

aplesque.lisp.

Function: enlist (input)

Create a vector containing all elements of the input array in ravel order, breaking down nested and multidimensional arrays.

Package

aplesque.

Source

aplesque.lisp.

Function: expand (degrees input axis &key compress-mode populator)

Expand an input array as per a vector of degrees, with the option to manifest zero values in the degree array as zeroes in the output in place of the original input values or to omit the corresponding values altogether if the :compress-mode option is used.

Package

aplesque.

Source

aplesque.lisp.

Function: find-array (input target)

Find instances of an array within a larger array.

Package

aplesque.

Source

aplesque.lisp.

Function: get-dimensional-factors (dimensions &optional as-vector)

Get the set of dimensional factors corresponding to a set of array dimensions.

Package

aplesque.

Source

aplesque.lisp.

Function: get-first-or-disclose (omega)

Get the first element of an array or disclose the element of a 0-rank array.

Package

aplesque.

Source

aplesque.lisp.

Function: get-input-position ()

→ _position_

→ _position_, _line_, _column_

*Arguments and Values:*

_position_, _column_—non-negative _integers_.

_line_—a positive _integer_.

*Description:*

{get-input-position} returns the number of elements read from the input so far. Additionally, _line_ and _column_ positions are returned if the input’s _element type_ is {character}. Lines are counted starting at one while columns are counted starting from zero.

{get-input-position} may only be called from within the body of {?fail}, the handlers of {%handler-case} or the restarts of {%restart-case}.

*Exceptional Situations:*

If {get-input-position} is not evaluated within the dynamic context of {?fail}, {%handler-case} or {%restart-case} an _error_ of _type_ {simple-error} is signaled.

Package

maxpc.

Source

interface.lisp.

Function: grade (input count-from compare-by)

Grade an array, using vector grading if 1-dimensional or decomposing the array into vectors and comparing those if multidimensional.

Package

aplesque.

Source

aplesque.lisp.

Function: index-of (to-search set count-from)

Find occurrences of members of one set in an array and create a corresponding array with values equal to the indices of the found values in the search set, or one plus the maximum possible found item index if the item is not found in the search set.

Package

aplesque.

Source

aplesque.lisp.

Reader: index-position (instance)
Package

maxpc.input.index.

Source

input/index.lisp.

Target Slot

position.

Function: interval-index (items reference)

Find the locations of indices of an array between the indices of a reference array.

Package

aplesque.

Source

aplesque.lisp.

Function: inverse-outer-product (input function right-original &optional threaded left-original)

Find the inverse outer product of an array with a function and a given outer product argument.

Package

aplesque.

Source

aplesque.lisp.

Function: invert-matrix (in-matrix)

Find the inverse of a square matrix.

Package

aplesque.

Source

aplesque.lisp.

Function: is-integer-array (array)

Determine if an array is typed so as to hold only integers.

Package

aplesque.

Source

aplesque.lisp.

Function: is-unitary (value)

Check whether this array has only one member, returning true if the argument is not an array.

Package

aplesque.

Source

aplesque.lisp.

Function: laminate (a1 a2 axis)

Join the two arrays along a new axis inserted before the specified axis, the new axis having a length of 2.

Package

aplesque.

Source

aplesque.lisp.

Function: left-invert-matrix (in-matrix)

Perform left inversion of matrix. Used to implement [⌹ matrix inverse].

Package

aplesque.

Source

aplesque.lisp.

Function: make-empty-array (array)

Makes a prototype version of an array.

Package

aplesque.

Source

aplesque.lisp.

Function: mix-arrays (axis input &key populator)

Combine an array of nested arrays into a higher-rank array, removing a layer of nesting.

Package

aplesque.

Source

aplesque.lisp.

Function: nest (input)

Enclose simple arrays and return nested arrays as-is.

Package

aplesque.

Source

aplesque.lisp.

Function: op-compose (type &rest args)
Package

varray.

Source

composed.lisp.

Function: parse (input-source parser)

→ _result_, _match‑p_, _end‑p_

*Arguments and Values:*

_input-source_—an _input source_.

_parser_—a parser.

_result_—an _object_.

_match‑p_, _end‑p_—_generalized booleans_.

*Description:*

{parse} applies _parser_ to the _input_ and returns the parser’s _result value_ or {nil}. _Match‑p_ is _true_ if _parser_ _matched_ the _input-source_. _End‑p_ is _true_ if _parser_ _matched_ the complete _input-source_. _Input_ is derived from _input-source_ by using {maxpc.input:make-input}.

{parse} accepts _input sources_ of _type_ {sequence} and {stream} out of the box.

*See Also:*

[input](#section-4), [maxpc.input.stream](#section-5)

Package

maxpc.

Source

interface.lisp.

Function: partition-array (positions input axis)

Split an array into an array of vectors divided according to an array of positions.

Package

aplesque.

Source

aplesque.lisp.

Function: partitioned-enclose (positions input axis)

Enclose parts of an input array partitioned according to the ’positions’ argument.

Package

aplesque.

Source

aplesque.lisp.

Function: permute-axes (omega alpha)

Permute an array according to a given new order of axes. If axis order indices are repeated, a diagonal traversal of the dimensions with repeated order indices is indicated.

Package

aplesque.

Source

aplesque.lisp.

Function: ravel (count-from input &optional axes)

Produce a vector from the elements of a multidimensional array.

Package

aplesque.

Source

aplesque.lisp.

Function: re-enclose (input axes)

Convert an array into a set of sub-arrays within a larger array. The dimensions of the containing array and the sub-arrays will be some combination of the dimensions of the original array. For example, a 2 x 3 x 4 array may be composed into a 3-element vector containing 2 x 4 dimensional arrays.

Package

aplesque.

Source

aplesque.lisp.

Function: reduce-array (input function axis threaded &optional last-axis window)

Reduce an array along by a given function along a given dimension, optionally with a window interval.

Package

aplesque.

Source

aplesque.lisp.

Function: reshape-to-fit (input output-dims &key populator)

Reshape an array into a given set of dimensions, truncating or repeating the elements in the array until the dimensions are satisfied if the new array’s size is different from the old.

Package

aplesque.

Source

aplesque.lisp.

Function: scale-array (unitary to-match &optional axis)

Scale up a 1-element array to fill the dimensions of the given array.

Package

aplesque.

Source

aplesque.lisp.

Function: section (input dimensions &key inverse populator)

Take a subsection of an array of the same rank and given dimensions as per APL’s [↑ take] function, or do the converse as per APL’s [↓ drop] function to take the elements of an array excepting a specific dimensional range.

Package

aplesque.

Source

aplesque.lisp.

Function: split-array (input &optional axis)

Split an array into a set of sub-arrays.

Package

aplesque.

Source

aplesque.lisp.

Function: sprfact (n)

Top-level factorial-computing function.

Package

aplesque.

Source

aplesque.lisp.

Function: stencil (input process window-dims movement &optional threaded)

Apply a given function to sub-arrays of an array with specified dimensions sampled according to a given pattern of movement across the array.

Package

aplesque.

Source

aplesque.lisp.

Function: turn (input axis &optional degrees)

Either reflect an array or rotate it a number of degrees along a given axis. Used to implement [⌽⊖ reflect/rotate].

Package

aplesque.

Source

aplesque.lisp.

Function: type-in-common (&rest types)

Find a type for an array that may hold elements from arrays of a set of given types; effectively the most efficient compatible type among the array types.

Package

aplesque.

Source

aplesque.lisp.

Function: varef (array subscripts)

Reference an element in an array according to a vector of subscripts.

Package

aplesque.

Source

aplesque.lisp.

Function: (setf varef) (array subscripts &optional offset)

Set an element in an array according to a vector of subscripts.

Package

aplesque.

Source

aplesque.lisp.

Function: varray-compare (item1 item2 &optional comparison-tolerance)

Perform a deep comparison of two APL arrays, which may be multidimensional or nested.

Package

varray.

Source

derived.lisp.

Function: varrayp (item)
Package

varray.

Source

base.lisp.

Function: vex-program (idiom options &optional string &rest inline-arguments)

Compile a set of expressions, optionally drawing external variables into the program and setting configuration parameters for the system.

Package

vex.

Source

vex.lisp.

Function: vrender (object &rest params)

A public-facing interface to the render method.

Package

varray.

Source

base.lisp.


5.1.4 Generic functions

Generic Function: assign-rank (varray rank)

Assign a rank at which to process a virtual array, implementing cases of function composition using the [⍤ rank] operator.

Package

varray.

Source

base.lisp.

Methods
Method: assign-rank ((varray vader-permute) rank)

Assign a rank at which the [⍉ permute] function shall operate, for its composition with the [⍤ rank] operator.

Source

derived.lisp.

Method: assign-rank ((varray vader-turn) rank)

Assign a rank at which the [⌽⊖ rotate] function shall operate, for its composition with the [⍤ rank] operator.

Source

derived.lisp.

Method: assign-rank ((varray vad-on-axis) rank)

Assign a rank at which the [⌽⊖ rotate] function shall operate, for its composition with the [⍤ rank] operator.

Source

derived.lisp.

Method: assign-rank (item rank)

The default case of rank assignment is to return nil.

Generic Function: etype-of (varray)

Get the element type of an array.

Package

varray.

Source

base.lisp.

Methods
Method: etype-of ((varray vader-stencil-margin))
Source

composed.lisp.

Method: etype-of ((varray vader-composing))
Source

composed.lisp.

Method: etype-of ((varray vader-select))
Source

select.lisp.

Method: etype-of ((varray vader-calculate))
Source

calculate.lisp.

Method: etype-of ((varray vader-identity))
Source

derived.lisp.

Method: etype-of ((varray vader-decode))
Source

derived.lisp.

Method: etype-of ((varray vader-encode))
Source

derived.lisp.

Method: etype-of ((varray vader-matrix-divide))
Source

derived.lisp.

Method: etype-of ((varray vader-matrix-inverse))
Source

derived.lisp.

Method: etype-of ((varray vader-grade))
Source

derived.lisp.

Method: etype-of ((varray vader-union))
Source

derived.lisp.

Method: etype-of ((varray vader-unique))
Source

derived.lisp.

Method: etype-of ((varray vader-intersection))
Source

derived.lisp.

Method: etype-of ((varray vader-pick))
Source

derived.lisp.

Method: etype-of ((varray vader-partition))
Source

derived.lisp.

Method: etype-of ((varray vader-enclose))
Source

derived.lisp.

Method: etype-of ((varray vader-split))

The [↓ split] function returns a nested array unless its argument is scalar.

Source

derived.lisp.

Method: etype-of ((varray vader-mix))
Source

derived.lisp.

Method: etype-of ((varray vader-catenate))
Source

derived.lisp.

Method: etype-of ((varray vader-interval-index))
Source

derived.lisp.

Method: etype-of ((varray vader-where))
Source

derived.lisp.

Method: etype-of ((varray vader-find))
Source

derived.lisp.

Method: etype-of ((varray vader-membership))
Source

derived.lisp.

Method: etype-of ((varray vader-compare))
Source

derived.lisp.

Method: etype-of ((varray vader-first-dim))
Source

derived.lisp.

Method: etype-of ((varray vader-depth))
Source

derived.lisp.

Method: etype-of ((varray vader-shape))
Source

derived.lisp.

Method: etype-of ((varray vader-index))
Source

derived.lisp.

Method: etype-of ((varray vader-inverse-where))
Source

derived.lisp.

Method: etype-of ((varray vader-umask))
Source

derived.lisp.

Method: etype-of ((varray vader-without))
Source

derived.lisp.

Method: etype-of ((varray vader-deal))
Source

derived.lisp.

Method: etype-of ((varray vader-random))
Source

derived.lisp.

Method: etype-of ((varray vapri-axis-vector))
Source

primal.lisp.

Method: etype-of ((varray vapri-onehot-vector))

Always a binary array.

Source

primal.lisp.

Method: etype-of ((varray vapri-coordinate-identity))

Being a nested array, the type is always t.

Source

primal.lisp.

Method: etype-of ((vvector vapri-coordinate-vector))

The type of the coordinate vector.

Source

primal.lisp.

Method: etype-of ((vvector vapri-apro-vector))
Source

primal.lisp.

Method: etype-of ((varray varray-derived))

The default shape of a derived array is the same as its base array.

Method: etype-of ((varray varray))

The default element type for a virtual array is T.

Method: etype-of ((array array))

A literal array’s element type is returned by the (array-element-type) function.

Method: etype-of (item)

A literal array’s element type is returned by the (array-element-type) function.

Generic Function: generator-of (varray &optional indexers params)

Get a generating function for an array.

Package

varray.

Source

base.lisp.

Methods
Method: generator-of ((varray vacomp-stencil) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vader-stencil-margin) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vader-stencil-window) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vacomp-produce) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vader-subarray-displaced) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vacomp-scan) &optional indexers params)

Scan a function across an array along a given axis. Used to implement the [\ scan] operator with an option for inversion when used with the [⍣ power] operator taking a negative right operand.

Source

composed.lisp.

Method: generator-of ((varray vacomp-reduce) &optional indexers params)

Reduce an array along by a given function along a given dimension, optionally with a window interval.

Source

composed.lisp.

Method: generator-of ((varray vader-subarray-reduce) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vacomp-each) &optional indexers params)
Source

composed.lisp.

Method: generator-of ((varray vader-select) &optional indexers params)
Source

select.lisp.

Method: generator-of ((varray vader-calculate) &optional indexers params)
Source

calculate.lisp.

Method: generator-of ((varray vader-identity) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-decode) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-encode) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-matrix-divide) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-matrix-inverse) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-grade) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-permute) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-turn) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-union) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-unique) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-intersection) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-pick) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-expand) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-partition) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-enclose) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-section) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-split) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-subarray-split) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-mix) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-catenate) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-interval-index) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-where) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-find) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-membership) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-enlist) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-compare) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-first-dim) &optional indexers params)

Index a reshaped array.

Source

derived.lisp.

Method: generator-of ((varray vader-depth) &optional indexers params)

Index an array depth value.

Source

derived.lisp.

Method: generator-of ((varray vader-reshape) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-shape) &optional indexers params)

Index a reshaped array.

Source

derived.lisp.

Method: generator-of ((varray vader-index) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-inverse-where) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-umask) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-without) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-deal) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-random) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vader-subarray) &optional indexers params)
Source

derived.lisp.

Method: generator-of ((varray vapri-axis-vector) &optional indexers params)
Source

primal.lisp.

Method: generator-of ((varray vapri-onehot-vector) &optional indexers params)

Return one if the index matches, zero if not.

Source

primal.lisp.

Method: generator-of ((varray vapri-coordinate-identity) &optional indexers params)

Each index returns a coordinate vector.

Source

primal.lisp.

Method: generator-of ((vvector vapri-coordinate-vector) &optional indexers params)
Source

primal.lisp.

Method: generator-of ((vvector vapri-apro-vector) &optional indexers params)
Source

primal.lisp.

Method: generator-of :around ((varray varray-derived) &optional indexers params)

If a derived virtual array has content assigned, its generator will simply derive from that assigned content; otherwise the specific generator for the virtual array will be returned.

Method: generator-of :around ((varray varray) &optional indexers params)
Method: generator-of ((varray varray) &optional indexers params)
Method: generator-of ((array array) &optional indexers params)
Method: generator-of (item &optional indexers params)
Generic Function: get-system-meta (idiom property)
Package

vex.

Source

vex.lisp.

Methods
Method: get-system-meta ((idiom idiom) property)

Retrieve a property of the idiom’s system.

Generic Reader: idiom-symbols (object)
Package

vex.

Methods
Reader Method: idiom-symbols ((idiom idiom))

automatically generated reader method

Source

vex.lisp.

Target Slot

symbols.

Generic Writer: (setf idiom-symbols) (object)
Package

vex.

Methods
Writer Method: (setf idiom-symbols) ((idiom idiom))

automatically generated writer method

Source

vex.lisp.

Target Slot

symbols.

Generic Function: input-element-type (input)

→ _typespec_

*Arguments and Values:*

_input_—an _input_.

_typespec_—a _type specifier_.

*Description:*

{input-element-type} returns a _type specifier_ that designates the _type_ of the elements in _input_.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-element-type ((input index-stream))
Source

input/stream.lisp.

Method: input-element-type ((input index-vector))
Source

input/vector.lisp.

Method: input-element-type (input)
Generic Function: input-empty-p (input)

→ _empty-p_

*Arguments and Values:*

_input_—an _input_.

_empty-p_—a _generalized boolean_.

*Description:*

{input-empty-p} returns _true_ if _input_ is empty.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-empty-p ((input index-stream))
Source

input/stream.lisp.

Method: input-empty-p ((input index-vector))
Source

input/vector.lisp.

Method: input-empty-p ((input index-list))
Source

input/list.lisp.

Generic Function: input-first (input)

→ _element_

*Arguments and Values:*

_input_—a non-empty _input_.

_element_—an _object_ of the _type_ designated by the _type specifier_ returned by {input-element-type} when called on _input_.

*Description:*

{input-first} returns the first element in _input_.

*Exceptional Situations:*

If _input_ is empty the behavior of {input-first} is unspecified.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-first ((input index-stream))
Source

input/stream.lisp.

Method: input-first ((input index-simple-string))
Source

input/vector.lisp.

Method: input-first ((input index-simple-vector))
Source

input/vector.lisp.

Method: input-first ((input index-vector))
Source

input/vector.lisp.

Method: input-first ((input index-list))
Source

input/list.lisp.

Generic Function: input-position (input)

→ _position_

*Arguments and Values:*

_input_—an _input_.

_position_—an _integer_ between 0 and {array-dimension-limit} inclusively.

*Description:*

{input-position} returns the _position_ of _input_.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-position ((input index))
Source

input/index.lisp.

Method: input-position (input)
Generic Function: input-rest (input)

→ _rest_

*Arguments and Values:*

_input_—a non-empty _input_.

_rest_—the remaining _input_.

*Description:*

{input-rest} returns the remaining _input_ without the first element.

*Exceptional Situations:*

If _input_ is empty the behavior of {input-rest} is unspecified.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-rest ((input index-stream))
Source

input/stream.lisp.

Method: input-rest ((input index-simple-string))
Source

input/vector.lisp.

Method: input-rest ((input index-simple-vector))
Source

input/vector.lisp.

Method: input-rest ((input index-vector))
Source

input/vector.lisp.

Method: input-rest ((input index-list))
Source

input/list.lisp.

Generic Function: input-sequence (input length)

→ _sequence_

*Arguments and Values:*

_input_—an _input_.

_length_—an _integer_ between 0 and {array-dimension-limit} inclusively.

_sequence_—a _sequence_.

*Description:*

{input-sequence} returns a _sequence_ of the next _length_ elements in _input_.

*Exceptional Situations:*

If the number of elements in _input_ are less than _length_ the behavior of {input-sequence} is unspecified.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: input-sequence ((input index-stream) (length integer))
Source

input/stream.lisp.

Method: input-sequence ((input index-vector) (length integer))
Source

input/vector.lisp.

Method: input-sequence ((input index-list) (length integer))
Source

input/list.lisp.

Method: input-sequence (input (length integer))
Generic Function: inverse-count-to (array index-origin)

Invert an [⍳ index] function, returning the right argument passed to ⍳.

Package

varray.

Source

derived.lisp.

Methods
Method: inverse-count-to ((varray vapri-apro-vector) index-origin)
Method: inverse-count-to ((varray vader-identity) index-origin)
Method: inverse-count-to ((varray varray-derived) index-origin)
Method: inverse-count-to (item index-origin)
Generic Function: make-input (input-source)

*Arguments and Values:*

_input-source_—an _object_.

*Description:*

{make-input} returns an _input_ for _input-source_.

Package

maxpc.input.

Source

input.lisp.

Methods
Method: make-input ((input-source stream))
Source

input/stream.lisp.

Method: make-input ((input-source vector))
Source

input/vector.lisp.

Method: make-input ((input-source list))
Source

input/list.lisp.

Generic Function: of-lexicons (idiom glyph &rest lexicons)
Package

vex.

Source

vex.lisp.

Methods
Method: of-lexicons ((idiom idiom) glyph &rest lexicons)

Check whether a character belongs to a given Vex lexicon.

Generic Function: of-system (idiom property)
Package

vex.

Source

vex.lisp.

Methods
Method: of-system ((idiom idiom) property)

Retrieve one of the idiom’s system properties.

Generic Function: of-utilities (idiom utility)
Package

vex.

Source

vex.lisp.

Methods
Method: of-utilities ((idiom idiom) utility)

Retrieve one of the idiom’s utilities used for parsing and language processing.

Generic Function: rank-of (varray)

Get the rank of an array.

Package

varray.

Source

base.lisp.

Methods
Method: rank-of ((varray varray))

A virtual array’s rank is the length of its shape.

Method: rank-of ((array array))

Literal array ranks are given by (array-rank).

Method: rank-of (item)

Non-arrays have a rank of 0.

Generic Function: set-system-meta (idiom &rest pairs)
Package

vex.

Source

vex.lisp.

Methods
Method: set-system-meta ((idiom idiom) &rest pairs)

Set a property of the idiom’s system.

Generic Function: shape-of (varray)

Get the shape of an array.

Package

varray.

Source

base.lisp.

Methods
Method: shape-of ((varray vacomp-stencil))
Source

composed.lisp.

Method: shape-of ((varray vacomp-produce))
Source

composed.lisp.

Method: shape-of ((varray vacomp-scan))
Source

composed.lisp.

Method: shape-of ((varray vacomp-reduce))
Source

composed.lisp.

Method: shape-of ((varray vacomp-each))
Source

composed.lisp.

Method: shape-of ((varray vader-select))
Source

select.lisp.

Method: shape-of ((varray vader-calculate))
Source

calculate.lisp.

Method: shape-of ((varray vader-identity))
Source

derived.lisp.

Method: shape-of ((varray vader-decode))
Source

derived.lisp.

Method: shape-of ((varray vader-encode))
Source

derived.lisp.

Method: shape-of ((varray vader-matrix-divide))
Source

derived.lisp.

Method: shape-of ((varray vader-matrix-inverse))
Source

derived.lisp.

Method: shape-of ((varray vader-grade))
Source

derived.lisp.

Method: shape-of ((varray vader-permute))
Source

derived.lisp.

Method: shape-of ((varray vader-union))
Source

derived.lisp.

Method: shape-of ((varray vader-unique))
Source

derived.lisp.

Method: shape-of ((varray vader-intersection))
Source

derived.lisp.

Method: shape-of ((varray vader-pick))
Source

derived.lisp.

Method: shape-of ((varray vader-expand))

The shape of an expanded or compressed array.

Source

derived.lisp.

Method: shape-of ((varray vader-partition))
Source

derived.lisp.

Method: shape-of ((varray vader-enclose))
Source

derived.lisp.

Method: shape-of ((varray vader-section))

The shape of a sectioned array is the parameters (if not inverse, as for [↑ take]) or the difference between the parameters and the shape of the original array (if inverse, as for [↓ drop]).

Source

derived.lisp.

Method: shape-of ((varray vader-split))
Source

derived.lisp.

Method: shape-of ((varray vader-mix))
Source

derived.lisp.

Method: shape-of ((varray vader-catenate))
Source

derived.lisp.

Method: shape-of ((varray vader-pare))

The shape of a reshaped array is simply its argument.

Source

derived.lisp.

Method: shape-of ((varray vader-interval-index))
Source

derived.lisp.

Method: shape-of ((varray vader-where))
Source

derived.lisp.

Method: shape-of ((varray vader-enlist))
Source

derived.lisp.

Method: shape-of ((varray vader-compare))

The shape of a comparison result is always nil.

Source

derived.lisp.

Method: shape-of ((varray vader-first-dim))

The shape of a reshaped array is simply its argument.

Source

derived.lisp.

Method: shape-of ((varray vader-depth))

The shape of a reshaped array is simply its argument.

Source

derived.lisp.

Method: shape-of ((varray vader-reshape))

The shape of a reshaped array is simply its argument.

Source

derived.lisp.

Method: shape-of ((varray vader-shape))

The shape of a reshaped array is simply its argument.

Source

derived.lisp.

Method: shape-of ((varray vader-index))
Source

derived.lisp.

Method: shape-of ((varray vader-inverse-where))
Source

derived.lisp.

Method: shape-of ((varray vader-umask))
Source

derived.lisp.

Method: shape-of ((varray vader-without))
Source

derived.lisp.

Method: shape-of ((varray vader-deal))
Source

derived.lisp.

Method: shape-of ((varray vader-random))
Source

derived.lisp.

Method: shape-of ((varray vapri-axis-vector))
Source

primal.lisp.

Method: shape-of ((varray vapri-onehot-vector))

The vector’s shape is explicit.

Source

primal.lisp.

Method: shape-of ((varray vapri-coordinate-identity))

Shape is explicit; dimensional factors are generated by this function if not set.

Source

primal.lisp.

Method: shape-of ((vvector vapri-coordinate-vector))
Source

primal.lisp.

Method: shape-of ((vvector vapri-apro-vector))
Source

primal.lisp.

Method: shape-of ((varray varray-derived))

The default shape of a derived array is the same as the original array.

Method: shape-of :around ((varray varray-derived))

Extend derived arrays’ shape-of methods to collect data on array shape over the course of an array transformation.

Method: shape-of ((varray varray))

Virtual array shapes are referenced using the (varray-shape) method.

Method: shape-of ((array array))

Literal array shapes are given by (array-dimensions).

Method: shape-of (_)

Non-arrays have a nil shape.

Generic Function: size-of (varray)

Get the size of an array.

Package

varray.

Source

base.lisp.

Methods
Method: size-of ((varray varray))

Virtual array shapes are referenced using the (varray-shape) method.

Method: size-of (item)

Virtual array shapes are referenced using the (varray-shape) method.


5.1.5 Standalone methods

Method: allocate-instance ((this-class va-class) &rest params)

Extend allocation logic for all virtual array classes. This function acts as an interface to the extend-allocator functions (mostly found in combinatorics.lisp) which provide for special allocation behavior of virtual array classes; specifically the potential for their allocation to return a modified form of the base object rather than an instance of their actual class.

Source

base.lisp.

Method: initialize-instance :after ((varray vader-identity) &key)

Condense successive right and left identities (like ⊢⊣3 4⍴⍳9) into a single identity with the deferred rendering metadata flag activated. Successive right identities (like ⊢⊢3 4⍴⍳9) will force rendering.

Source

derived.lisp.

Method: initialize-instance :after ((varray vader-turn) &key)

Sum cumulative rotations into a single rotation; currently only works with a scalar left argument.

Source

derived.lisp.

Method: initialize-instance :around ((varray varray-derived) &key)

If the instance’s base slot is already bound, it has been populated through one of he above type combinatorics and so should be returned with no changes.

Source

base.lisp.

Method: validate-superclass ((class va-class) (superclass standard-class))
Package

sb-mop.

Source

base.lisp.


5.1.6 Structures

Structure: index

Generic index.

Package

maxpc.input.index.

Source

input/index.lisp.

Direct superclasses

structure-object.

Direct subclasses
Direct methods

input-position.

Direct slots
Slot: position
Package

common-lisp.

Type

maxpc.input.index:index-position

Initform

0

Readers

index-position.

Writers

This slot is read-only.


5.1.7 Classes

Class: vacomp-each

An each-composed array as with the [¨ each] operator.

Package

varray.

Source

composed.lisp.

Direct superclasses
Direct methods
Class: vacomp-produce

A produce-composed array as with the [. inner/outer product] operator.

Package

varray.

Source

composed.lisp.

Direct superclasses
Direct methods
Class: vacomp-reduce

A reduce-composed array as with the [/ reduce] operator.

Package

varray.

Source

composed.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %unitary

Whether the array measures only one unit along the axis to be reduced.

Initargs

:unitary

Readers

vacred-unitary.

Writers

(setf vacred-unitary).

Class: vacomp-scan

A scan-composed array as with the [\ scan] operator.

Package

varray.

Source

composed.lisp.

Direct superclasses
Direct methods
Class: vacomp-stencil

A stencil-composed array as with the [⌺ stencil] operator.

Package

varray.

Source

composed.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %base-dims

Vector of base array’s dimensions.

Initargs

:base-dims

Readers

vacst-base-dims.

Writers

(setf vacst-base-dims).

Slot: %win-dims

Dimensions for windows within stencil.

Initargs

:win-dims

Readers

vacst-win-dims.

Writers

(setf vacst-win-dims).

Slot: %win-offsets

Space offsets for windows within stencil.

Initargs

:win-offsets

Readers

vacst-win-offsets.

Writers

(setf vacst-win-offsets).

Slot: %win-factors

Dimensional factors for stencil window.

Initargs

:win-factors

Readers

vacst-win-factors.

Writers

(setf vacst-win-factors).

Slot: %movement

Stencil’s movement parameters.

Initargs

:movement

Readers

vacst-movement.

Writers

(setf vacst-movement).

Slot: %in-factors

Dimensional factors for stencil input.

Initargs

:in-factors

Readers

vacst-in-factors.

Writers

(setf vacst-in-factors).

Slot: %out-factors

Dimensional factors for stencil output.

Initargs

:out-factors

Readers

vacst-out-factors.

Writers

(setf vacst-out-factors).

Class: vader-calculate
Package

varray.

Source

calculate.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %params

Parameters for scalar operation to be performed.

Initargs

:params

Readers

vaop-params.

Writers

(setf vaop-params).

Slot: %function

Function to be applied to derived array element(s).

Initargs

:function

Readers

vaop-function.

Writers

(setf vaop-function).

Slot: %sub-shape

Shape of a lower-rank array to be combined with a higher-rank array along given axes.

Initargs

:sub-shape

Readers

vaop-sub-shape.

Writers

(setf vaop-sub-shape).

Class: vader-catenate

A catenated array as from the [, catenate] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %laminating

Whether this catenation laminates arrays.

Initargs

:laminating

Readers

vacat-laminating.

Writers

(setf vacat-laminating).

Class: vader-compare

The first dimension of an array as from the [≢ first dimension] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-composing

An array produced by an operator-composed function.

Package

varray.

Source

composed.lisp.

Direct superclasses

varray-derived.

Direct subclasses
Direct methods
Direct slots
Slot: %left

Left function composed with operator.

Initargs

:left

Readers

vacmp-left.

Writers

(setf vacmp-left).

Slot: %right

Right function composed with operator.

Initargs

:right

Readers

vacmp-right.

Writers

(setf vacmp-right).

Slot: %omega

Right argument to composed function.

Initargs

:omega

Readers

vacmp-omega.

Writers

(setf vacmp-omega).

Slot: %alpha

Left argument to composed function.

Initargs

:alpha

Readers

vacmp-alpha.

Writers

(setf vacmp-alpha).

Slot: %async

Whether this operation is asynchronous; i.e. operand functions lack side effects.

Initform

t

Initargs

:async

Readers

vacmp-async.

Writers

(setf vacmp-async).

Class: vader-deal

A shuffled index vector as from the [? deal] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %cached

Cached shuffled vector elements.

Initargs

:cached

Readers

vadeal-cached.

Writers

(setf vadeal-cached).

Class: vader-decode

A decoded array as from the [⊥ decode] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-depth

The first dimension of an array as from the [≢ first dimension] function.

Package

varray.

Source

derived.lisp.

Direct superclasses

varray-derived.

Direct methods
Class: vader-enclose

An enclosed or re-enclosed array as from the [⊂ enclose] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %inner-shape

Inner shape value for re-enclosed array.

Initargs

:inner-shape

Readers

vaenc-inner-shape.

Writers

(setf vaenc-inner-shape).

Class: vader-encode

An encoded array as from the [⊤ encode] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-enlist

An array decomposed into a vector as from the [∊ enlist] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-expand

An expanded (as from [ expand]) or compressed (as from [/ compress]) array.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %separating

Whether this section separates sections of the input with empty space in between to be filled with the array’s prototype.

Initargs

:separating

Readers

vadex-separating.

Writers

(setf vadex-separating).

Class: vader-find

An array of search matches as from the [⍷ find] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %pattern

Pattern to find.

Initargs

:pattern

Readers

vafind-pattern.

Writers

(setf vafind-pattern).

Slot: %cached

Cached data to search.

Initargs

:cached

Readers

vafind-cached.

Writers

(setf vafind-cached).

Class: vader-first-dim

The first dimension of an array as from the [≢ first dimension] function.

Package

varray.

Source

derived.lisp.

Direct superclasses

varray-derived.

Direct methods
Class: vader-grade

A graded array as from the [⍋⍒ grade up/down] functions.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-identity

The identity of an array as from the [⊢ identity] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-index

An indexed array as from the [⍳ index of] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %cache

Cached items to search in array.

Initargs

:cache

Readers

vaix-cache.

Writers

(setf vaix-cache).

Slot: %set

Cached items to search in array.

Initargs

:set

Readers

vaix-set.

Writers

(setf vaix-set).

Class: vader-intersection

An array intersection as from the [∩ intersection] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-interval-index

Interval indices of value(s) as from the [⍸ interval index] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-inverse-where

An inverted product of the [⍸ where] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-matrix-divide

A matrix-divided array as from the [⌹ matrix divide] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-matrix-inverse

A matrix-inverse array as from the [⌹ matrix inverse] function.

Package

varray.

Source

derived.lisp.

Direct superclasses

varray-derived.

Direct methods
Class: vader-membership

A membership array as from the [∊ membership] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %to-search

Set of elements to be checked for membership in array.

Initargs

:to-search

Readers

vamem-to-search.

Writers

(setf vamem-to-search).

Class: vader-mix

A mixed array as from the [↑ mix] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %shape-indices

Indices of shape dimensions.

Initargs

:shape-indices

Readers

vamix-shape-indices.

Writers

(setf vamix-shape-indices).

Slot: %cached-elements

Cached mixed array elements.

Initargs

:cached-elements

Readers

vamix-cached-elements.

Writers

(setf vamix-cached-elements).

Class: vader-pare

An array with a reduced shape as from the [, catenate] or [⍪ table] functions.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods

shape-of.

Class: vader-partition

A partitioned array as from the [⊆ partition] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %params

Parameters for partitioning.

Initargs

:params

Readers

vapart-params.

Writers

(setf vapart-params).

Class: vader-permute

A permuted array as from the [⍉ permute] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %is-diagonal

Whether this permutation is diagonal, as from 1 1 2⍉2 3 4⍴⍳9.

Initargs

:is-diagonal

Readers

vaperm-is-diagonal.

Writers

(setf vaperm-is-diagonal).

Class: vader-pick

An element from within an array as from the [⊃ disclose] or [⊃ pick] functions.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %reference

Reference to the array designated by this function.

Initargs

:reference

Readers

vapick-reference.

Writers

(setf vapick-reference).

Slot: %assign

Item to be assigned to selected index in array.

Initargs

:assign

Readers

vapick-assign.

Writers

(setf vapick-assign).

Slot: %selector

Virtual array selecting items within index to assign.

Initargs

:selector

Readers

vapick-selector.

Writers

(setf vapick-selector).

Slot: %function

Function to be applied to selected index in array.

Initargs

:assign

Readers

vapick-function.

Writers

(setf vapick-function).

Slot: %ap-index

Index for assignment path.

Initform

0

Initargs

:assign-path-index

Readers

vapick-apath-index.

Writers

(setf vapick-apath-index).

Class: vader-random

An array of randomized elements as from the [? random] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-reshape

A reshaped array as from the [⍴ reshape] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct subclasses

vader-pare.

Direct methods
Class: vader-section

A sectioned array as from the [↑ take] or [↓ drop] functions.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %span

The start and end points of the section within the base array.

Initargs

:span

Readers

vasec-span.

Writers

(setf vasec-span).

Slot: %pad

The number of prototype elements padding the output in each dimension.

Initargs

:pad

Readers

vasec-pad.

Writers

(setf vasec-pad).

Class: vader-select
Package

varray.

Source

select.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %assign

Item(s) to be assigned to selected indices in array.

Initargs

:assign

Readers

vasel-assign.

Writers

(setf vasel-assign).

Slot: %assign-if

Function to select items to be assigned as for ⌽@(<∘5)⊢⍳9.

Initargs

:assign-if

Readers

vasel-assign-if.

Writers

(setf vasel-assign-if).

Slot: %assign-shape

Shape of area to be assigned, eliding 1-sized dimensions.

Initargs

:assign-shape

Readers

vasel-assign-shape.

Writers

(setf vasel-assign-shape).

Slot: %calling

Function to be called on original and assigned index values.

Initargs

:calling

Readers

vasel-calling.

Writers

(setf vasel-calling).

Slot: %selector

Object implementing selection function for array.

Initargs

:selector

Readers

vasel-selector.

Writers

(setf vasel-selector).

Class: vader-shape

The shape of an array as from the [⍴ shape] function.

Package

varray.

Source

derived.lisp.

Direct superclasses

varray-derived.

Direct methods
Class: vader-split

A split array as from the [↓ split] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-subarray

Subarray of a larger array; its relationship to the larger array is defined by its index parameter, indexer and prototype functions.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: %index

Index variable for subarray; often used to index the subarray as part of the larger array it derives from.

Initargs

:index

Readers

vasv-index.

Writers

(setf vasv-index).

Class: vader-subarray-displaced

An element of a split array as from the [↓ split] function.

Package

varray.

Source

composed.lisp.

Direct superclasses

vader-subarray.

Direct methods
Class: vader-turn

A rotated array as from the [⌽ rotate] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %degrees

Real degrees to rotate the array (with modulo applied).

Initargs

:degrees

Readers

vaturn-degrees.

Writers

(setf vaturn-degrees).

Class: vader-umask

The unique mask of an array as from the [≠ unique mask] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-union

An array intersection as from the [∩ union] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-unique

An array intersection as from the [∩ intersection] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %indices

Parameters for partitioning.

Initargs

:indices

Readers

vauni-indices.

Writers

(setf vauni-indices).

Class: vader-where

The coordinates of array elements equal to 1 as from the [⍸ where] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vader-without

An array without given elements as from the [~ without] function.

Package

varray.

Source

derived.lisp.

Direct superclasses
Direct methods
Class: vapri-apro-vector

Arithmetic progression vector - a series of numeric values generated by [⍳ index].

Package

varray.

Source

primal.lisp.

Direct superclasses

varray-primal.

Direct methods
Direct slots
Slot: %number

The number of values.

Initform

1

Initargs

:number

Readers

vapip-number.

Writers

(setf vapip-number).

Slot: %origin

The origin point - by default, the index origin.

Initform

0

Initargs

:origin

Readers

vapip-origin.

Writers

(setf vapip-origin).

Slot: %offset

The offset - an amount added to or subtracted from each value.

Initform

0

Initargs

:offset

Readers

vapip-offset.

Writers

(setf vapip-offset).

Slot: %factor

Factor of values.

Initform

1

Initargs

:factor

Readers

vapip-factor.

Writers

(setf vapip-factor).

Slot: %repeat

Instances of each value.

Initform

1

Initargs

:repeat

Readers

vapip-repeat.

Writers

(setf vapip-repeat).

Class: vapri-coordinate-identity

Coordinate identity array - an array of coordinate vectors generated by [⍳ index].

Package

varray.

Source

primal.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: %shape

The shape of the array.

Initform

1

Initargs

:number

Readers

vapci-shape.

Writers

(setf vapci-shape).

Class: vapri-onehot-vector

One-hot vector - a binary vector where one element is set to 1.

Package

varray.

Source

primal.lisp.

Direct superclasses

varray-primal.

Direct methods
Direct slots
Slot: %index

The index equal to one.

Initform

0

Initargs

:index

Readers

vaohv-index.

Writers

(setf vaohv-index).

Class: varray

Virtual array - the ancestor class for all virtual array objects.

Package

varray.

Source

base.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: %shape

The array’s shape - typically populated by a (shape-of) method.

Initargs

:shape

Readers

varray-shape.

Writers

(setf varray-shape).

Slot: %generator

The array’s generator - typically populated by a (generator-of) method.

Initargs

:generator

Readers

varray-generator.

Writers

(setf varray-generator).

Slot: %prototype

The array’s prototype - typically populated by a (prototype-of) method.

Initargs

:prototype

Readers

varray-prototype.

Writers

(setf varray-prototype).

Slot: %meta

Metadata for the array.

Initargs

:meta

Readers

varray-meta.

Writers

(setf varray-meta).


5.1.8 Types

Type: index-position ()

Array index type used in index structure.

Package

maxpc.input.index.

Source

input/index.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *alphabet-vector*
Package

april.

Source

utilities.lisp.

Special Variable: *april-idiom*
Package

april.

Source

utilities.lisp.

Special Variable: *april-parallel-kernel*
Package

varray.

Source

base.lisp.

Special Variable: *demo-packages*
Package

april.

Source

utilities.lisp.

Special Variable: *digit-vector*
Package

april.

Source

utilities.lisp.

Special Variable: *function-identities*
Package

april.

Source

utilities.lisp.

Special Variable: *idiom-native-symbols*
Package

april.

Source

utilities.lisp.

Special Variable: *input-fail*
Package

maxpc.

Source

interface.lisp.

Special Variable: *input-start*
Package

maxpc.

Source

interface.lisp.

Special Variable: *io-currying-function-symbols-dyadic*
Package

april.

Source

utilities.lisp.

Special Variable: *io-currying-function-symbols-monadic*
Package

april.

Source

utilities.lisp.

Special Variable: *lib-tests-failed*
Package

april.

Source

utilities.lisp.

Special Variable: *lib-tests-run*
Package

april.

Source

utilities.lisp.

Special Variable: *library-packages*
Package

april.

Source

utilities.lisp.

Special Variable: *package-name-string*
Package

varray.

Source

base.lisp.

Special Variable: *package-name-string*
Package

april.

Source

utilities.lisp.

Special Variable: *rng-names*
Package

april.

Source

utilities.lisp.

Special Variable: *sub-7-bit-element-processing-register-size*
Package

aplesque.

Source

aplesque.lisp.

Special Variable: *system-variables*
Package

april.

Source

utilities.lisp.

Special Variable: *value-composable-lexical-operators*
Package

april.

Source

utilities.lisp.

Special Variable: *workers-count*
Package

varray.

Source

base.lisp.

Special Variable: april-lex-fn-!
Package

april.

Special Variable: april-lex-fn-*
Package

april.

Special Variable: april-lex-fn-+
Package

april.

Special Variable: april-lex-fn-,
Package

april.

Special Variable: april-lex-fn--
Package

april.

Special Variable: april-lex-fn-/
Package

april.

Special Variable: april-lex-fn-<
Package

april.

Special Variable: april-lex-fn-=
Package

april.

Special Variable: april-lex-fn->
Package

april.

Special Variable: april-lex-fn-?
Package

april.

Special Variable: april-lex-fn-\
Package

april.

Special Variable: april-lex-fn-^
Package

april.

Special Variable: april-lex-fn-|
Package

april.

Special Variable: april-lex-fn-~
Package

april.

Special Variable: april-lex-fn-×
Package

april.

Special Variable: april-lex-fn-÷
Package

april.

Special Variable: april-lex-fn-↑
Package

april.

Special Variable: april-lex-fn-↓
Package

april.

Special Variable: april-lex-fn-∊
Package

april.

Special Variable: april-lex-fn-∧
Package

april.

Special Variable: april-lex-fn-∨
Package

april.

Special Variable: april-lex-fn-∩
Package

april.

Special Variable: april-lex-fn-∪
Package

april.

Special Variable: april-lex-fn-≠
Package

april.

Special Variable: april-lex-fn-≡
Package

april.

Special Variable: april-lex-fn-≢
Package

april.

Special Variable: april-lex-fn-≤
Package

april.

Special Variable: april-lex-fn-≥
Package

april.

Special Variable: april-lex-fn-⊂
Package

april.

Special Variable: april-lex-fn-⊃
Package

april.

Special Variable: april-lex-fn-⊆
Package

april.

Special Variable: april-lex-fn-⊖
Package

april.

Special Variable: april-lex-fn-⊢
Package

april.

Special Variable: april-lex-fn-⊣
Package

april.

Special Variable: april-lex-fn-⊤
Package

april.

Special Variable: april-lex-fn-⊥
Package

april.

Special Variable: april-lex-fn-⋆
Package

april.

Special Variable: april-lex-fn-⌈
Package

april.

Special Variable: april-lex-fn-⌊
Package

april.

Special Variable: april-lex-fn-⌷
Package

april.

Special Variable: april-lex-fn-⌹
Package

april.

Special Variable: april-lex-fn-⌽
Package

april.

Special Variable: april-lex-fn-⌿
Package

april.

Special Variable: april-lex-fn-⍀
Package

april.

Special Variable: april-lex-fn-⍉
Package

april.

Special Variable: april-lex-fn-⍋
Package

april.

Special Variable: april-lex-fn-⍎
Package

april.

Special Variable: april-lex-fn-⍒
Package

april.

Special Variable: april-lex-fn-⍕
Package

april.

Special Variable: april-lex-fn-⍟
Package

april.

Special Variable: april-lex-fn-⍪
Package

april.

Special Variable: april-lex-fn-⍱
Package

april.

Special Variable: april-lex-fn-⍲
Package

april.

Special Variable: april-lex-fn-⍳
Package

april.

Special Variable: april-lex-fn-⍴
Package

april.

Special Variable: april-lex-fn-⍷
Package

april.

Special Variable: april-lex-fn-⍸
Package

april.

Special Variable: april-lex-fn-○
Package

april.

Special Variable: april-lex-op-.
Package

april.

Special Variable: april-lex-op-/
Package

april.

Special Variable: april-lex-op-@
Package

april.

Special Variable: april-lex-op-\
Package

april.

Special Variable: april-lex-op-¨
Package

april.

Special Variable: april-lex-op-∘
Package

april.

Special Variable: april-lex-op-⌸
Package

april.

Special Variable: april-lex-op-⌺
Package

april.

Special Variable: april-lex-op-⌿
Package

april.

Special Variable: april-lex-op-⍀
Package

april.

Special Variable: april-lex-op-⍛
Package

april.

Special Variable: april-lex-op-⍣
Package

april.

Special Variable: april-lex-op-⍤
Package

april.

Special Variable: april-lex-op-⍥
Package

april.

Special Variable: april-lex-op-⍨
Package

april.

Special Variable: april-lex-st-$
Package

april.

Special Variable: april-lex-st-⍢
Package

april.

Special Variable: april-lex-sy-:
Package

april.

Special Variable: april-lex-sy-←
Package

april.

Special Variable: april-lex-sy-→
Package

april.

Special Variable: april-lex-sy-∘
Package

april.

Special Variable: april-lex-vfn-*
Package

april.

Special Variable: april-lex-vfn-^
Package

april.

Special Variable:
Package

april.

Source

utilities.lisp.

Special Variable: ∇∇
Package

april.

Source

utilities.lisp.


5.2.2 Symbol macros

Symbol Macro: *apl-timestamp*
Package

april.

Source

utilities.lisp.

Symbol Macro: *branches*
Package

april.

Source

utilities.lisp.

Symbol Macro: *first-axis*
Package

april.

Source

utilities.lisp.

Symbol Macro: *first-axis-or-nil*
Package

april.

Source

utilities.lisp.

Symbol Macro: *last-axis*
Package

april.

Source

utilities.lisp.

Symbol Macro: this-idiom
Package

april.

Source

utilities.lisp.


5.2.3 Macros

Macro: a-call (function &rest arguments)

Call an APL function with one or two arguments. Compose successive scalar functions into bigger functions for more efficiency.

Package

april.

Source

utilities.lisp.

Macro: a-comp (symbol &rest body)

A wrapper macro for macros that implement April’s operators; functionally this macro does nothing but it improves the readability of April’s compiled code.

Package

april.

Source

utilities.lisp.

Macro: a-out (form &key print-to output-printed unrendered print-assignment print-precision with-newline)

Generate code to output the result of APL evaluation, with options to print an APL-formatted text string expressing said result and/or return the text string as a result.

Package

april.

Source

utilities.lisp.

Macro: a-set (symbol value &key by axes)

This is macro is used to build variable assignment forms and includes logic for strand assignment.

Package

april.

Source

utilities.lisp.

Macro: ac-wrap (type form)

Wrap a function form in a function that calls it via (a-call). Used for specification of inverse scalar functions.

Package

april.

Source

utilities.lisp.

Macro: achoose (item indices &rest rest-params)

Wrapper for the choose function.

Package

april.

Source

utilities.lisp.

Macro: alambda (params options &body body)

Generate a lambda with a self-reference for use with APL’s ∇ character for self-reference in a defn.

Package

april.

Source

utilities.lisp.

Macro: amb-ref (fn-monadic fn-dyadic &optional axes)

Generate a function aliasing a lexical function which may be monadic or dyadic; an ambivalent reference.

Package

april.

Source

utilities.lisp.

Macro: apl-fn (glyph &rest initial-args)

Wrap a glyph referencing a lexical function, and if more parameters are passed, use them as a list of implicit args for the primary function represented by that glyph, the resulting secondary function to be called on the argumants passed in the APL code.

Package

april.

Source

utilities.lisp.

Macro: apl-fn-s (glyph &rest initial-args)

Wrap a glyph referencing a scalar lexical function, with axes handled appropriately and defaulting to the (apl-fn) handling of .

Package

april.

Source

utilities.lisp.

Macro: apl-if (&rest each-clause)

Expands to an APL-style if-statement where clauses are evaluated depending on whether given expressions evaluate to 1 or 0.

Package

april.

Source

utilities.lisp.

Macro: aprgn (&rest content)

This macro aliases (progn) - it is a solution for macros like (iterate) that chew up (progns) found in April’s generated code.

Package

april.

Source

utilities.lisp.

Macro: f-lex (symbol-sets &body body)

Specify the lexicon for a function - this means wrapping the function’s contents in a (let) form referencing external variables as appropriate.

Package

april.

Source

utilities.lisp.

Macro: fn-meta (function &rest meta)

Wrap a function in another function so that it may carry metadata.

Package

april.

Source

utilities.lisp.

Macro: function-variant (assignment-clause variable-clause function-clause)

Evaluates one form if the initial clause evaluates to a function, the other if it’s a variable. Used to implement ⍺←function cases within defns, most often ⍺←⊢.

Package

april.

Source

utilities.lisp.

Macro: get-or-assign-shape (object form)
Package

varray.

Source

base.lisp.

Macro: get-promised (object form)
Package

varray.

Source

base.lisp.

Macro: in-april-workspace (name &body body)

Macro that interns symbols in the current workspace; works in tandem with ⊏ reader macro.

Package

april.

Source

utilities.lisp.

Macro: insym (symbol)

Macro used in grammar.lisp to intern value-referencing symbols in appropriate workspace package.

Package

april.

Source

utilities.lisp.

Macro: intraverser (params function)
Package

varray.

Source

macros.lisp.

Macro: inv-fn (function &optional is-dyadic inverse-type)

Wrap a function to be inverted; returns an error if the function has no inverse form.

Package

april.

Source

utilities.lisp.

Macro: is-workspace-function (item)

Checks if a variable is present in the current workspace as a function.

Package

april.

Source

utilities.lisp.

Macro: is-workspace-operator (item)

Checks if a variable is present in the current workspace as an operator.

Package

april.

Source

utilities.lisp.

Macro: is-workspace-value (item)

Checks if a variable is present in the current workspace as a value.

Package

april.

Source

utilities.lisp.

Macro: make-virtual (type &rest params)

Wrapper for the choose function.

Package

april.

Source

utilities.lisp.

Macro: nspath (list &rest keys)

Macro to expedite the fetching of values from nested namespaces.

Package

april.

Source

utilities.lisp.

Macro: olambda (params &body body)

Generate a lambda with a self-reference for use with APL’s ∇∇ symbol for self-reference in a defined operator.

Package

april.

Source

utilities.lisp.

Macro: plain-ref (function &optional axes)

Wrap a lexical function; this is needed to implement some meta-functionality.

Package

april.

Source

utilities.lisp.

Macro: print-and-run (form)

Print a formatted code string and then run the code; used in april’s arbitrary evaluation tests.

Package

april.

Source

utilities.lisp.

Macro: run-lib-tests ()

Run the tests for each April library package.

Package

april.

Source

utilities.lisp.

Macro: scalar-function (function &rest meta)

Wrap a scalar function. This is a passthrough macro used by the scalar composition system in (a-call).

Package

april.

Source

utilities.lisp.

Macro: specify-demo (title params &rest sections)

This macro is used to specify a set of information and tests for an April demo package, currently used for some of those found in the /demos folder.

Package

april.

Source

utilities.lisp.

Macro: sub-aliasing (form)
Package

april.

Source

utilities.lisp.

Macro: sub-lex (item)
Package

april.

Source

utilities.lisp.

Macro: value-meta-process (form)

Assign array metadata appropriately to arrays resulting from scalar operations along with newly assigned arrays. Currently this is used to migrate array prototypes, as for operations like 1+0↑⊂3 3⍴⍳9.

Package

april.

Source

utilities.lisp.

Macro: vex-idiom-spec (symbol extension &rest subspecs)

Process the specification for a vector language and build functions that generate the code tree.

Package

vex.

Source

vex.lisp.

Macro: with-open-vex-file ((filename path &rest options) &body body)

Wraps with-open-file forms, designates the format for Vex-compatible input files as UTF-8.

Package

vex.

Source

vex.lisp.

Macro: λχ (body axes)

Curry a function with axes for use with an operator.

Package

april.

Source

utilities.lisp.

Macro: λω (&rest body)
Package

april.

Source

utilities.lisp.

Macro: λωα (&rest body)
Package

april.

Source

utilities.lisp.

Macro: λωαχ (&rest body)
Package

april.

Source

utilities.lisp.

Macro: λωχ (&rest body)
Package

april.

Source

utilities.lisp.


5.2.4 Ordinary functions

Function: =vex-string (idiom &optional output special-precedent)

Parse a string of text, converting its contents into nested lists of Vex tokens.

Package

vex.

Source

vex.lisp.

Function: add-aprepl-load-to-emacs-init-file (&optional unique-init-path)

Add a line loading the ApREPL utility to the Emacs init file so ApREPL will be ready for use when Emacs is loaded.

Package

april.

Source

utilities.lisp.

Function: adjust-axes-for-index-origin (io axis-list)

Adjust axes passed to a function to account for the given index origin.

Package

april.

Source

utilities.lisp.

Function: apl-array-prototype (array)

Returns the default element for an array based on that array’s first element (its prototype in array programming terms); blank spaces in the case of a character prototype and zeroes for others.

Package

varray.

Source

base.lisp.

Function: apl-ceiling (comparison-tolerance)

Find a number’s ceiling deriving from the complex floor algorithm if needed.

Package

april.

Source

functions.lisp.

Function: apl-divide (method)

Generate a division function according to the [⎕DIV division method] in use.

Package

april.

Source

functions.lisp.

Function: apl-exp (omega)

Power of e function that will always output a double-precision float as per APL standard.

Package

april.

Source

functions.lisp.

Function: apl-expt (omega alpha)

Exponent function that will always output a double-precision float except if both arguments are integers, as per APL standard.

Package

april.

Source

functions.lisp.

Function: apl-floor (comparison-tolerance)

Find a number’s floor using the complex floor algorithm if needed.

Package

april.

Source

functions.lisp.

Function: apl-gcd (comparison-tolerance)

Implementation of greatest common denominator extended to complex numbers based on the complex-floor function.

Package

april.

Source

functions.lisp.

Function: apl-lcm (comparison-tolerance)

Implementation of lease common multiple extended to complex numbers based on the complex-floor function.

Package

april.

Source

functions.lisp.

Function: apl-log (omega &optional alpha)

Logarithm function that will always output a double-precision float as per APL standard.

Package

april.

Source

functions.lisp.

Function: apl-random (index-origin rngs)

Randomize an array or scalar value. This must run synchronously over arrays without threading so that the same seed will produce the same output. Used to implement [? random].

Package

april.

Source

functions.lisp.

Function: apl-random-process (item index-origin generator)

Core of (apl-random), randomizing an individual integer or float.

Package

varray.

Source

derived.lisp.

Function: apl-random-process (item index-origin generator)

Core of (apl-random), randomizing an individual integer or float.

Package

april.

Source

functions.lisp.

Function: apl-residue (comparison-tolerance)

Implementation of residue extended to complex numbers based on the complex-floor function.

Package

april.

Source

functions.lisp.

Function: apl-timestamp ()

Generate an APL timestamp, a vector of the current year, month, day, hour, minute, second and millisecond.

Package

april.

Source

utilities.lisp.

Function: apl-xcy (function)

Return a function to find the greatest common denominator or least common multiple of fractional as well as whole numbers. If one or both arguments are floats, the result is coerced to a double float.

Package

april.

Source

functions.lisp.

Function: april-lex-fn-! (&rest g10555)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-* (&rest g12353)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-+ (&rest g18516)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-, (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-- (&rest g16946)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-/ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-< (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-= (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-> (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-? (index-origin &optional rngs)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-\ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-^ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-| (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-~ (&rest g7478)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-× (&rest g15826)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-÷ (division-method &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-↑ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-↓ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-∊ (&rest g5133)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-∧ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-∨ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-∩ (&rest g3127)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-∪ (&rest g2959)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-≠ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-≡ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-≢ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-≤ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-≥ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊂ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊃ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊆ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊖ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊢ (&rest g934)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊣ (&rest g773)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊤ (&rest g1208)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⊥ (&rest g1141)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⋆ (&rest g13577)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌈ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌊ (comparison-tolerance &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌷ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌹ (&rest g1274)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌽ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⌿ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍀ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍉ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍋ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍎ (+workspace-name+ &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍒ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍕ (print-precision &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍟ (&rest g10984)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍪ (index-origin &optional axes)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍱ (&rest g6077)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍲ (&rest g6307)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍳ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍴ (&rest g5724)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍷ (&rest g5074)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-⍸ (index-origin &optional)
Package

april.

Source

spec.lisp.

Function: april-lex-fn-○ (&rest g7997)
Package

april.

Source

spec.lisp.

Function: april-lex-op-. (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-/ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-@ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-\ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-¨ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-∘ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⌸ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⌺ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⌿ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍀ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍛ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍣ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍤ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍥ (right left)
Package

april.

Source

spec.lisp.

Function: april-lex-op-⍨ (operand)
Package

april.

Source

spec.lisp.

Function: april-lex-st-$ (axes)
Package

april.

Source

spec.lisp.

Function: april-lex-st-⍢ (axes)
Package

april.

Source

spec.lisp.

Function: april-ref (g326 &optional g323)
Package

april.

Source

spec.lisp.

Function: arg-process (varray)
Package

varray.

Source

derived.lisp.

Function: array-setting-meta (array &rest data)

Sets one or more metadata of an array using the displacement reference technique, returning the displaced array.

Package

april.

Source

utilities.lisp.

Function: array-to-nested-vector (array)

Convert an array to a nested vector. Useful for applications such as JSON conversion where multidimensional arrays must be converted to nested vectors.

Package

april.

Source

utilities.lisp.

Function: assign-by-selection (function value omega &key index-origin)

Assign to elements of an array selected by a function. Used to implement (3↑x)←5 etc.

Package

april.

Source

functions.lisp.

Function: at-index (index-origin axes)

Find the value(s) at the given index or indices in an array. Used to implement [⌷ index].

Package

april.

Source

functions.lisp.

Function: at-path (object path &key value value-nil set-by)

Get or set values within a namespace (structured as a ptree), handling arrays within the namespace according to array indices within the namespace path or eliding arrays in the absence of specific coordinates.

Package

april.

Source

utilities.lisp.

Function: avec (&rest items)

This function returns an APL vector; in the case of virtual arrays within the vector, a nested virtual container vector is returned.

Package

april.

Source

utilities.lisp.

Function: axes-to-indices (ic idims out-vector &optional if start)

Take a list of axes and assign the derived row-major indices to a vector with a fill point.

Package

aplesque.

Source

aplesque.lisp.

Function: binary-not (bit)

Flip a binary value. Used to implement [~ not].

Package

april.

Source

functions.lisp.

Function: build-axes (elements &key space params)

Construct a set of axes from an (:axes) token form.

Package

april.

Source

grammar.lisp.

Function: build-call-form (glyph-char &optional args axes)

Format a function to be called within generated APL code.

Package

april.

Source

utilities.lisp.

Function: build-compiled-code (exps workspace-symbols options system-vars vars-declared stored-refs space)

Return a set of compiled April expressions within the proper context.

Package

april.

Source

utilities.lisp.

Function: build-decoder (stsym insym d-factors coordinate-type)
Package

varray.

Source

base.lisp.

Function: build-decoder-x86asm (syms d-factors encoding coordinate-type)
Package

varray.

Source

effectors/x86.lisp.

Function: build-encoder (stsym index d-factors encoding coordinate-type &optional dsym rsym)
Package

varray.

Source

base.lisp.

Function: build-encoder-x86asm (starting-value syms d-factors encoding coordinate-type)
Package

varray.

Source

effectors/x86.lisp.

Function: build-function (tokens &key axes found-function initial space params)

Construct an APL function; this may be a simple lexical function like +, an operator-composed function like +.× or a defn like {⍵+5}.

Package

april.

Source

grammar.lisp.

Function: build-iterator (insym dimensions encoding coordinate-type &optional index)
Package

varray.

Source

base.lisp.

Function: build-iterator-x86asm (insym osym dimensions encoding ctype)
Package

varray.

Source

effectors/x86.lisp.

Function: build-operator (tokens &key axes found-operator initial space params valence)

Build an operator like @ (a lexical operator), {⍺⍺/⍵} (a defined operator) or an operator assignment like p←⍣.

Package

april.

Source

grammar.lisp.

Function: build-populator (array)

Generate a function that will populate array elements with an empty array prototype.

Package

april.

Source

utilities.lisp.

Function: build-profile (symbol spec mode section-names)

Build a documentation or test profile from a set of section names in a Vex idiom specification.

Package

vex.

Source

vex.lisp.

Function: build-value (tokens &key axes elements space params left axes-last)

Construct an APL value; this may be a scalar value like 5, a vector like 1 2 3, or the result of a function lilike 1+2.

Package

april.

Source

grammar.lisp.

Function: build-variable-declarations (input-vars space)

Create the set of variable declarations that begins April’s compiled code.

Package

april.

Source

utilities.lisp.

Function: call-circular (&optional inverse)
Package

april.

Source

spec.lisp.

Function: cases-to-parser-cases (cases input-sym)

Utility macro function for %HANDLER-CASE and %RESTART-CASE.

Package

maxpc.

Source

interface.lisp.

Function: change-namespace (ns-path workspace-symbol)

Change the current ’namespace point’ within the workspace. Used to implement ⎕CS.

Package

april.

Source

utilities.lisp.

Function: check-value (item)
Package

april.

Source

utilities.lisp.

Function: cmucl-complex-acos (z)

This (acos) implementation is used for ECL, whose stock (acos) is different from other CLs.

Package

april.

Source

functions.lisp.

Function: coerce-or-get-type (array &optional type-index)

Create an array with a numerically designated type holding the contents of the given array. Used to implement ⎕TY.

Package

april.

Source

utilities.lisp.

Function: compare-by (symbol comparison-tolerance)

Generate a comparison function using the [⎕CT comparison tolerance].

Package

april.

Source

functions.lisp.

Function: compile-form (exprs &key space params)

Compile a series of APL expressions.

Package

april.

Source

grammar.lisp.

Function: complete-branch-composition (tokens branch-to &key space params)

Complete the composition of a branch statement, either creating or optionally moving to a branch within an APL expression.

Package

april.

Source

grammar.lisp.

Function: complete-pivotal-match (operator tokens right-function right-value space params initial)

Exension of (build-value) and (build-function) to process functions composed with pivotal operators.

Package

april.

Source

grammar.lisp.

Function: complete-value-assignment (tokens elements space params axes)

Complete the compilation of a value assignment; wraps the (compose-value-assignment) function.

Package

april.

Source

grammar.lisp.

Function: complex-floor (number comparison-tolerance)

Find the floor of a complex number using Eugene McDonnell’s algorithm.

Package

april.

Source

functions.lisp.

Function: compose-function-assignment (symbol function &key space params)

Compose a function assignment.

Package

april.

Source

grammar.lisp.

Function: compose-function-lateral (operator function value axes)

Compose a function using a lateral operator like [/ reduce].

Package

april.

Source

grammar.lisp.

Function: compose-function-pivotal (operator function1 function2 value)

Compose a function using a pivotal operator like [⍣ power].

Package

april.

Source

grammar.lisp.

Function: compose-function-train (space right center &optional left left-value)

Compose a function train like (-,÷).

Package

april.

Source

grammar.lisp.

Function: compose-value-assignment (symbol value &key function space params)

Compose a value assignment like v←1 2 3.

Package

april.

Source

grammar.lisp.

Function: copy-index (instance)
Package

maxpc.input.index.

Source

input/index.lisp.

Function: copy-index-list (instance)
Package

maxpc.input.list.

Source

input/list.lisp.

Function: copy-index-simple-string (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: copy-index-simple-vector (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: copy-index-stream (instance)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Function: copy-index-vector (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: count-cpus ()

Count the available threads in the system, accounting for different operating systems.

Package

april.

Source

utilities.lisp.

Function: count-symbol-in-spec (symbol limbs)

Count occurrences of a symbol in the spec. Used to plan the number of Prove tests to run.

Package

vex.

Source

vex.lisp.

Function: count-to (index index-origin)

Implementation of APL’s [⍳ index] function.

Package

april.

Source

functions.lisp.

Function: decode-rmi (width element-width rank factors)
Package

varray.

Source

base.lisp.

Function: derive-opglyphs (glyph-list &optional output)

Extract a list of function/operator glyphs from part of a Vex language specification.

Package

vex.

Source

vex.lisp.

Function: disclose-atom (item)

If the argument is a non-nested array with only one member, disclose it, otherwise do nothing.

Package

april.

Source

utilities.lisp.

Function: display-banner (&key width height)
Package

april.

Source

novelties.lisp.

Function: dummy-nargument-function (first &rest rest)

Placeholder function to be assigned to newly initialized function symbols.

Package

april.

Source

utilities.lisp.

Function: dummy-operator (first &rest rest)

Placeholder function to be assigned to newly initialized operator symbols.

Package

april.

Source

utilities.lisp.

Function: element-type (stream)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Function: enclose-axes (body axis-sets &key set set-by)

Apply axes to an array, with the ability to handle multiple sets of axes as in (6 8 5⍴⍳9)[1 4;;2 1][1;2 4 5;].

Package

april.

Source

utilities.lisp.

Function: encode-rmi (factors iwidth itype)
Package

varray.

Source

base.lisp.

Function: extend-allocator-vader-calculate (&key base axis function index-origin params)

Extend allocation behavior of operate class; currently, this allows for things like 1+⍳9 returning a modified integer progression vector rather than an instance of the vader-calculate class.

Package

varray.

Source

logic.lisp.

Function: extend-allocator-vader-expand (&key base argument index-origin inverse axis)

Extend allocation behavior of expand class; allows for 3/⍳3 to produce a repeating integer progression vector instead of a vader-expand instance.

Package

varray.

Source

logic.lisp.

Function: extend-allocator-vader-inverse-where (&key base argument index-origin)

Extend allocation behavior of inverse-where class; allows the use of ⍸⍣¯1 to create one-hot vectors.

Package

varray.

Source

logic.lisp.

Function: extend-allocator-vader-permute (&key base argument index-origin)

Extend allocation behavior of permute class; allows simple inversion of permutation without an argument.

Package

varray.

Source

logic.lisp.

Function: extend-allocator-vader-section (&key base argument inverse axis index-origin)

Extend allocation behavior of section class; allows resizing of one-hot vectors.

Package

varray.

Source

logic.lisp.

Function: external-workspace-function (symbol-string &optional space-string)

Import a function from an external workspace, implementing the ⎕XWF function.

Package

april.

Source

utilities.lisp.

Function: external-workspace-operator (symbol-string &optional space-string)

Import an operator from an external workspace, implementing the ⎕XWO function.

Package

april.

Source

utilities.lisp.

Function: external-workspace-value (symbol-string &optional space-string)

Import a value from an external workspace, implementing the ⎕XWV function.

Package

april.

Source

utilities.lisp.

Function: extract-axes (process tokens &optional axes)

Given a list of tokens starting with axis specifications, build the code for the axis specifications to be applied to the subsequent function or value.

Package

april.

Source

utilities.lisp.

Function: fast-iota-sum (n)

Fast version of iota-sum for integers of type fast-iota-sum-fixnum

Package

varray.

Source

primal.lisp.

Function: fnexp-backup (form &key space params)

If a value build produces a pivotal function composition, it is built as a function. Needed for cases like fn←{2+⍵}⍣3 ⋄ fn 5.

Package

april.

Source

grammar.lisp.

Function: follow-path (space path &optional item)

Follow a path through a namespace and fetch the function or value there.

Package

april.

Source

utilities.lisp.

Function: format-array (print-precision)

Use (aplesque:array-impress) to print an array and return the resulting character array, with the option of specifying decimal precision. Used to implement monadic and dyadic [⍕ format].

Package

april.

Source

functions.lisp.

Function: format-array-uncollated (print-precision-default)

Generate a function using (aplesque:array-impress) to print an array in matrix form without collation. Used to implement ⎕FMT.

Package

april.

Source

functions.lisp.

Function: format-nspath (items &optional output)

Create a string representation of a namespace path from the symbol list implementing that path.

Package

april.

Source

utilities.lisp.

Function: format-value (idiom-name symbols element)

Convert a token string into an APL value, paying heed to APL’s native ⍺, ⍵ and ⍬ variables.

Package

april.

Source

utilities.lisp.

Function: gamma (c)

Gamma function using Lanczos approximation.

Package

aplesque.

Source

aplesque.lisp.

Function: generate-index-array (array &optional scalar-assigned ext-index)

Given an array, generate an array of the same shape whose each cell contains its row-major index.

Package

april.

Source

functions.lisp.

Function: get-array-meta (array &rest keys)

Gets one or more metadata of an array using the displacement reference technique.

Package

april.

Source

utilities.lisp.

Function: get-assigned-symbols (tokens space &optional token-list is-nested in-assignment-context)

Find a list of symbols within a token list which are assigned with the [← gets] lexical function. Used to find lists of variables to hoist in lambda forms.

Package

april.

Source

utilities.lisp.

Function: get-dimensional-factors (dimensions &optional as-vector)

Get the set of dimensional factors corresponding to a set of array dimensions.

Package

varray.

Source

base.lisp.

Function: get-free-threads ()

Find the number of threads currently available in the system.

Package

aplesque.

Source

aplesque.lisp.

Function: get-indexing-function (varray factors divisions to-call)
Package

varray.

Source

base.lisp.

Function: get-path-value (varray index base)
Package

varray.

Source

derived.lisp.

Function: ibinomial (n k)

Find a binomial for integer parameters.

Package

aplesque.

Source

aplesque.lisp.

Function: incrementer-encoded (width element-width dimensions)
Package

varray.

Source

base.lisp.

Function: indent-code (string)

Indent a code string produced by (print-and-run) as appropriate for April’s test output.

Package

april.

Source

utilities.lisp.

Reader: index-list-list (instance)
Package

maxpc.input.list.

Source

input/list.lisp.

Target Slot

list.

Function: index-list-p (object)
Package

maxpc.input.list.

Source

input/list.lisp.

Function: index-list-position (instance)
Package

maxpc.input.list.

Source

input/list.lisp.

Function: index-p (object)
Package

maxpc.input.index.

Source

input/index.lisp.

Function: index-simple-string-p (object)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-simple-string-position (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-simple-string-vector (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-simple-vector-p (object)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-simple-vector-position (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-simple-vector-vector (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Reader: index-stream-buffer (instance)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Target Slot

buffer.

Function: index-stream-p (object)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Function: index-stream-position (instance)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Reader: index-stream-stream (instance)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Target Slot

stream.

Function: index-vector-p (object)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: index-vector-position (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Reader: index-vector-vector (instance)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Target Slot

vector.

Function: indexer-enclose (axes input-dims)
Package

aplesque.

Source

forms.lisp.

Function: indexer-expand (degrees dims axis compress-mode is-inverse)

Return indices of an array expanded as with the [/ compress] or [\ expand] functions.

Package

aplesque.

Source

forms.lisp.

Function: indexer-permute (idims odims alpha is-diagonal iwidth itype &optional is-inverse)

Return indices of an array permuted as with the [⍉ permute] function.

Package

varray.

Source

index.lisp.

Function: indexer-permute (idims odims alpha is-diagonal &optional is-inverse)

Return indices of an array permuted as with the [⍉ permute] function.

Package

aplesque.

Source

forms.lisp.

Function: indexer-section (dims span pad output-shorter iwidth itype &optional is-flat)

Return indices of an array sectioned as with the [↑ take] or [↓ drop] functions.

Package

varray.

Source

index.lisp.

Function: indexer-section (inverse dims dimensions output-shorter)

Return indices of an array sectioned as with the [↑ take] or [↓ drop] functions.

Package

aplesque.

Source

forms.lisp.

Function: indexer-split (axis orank input-factors output-factors)
Package

aplesque.

Source

forms.lisp.

Function: indexer-turn (axis idims iwidth itype &optional degrees)

Return indices of an array rotated as with the [⌽ rotate] or [⊖ rotate first] functions.

Package

varray.

Source

index.lisp.

Function: indexer-turn (axis idims &optional degrees)

Return indices of an array rotated as with the [⌽ rotate] or [⊖ rotate first] functions.

Package

aplesque.

Source

forms.lisp.

Function: invert-assigned-varray (object &optional order)

Generate the inverted deferred computation object that serves to verify indices in a selection array implementing assignment by selection, like the one expressed by {na←3⍴⊂⍳4 ⋄ (1↑⊃na[1])←⍵ ⋄ na} 99.

Package

april.

Source

functions.lisp.

Function: invert-function (form &optional to-wrap)

Invert a function expression. For use with the [⍣ power] operator taking a negative right operand.

Package

april.

Source

utilities.lisp.

Function: iota-sum (n index-origin)

Fast implementation of +/⍳X.

Package

varray.

Source

primal.lisp.

Function: is-alphanumeric (character)

Consistently check whether a character is alphanumeric - needed since different CL implementations consider different sets of characters to be alphanumeric as per (alphanumericp).

Package

april.

Source

utilities.lisp.

Function: isprfact (n)

Recursive factorial-computing function. Based on P. Luschny’s code.

Package

aplesque.

Source

aplesque.lisp.

Function: join-indexers (indexers params)
Package

varray.

Source

base.lisp.

Function: lexer-postprocess (tokens idiom space &optional closure-meta-form)

Process the output of the lexer, assigning values in the workspace and closure metadata as appropriate. Mainly used to process symbols naming functions and variables.

Package

april.

Source

utilities.lisp.

Function: life (&key width height seed return)

Create or update a playfield for Conway’s Game of Life.

Package

april.

Source

novelties.lisp.

Function: linear-regression (omega alpha)

Linear regression for coefficient matrix ⍵ and constants ⍺. Used to implement dyadic [⌹ matrix divide] for an overspecified system

Package

varray.

Source

derived.lisp.

Function: load-libs ()

Load the April library packages.

Package

april.

Source

utilities.lisp.

Function: make-index (&key position)
Package

maxpc.input.index.

Source

input/index.lisp.

Function: make-index-list (&key position list)
Package

maxpc.input.list.

Source

input/list.lisp.

Function: make-index-simple-string (&key position vector)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: make-index-simple-vector (&key position vector)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: make-index-stream (&key position stream buffer)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Function: make-index-vector (&key position vector)
Package

maxpc.input.vector.

Source

input/vector.lisp.

Function: make-namespace (contents)

Create a namespace. Used to implement ⎕NS. A namespace is just a plist, so this returns nil.

Package

april.

Source

utilities.lisp.

Function: make-prototype-of (array)

Make a prototype version of an array; all values in the array will be blank spaces for character arrays or zeroes for other types of arrays.

Package

april.

Source

utilities.lisp.

Function: make-threading-kernel-if-absent ()

Create a kernel for multithreaded executuion via lparallel if none is present.

Package

varray.

Source

base.lisp.

Function: mask-signed (x size)
Package

varray.

Source

effectors/x86.lisp.

Function: matrix-divide (omega alpha)

Divide two matrices. Used to implement dyadic [⌹ matrix divide].

Package

varray.

Source

derived.lisp.

Function: maybe-fill-buffer (input)
Package

maxpc.input.stream.

Source

input/stream.lisp.

Function: merge-options (source target)

Merge options from multiple Vex specifiction sections into a single set.

Package

vex.

Source

vex.lisp.

Function: near-integerp (x)

Determing if a number is close enough to an integer to be treated as such.

Package

aplesque.

Source

aplesque.lisp.

Function: near-realp (x)

Determine if the number is ’real enough’ to be treated as such.

Package

aplesque.

Source

aplesque.lisp.

Function: nested-base (item)
Package

varray.

Source

base.lisp.

Function: nested-p (item)
Package

varray.

Source

base.lisp.

Function: of-meta-hierarchy (meta-form key &optional symbol)

Fetch a combined list of symbols of a given type at each level of a closure metadata hierarchy. Used to query data collected as part of lexer postprocessing.

Package

april.

Source

utilities.lisp.

Function: operate-at (right left index-origin)

Generate a function applying a function at indices in an array specified by a given index or meeting certain conditions. Used to implement [@ at].

Package

april.

Source

functions.lisp.

Function: operate-at-rank (rank function)

Generate a function applying a function to sub-arrays of the arguments. Used to implement [⍤ rank].

Package

april.

Source

functions.lisp.

Function: operate-atop (right-fn left-fn)

Generate a function applying two functions to a value in succession. Used to implement [⍤ atop].

Package

april.

Source

functions.lisp.

Function: operate-before (right-fn left-fn)

Generate a function by linking together two functions with the left one called first. Used to implement [⍛ reverse compose].

Package

april.

Source

functions.lisp.

Function: operate-beside (right left)

Generate a function by linking together two functions or a function curried with an argument. Used to implement [∘ compose].

Package

april.

Source

functions.lisp.

Function: operate-commuting (operand)

Generate a function with reversed or mirrored arguments. Used to implement [⍨ commute].

Package

april.

Source

functions.lisp.

Function: operate-each (operand)
Package

april.

Source

functions.lisp.

Function: operate-grouping (function index-origin)

Generate a function applying a function to items grouped by a criterion. Used to implement [⌸ key].

Package

april.

Source

functions.lisp.

Function: operate-producing-outer (operand)

Generate a function producing an outer product. Used to implement [∘. outer product].

Package

april.

Source

functions.lisp.

Function: operate-stenciling (right-value left-function)

Generate a function applying a function via (aplesque:stencil) to an array. Used to implement [⌺ stencil].

Package

april.

Source

functions.lisp.

Function: operate-to-power (fetch-determinant function)

Generate a function applying a function to a value and successively to the results of prior iterations a given number of times. Used to implement [⍣ power].

Package

april.

Source