Slang Documentation

Index

There are currently 102 Slang operators with 32 tags

Aggregate operators

There are 9 operators tagged with aggregate

Emits first item of a stream of generic items.
Counts number of items in a stream of generic items.
Finds the best item using a chooser delegate to decide which item is better.
Emits last item of a stream of generic items.
Emits the median number of a stream of numbers.
Sum
Emits the sum of a stream of numbers.
Finds smallest number in a stream of numbers.
Emits the product of a stream of numbers.
Finds greatest number in a stream of numbers.

Arithmetic operators

There are 5 operators tagged with arithmetic

Subtracts number B from number A and emits the resulting difference.
Divides number A by number B.
Emits the modulo, the remainer of a division of two numbers A and B.
Add
Adds two numbers A and B and emits their sum.
Multiplies two numbers A and B and emits their product.

Boolean operators

There are 6 operators tagged with boolean

Evaluates an expression.
Or
Emits true only if at least one of the given booleans A and B is true.
And
Emits true only if both given booleans A and B are true.
Xor
Emits true only if the given boolean values A and B are not equal.
Emits the inverse of a given boolean.
Emits true only if both booleans A and B are equal.

Color operators

There are 1 operators tagged with color

Transforms an RGB pixel into a gray pixel.

Compare operators

There are 7 operators tagged with compare

Emits true only if number A is greater than number B.
Emits true only if number A is greater than or equal to number B.
Emits true only if number A does not equal number B.
Emits true if number A equals number B.
Emits true only if number A is less than number B.
Emits true only if number A is less than or equal to number B.
Emits true only if both booleans A and B are equal.

Compression operators

There are 2 operators tagged with compression

Unpacks a zip archive and emits a stream of files and their binary content.
Packs a stream of binary content into a zip archive.

Control operators

There are 6 operators tagged with control

Emits a constant value for each item.
Emits either the first or the second item depending on the given boolean.
Merges two streams using a compare delegate deciding which item has precedence.
Takes two items and emits one of them, using a chooser delegate as decider.
Emits items of a stream to either outgoing stream depending on the control value.
Performs a task repetetively, at least once..

Convert operators

There are 4 operators tagged with convert

Takes a stream and emits a map of items, selected by given indices.
Takes a map and emits a stream of key-value pairs.
Takes a map and emits a stream of key-value pairs.
Takes a map of items and serializes them into a stream.

Csv operators

There are 1 operators tagged with csv

Reads a CSV file and emits a stream of lines, separated into columns.

Data operators

There are 5 operators tagged with data

Converts the type of a value.
Uses an iterator delegate to aggregate items of a stream.
Lets an iterator delegate process a state until the controller tells it to stop.
Reduces the items of a stream pairwise using a reducer delegate.
Emits a constant value for each item.

Database operators

There are 2 operators tagged with database

Queries an SQL query on a relational database and emits the result set.
Executes an SQL query on a relational database.

Email operators

There are 1 operators tagged with email

Sends an email.

Encoding operators

There are 5 operators tagged with encoding

Decodes Excel data into a stream of sheets, each being a 2d-stream of cells.
Encodes Slang data into a JSON string.
Decodes a JSON string and emits the corresponding Slang data.
Encodes a Slang map into the corresponding URL-encoded string.
Reads a CSV file and emits a stream of lines, separated into columns.

Exception operators

There are 2 operators tagged with exception

Emits true only if a given primitive is null.
Replaces null items with specified value in a stream of primitive items.

File operators

There are 6 operators tagged with file

Creates or replaces a file and writes binary data to it.
Reads the contents of a file and emits them.
Appends binary data to a file or creates it if non existent.
Reads a file, deserializes each line and emits one item per line.
Reads the contents of a file line by line and emits them as stream.
Appends serialization of generic item to file.

Function operators

There are 3 operators tagged with function

Evaluates an expression.
Emits the greatest integer less than or equal to a given number.
Calculates square root of a number.

Http operators

There are 7 operators tagged with http

Decodes Excel data into a stream of sheets, each being a 2d-stream of cells.
Encodes a Slang map into the corresponding URL-encoded string.
Queries a given URL via GET using given parameters and emits the parsed response.
Starts an HTTP server, uses a handler delegate to process requests.
Performs an HTTP get request at a given URL and emits body and status code.
Sends an HTTP request.
Queries a given URL via GET request and emits its parsed response.

Image operators

There are 3 operators tagged with image

Takes pixels as stream of rgb values and encodes it into an image binary.
Reads an encoded image binary and emits its pixels as stream of rgb values.
Transforms an RGB pixel into a gray pixel.

Json operators

There are 2 operators tagged with json

Decodes a JSON string and emits the corresponding Slang data.
Encodes Slang data into a JSON string.

Math operators

There are 22 operators tagged with math

Evaluates an expression.
Emits true only if number A is greater than number B.
Finds smallest number in a stream of numbers.
Emits the median number of a stream of numbers.
Divides number A by number B.
Emits the product of a stream of numbers.
Finds greatest number in a stream of numbers.
Add
Adds two numbers A and B and emits their sum.
Subtracts number B from number A and emits the resulting difference.
Emits the modulo, the remainer of a division of two numbers A and B.
Multiplies two numbers A and B and emits their product.
Emits true only if number A is less than or equal to number B.
Emits true only if number A is less than number B.
Sum
Emits the sum of a stream of numbers.
Calculates square root of a number.
Emits the z-score for each number of a stream of numbers.
Calculates and emits moving average for each number of a stream of numbers.
Emits true if number A equals number B.
Emits true only if number A is greater than or equal to number B.
Emits the greatest integer less than or equal to a given number.
Emits true only if number A does not equal number B.
Flips the sign of a given number and emit the resulting number.

Mqtt operators

There are 2 operators tagged with mqtt

Publishes an MQTT message at a given topic.
Subscribes at a given topic, behaves like an MQTT client.

Network operators

There are 8 operators tagged with network

Publishes an MQTT message at a given topic.
Subscribes at a given topic, behaves like an MQTT client.
Queries a given URL via GET request and emits its parsed response.
Sends an email.
Sends an HTTP request.
Queries a given URL via GET using given parameters and emits the parsed response.
Starts an HTTP server, uses a handler delegate to process requests.
Performs an HTTP get request at a given URL and emits body and status code.

Smtp operators

There are 1 operators tagged with smtp

Sends an email.

Sort operators

There are 2 operators tagged with sort

Sorts a stream, using a comparator delegate specifying the order.
Sorts a stream of primitive items.

Statistics operators

There are 2 operators tagged with statistics

Emits the z-score for each number of a stream of numbers.
Emits standard deviation of a stream of numbers.

Stream operators

There are 29 operators tagged with stream

Takes a stream and emits a map of items, selected by given indices.
Takes a map of items and serializes them into a stream.
Lets an iterator delegate process a state until the controller tells it to stop.
Transforms a stream by iterating it using an iterator delegate.
Collects items from a stream until released.
Creates stream containing one single generic item.
Emits last item of a stream of generic items.
Counts number of items in a stream of generic items.
Emits standard deviation of a stream of numbers.
Filters a stream letting items pass only if given boolean pass is true.
Takes a map and emits a stream of key-value pairs.
Concatenates two streams.
Takes a map and emits a stream of key-value pairs.
Uses an iterator delegate to aggregate items of a stream.
Releases windows of items collected before.
Emits first item of a stream of generic items.
Calculates and emits moving average for each number of a stream of numbers.
Selects the n-th item in a stream of generic items, n being the index.
Emits the median number of a stream of numbers.
Sorts a stream of primitive items.
Emits a sub-stream of another stream.
Takes a stream of key-value pairs and emits the value with the given key.
Cuts a stream into windows of a certain size and emits them.
Reduces the items of a stream pairwise using a reducer delegate.
Emits the z-score for each number of a stream of numbers.
Sorts a stream, using a comparator delegate specifying the order.
Filters generic items of a stream, using a filter delegate as decider.
Emits all collected values for multiple streams at once in a given interval.
Finds the best item using a chooser delegate to decide which item is better.

String operators

There are 7 operators tagged with string

Tells if a string contains another string.
Tells if a string begins with another string.
Concatenates strings A and B.
Tells if a string ends with another string.
Places values formatted in a C-like manner inside a string.
Splits a string at a given separator and emits its pieces as stream.
Replaces placeholders in a given string with given values.

Synchronize operators

There are 1 operators tagged with synchronize

Emits all collected values for multiple streams at once in a given interval.

System operators

There are 1 operators tagged with system

Executes a command on the host system.

Time operators

There are 5 operators tagged with time

Takes a UNIX crontab string, sends triggers to its handler delegate accordingly.
Takes a string containing date and time and emits its parsed values.
Takes an item and emits it again after a given number of milliseconds has passed.
Emits triggers using a given crontab.
Now
Emits the current date and time.

Window operators

There are 3 operators tagged with window

Cuts a stream into windows of a certain size and emits them.
Collects items from a stream until released.
Releases windows of items collected before.

Zip operators

There are 2 operators tagged with zip

Unpacks a zip archive and emits a stream of files and their binary content.
Packs a stream of binary content into a zip archive.