ThreadComputation

package module
v0.0.0-...-330370c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: GPL-3.0 Imports: 35 Imported by: 0

README

Go Go Reference

ThreadComputation

ThreadComputation is a programmatic module implementing core interpreter and virtual machine for programming language BUND. Being a GoLang module, ThreadComputation can be embedded in your project, giving you ability to add Domain Specific Language to your application.

What is the BUND language ?

BUND language is interpreted, dynamically typed, functional and stack-based language, implemented in Go, embeddable a extendable with GoLang. BUND build around two-dimentional stack engine acting like a storage for the functions call modeled with idea of threading macros in mind. What is the main features of the BUND:

  • Dynamic typing, with support for boolean, string, float, integer, set, map, matrix data types;
  • Transparent (or striving to be transparent) approach to operators that work seamlessly with all supported types;
  • URI-based access to external data;
  • Lambda and named functions;
  • Advanced operations with stack;
  • Named stacks supported by two-dimentional stack VM;
  • Very easy to write new functions in Go or in BUND;
  • On-the-fly function redefine;
  • Native support for map and json keys query;
  • Prefix and postfix notations;
  • and more ...

Show me 'Hello World!' now !

The famous HelloWorld program will look like this:

print['Hello World!']

In this example, we are calling function print and pass the string as a function argument. Alternatively, you can execute that code:

'Hello world!' print

And in this example, you do not pass the string as argument and function print will take data from the stack. Or you can do something like that:

+['Hello ' 'world!'] `print attr !

Here, first, you are creating string using concatenation, then create function reference, then dynamically assign arguments to the that reference than execute that reference. As you see, possibilitis of how you can greet the world are endless.

How to use ThreadComputation module

ThreadComputation module is hosted on GitHub, fully tested with automatic Actions call. You are welcome to fork and contribute new functions and features of the BUND.

Installation
go get github.com/vulogov/ThreadComputation

or you can check out the module and run

make pre; make

If you are planning to change BUND syntax, you must have ANTLR4 for Go installed.

make rebuild

will rebuild ANTLR4 code.

Use from inside Go code
import "github.com/vulogov/ThreadComputation"

After you imported the module, you have to create TC instance

tc := ThreadComputation.Init()

This function call will create a BUND VM and initialize all structures for VM. Initial stack will be created for you.

tc = tc.Eval("BUND code goes here")

This call evaluates and executed a BUND code in created VM instance.

if tc.Errors() != 0 {
  log.Fatalf(tc.Error())
}
  • Function tc.Errors() of BUND VM will return a number of errors from lexer, parser and run-time;
  • Function tc.Error() of BUND VM will return last error message.
if tc.Ready() {
  res := tc.Get()
}

This function will test if stack have any value to return and return that value as an interface{}.

Key concepts of the BUND language

To the source !

Information about ThreadComputation package is available on https://pkg.go.dev

Source code available on GitHub: https://github.com/vulogov/ThreadComputation

Get support

Here, you can open ticket.

Documentation

Overview

Package binary_pack performs conversions between some Go values represented as byte slices. This can be used in handling binary data stored in files or from network connections, among other sources. It uses format slices of strings as compact descriptions of the layout of the Go structs.

Format characters (some characters like H have been reserved for future implementation of unsigned numbers):

? - bool, packed size 1 byte
h, H - int, packed size 2 bytes (in future it will support pack/unpack of int8, uint8 values)
i, I, l, L - int, packed size 4 bytes (in future it will support pack/unpack of int16, uint16, int32, uint32 values)
q, Q - int, packed size 8 bytes (in future it will support pack/unpack of int64, uint64 values)
f - float32, packed size 4 bytes
d - float64, packed size 8 bytes
Ns - string, packed size N bytes, N is a number of runes to pack/unpack

Index

Constants

View Source
const (
	Unknown  int = 0
	Int          = 1
	Float        = 2
	String       = 3
	Bool         = 4
	List         = 5
	Matrix       = 6
	Dict         = 7
	Set          = 8
	Ref          = 9
	Code         = 10
	Value        = 11
	Range        = 12
	None         = 13
	Numbers      = 14
	Pair         = 15
	Json         = 16
	Neural       = 17
	Data         = 18
	Time         = 19
	Binary       = 20
	Context      = 21
	Lines        = 22
	IO           = 23
	Exported     = 24
	Iterator     = 95
	SType        = 96
	Error        = 97
	Simple       = 98
	Any          = 99
	Nil          = 100
)

Variables

View Source
var Callbacks cmap.Cmap
View Source
var Commands cmap.Cmap
View Source
var FunctionRouterQ deque.Deque
View Source
var Functions cmap.Cmap
View Source
var TCEndOfLine = regexp.MustCompile(`\n+`)
View Source
var TCIOReadRouters = dict.New()
View Source
var TCIOWriteRouters = dict.New()
View Source
var VERSION = "1.22"
View Source
var Vars cmap.Cmap

Functions

func AddNewStack

func AddNewStack(l *TCExecListener, name string)

func AllValuesFromStackAndAttr

func AllValuesFromStackAndAttr(l *TCExecListener, q *deque.Deque) *deque.Deque

func AllValuesFromStackOrAttr

func AllValuesFromStackOrAttr(l *TCExecListener, q *deque.Deque) *deque.Deque

func ApplyToFunction

func ApplyToFunction(l *TCExecListener, x interface{}, q *deque.Deque) interface{}

func ArrayToAttrs

func ArrayToAttrs(attrs []interface{}) *deque.Deque

func AttrsToArray

func AttrsToArray(q *deque.Deque) []interface{}

func BinNext

func BinNext(res *TCIterator) interface{}

func BinPrev

func BinPrev(res *TCIterator) interface{}

func BlockCode

func BlockCode(l *TCExecListener, name string, code string) interface{}

func BlockConditionalFalse

func BlockConditionalFalse(l *TCExecListener, name string, code string) interface{}

func BlockConditionalTrue

func BlockConditionalTrue(l *TCExecListener, name string, code string) interface{}

func BlockLambda

func BlockLambda(l *TCExecListener, name string, code string) interface{}

func BlockMonitoring

func BlockMonitoring(l *TCExecListener, name string, code string) interface{}

func BlockNotOnError

func BlockNotOnError(l *TCExecListener, name string, code string) interface{}

func BlockOnDebug

func BlockOnDebug(l *TCExecListener, name string, code string) interface{}

func BlockOnError

func BlockOnError(l *TCExecListener, name string, code string) interface{}

func BlockSpawn

func BlockSpawn(l *TCExecListener, name string, code string) interface{}

func BlockTesting

func BlockTesting(l *TCExecListener, name string, code string) interface{}

func DataNext

func DataNext(res *TCIterator) interface{}

func DataPrev

func DataPrev(res *TCIterator) interface{}

func FloatNext

func FloatNext(res *TCIterator) interface{}

func FloatPrev

func FloatPrev(res *TCIterator) interface{}

func FuncSetVariable

func FuncSetVariable(l *TCExecListener, func_name string, q *deque.Deque)

func GetFunctionName

func GetFunctionName(i interface{}) string

func GetPositionalFromAttr

func GetPositionalFromAttr(l *TCExecListener, n int64) interface{}

func GetSimpleData

func GetSimpleData(data string) interface{}

func GetVariable

func GetVariable(name string) (interface{}, error)

func InCode

func InCode(l *TCExecListener, name string, code string) interface{}

func InitExitCallbacks

func InitExitCallbacks(tc *TCstate)

func IntNext

func IntNext(res *TCIterator) interface{}

func IntPrev

func IntPrev(res *TCIterator) interface{}

func IsBinary

func IsBinary(x interface{}) bool

func IsContext

func IsContext(x interface{}) bool

func IsData

func IsData(x interface{}) bool

func IsExported

func IsExported(x interface{}) bool

func IsIO

func IsIO(x interface{}) bool

func IsLines

func IsLines(x interface{}) bool

func IsNeural

func IsNeural(x interface{}) bool

func IsNone

func IsNone(x interface{}) bool

func IsSimpleData

func IsSimpleData(data string) bool

func IsStringElementExist

func IsStringElementExist(s []string, str string) bool

func IsType

func IsType(x interface{}) bool

func LinesNext

func LinesNext(res *TCIterator) interface{}

func LinesPrev

func LinesPrev(res *TCIterator) interface{}

func ListNext

func ListNext(res *TCIterator) interface{}

func ListPrev

func ListPrev(res *TCIterator) interface{}

func LoopCode

func LoopCode(l *TCExecListener, name string, code string) interface{}

func MatrixNext

func MatrixNext(res *TCIterator) interface{}

func MatrixPrev

func MatrixPrev(res *TCIterator) interface{}

func NumbersNext

func NumbersNext(res *TCIterator) interface{}

func NumbersPrev

func NumbersPrev(res *TCIterator) interface{}

func PushQueueToStack

func PushQueueToStack(l *TCExecListener, q *deque.Deque)

func ReadFile

func ReadFile(uri string) (string, error)

func RegisterApplyCallback

func RegisterApplyCallback(x_type int, y_type int, apply_fun TCApplyFun)

func RegisterBlockCallback

func RegisterBlockCallback(name string, fun TCBlockFun)

func RegisterCloneCallback

func RegisterCloneCallback(from_type int, fun TCCloneFun)

func RegisterCompareCallback

func RegisterCompareCallback(x_type int, y_type int, fun TCCompareFun)

func RegisterConvertCallback

func RegisterConvertCallback(from_type int, fun TCConvertFun)

func RegisterExecuteCallback

func RegisterExecuteCallback(etype int, fun TCExecuteFun)

func RegisterFunctionCallback

func RegisterFunctionCallback(name string, x_type int, fun TCGenericFunction)

func RegisterGenCallback

func RegisterGenCallback(gtype int, fun TCGenFun)

func RegisterLoopPCallback

func RegisterLoopPCallback(x_type int, fun TCLoopParamFun)

func RegisterMathCallback

func RegisterMathCallback(x_type int, y_type int, fun TCMathFun)

func RegisterNextCallback

func RegisterNextCallback(gtype int, fun TCNextFun)

func RegisterOperatorCallback

func RegisterOperatorCallback(name string, x_type int, y_type int, fun TCGenericOperator)

func RegisterOperatorCmdCallback

func RegisterOperatorCmdCallback(name string, x_type int, y_type int, fun TCOperatorCommand)

func RegisterPrevCallback

func RegisterPrevCallback(gtype int, fun TCNextFun)

func RegisterSizeCallback

func RegisterSizeCallback(from_type int, fun TCSizeFun)

func RegisterToListCallback

func RegisterToListCallback(x_type int, fun TCToListFun)

func RegisterToStringCallback

func RegisterToStringCallback(x_type int, fun TCToStringFun)

func ReturnFromFunction

func ReturnFromFunction(l *TCExecListener, func_name string, data interface{})

func SetCommand

func SetCommand(name string, fun TCFun)

func SetExternalTypeHandlers

func SetExternalTypeHandlers(fun1 TCExtType, fun2 TCExtTypeStr)

func SetFunction

func SetFunction(name string, fun TCFun)

func SetVariable

func SetVariable(name string, data interface{})

func SingleValueFromStackAndAttr

func SingleValueFromStackAndAttr(l *TCExecListener, q *deque.Deque) *deque.Deque

func SingleValueFromStackOrAttr

func SingleValueFromStackOrAttr(l *TCExecListener, q *deque.Deque) *deque.Deque

func StringNext

func StringNext(res *TCIterator) interface{}

func StringPrev

func StringPrev(res *TCIterator) interface{}

func TCAddRouterFunction

func TCAddRouterFunction(fun TCRouterFun)

func TCAnyValueMath

func TCAnyValueMath(name string, x interface{}, y interface{}) interface{}

func TCAnythingConvert

func TCAnythingConvert(data interface{}, to_type int) interface{}

func TCBinaryConvert

func TCBinaryConvert(data interface{}, to_type int) interface{}

func TCBinaryFunction

func TCBinaryFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCBinaryMath

func TCBinaryMath(name string, x interface{}, y interface{}) interface{}

func TCBinarySize

func TCBinarySize(data interface{}) int

func TCBinaryTypeFunction

func TCBinaryTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCBinaryValueFunction

func TCBinaryValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCBoolConvert

func TCBoolConvert(data interface{}, to_type int) interface{}

func TCBoolTypeFunction

func TCBoolTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCarFunction

func TCCarFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCdrFunction

func TCCdrFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCClearErrorsFunction

func TCClearErrorsFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCClrFunction

func TCClrFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCodeConvert

func TCCodeConvert(data interface{}, to_type int) interface{}

func TCCodeExecute

func TCCodeExecute(l *TCExecListener, code interface{}, q *deque.Deque) interface{}

func TCCodeMath

func TCCodeMath(name string, x interface{}, y interface{}) interface{}

func TCCompareBinaryBinary

func TCCompareBinaryBinary(name string, x interface{}, y interface{}) interface{}

func TCCompareBinaryString

func TCCompareBinaryString(name string, x interface{}, y interface{}) interface{}

func TCCompareBoolBool

func TCCompareBoolBool(name string, x interface{}, y interface{}) interface{}

func TCCompareBoolString

func TCCompareBoolString(name string, x interface{}, y interface{}) interface{}

func TCCompareFloatFloat

func TCCompareFloatFloat(name string, x interface{}, y interface{}) interface{}

func TCCompareFloatInt

func TCCompareFloatInt(name string, x interface{}, y interface{}) interface{}

func TCCompareFunction

func TCCompareFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCompareIntFloat

func TCCompareIntFloat(name string, x interface{}, y interface{}) interface{}

func TCCompareIntInt

func TCCompareIntInt(name string, x interface{}, y interface{}) interface{}

func TCCompareMatrixMatrix

func TCCompareMatrixMatrix(name string, x interface{}, y interface{}) interface{}

func TCCompareNumbersNumbers

func TCCompareNumbersNumbers(name string, x interface{}, y interface{}) interface{}

func TCCompareNumericString

func TCCompareNumericString(name string, x interface{}, y interface{}) interface{}

func TCCompareSomethingValue

func TCCompareSomethingValue(name string, x interface{}, y interface{}) interface{}

func TCCompareStringBool

func TCCompareStringBool(name string, x interface{}, y interface{}) interface{}

func TCCompareStringNumeric

func TCCompareStringNumeric(name string, x interface{}, y interface{}) interface{}

func TCCompareStringString

func TCCompareStringString(name string, x interface{}, y interface{}) interface{}

func TCCompareValueSomething

func TCCompareValueSomething(name string, x interface{}, y interface{}) interface{}

func TCCompareValueValue

func TCCompareValueValue(name string, x interface{}, y interface{}) interface{}

func TCContextConvert

func TCContextConvert(data interface{}, to_type int) interface{}

func TCContextGet

func TCContextGet(x interface{}, y interface{}) interface{}

func TCContextSet

func TCContextSet(x interface{}, y interface{})

func TCConversionFunction

func TCConversionFunction(l *TCExecListener, t int, e interface{}) (interface{}, error)

func TCConvertAnyToString

func TCConvertAnyToString(x interface{}) string

func TCConvertBinaryToString

func TCConvertBinaryToString(x interface{}) string

func TCConvertFunction

func TCConvertFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCConvertLinesToString

func TCConvertLinesToString(x interface{}) string

func TCConvertListToString

func TCConvertListToString(x interface{}) string

func TCCreateErrorFunction

func TCCreateErrorFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCtxFunction

func TCCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCCtxValueFunction

func TCCtxValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDataAddSeries

func TCDataAddSeries(d *TCData, p *TCPair) error

func TCDataConvert

func TCDataConvert(data interface{}, to_type int) interface{}

func TCDataFrameCar

func TCDataFrameCar(v interface{}) interface{}

func TCDataFrameCdr

func TCDataFrameCdr(v interface{}) interface{}

func TCDataFunction

func TCDataFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDataSet

func TCDataSet(x interface{}, y interface{})

func TCDataValueFunction

func TCDataValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDataframeGet

func TCDataframeGet(x interface{}, y interface{}) interface{}

func TCDataframeMath

func TCDataframeMath(name string, x interface{}, y interface{}) interface{}

func TCDataframeSample

func TCDataframeSample(x interface{}, y interface{}) interface{}

func TCDataframeSize

func TCDataframeSize(data interface{}) int

func TCDecFloat

func TCDecFloat(v interface{}) interface{}

func TCDecFunction

func TCDecFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDecInt

func TCDecInt(v interface{}) interface{}

func TCDecMatrix

func TCDecMatrix(v interface{}) interface{}

func TCDecNumbers

func TCDecNumbers(v interface{}) interface{}

func TCDictConvert

func TCDictConvert(data interface{}, to_type int) interface{}

func TCDictFunction

func TCDictFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDictGet

func TCDictGet(x interface{}, y interface{}) interface{}

func TCDictSet

func TCDictSet(x interface{}, y interface{})

func TCDictValueFunction

func TCDictValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDropCtxFunction

func TCDropCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDropFunction

func TCDropFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCDupFunction

func TCDupFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCErrorConvert

func TCErrorConvert(data interface{}, to_type int) interface{}

func TCErrorsHandleFunction

func TCErrorsHandleFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCErrorsNotHandleFunction

func TCErrorsNotHandleFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExecuteAllFunction

func TCExecuteAllFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExecuteBinary

func TCExecuteBinary(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteContext

func TCExecuteContext(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteEcho

func TCExecuteEcho(l *TCExecListener, code interface{}, q *deque.Deque) interface{}

func TCExecuteEval

func TCExecuteEval(l *TCExecListener, code interface{}, q *deque.Deque) interface{}

func TCExecuteFunction

func TCExecuteFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExecuteLines

func TCExecuteLines(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteList

func TCExecuteList(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteMatrix

func TCExecuteMatrix(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteNumbers

func TCExecuteNumbers(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExecuteValue

func TCExecuteValue(l *TCExecListener, v interface{}, q *deque.Deque) interface{}

func TCExitCbPoolClose

func TCExitCbPoolClose(l *TCExecListener)

func TCExitCbSetExitError

func TCExitCbSetExitError(l *TCExecListener)

func TCExitFunction

func TCExitFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExitRequestedFunction

func TCExitRequestedFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExportFunction

func TCExportFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCExportedConvert

func TCExportedConvert(data interface{}, to_type int) interface{}

func TCExportedSize

func TCExportedSize(data interface{}) int

func TCExportedTypeFunction

func TCExportedTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCFloatConvert

func TCFloatConvert(data interface{}, to_type int) interface{}

func TCFloatFloatMath

func TCFloatFloatMath(name string, x interface{}, y interface{}) interface{}

func TCFloatFunction

func TCFloatFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCFloatIntMath

func TCFloatIntMath(name string, x interface{}, y interface{}) interface{}

func TCFunctionRouter

func TCFunctionRouter(l *TCExecListener, func_name string, q *deque.Deque) (interface{}, error)

func TCFuzzyMathFunction

func TCFuzzyMathFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCGStackLeftFunction

func TCGStackLeftFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCGStackRightFunction

func TCGStackRightFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCGetCtxFunction

func TCGetCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCGetFunction

func TCGetFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCGetValueFunction

func TCGetValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIOConvert

func TCIOConvert(data interface{}, to_type int) interface{}

func TCIOFunction

func TCIOFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIOReadFunction

func TCIOReadFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIORegisterReadRouter

func TCIORegisterReadRouter(patt string, fun TCIOReadFun)

func TCIORegisterWriteRouter

func TCIORegisterWriteRouter(patt string, fun TCIOWriteFun)

func TCIOSet

func TCIOSet(x interface{}, y interface{})

func TCIOTypeFunction

func TCIOTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIOValueFunction

func TCIOValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIOWriteFunction

func TCIOWriteFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIfErrorFunction

func TCIfErrorFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIfLastErrorFunction

func TCIfLastErrorFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCImportFunction

func TCImportFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIncFloat

func TCIncFloat(v interface{}) interface{}

func TCIncFunction

func TCIncFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIncInt

func TCIncInt(v interface{}) interface{}

func TCIncMatrix

func TCIncMatrix(v interface{}) interface{}

func TCIncNumbers

func TCIncNumbers(v interface{}) interface{}

func TCIntConvert

func TCIntConvert(data interface{}, to_type int) interface{}

func TCIntFloatMath

func TCIntFloatMath(name string, x interface{}, y interface{}) interface{}

func TCIntFunction

func TCIntFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCIntMath

func TCIntMath(name string, x interface{}, y interface{}) interface{}

func TCIteratorConvert

func TCIteratorConvert(data interface{}, to_type int) interface{}

func TCJsonConvert

func TCJsonConvert(data interface{}, to_type int) interface{}

func TCJsonFunction

func TCJsonFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCJsonGet

func TCJsonGet(x interface{}, y interface{}) interface{}

func TCJsonSetDict

func TCJsonSetDict(x interface{}, y interface{})

func TCJsonSetJson

func TCJsonSetJson(x interface{}, y interface{})

func TCJsonSetString

func TCJsonSetString(x interface{}, y interface{})

func TCJsonUniqFunction

func TCJsonUniqFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCJsonValueFunction

func TCJsonValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCJustLinesFunction

func TCJustLinesFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCJustValueFunction

func TCJustValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLastErrorFunction

func TCLastErrorFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLenFunction

func TCLenFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLikelyValueFunction

func TCLikelyValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLinesConvert

func TCLinesConvert(data interface{}, to_type int) interface{}

func TCLinesFunction

func TCLinesFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLinesGet

func TCLinesGet(x interface{}, y interface{}) interface{}

func TCLinesMath

func TCLinesMath(name string, x interface{}, y interface{}) interface{}

func TCLinesSet

func TCLinesSet(x interface{}, y interface{})

func TCLinesSize

func TCLinesSize(data interface{}) int

func TCLinesTypeFunction

func TCLinesTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCListCar

func TCListCar(v interface{}) interface{}

func TCListCdr

func TCListCdr(v interface{}) interface{}

func TCListConvert

func TCListConvert(data interface{}, to_type int) interface{}

func TCListFunction

func TCListFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCListMath

func TCListMath(name string, x interface{}, y interface{}) interface{}

func TCListSize

func TCListSize(data interface{}) int

func TCListTypeFunction

func TCListTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLoglevelFunction

func TCLoglevelFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCLoopPDictCallback

func TCLoopPDictCallback(l *TCExecListener, v interface{}, q *deque.Deque) *deque.Deque

func TCLoopPListCallback

func TCLoopPListCallback(l *TCExecListener, v interface{}, q *deque.Deque) *deque.Deque

func TCLoopPNumbersCallback

func TCLoopPNumbersCallback(l *TCExecListener, v interface{}, q *deque.Deque) *deque.Deque

func TCLoopPPairCallback

func TCLoopPPairCallback(l *TCExecListener, v interface{}, q *deque.Deque) *deque.Deque

func TCLoopPValueCallback

func TCLoopPValueCallback(l *TCExecListener, v interface{}, q *deque.Deque) *deque.Deque

func TCMatrixClone

func TCMatrixClone(data interface{}) interface{}

func TCMatrixConvert

func TCMatrixConvert(data interface{}, to_type int) interface{}

func TCMatrixFunction

func TCMatrixFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCMatrixGet

func TCMatrixGet(x interface{}, y interface{}) interface{}

func TCMatrixMath

func TCMatrixMath(name string, x interface{}, y interface{}) interface{}

func TCMatrixSet

func TCMatrixSet(x interface{}, y interface{})

func TCMatrixSize

func TCMatrixSize(data interface{}) int

func TCMergeListsX

func TCMergeListsX(x interface{}, y interface{}) interface{}

func TCMergeListsY

func TCMergeListsY(x interface{}, y interface{}) interface{}

func TCMergeValueToListX

func TCMergeValueToListX(x interface{}, y interface{}) interface{}

func TCMergeValueToListY

func TCMergeValueToListY(x interface{}, y interface{}) interface{}

func TCMergeValuesToList

func TCMergeValuesToList(x interface{}, y interface{}) interface{}

func TCNErrorsFunction

func TCNErrorsFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNSNameFunction

func TCNSNameFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNSPreviousNameFunction

func TCNSPreviousNameFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNeuralConvert

func TCNeuralConvert(data interface{}, to_type int) interface{}

func TCNeuralFunction

func TCNeuralFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNeuralSize

func TCNeuralSize(data interface{}) int

func TCNeuralTrain

func TCNeuralTrain(x interface{}, y interface{})

func TCNeuralUpdate

func TCNeuralUpdate(x interface{}, y interface{}) interface{}

func TCNeuralValueFunction

func TCNeuralValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNeverValueFunction

func TCNeverValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNewStackFunction

func TCNewStackFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNoneConvert

func TCNoneConvert(data interface{}, to_type int) interface{}

func TCNoneFunction

func TCNoneFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNoneValueFunction

func TCNoneValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNotFunction

func TCNotFunction(x interface{}) interface{}

func TCNotLogicFunction

func TCNotLogicFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNotSureValueFunction

func TCNotSureValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNotValueFunction

func TCNotValueFunction(x interface{}) interface{}

func TCNumbersCar

func TCNumbersCar(v interface{}) interface{}

func TCNumbersCdr

func TCNumbersCdr(v interface{}) interface{}

func TCNumbersConvert

func TCNumbersConvert(data interface{}, to_type int) interface{}

func TCNumbersFunction

func TCNumbersFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNumbersGet

func TCNumbersGet(x interface{}, y interface{}) interface{}

func TCNumbersMath

func TCNumbersMath(name string, x interface{}, y interface{}) interface{}

func TCNumbersSize

func TCNumbersSize(data interface{}) int

func TCNumbersTypeFunction

func TCNumbersTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCNumbersValueFunction

func TCNumbersValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCObserveDisableFunction

func TCObserveDisableFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCObserveEnableFunction

func TCObserveEnableFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPairCar

func TCPairCar(v interface{}) interface{}

func TCPairCdr

func TCPairCdr(v interface{}) interface{}

func TCPairConvert

func TCPairConvert(data interface{}, to_type int) interface{}

func TCPairFunction

func TCPairFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPairValueFunction

func TCPairValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPoolActiveFunction

func TCPoolActiveFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPoolCapacityFunction

func TCPoolCapacityFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPopulateCtxFunction

func TCPopulateCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPrintFunction

func TCPrintFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPrintfFunction

func TCPrintfFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPrintflnFunction

func TCPrintflnFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCPrintlnFunction

func TCPrintlnFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRangeConvert

func TCRangeConvert(data interface{}, to_type int) interface{}

func TCRangeFunction

func TCRangeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCReadFromIO

func TCReadFromIO(v interface{}) interface{}

func TCReadFunction

func TCReadFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRecvLocalFunction

func TCRecvLocalFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRecvNamedFunction

func TCRecvNamedFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRefConvert

func TCRefConvert(data interface{}, to_type int) interface{}

func TCRefExecute

func TCRefExecute(l *TCExecListener, code interface{}, q *deque.Deque) interface{}

func TCRotateLeftFunction

func TCRotateLeftFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRotateListLeft

func TCRotateListLeft(v interface{}) interface{}

func TCRotateListRight

func TCRotateListRight(v interface{}) interface{}

func TCRotateMatrixLeft

func TCRotateMatrixLeft(v interface{}) interface{}

func TCRotateMatrixRight

func TCRotateMatrixRight(v interface{}) interface{}

func TCRotateNumbersLeft

func TCRotateNumbersLeft(v interface{}) interface{}

func TCRotateNumbersRight

func TCRotateNumbersRight(v interface{}) interface{}

func TCRotateRightFunction

func TCRotateRightFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCRotateSimple

func TCRotateSimple(v interface{}) interface{}

func TCSStackFunction

func TCSStackFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSampleFunction

func TCSampleFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSendLocalFunction

func TCSendLocalFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSendNamedFunction

func TCSendNamedFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSetConvert

func TCSetConvert(data interface{}, to_type int) interface{}

func TCSetDataFromPairs

func TCSetDataFromPairs(l *TCExecListener, d *TCData, q *deque.Deque) error

func TCSetFunction

func TCSetFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSetGlobalCtxFunction

func TCSetGlobalCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSetLocalCtxFunction

func TCSetLocalCtxFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSetMath

func TCSetMath(name string, x interface{}, y interface{}) interface{}

func TCSetOpFunction

func TCSetOpFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSimpleClone

func TCSimpleClone(data interface{}) interface{}

func TCSimpleLogicFunction

func TCSimpleLogicFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSimpleMathFunction

func TCSimpleMathFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSimpleStringMath

func TCSimpleStringMath(name string, x interface{}, y interface{}) interface{}

func TCSizeFunction

func TCSizeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCSizeSimple

func TCSizeSimple(data interface{}) int

func TCStackBackSendFunction

func TCStackBackSendFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStackLeftFunction

func TCStackLeftFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStackReturnFunction

func TCStackReturnFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStackRightFunction

func TCStackRightFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStrFormatFunction

func TCStrFormatFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStrStringFunction

func TCStrStringFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStringClone

func TCStringClone(data interface{}) interface{}

func TCStringConvert

func TCStringConvert(data interface{}, to_type int) interface{}

func TCStringFunction

func TCStringFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCStringSimpleMath

func TCStringSimpleMath(name string, x interface{}, y interface{}) interface{}

func TCStringSize

func TCStringSize(data interface{}) int

func TCStringStringMath

func TCStringStringMath(name string, x interface{}, y interface{}) interface{}

func TCSureValueFunction

func TCSureValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCTestDisableFunction

func TCTestDisableFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCTestEnableFunction

func TCTestEnableFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCThrowErrorFunction

func TCThrowErrorFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCTimeFunction

func TCTimeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCToTypeConverter

func TCToTypeConverter(v interface{}) interface{}

func TCToTypeFunction

func TCToTypeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCTrainNeuralFromPairs

func TCTrainNeuralFromPairs(l *TCExecListener, n *TCNeural, q *deque.Deque) error

func TCTrainNeuralFunction

func TCTrainNeuralFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCType

func TCType(x interface{}) int

func TCTypeConvert

func TCTypeConvert(data interface{}, to_type int) interface{}

func TCUseFunction

func TCUseFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCVFunction

func TCVFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCValueAnyMath

func TCValueAnyMath(name string, x interface{}, y interface{}) interface{}

func TCValueFunction

func TCValueFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCValueMakeFunction

func TCValueMakeFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCValueNumbersMath

func TCValueNumbersMath(name string, x interface{}, y interface{}) interface{}

func TCValueValueMath

func TCValueValueMath(name string, x interface{}, y interface{}) interface{}

func TCWaitFunction

func TCWaitFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCWriteToIO

func TCWriteToIO(x interface{}, y interface{})

func TCisSimple

func TCisSimple(x interface{}) bool

func TCnewlineFunction

func TCnewlineFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TCsStackFunction

func TCsStackFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func ToStackFunction

func ToStackFunction(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

func TypeToStr

func TypeToStr(t interface{}) string

Types

type BinaryPack

type BinaryPack struct{}

func (*BinaryPack) CalcSize

func (bp *BinaryPack) CalcSize(format []string) (int, error)

Return the size of the struct (and hence of the byte slice) corresponding to the given format.

func (*BinaryPack) Pack

func (bp *BinaryPack) Pack(format []string, msg []interface{}) ([]byte, error)

Return a byte slice containing the values of msg slice packed according to the given format. The items of msg slice must match the values required by the format exactly.

func (*BinaryPack) UnPack

func (bp *BinaryPack) UnPack(format []string, msg []byte) ([]interface{}, error)

Unpack the byte slice (presumably packed by Pack(format, msg)) according to the given format. The result is a []interface{} slice even if it contains exactly one item. The byte slice must contain not less the amount of data required by the format (len(msg) must more or equal CalcSize(format)).

type TCApplyFun

type TCApplyFun func(interface{}, interface{}) interface{}

func GetApplyCallback

func GetApplyCallback(x interface{}, y interface{}) TCApplyFun

type TCBinary

type TCBinary struct {
	Type int
	D    []byte
}

func MakeBinary

func MakeBinary(d interface{}) *TCBinary

func (*TCBinary) Add

func (res *TCBinary) Add(d interface{}) *TCBinary

func (*TCBinary) Len

func (b *TCBinary) Len() int

func (*TCBinary) Raw

func (b *TCBinary) Raw() string

func (*TCBinary) Slice

func (b *TCBinary) Slice(s int, l int) *TCBinary

func (*TCBinary) String

func (b *TCBinary) String() string

type TCBlockFun

type TCBlockFun func(*TCExecListener, string, string) interface{}

func GetBlockCallback

func GetBlockCallback(name string) TCBlockFun

type TCBreak

type TCBreak struct {
}

type TCCloneFun

type TCCloneFun func(interface{}) interface{}

func GetCloneCallback

func GetCloneCallback(x interface{}) TCCloneFun

type TCCode

type TCCode struct {
	Name      string
	Userfuncs mapset.Set
	Code      deque.Deque
}

func (*TCCode) Add

func (c *TCCode) Add(v interface{})

func (*TCCode) AddCall

func (c *TCCode) AddCall(name string, q *deque.Deque)

func (*TCCode) AddRaw

func (c *TCCode) AddRaw(data string)

func (*TCCode) AddUserfunc

func (c *TCCode) AddUserfunc(name string)

func (*TCCode) Execute

func (c *TCCode) Execute(tc *TCstate) error

func (*TCCode) New

func (c *TCCode) New()

func (*TCCode) String

func (c *TCCode) String() string

type TCCompareFun

type TCCompareFun func(string, interface{}, interface{}) interface{}

func GetCompareCallback

func GetCompareCallback(x interface{}, y interface{}) TCCompareFun

type TCConvertFun

type TCConvertFun func(interface{}, int) interface{}

func GetConverterCallback

func GetConverterCallback(x interface{}) TCConvertFun

func GetStringConverter

func GetStringConverter() TCConvertFun

type TCCtx

type TCCtx struct {
	Id string
	C  cmap.Cmap
}

func MakeContext

func MakeContext() *TCCtx

func TCFillCtx

func TCFillCtx(res *TCCtx, q *deque.Deque) *TCCtx

func (*TCCtx) String

func (c *TCCtx) String() string

type TCData

type TCData struct {
	Id    string
	Stamp time.Time
	D     *dataframe.DataFrame
}

func MakeData

func MakeData() *TCData

func (*TCData) String

func (d *TCData) String() string

type TCDict

type TCDict struct {
	D *dict.Dict
}

func MakeDict

func MakeDict() *TCDict

func (*TCDict) String

func (r *TCDict) String() string

func (*TCDict) ToMap

func (r *TCDict) ToMap() map[string]interface{}

type TCError

type TCError struct {
	Msg   string
	Attrs cmap.Cmap
	Err   error
}

func MakeError

func MakeError(err interface{}, args ...interface{}) *TCError

func (*TCError) Error

func (e *TCError) Error() string

func (*TCError) String

func (e *TCError) String() string

func (*TCError) Unix

func (e *TCError) Unix() int64

type TCExecListener

type TCExecListener struct {
	*parser.BaseThreadComputationListener
	TC *TCstate
}

func (*TCExecListener) AttrByType

func (l *TCExecListener) AttrByType(x_type int, q *deque.Deque) interface{}

func (*TCExecListener) Attrs

func (l *TCExecListener) Attrs() *deque.Deque

func (*TCExecListener) EnterFun

func (l *TCExecListener) EnterFun(c *parser.FunContext)

func (*TCExecListener) EnterNs

func (l *TCExecListener) EnterNs(c *parser.NsContext)

func (*TCExecListener) EnterVal

func (l *TCExecListener) EnterVal(c *parser.ValContext)

func (*TCExecListener) ExecFunction

func (l *TCExecListener) ExecFunction(func_name string, q *deque.Deque) (interface{}, error)

func (*TCExecListener) ExecuteOperator

func (l *TCExecListener) ExecuteOperator(name string, q *deque.Deque) *TCError

func (*TCExecListener) ExecuteOperatorCommand

func (l *TCExecListener) ExecuteOperatorCommand(name string, q *deque.Deque) *TCError

func (*TCExecListener) ExecuteOperatorTyped

func (l *TCExecListener) ExecuteOperatorTyped(name string, x_type int, q *deque.Deque) *TCError

func (*TCExecListener) ExecuteSingleArgumentFunction

func (l *TCExecListener) ExecuteSingleArgumentFunction(name string, q *deque.Deque) *TCError

func (*TCExecListener) ExitFun

func (l *TCExecListener) ExitFun(c *parser.FunContext)

func (*TCExecListener) ExitNs

func (l *TCExecListener) ExitNs(c *parser.NsContext)

func (*TCExecListener) ExitPos_term

func (l *TCExecListener) ExitPos_term(c *parser.Pos_termContext)

func (*TCExecListener) ExitRequest

func (l *TCExecListener) ExitRequest()

func (*TCExecListener) ExitRequested

func (l *TCExecListener) ExitRequested() bool

func (*TCExecListener) ExitVal

func (l *TCExecListener) ExitVal(c *parser.ValContext)

func (*TCExecListener) IsFalse

func (l *TCExecListener) IsFalse() bool

func (*TCExecListener) IsTrue

func (l *TCExecListener) IsTrue() bool

func (*TCExecListener) LastEvAttr

func (l *TCExecListener) LastEvAttr() *deque.Deque

func (*TCExecListener) RegisterExitCallback

func (l *TCExecListener) RegisterExitCallback(name string, fun TCExitCbFun)

func (*TCExecListener) RunExitCallbacks

func (l *TCExecListener) RunExitCallbacks()

func (*TCExecListener) SetError

func (l *TCExecListener) SetError(msg string, args ...interface{})

type TCExecuteFun

type TCExecuteFun func(*TCExecListener, interface{}, *deque.Deque) interface{}

func GetExecuteCallback

func GetExecuteCallback(e interface{}) TCExecuteFun

type TCExitCbFun

type TCExitCbFun func(*TCExecListener)

type TCExported

type TCExported struct {
	Data []byte
}

func MakeExported

func MakeExported(d []byte) *TCExported

func MakeExportedFromBinary

func MakeExportedFromBinary(d *TCBinary) *TCExported

func (*TCExported) Export

func (r *TCExported) Export() *TCBinary

func (*TCExported) Len

func (r *TCExported) Len() int

func (*TCExported) String

func (r *TCExported) String() string

type TCExtType

type TCExtType func(interface{}) int

type TCExtTypeStr

type TCExtTypeStr func(interface{}) string

type TCFun

type TCFun func(l *TCExecListener, name string, q *deque.Deque) (interface{}, error)

type TCFunRef

type TCFunRef struct {
	Name  string
	Attrs *deque.Deque
}

func (*TCFunRef) String

func (r *TCFunRef) String() string

type TCGenFun

type TCGenFun func(interface{}) *TCIterator

func GetGenCallback

func GetGenCallback(v interface{}) TCGenFun

type TCGenericFunction

type TCGenericFunction func(interface{}) interface{}

func GetFunctionCallback

func GetFunctionCallback(name string, x interface{}) TCGenericFunction

type TCGenericOperator

type TCGenericOperator func(interface{}, interface{}) interface{}

func GetOperatorCallback

func GetOperatorCallback(name string, x interface{}, y interface{}) TCGenericOperator

type TCIO

type TCIO struct {
	L  *TCExecListener
	Id string
	D  *dict.Dict
}

func MakeIO

func MakeIO(l *TCExecListener, d interface{}) *TCIO

func (*TCIO) Add

func (r *TCIO) Add(e interface{})

func (*TCIO) String

func (r *TCIO) String() string

type TCIOReadFun

type TCIOReadFun func(*TCIO, string) *TCBinary

func TCIOGetReadRouter

func TCIOGetReadRouter(name string) TCIOReadFun

type TCIOWriteFun

type TCIOWriteFun func(*TCIO, string, interface{}) interface{}

func TCIOGetWriteRouter

func TCIOGetWriteRouter(name string) TCIOWriteFun

type TCIterator

type TCIterator struct {
	Type  int
	Gen   interface{}
	Last  interface{}
	Attrs cmap.Cmap
	// contains filtered or unexported fields
}

func BinaryGenerator

func BinaryGenerator(v interface{}) *TCIterator

func DataGenerator

func DataGenerator(v interface{}) *TCIterator

func FloatGenerator

func FloatGenerator(v interface{}) *TCIterator

func IntGenerator

func IntGenerator(v interface{}) *TCIterator

func LinesGenerator

func LinesGenerator(v interface{}) *TCIterator

func ListGenerator

func ListGenerator(v interface{}) *TCIterator

func MatrixGenerator

func MatrixGenerator(v interface{}) *TCIterator

func NumbersGenerator

func NumbersGenerator(v interface{}) *TCIterator

func RangeGenerator

func RangeGenerator(v interface{}) *TCIterator

func StringGenerator

func StringGenerator(v interface{}) *TCIterator

func (*TCIterator) Get

func (i *TCIterator) Get(name string) interface{}

func (*TCIterator) Next

func (i *TCIterator) Next() interface{}

func (*TCIterator) Prev

func (i *TCIterator) Prev() interface{}

func (*TCIterator) Set

func (i *TCIterator) Set(name string, val interface{}) interface{}

func (*TCIterator) SetTC

func (i *TCIterator) SetTC(tc *TCstate)

func (*TCIterator) String

func (i *TCIterator) String() interface{}

func (*TCIterator) TC

func (i *TCIterator) TC() *TCstate

type TCJson

type TCJson struct {
	J *gabs.Container
}

func (*TCJson) String

func (j *TCJson) String() string

type TCLines

type TCLines struct {
	Q deque.Deque
}

func MakeLines

func MakeLines(q *deque.Deque) *TCLines

func MakeLinesFromValue

func MakeLinesFromValue(d interface{}) *TCLines

func (*TCLines) Add

func (l *TCLines) Add(x interface{})

func (*TCLines) Len

func (l *TCLines) Len() int

func (*TCLines) String

func (l *TCLines) String() string

type TCList

type TCList struct {
	Q deque.Deque
}

func MakeList

func MakeList() *TCList

func TCConvertAnyToList

func TCConvertAnyToList(x interface{}) *TCList

func TCConvertDataframeToList

func TCConvertDataframeToList(x interface{}) *TCList

func TCConvertDictToList

func TCConvertDictToList(x interface{}) *TCList

func TCConvertJsonToList

func TCConvertJsonToList(x interface{}) *TCList

func TCConvertMatrixToList

func TCConvertMatrixToList(x interface{}) *TCList

func TCConvertNumbersToList

func TCConvertNumbersToList(x interface{}) *TCList

func TCConvertStringToList

func TCConvertStringToList(x interface{}) *TCList

func (*TCList) Add

func (l *TCList) Add(x interface{})

func (*TCList) Len

func (l *TCList) Len() int

func (*TCList) Numbers

func (l *TCList) Numbers() *TCNumbers

func (*TCList) String

func (l *TCList) String() string

type TCLoopParamFun

type TCLoopParamFun func(*TCExecListener, interface{}, *deque.Deque) *deque.Deque

func GetLoopPCallback

func GetLoopPCallback(x interface{}) TCLoopParamFun

type TCMathFun

type TCMathFun func(string, interface{}, interface{}) interface{}

func GetMathCallback

func GetMathCallback(x interface{}, y interface{}) TCMathFun

type TCMatrix

type TCMatrix struct {
	P float64
	M *mat.Dense
}

func (*TCMatrix) RotateLeft

func (m *TCMatrix) RotateLeft() *TCMatrix

func (*TCMatrix) RotateRight

func (m *TCMatrix) RotateRight() *TCMatrix

func (*TCMatrix) String

func (m *TCMatrix) String() string

type TCNeural

type TCNeural struct {
	Id        string
	Stamp     time.Time
	Patterns  [][][]float64
	NN        *gobrain.FeedForward
	Inputs    int
	Outputs   int
	Hidden    int
	Epoch     int
	Lr        float64
	Momentum  float64
	IsTrained bool
}

func MakeNeural

func MakeNeural() *TCNeural

func TCNeuralAddTrainSet

func TCNeuralAddTrainSet(n *TCNeural, p *TCPair) *TCNeural

func (*TCNeural) String

func (n *TCNeural) String() string

type TCNextFun

type TCNextFun func(*TCIterator) interface{}

func GetNextCallback

func GetNextCallback(v interface{}) TCNextFun

func GetNextCallbackByType

func GetNextCallbackByType(ntype int) TCNextFun

func GetPrevCallback

func GetPrevCallback(v interface{}) TCNextFun

func GetPrevCallbackByType

func GetPrevCallbackByType(ntype int) TCNextFun

type TCNone

type TCNone struct {
	Id    string
	Stamp time.Time
}

func MakeNone

func MakeNone() *TCNone

func (*TCNone) String

func (r *TCNone) String() string

type TCNumbers

type TCNumbers struct {
	P float64
	N []float64
}

func MakeNumbers

func MakeNumbers() *TCNumbers

func (*TCNumbers) Add

func (n *TCNumbers) Add(v interface{}) bool

func (*TCNumbers) Len

func (n *TCNumbers) Len() int

func (*TCNumbers) List

func (n *TCNumbers) List() *TCList

func (*TCNumbers) RotateLeft

func (n *TCNumbers) RotateLeft()

func (*TCNumbers) RotateRight

func (n *TCNumbers) RotateRight()

func (*TCNumbers) Set

func (n *TCNumbers) Set(v []float64)

func (*TCNumbers) String

func (n *TCNumbers) String() string

type TCOperatorCommand

type TCOperatorCommand func(interface{}, interface{})

func GetOperatorCmdCallback

func GetOperatorCmdCallback(name string, x interface{}, y interface{}) TCOperatorCommand

type TCPair

type TCPair struct {
	X interface{}
	Y interface{}
}

func (*TCPair) String

func (p *TCPair) String() string

type TCRange

type TCRange struct {
	X    float64
	Y    float64
	Step float64
}

func (*TCRange) String

func (r *TCRange) String() string

type TCRouterFun

type TCRouterFun func(*TCExecListener, string, *deque.Deque) (bool, interface{}, error)

type TCSizeFun

type TCSizeFun func(interface{}) int

func GetSizeCallback

func GetSizeCallback(x interface{}) TCSizeFun

type TCToListFun

type TCToListFun func(interface{}) *TCList

func GetToListCallback

func GetToListCallback(x interface{}) TCToListFun

type TCToStringFun

type TCToStringFun func(interface{}) string

func GetToStringCallback

func GetToStringCallback(x interface{}) TCToStringFun

type TCValue

type TCValue struct {
	Value interface{}
	Type  int
	Stamp time.Time
	TTL   int
	P     float32
}

func MakeValue

func MakeValue(v interface{}, p float32, ttl int) *TCValue

func (*TCValue) IsTrue

func (v *TCValue) IsTrue() bool

func (*TCValue) String

func (v *TCValue) String() string

type TCstate

type TCstate struct {
	ID string
	TC *TCstate

	HandleErr  bool
	IsDebug    bool
	IsTest     bool
	IsObserve  bool
	ErrStack   deque.Deque         // Stack of errors
	InAttr     int                 // How deep we are in attributes
	InRef      int                 // If we are in reference
	Attrs      *TwoStack           // Creating attributes
	EvAttrs    deque.Deque         // Evaluating attributes
	Res        *TwoStack           // Main stack
	ResNames   deque.Deque         // stack of stack names
	ResN       mapset.Set          // set of stack names
	Vars       cmap.Cmap           // variables
	Functions  cmap.Cmap           // Functions
	UFunctions cmap.Cmap           // User Functions
	Commands   cmap.Cmap           // Commands
	UFStack    deque.Deque         // Stack of User-defined functions
	UFNStack   deque.Deque         // Stack of names User-defined functions
	UFNB       int                 // balancing []
	CStack     deque.Deque         // Conditionals stack
	StackList  cmap.Cmap           // Reference to stacks
	StackChan  cmap.Cmap           // Reference to stack channels
	Wg         sync.WaitGroup      // Global wait group
	Pool       *gohive.PoolService // Global execution pool
	ExReq      chan bool           // Exit request channel
	IsExitReq  bool                // Exit flag
	ExitCb     *dict.Dict          // Exit callbacks
	Ctx        cmap.Cmap           // Global context
	CtxStack   deque.Deque         // Stack of local contexts
	// contains filtered or unexported fields
}

func Init

func Init() *TCstate

func (*TCstate) AddContext

func (tc *TCstate) AddContext(c interface{})

func (*TCstate) AddNewStack

func (tc *TCstate) AddNewStack(name string)

func (*TCstate) AddToUserFun

func (tc *TCstate) AddToUserFun(data string) bool

func (*TCstate) BeginConditional

func (tc *TCstate) BeginConditional(name string)

func (*TCstate) ClearErrors

func (tc *TCstate) ClearErrors()

func (*TCstate) DelContext

func (tc *TCstate) DelContext()

func (*TCstate) DelStack

func (tc *TCstate) DelStack(name string)

func (*TCstate) Dict

func (tc *TCstate) Dict() *TCDict

func (*TCstate) DropLastStack

func (tc *TCstate) DropLastStack() error

func (*TCstate) EndConditional

func (tc *TCstate) EndConditional(name string) bool

func (*TCstate) EndUserFun

func (tc *TCstate) EndUserFun() (string, error)

func (*TCstate) Error

func (tc *TCstate) Error() string

func (*TCstate) Errors

func (tc *TCstate) Errors() int

func (*TCstate) Eval

func (tc *TCstate) Eval(code string) *TCstate

func (*TCstate) ExecuteCode

func (tc *TCstate) ExecuteCode(c *TCCode) error

func (*TCstate) ExitRequested

func (tc *TCstate) ExitRequested() bool

func (*TCstate) FinishUserFun

func (tc *TCstate) FinishUserFun() bool

func (*TCstate) FromContext

func (tc *TCstate) FromContext(name string, data interface{}) interface{}

func (*TCstate) Get

func (tc *TCstate) Get() interface{}

func (*TCstate) GetAsString

func (tc *TCstate) GetAsString() string

func (*TCstate) GetCommand

func (tc *TCstate) GetCommand(name string) TCFun

func (*TCstate) GetContext

func (tc *TCstate) GetContext(name string) interface{}

func (*TCstate) GetFunction

func (tc *TCstate) GetFunction(name string) TCFun

func (*TCstate) GetUserFunCode

func (tc *TCstate) GetUserFunCode(fname string) (string, error)

func (*TCstate) GetVariable

func (tc *TCstate) GetVariable(name string) (interface{}, error)

func (*TCstate) GoEval

func (tc *TCstate) GoEval(code string) *TCstate

func (*TCstate) HasVariable

func (tc *TCstate) HasVariable(name string) bool

func (*TCstate) HaveAttrs

func (tc *TCstate) HaveAttrs() bool

func (*TCstate) HaveCommand

func (tc *TCstate) HaveCommand(name string) bool

func (*TCstate) HaveContext

func (tc *TCstate) HaveContext(name string) bool

func (*TCstate) HaveFunction

func (tc *TCstate) HaveFunction(name string) bool

func (*TCstate) HaveStack

func (tc *TCstate) HaveStack(name string) bool

func (*TCstate) HaveUserFun

func (tc *TCstate) HaveUserFun() bool

func (*TCstate) IfConditional

func (tc *TCstate) IfConditional(name string) bool

func (*TCstate) IsInConditional

func (tc *TCstate) IsInConditional() bool

func (*TCstate) IsUserFunction

func (tc *TCstate) IsUserFunction(fname string) bool

func (*TCstate) Iterator

func (tc *TCstate) Iterator(gen interface{}) *TCIterator

func (*TCstate) Json

func (tc *TCstate) Json() *TCJson

func (*TCstate) LastContext

func (tc *TCstate) LastContext() *TCCtx

func (*TCstate) MakeError

func (tc *TCstate) MakeError(err interface{}, args ...interface{}) *TCError

func (*TCstate) MakeUserFun

func (tc *TCstate) MakeUserFun(mod string, name string) bool

func (*TCstate) Matrix

func (tc *TCstate) Matrix(q *deque.Deque) *TCMatrix

func (*TCstate) NewCode

func (tc *TCstate) NewCode() *TCCode

func (*TCstate) NewRef

func (tc *TCstate) NewRef(name string, q *deque.Deque) *TCFunRef

func (*TCstate) Numbers

func (tc *TCstate) Numbers() *TCNumbers

func (*TCstate) Pair

func (tc *TCstate) Pair(x interface{}, y interface{}) *TCPair

func (*TCstate) PositionStack

func (tc *TCstate) PositionStack(name string) error

func (*TCstate) Ready

func (tc *TCstate) Ready() bool

func (*TCstate) RegisterError

func (tc *TCstate) RegisterError(err *TCError)

func (*TCstate) RegisterExitCallback

func (tc *TCstate) RegisterExitCallback(name string, fun TCExitCbFun)

func (*TCstate) RotateStackNames

func (tc *TCstate) RotateStackNames()

func (*TCstate) Set

func (tc *TCstate) Set(x interface{})

func (*TCstate) SetCommand

func (tc *TCstate) SetCommand(name string, fun TCFun)

func (*TCstate) SetContext

func (tc *TCstate) SetContext(name string, data interface{})

func (*TCstate) SetError

func (tc *TCstate) SetError(msg string, args ...interface{})

func (*TCstate) SetFunction

func (tc *TCstate) SetFunction(name string, fun TCFun)

func (*TCstate) SetVariable

func (tc *TCstate) SetVariable(name string, data interface{})

func (*TCstate) StackLeft

func (tc *TCstate) StackLeft(n int)

func (*TCstate) StackRight

func (tc *TCstate) StackRight(n int)

func (*TCstate) StacksLeft

func (tc *TCstate) StacksLeft(n int)

func (*TCstate) StacksRight

func (tc *TCstate) StacksRight(n int)

func (*TCstate) StartLambdaFun

func (tc *TCstate) StartLambdaFun() string

func (*TCstate) StartUserFun

func (tc *TCstate) StartUserFun(name string) string

func (*TCstate) TrueErrors

func (tc *TCstate) TrueErrors() int

func (*TCstate) Value

func (tc *TCstate) Value(v interface{}, p float32, ttl int) *TCValue

type TwoStack

type TwoStack struct {
	R deque.Deque
	C cmap.Cmap

	ID     string
	Status bool
	Mode   bool
	// contains filtered or unexported fields
}

func InitTS

func InitTS() *TwoStack

Initialize new 2-dimentional stack structure

func (*TwoStack) Add

func (ts *TwoStack) Add()

func (*TwoStack) CLeft

func (ts *TwoStack) CLeft()

func (*TwoStack) CRight

func (ts *TwoStack) CRight()

func (*TwoStack) Del

func (ts *TwoStack) Del()

func (*TwoStack) Front

func (ts *TwoStack) Front() interface{}

func (*TwoStack) GLen

func (ts *TwoStack) GLen() int

func (*TwoStack) Get

func (ts *TwoStack) Get() (interface{}, error)

func (*TwoStack) Left

func (ts *TwoStack) Left()

func (*TwoStack) Len

func (ts *TwoStack) Len() int

func (*TwoStack) Normal

func (ts *TwoStack) Normal()

func (*TwoStack) PopFront

func (ts *TwoStack) PopFront() interface{}

func (*TwoStack) Q

func (ts *TwoStack) Q() *deque.Deque

func (*TwoStack) Reverse

func (ts *TwoStack) Reverse()

func (*TwoStack) Right

func (ts *TwoStack) Right()

func (*TwoStack) Set

func (ts *TwoStack) Set(data interface{})

func (*TwoStack) Take

func (ts *TwoStack) Take() (interface{}, error)

type Type

type Type struct {
	T int
}

func MakeType

func MakeType(t interface{}) *Type

func (*Type) String

func (t *Type) String() string

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL