Table of Contents

About

Sifting for the Corrade scripted agent means to filter out the results of a command returned to a callback. The purpose of sifting is to trim the results that a command produces such that the results may be easier to handle by the scripting language used. In the context of SecondLife, an LSL script can receive via HTTP a total of $2KiB$ of data such that Corrade commands that produce data sets far larger than $2KiB$ would be truncated when received by the LSL script. Technically, sifting is implemented in Corrade using a set of map-reduce-like commands that act on the output produced by all commands.

Complete List of Sifts

siftparametersdescriptionchanges

count

a CSV string representing a regular expression (regex) and regular expression options

The count sift will count the number of items in a list that match a supplied regular expression.

None.

distinct

the empty string

The distinct sift will return only unique elements in a list.

None.

each

An integer.

The each sift will return a strided list given a supplied number.

None.

jsonpath

a string representing a JSON path

The jsonpath sift will extract JSON elements matching the provided JSON path.

None.

match

a string representing a regular expression

The match sift will match the whole returned list against a provided regular expression.

None.

MD5

the empty string

The MD5 sift will generate an unsalted MD5 hash of the current data.

None.

permute

an integer representing the number of rotations

The permute sift will rotate the elements of the list left or right a number of times depending on the provided parameter.

None.

random

an integer representing a seed

The random sift will select a random element from the CSV list.

None.

reverse

the empty string

The reverse sift will reverse the CSV list.

None.

select

a string representing an element to match

The select will return the items following the provided element for all elements in the list.

None.

SHA1

the empty string

The SHA1 sift will generate a SHA1 hash of the current data.

None.

skip

An integer.

The skip sift will remove a supplied number of elements in a list from the start of the list.

None.

take

An integer.

The take sift will reduce the list produced by a command to a supplied number of items.

None.

XPath

a string representing a fully qualified XML path

The XPath sift will return all items matching an XML path.

None.

CSV Export

Index