Slang Documentation

Index

There are currently 124 Slang operators with 37 tags

Aggregate operators

There are 11 operators tagged with aggregate

Emits last item of a stream of generic items.
Emits first item of a stream of generic items.
Emits variance of a stream of numbers.
Sum
Emits the sum of a stream of numbers.
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 the average of a stream of numbers.
Emits the product of a stream of numbers.
Finds greatest number in a stream of numbers.
Emits the median number of a stream of numbers.
Finds smallest 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.
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.
Divides number A by number B.
Multiplies two numbers A and B and emits their product.

Boolean operators

There are 6 operators tagged with boolean

Evaluates an expression.
And
Emits true only if both given booleans A and B are true.
Emits the inverse of a given boolean.
Emits true only if both booleans A and B are equal.
Or
Emits true only if at least one of the given booleans A and B is true.
Xor
Emits true only if the given boolean values A and B are not 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 both booleans A and B are equal.
Emits true only if number A does not equal number B.
Emits true only if number A is less than number B.
Emits true if number A equals number B.
Emits true only if number A is less than or equal to number B.
Emits true only if number A is greater than or equal to number B.
Emits true only if number A is greater than number B.

Compression operators

There are 2 operators tagged with compression

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

Control operators

There are 8 operators tagged with control

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

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 2 operators tagged with csv

Reads a CSV file and emits a stream of lines, separated into columns.
Encodes streams into a single string.

Data operators

There are 8 operators tagged with data

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

Database operators

There are 12 operators tagged with database

Reads an item from memory by key string.
Writes an item to memory and associates it with a key string.
Executes an HSet command at the specified Redis server.
Subscribes at a Kafka topic.
Executes an HIncr command at the specified Redis server.
Executes an LPush command at the specified Redis server.
Queries an SQL query on a relational database and emits the result set.
Executes an SQL query on a relational database.
Executes an HGet command at the specified Redis server.
Executes an subscribe command at the specified Redis server.
Executes a Set command at the specified Redis server.
Executes a Get command at the specified Redis server.

Email operators

There are 1 operators tagged with email

Sends an email.

Encoding operators

There are 6 operators tagged with encoding

Reads a CSV file and emits a stream of lines, separated into columns.
Encodes streams into a single string.
Encodes Slang data into a JSON string.
Decodes a JSON string and emits the corresponding Slang data.
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.

Exception operators

There are 2 operators tagged with exception

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

File operators

There are 6 operators tagged with file

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

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 request and emits its 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 using given parameters and emits the parsed response.

Image operators

There are 3 operators tagged with image

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

Json operators

There are 2 operators tagged with json

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

Kafka operators

There are 1 operators tagged with kafka

Subscribes at a Kafka topic.

Math operators

There are 24 operators tagged with math

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

Memory operators

There are 2 operators tagged with memory

Reads an item from memory by key string.
Writes an item to memory and associates it with a key string.

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 9 operators tagged with network

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

Random operators

There are 1 operators tagged with random

Generates a random UUID.

Redis operators

There are 7 operators tagged with redis

Executes an HIncr command at the specified Redis server.
Executes an subscribe command at the specified Redis server.
Executes a Get command at the specified Redis server.
Executes an HGet command at the specified Redis server.
Executes an HSet command at the specified Redis server.
Executes an LPush command at the specified Redis server.
Executes a Set command at the specified Redis server.

Smtp operators

There are 1 operators tagged with smtp

Sends an email.

Sort operators

There are 2 operators tagged with sort

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

Statistics operators

There are 2 operators tagged with statistics

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

Stream operators

There are 29 operators tagged with stream

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

String operators

There are 8 operators tagged with string

Tells if a string ends with another string.
Tells if a string contains another string.
Builds a URL value from given protocol, host, port, path and query string.
Splits a string at a given separator and emits its pieces as stream.
Places values formatted in a C-like manner inside a string.
Concatenates strings A and B.
Tells if a string begins with another string.
Replaces placeholders in a given string with given values.

Sync operators

There are 2 operators tagged with sync

Frees a semaphore token.
Tries to acquire semaphore token.

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 shell command on the host system.

Time operators

There are 7 operators tagged with time

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

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

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