Skip to content

Planned CCL API

Iconmaster edited this page Feb 6, 2019 · 5 revisions

CCL is Iconus's input format and scripting language.

stdlib - Standard library

Field manipulation

Selectors

  • get
  • set!
  • has?
  • read-only?
  • fields
  • field-names
  • field-values
  • keys
  • values

Mutable collection (list, map, etc.) manipulation

Constructors

  • set
  • add
  • add-all
  • del-key
  • del-val
  • del-keys
  • del-vals
  • concat
  • slice

Mutators

  • clear!
  • add!
  • add-all!
  • del-key!
  • del-val!
  • del-keys!
  • del-vals!

Transformers

  • each, each!, each/pair, each!/pair
  • filter, filter!, filter/pair, filter!/pair
  • count, count!, count/pair, count!/pair

Variable manipulation

  • local
  • global

Misc. functions

  • ==
  • !=
  • echo

<nil> - Nil

<bool> - Boolean

  • bool
  • and
  • or
  • not
  • if
  • while
  • case
  • cond

<number> - Double-precision floating point number

<string> - Null-terminated string

<list> - Basic list

Constructors

  • list
  • >list
  • range
  • split

Selectors

  • head
  • tail
  • behead
  • curtail

Mutators

  • behead!
  • curtail!

<map> - Basic hash-map

Constructors

  • map
  • >map
  • partition, partition/pair

<future> - Asynchronous computation

  • future
  • >future

<event> - Asynchronous events

  • event
  • connect
  • disconnect
  • fire
  • wait

<function> - Functions

  • apply

<class> - Classes

Construction

  • class

Reflection

  • get-class
  • is?
  • to

<error> - Error handling

  • try
  • throw

filesystem - Accessing the server's filesystem

<file> - Paths and files

  • ls: Returns a list of files.
  • cat: Returns a str/raw by default, or something else if a correct cat handler is defined.

<str/raw> - Output of calls to cat

os - OS integration

Executing commands

  • system - calls out to an OS binary

<sys-out> - Output of system calls

image - Image manipulation

<image> - Images

table - Tables and queries

  • table
  • >table
  • get-row
  • get-col
  • get-cols
  • add-row
  • add-rows
  • add-col
  • add-cols
  • del-row
  • del-rows
  • del-col
  • del-cols
  • select
  • join