Giter Site home page Giter Site logo

core blocks about st-core HOT 23 CLOSED

nytlabs avatar nytlabs commented on August 20, 2024
core blocks

from st-core.

Comments (23)

mikedewar avatar mikedewar commented on August 20, 2024

Pusher, Sink

The 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
don't need a pusher, because every inbound route can essentially act as a pushed. Do need a sink, though, as messages won't be automatically discarded on unconnected routes.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

Delay

Upon receiving a message Delay blocks for a specified duration before emitting the message.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

Log

Log writes inbound messages to stdout (or somewhere).

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

+ - ร— รท ^ %

These basic operators operate on two inputs, returning the output of the operation or an error on type failure.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

> < == !=

These comparisons operate on two inputs, returning a boolean or an error on type failure.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

inArray, inObject, inString, hasPrefix, hasSuffix

These 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...?

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

Latch

A 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

kvGet, kvSet, kvDump, kvClear

These 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

pqPush, pqPop, pqPeek, pqLen, pqClear, pqDump

These 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

Uniform, Zipf, Poisson, Categorical, Gaussian, Bernoulli

These blocks emit a random number in response to a bang

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

exp, log10, ln, sqrt, sin, cos, tan

These blocks perform a single operation on an inbound number emitting the result or error on a type problem.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

toLower, toUpper, toTitle

These blocks perform a single operation on an inbound string, emitting the result or error on type failure.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

fields

Outputs 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

set

Set has two inputs, a key and a value, and it outputs the object key:value.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

merge

Merge 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

gate

Gate has two inputs, value and trigger. When messages exist at value and trigger, the value is emitted.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

append

Append has two inputs, array and value. When messages exist at both inputs, the value is appended to the array.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

first

First emits the first N values it sees.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

qPush, qPop, qPeek, qLen, qClear, qDump

These blocks perform operations on a queue, analogous the priority queue.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

identity

This block has a single input and a single output and does nothing.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

head, tail

head 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.

from st-core.

mikedewar avatar mikedewar commented on August 20, 2024

JSONUmarshal, XMLUnmarshal

These accept strings and try to turn them into map[string]interface{}s, accordingly. Failure to unmarshal results in emitting an error.

from st-core.

nikhan avatar nikhan commented on August 20, 2024

๐Ÿ’ƒ

from st-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.