-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core blocks #22
Comments
Pusher, SinkThe pusher block emits a constant stream of messages. The message can be set by setting the value input to something. Sink discards any message it receives immediately upon receipt. -- update |
DelayUpon receiving a message Delay blocks for a specified duration before emitting the message. |
LogLog writes inbound messages to stdout (or somewhere). |
+ - × ÷ ^ %These basic operators operate on two inputs, returning the output of the operation or an error on type failure. |
> < == !=These comparisons operate on two inputs, returning a boolean or an error on type failure. |
inArray, inObject, inString, hasPrefix, hasSuffixThese membership operators operate on a value and an array/object/string returning a boolean or an error on type failure. Note that inObject is a bit vague and maybe "hasField" or something like that might be better...? |
LatchA latch has a value input and a control input, and left and right outputs. If the control input is true, then the value will be emitted on the left output. If the control input is false the value will be emitted from the right output. |
kvGet, kvSet, kvDump, kvClearThese blocks perform get, set and dump operations against a key-value store. Get accepts a key and emits a value, Set accepts a key and a value, Dump responds to a bang with the whole key-value store as an object. |
pqPush, pqPop, pqPeek, pqLen, pqClear, pqDumpThese blocks perform push, pop, and peek operations against a key-value store. Push accepts a value and a priority, pop responds to a bang and removes the last value from the queue before emitting, and peek responds to a bang, returning an object containing the last value and its priority. |
Uniform, Zipf, Poisson, Categorical, Gaussian, BernoulliThese blocks emit a random number in response to a bang |
exp, log10, ln, sqrt, sin, cos, tanThese blocks perform a single operation on an inbound number emitting the result or error on a type problem. |
toLower, toUpper, toTitleThese blocks perform a single operation on an inbound string, emitting the result or error on type failure. |
fieldsOutputs the fields of an inbound object as an array. Emits a type error if the inbound message is not an object. Could be called "keys" instead depending where we end up with the vocabulary. I think I prefer fields but I've not had any coffee yet. |
setSet has two inputs, a key and a value, and it outputs the object |
mergeMerge has two inputs, both expecting objects. The Merge block creates a new object by combining the two inbound objects at the root of the block, favouring the left input for any conflicts. |
gateGate has two inputs, value and trigger. When messages exist at value and trigger, the value is emitted. |
appendAppend has two inputs, array and value. When messages exist at both inputs, the value is appended to the array. |
firstFirst emits the first N values it sees. |
qPush, qPop, qPeek, qLen, qClear, qDumpThese blocks perform operations on a queue, analogous the priority queue. |
identityThis block has a single input and a single output and does nothing. |
head, tailhead accepts an array and has two outputs. One output emits the first element in the array and the other output emits the remainder of the array. The empty array will cause nothing to be emitted on either outbound channel. Tail does the opposite. |
JSONUmarshal, XMLUnmarshalThese accept strings and try to turn them into map[string]interface{}s, accordingly. Failure to unmarshal results in emitting an error. |
💃 |
This issue is to describes those blocks we currently feel should be included in st-core. Each comment should describe a block or a group of related blocks.
The text was updated successfully, but these errors were encountered: