Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)

Common Expression Language

Go Report Card GoDoc

The Common Expression Language (CEL) is a non-Turing complete language designed for simplicity, speed, safety, and portability. CEL's C-like syntax looks nearly identical to equivalent expressions in C++, Go, Java, and TypeScript.

// Check whether a resource name starts with a group name.
resource.name.startsWith("/groups/" + auth.claims.group)
// Determine whether the request is in the permitted time window.
request.time - resource.age < duration("24h")
// Check whether all resource names in a list match a given filter.
auth.claims.email_verified && resources.all(r, r.startsWith(auth.claims.email))

A CEL "program" is a single expression. The examples have been tagged as java, go, and typescript within the markdown to showcase the commonality of the syntax.

CEL is ideal for lightweight expression evaluation when a fully sandboxed scripting language is too resource intensive. To get started, try the Codelab.

A dashboard that shows results of cel-go conformance tests can be found here.



Overview

Determine the variables and functions you want to provide to CEL. Parse and check an expression to make sure it's valid. Then evaluate the output AST against some input. Checking is optional, but strongly encouraged.

Environment Setup

Let's expose name and group variables to CEL using the cel.Declarations environment option:

import(
    "github.com/google/cel-go/cel"
    "github.com/google/cel-go/checker/decls"
)

env, err := cel.NewEnv(
    cel.Declarations(
        decls.NewVar("name", decls.String),
        decls.NewVar("group", decls.String)))

That's it. The environment is ready to be use for parsing and type-checking. CEL supports all the usual primitive types in addition to lists, maps, as well as first-class support for JSON and Protocol Buffers.

Parse and Check

The parsing phase indicates whether the expression is syntactically valid and expands any macros present within the environment. Parsing and checking are more computationally expensive than evaluation, and it is recommended that expressions be parsed and checked ahead of time.

The parse and check phases are combined for convenience into the Compile step:

ast, issues := env.Compile(`name.startsWith("/groups/" + group)`)
if issues != nil && issues.Err() != nil {
    log.Fatalf("type-check error: %s", issues.Err())
}
prg, err := env.Program(ast)
if err != nil {
    log.Fatalf("program construction error: %s", err)
}

The cel.Program generated at the end of parse and check is stateless, thread-safe, and cachable.

Type-checking in an optional, but strongly encouraged, step that can reject some semantically invalid expressions using static analysis. Additionally, the check produces metadata which can improve function invocation performance and object field selection at evaluation-time.

Macros

Macros are optional but enabled by default. Macros were introduced to support optional CEL features that might not be desired in all use cases without the syntactic burden and complexity such features might desire if they were part of the core CEL syntax. Macros are expanded at parse time and their expansions are type-checked at check time.

For example, when macros are enabled it is possible to support bounded iteration / fold operators. The macros all, exists, exists_one, filter, and map are particularly useful for evaluating a single predicate against list and map values.

// Ensure all tweets are less than 140 chars
tweets.all(t, t.size() <= 140)

The has macro is useful for unifying field presence testing logic across protobuf types and dynamic (JSON-like) types.

// Test whether the field is a non-default value if proto-based, or defined
// in the JSON case.
has(message.field)

Both cases traditionally require special syntax at the language level, but these features are exposed via macros in CEL.

Evaluate

Now, evaluate for fun and profit. The evaluation is thread-safe and side-effect free. Many different inputs can be send to the same cel.Program and if fields are present in the input, but not referenced in the expression, they are ignored.

// The `out` var contains the output of a successful evaluation.
// The `details' var would contain intermediate evaluation state if enabled as
// a cel.ProgramOption. This can be useful for visualizing how the `out` value
// was arrive at.
out, details, err := prg.Eval(map[string]interface{}{
    "name": "/groups/acme.co/documents/secret-stuff",
    "group": "acme.co"})
fmt.Println(out) // 'true'

Partial State

What if name hadn't been supplied? CEL is designed for this case. In distributed apps it is not uncommon to have edge caches and central services. If possible, evaluation should happen at the edge, but it isn't always possible to know the full state required for all values and functions present in the CEL expression.

To improve the odds of successful evaluation with partial state, CEL uses commutative logical operators &&, ||. If an error or unknown value (not the same thing) is encountered on the left-hand side, the right hand side is evaluated also to determine the outcome. While it is possible to implement evaluation with partial state without this feature, this method was chosen because it aligns with the semantics of SQL evaluation and because it's more robust to evaluation against dynamic data types such as JSON inputs.

In the following truth-table, the symbols <x> and <y> represent error or unknown values, with the ? indicating that the branch is not taken due to short-circuiting. When the result is <x, y> this means that the both args are possibly relevant to the result.

Expression Result
false && ? false
true && false false
<x> && false false
true && true true
true && <x> <x>
<x> && true <x>
<x> && <y> <x, y>
true || ? true
false || true true
<x> || true true
false || false false
false || <x> <x>
<x> || false <x>
<x> || <y> <x, y>

In the cases where unknowns are expected, cel.EvalOptions(cel.OptTrackState) should be enabled. The details value returned by Eval() will contain the intermediate evaluation values and can be provided to the interpreter.Prune function to generate a residual expression. e.g.:

// Residual when `name` omitted:
name.startsWith("/groups/acme.co")

This technique can be useful when there are variables that are expensive to compute unless they are absolutely needed. This functionality will be the focus of many future improvements, so keep an eye out for more goodness here!

Errors

Parse and check errors have friendly error messages with pointers to where the issues occur in source:

ERROR: <input>:1:40: undefined field 'undefined'
    | TestAllTypes{single_int32: 1, undefined: 2}
    | .......................................^`,

Both the parsed and checked expressions contain source position information about each node that appears in the output AST. This information can be used to determine error locations at evaluation time as well.

Install

CEL-Go supports modules and uses semantic versioning. For more info see the Go Modules docs.

And of course, there is always the option to build from source directly.

Common Questions

Why not JavaScript, Lua, or WASM?

JavaScript and Lua are rich languages that require sandboxing to execute safely. Sandboxing is costly and factors into the "what will I let users evaluate?" question heavily when the answer is anything more than O(n) complexity.

CEL evaluates linearly with respect to the size of the expression and the input being evaluated when macros are disabled. The only functions beyond the built-ins that may be invoked are provided by the host environment. While extension functions may be more complex, this is a choice by the application embedding CEL.

But, why not WASM? WASM is an excellent choice for certain applications and is far superior to embedded JavaScript and Lua, but it does not have support for garbage collection and non-primitive object types require semi-expensive calls across modules. In most cases CEL will be faster and just as portable for its intended use case, though for node.js and web-based execution CEL too may offer a WASM evaluator with direct to WASM compilation.

Do I need to Parse and Check?

Checking is an optional, but strongly suggested, step in CEL expression validation. It is sufficient in some cases to simply Parse and rely on the runtime bindings and error handling to do the right thing.

Where can I learn more about the language?

  • See the CEL Spec for the specification and conformance test suite.
  • Ask for support on the CEL Go Discuss Google group.

Where can I learn more about the internals?

  • See GoDoc to learn how to integrate CEL into services written in Go.
  • See the CEL C++ toolchain (under development) for information about how to integrate CEL evaluation into other environments.

How can I contribute?

Some tests don't work with go test?

A handful of tests rely on Bazel. In particular dynamic proto support at check time and the conformance test driver require Bazel to coordinate the test inputs:

bazel test ...

License

Released under the Apache License.

Disclaimer: This is not an official Google product.

Comments
  • Resolve multiple packages with cel.Container

    Resolve multiple packages with cel.Container

    Feature request checklist

    • [X] There are no issues that match the desired change
    • [ ] The change is large enough it can't be addressed with a simple Pull Request
    • [ ] If this is a bug, please file a Bug Report.

    Change

    Currently, cel.Container can be used to specify a namespace for symbol resolution. For example:

    env, _ := cel.NewEnv(
    	cel.Container("a"),
    	cel.Types(&apb.A{}),
    )
    ast, _ := env.Compile("A{}")
    prg, _ := env.Program(ast)
    prg.Eval(map[string]interface{}{})
    

    In order to write programs that reference multiple protobuf packages, we are forced to use fully qualified names for types outside the container:

    env, _ := cel.NewEnv(
    	cel.Container("a"),
    	cel.Types(&apb.A{}, &bpb.B{}),
    )
    ast, _ := env.Compile("b.B{}")
    prg, _ := env.Program(ast)
    prg.Eval(map[string]interface{}{})
    

    Example

    We should provide the ability to resolve multiple namespaces. There are two options:

    1. Container could take multiple package names:
    func Container(pkgs ...string) EnvOption
    
    1. Env could be initialized with a custom packages.Packager:
    func Package(pkg packages.Packager) EnvOption
    

    Alternatives considered

    It’s possible that both these methods would be useful. Here is a sample implementation:

    package cel
    
    func Container(pkgs ...string) EnvOption {
    	return func(e *Env) (*Env, error) {
    		return e.Package(packages.NewPackage(pkgs...))
    	}
    }
    
    func Package(pkg packages.Packager) EnvOption {
    	return func(e *Env) (*Env, error) {
    		e.pkg = pkg
    		return e, nil
    	}
    }
    
    //////
    
    package packages
    
    type defaultPackage struct {
    	pkgs []string
    }
    
    func NewPackage(pkgs ...string) packages.Packager {
    	seen := make(map[string]bool, len(pkgs))
    
    	var p defaultPackage
    	for _, pkg := range pkgs {
    		if seen[pkg] {
    			continue
    		}
    		p.pkgs = append(p.pkgs, p.pkgs)
    		seen[pkg] = true
    	}
    	return &p
    }
    
    func (p *defaultPackage) Package() string {
    	return strings.Join(p.pkgs, " ")
    }
    
    func (p *defaultPackage) ResolveCandidateNames(name string) []string {
    	if strings.HasPrefix(name, ".") {
    		return []string{name[1:]}
    	}
    
    	if len(p.pkg) == 0 {
    		return []string{name}
    	}
    
    	for _, nextPkg := range p.pkgs {
    		candidates := []string{nextPkg + "." + name}
    		for i := strings.LastIndex(nextPkg, "."); i >= 0; i = strings.LastIndex(nextPkg, ".") {
    			nextPkg = nextPkg[:i]
    			candidates = append(candidates, nextPkg+"."+name)
    		}
    	}
    
    	return append(candidates, name)
    }
    
  • Create an extension library for working with strings

    Create an extension library for working with strings

    This code is based on FR #306 which requested support for built-in substrings. While substrings are not part of the core CEL spec, such functions are a common ask and the following is an implementation of such functions as extensions which can be layered onto the core CEL spec.

    Closes #306

  • Fix nested CallExpr cost estimation

    Fix nested CallExpr cost estimation

    This PR fixes instances where cost estimation is used on expressions where a CallExpr is nested inside of another CallExpr and math.MaxUint64 is incorrectly returned. The test case included with this PR shows an example of where this can happen; == is treated as a function call/CallExpr, and will call sizeEstimate on its left and right-hand expressions. sizeEstimate will then try to call AstNode.ComputedSize before trying EstimateSize and finally returning math.MaxUint64 for an upper limit.

    That constant will get returned for operator-based CallExprs inside CallExprs whenever the inner one lacks an EstimateSize, such as with list.size(). Instead, this PR checks for CallExpr inside SizeEstimate and returns a min/max cost of 1.

    The original issue was first reported in https://github.com/kubernetes/kubernetes/issues/111769.

  • Allow building Ast with textual contents

    Allow building Ast with textual contents

    Unless I am missing something, it is currently not possible to build an Ast from an exprpb.ParsedExpr or exprpb.CheckedExpr with source contents. As a consequence, if an Ast built from ParsedExprToAst or CheckedExprToAst is checked or executed, the error messages will not show code snippets.

    Introduce a CheckedExprToAstWithSource and ParsedExprToAstWithSource to allow providing the source contents.

  • Optimize type conversion functions.

    Optimize type conversion functions.

    Unary type-conversion functions with literal arguments should be evaluated eagerly when the cel.EvalOptions(cel.OptOptimize) flag is set. The conversion will also ensure that if an error is encountered when evaluating these functions, such as when constructing timestamps or durations from strings, the evaluation will result in an error in the env.Program call.

    This is not a perfect fix for #359, but it can be used to assist with correctness checks.

  • Comparing timestamps?

    Comparing timestamps?

    Hi, sorry for the lame question -- how can I compare timestamps using CEL + this library?

    I tried timestamp(0) == timestamp(0) but I get false every time.

    Is there a reference I could read about how to do this?

  • Reject dyn inputs to strongly typed functions at check time.

    Reject dyn inputs to strongly typed functions at check time.

    We're evaluating this for our filter expressions and we found a weird behaviour which I don't know if its related to our environment or the lib itself. The issue comes when using the in operator and defining a list with different types. As far as i know, the parsed expression checking enforces this by default, or this is what i understood by reading this paragraph on the langdef spec:

    The type checker also introduces the dyn type, which is the union of all other types. Therefore the type checker could accept a list of heterogeneous values as dyn([1, 3.14, "foo"]), which is tiven the type list(dyn). The standard function dyn has no effect at runtime, but signals to the type checker that its argument should be considered of type dyn, list(dyn), or a dyn-valued map.

    Take this as an example:

    • Declare Parser
    // Parser is our expr parser
    type Parser struct {
    	env *checker.Env
    }
    
    // NewParser instantiates the Parser object
    func NewParser(message proto.Message, allowedFields []string) (*Parser, error) {
    	// attach protobuf & initialize env
    	pkg := proto.MessageName(message)
    	typeProvider := types.NewProvider(message)
    	exprType := decls.NewObjectType(pkg)
    
    	// create standard env
    	env := checker.NewEnv(packages.NewPackage(pkg), typeProvider)
    	if err := env.Add(standardDeclarations()...); err != nil {
    		return nil, err
    	}
    
    	// add types tailored to our specific use-case.
    	for _, filterable := range allowedFields {
    		fieldType, ok := typeProvider.FindFieldType(exprType, filterable)
    		if !ok {
    			return nil, fmt.Errorf("expr: couldn't find field %s", filterable)
    		}
    		err := env.Add(decls.NewIdent(filterable, fieldType.Type, nil))
    		if err != nil {
    			return nil, err
    		}
    	}
    
    	return &Parser{env: env}, nil
    }
    
    func standardDeclarations() []*exprpb.Decl {
    	return []*exprpb.Decl{
    		decls.NewFunction(operators.LogicalAnd,
    			decls.NewOverload(overloads.LogicalAnd,
    				[]*exprpb.Type{decls.Bool, decls.Bool}, decls.Bool)),
    		decls.NewFunction(operators.LogicalOr,
    			decls.NewOverload(overloads.LogicalOr,
    				[]*exprpb.Type{decls.Bool, decls.Bool}, decls.Bool)),
    		decls.NewFunction(operators.Equals,
    			decls.NewOverload(overloads.Equals,
    				[]*exprpb.Type{decls.String, decls.String}, decls.Bool)),
    		decls.NewFunction(operators.In,
    			decls.NewOverload(overloads.InList,
    				[]*exprpb.Type{decls.String, decls.NewListType(decls.String)}, decls.Bool)),
    	}
    }
    
    • Parse filter
    // Parse produces a database friendly expr from a cel string expr
    func (e *Parser) Parse(filter string) (*Expr, error) {
    	if filter == "" {
    		return nil, nil
    	}
    	// parse expr
    	src := common.NewTextSource(filter)
    	expr, errs := parser.Parse(src)
    	if len(errs.GetErrors()) != 0 {
    		return nil, errors.New(errs.ToDisplayString())
    	}
    
    	// check expr against env
    	checkedExpr, errs := checker.Check(expr, src, e.env)
    	if len(errs.GetErrors()) != 0 {
    		return nil, errors.New(errs.ToDisplayString())
    	}
    
    	return &Expr{expr: checkedExpr.Expr}, nil
    }
    

    I would expect the checker to fail but it returns the checked expression without complaining.

    Can anyone point to the right direction if i'm missing something?

    Thanks for this great library by the way.

  • Runtime cost calculation

    Runtime cost calculation

    Introduce runtime cost calculation into CEL.

    The work is part of this issue

    The current PR includes:

    • Add runtime cost calculation into evaluation path
    • Test to verify runtime cost calculation
    • Test to verify runtime cost fell into estimation cost range
    • Test to allow cost calculation for extension function

    Todo in following PR:

    • Add cancellation
    • Add more test for large input
    • Add test coverage for aligning runtime cost with estimate cost
  • Update README.md

    Update README.md

    Hi,

    Awesome project 😀 But I found this in README.md:

    ... https://github.com/antonmedv/expr ... StartsWith(name, Concat("/groups/", group)) // Expr BenchmarkExpr-8 1000000 1402 ns/op

    Please, update README.md with new results:

    ❯❯❯ go test -bench=startswith
    goos: darwin
    goarch: amd64
    pkg: github.com/antonmedv/golang-expression-evaluation-comparison
    Benchmark_celgo_startswith-8   	 3000000	       466 ns/op
    Benchmark_expr_startswith-8    	 5000000	       362 ns/op
    PASS
    ok  	github.com/antonmedv/golang-expression-evaluation-comparison	4.081s
    
  • go get or go build does not work for repo

    go get or go build does not work for repo

    Describe the bug As mentioned in https://github.com/google/cel-go#install

    go mod init <my-cel-app>
    go build ./...
    

    or

    go get -u github.com/google/cel-go/...
    

    Does not work and results in the following error:

    go build -o myproj.bin -v
    go: finding github.com/google/cel-go/interpreter/functions latest
    go: finding github.com/google/cel-go/common/types latest
    go: finding github.com/google/cel-go/cel latest
    go: finding github.com/google/cel-go/common/types/ref latest
    go: finding github.com/google/cel-go/checker/decls latest
    go: finding github.com/google/cel-go/interpreter latest
    go: finding github.com/google/cel-go/common latest
    Fetching https://github.com?go-get=1
    go: finding github.com/google/cel-go/checker latest
    Parsing meta tags from https://github.com?go-get=1 (status code 200)
    build company.tech/rhnvrm/myproj cannot load github.com/google/cel-go/cel: cannot find module providing package github.com/google/cel-go/cel
    
    go get -u github.com/google/cel-go/...
    ...
    go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
    

    To fix this for now, I have done a git clone and added a replace directive

    This is my go.mod

    module company.tech/rhnvrm/myproj
    
    go 1.12
    
    require (
    	github.com/golang/protobuf v1.3.0
    	github.com/google/cel-go v0.2.0
    	google.golang.org/genproto v0.0.0-20190227213309-4f5b463f9597
    )
    
    replace github.com/google/cel-go v0.2.0 => ./celgo
    
  • Speculative optimization: Use custom string serializer for Type

    Speculative optimization: Use custom string serializer for Type

    It seems that the generic text proto CompactStringMarshal is more expensive that hand-made one. Looking for feedback. I think we probably want to use a Struct as a hashmap key, but that would require building a new family of structs mirroring Types, since using proto Type does not seem to work.

  • No way to check for existence of dictionary key that isn't expressible as `[a-zA-Z][a-zA-Z0-9_]*`

    No way to check for existence of dictionary key that isn't expressible as `[a-zA-Z][a-zA-Z0-9_]*`

    Describe the bug

    There doesn't appear to be a syntax for checking the existence of a key in a dictionary if the key contains characters that are disallowed in field names. For example "foo/bar".

    I have reviewed the documentation from the language spec and it seems you're supposed to be able to invoke via:

    has(foo.x)
    

    to check the existence of x on the foo object. I infer from that example that a user would use the standard access pattern and that the interpreter would handle the conversion for you. That is to say that if foo.x is a map[string]string you would like to check for key existence, you might try:

    has(foo.x["bar"])
    

    To Reproduce Check which components this affects:

    I think it's the interpreter, but I'm not entirely sure. Sorry!

    • [ ] parser
    • [ ] checker
    • [X] interpreter

    Sample expression and input that reproduces the issue:

    // sample expression string
    

    Test setup:

    Add a test case to interpreter/interpreter_test.go:

        { // N.B. this one passes already, so the setup is sane-ish
          name:      "has_able_to_detect_maps_with_complex_keys_success",
          container: "google.expr.proto3.test",
          types:     []proto.Message{&proto3pb.TestAllTypes{}},
          expr: `has(TestAllTypes{
            map_string_string: {
              'hello': 'world',
            },
          }.map_string_string.hello)`,
          out: types.True,
        },
        {
    /* This testcase fails with: 
        interpreter_test.go:1579: has_able_to_detect_maps_with_complex_keys_attempt_1: ERROR: <input>:1:4: invalid argument to has() macro
             | has(TestAllTypes{
             | ...^
    */
          name:      "has_able_to_detect_maps_with_complex_keys_attempt_1",
          container: "google.expr.proto3.test",
          types:     []proto.Message{&proto3pb.TestAllTypes{}},
          expr: `has(TestAllTypes{
            map_string_string: {
              'hello/world': 'moo',
            },
          }.map_string_string["hello/world"])`,
        },
        {
    /* This testcase fails with: 
        interpreter_test.go:1585: has_able_to_detect_maps_with_complex_keys_attempt_2: ERROR: <input>:1:4: invalid argument to has() macro
             | has(TestAllTypes{
             | ...^
    */
          name:      "has_able_to_detect_maps_with_complex_keys_attempt_2",
          container: "google.expr.proto3.test",
          types:     []proto.Message{&proto3pb.TestAllTypes{}},
          expr: `has(TestAllTypes{
            map_string_string: {
              'hello/world': 'moo',
            },
          }.map_string_string.hello/world)`,
        },
    

    Expected behavior

    A function for checking the existence of a map key.

    Additional context

    I think this is possibly solvable by creating my own macro that takes an dict (map[string]any) and a key (in this case string) and returns an any iff the key exists, otherwise returns a default value. Is there a better way to approach this without extending the language with my own macro?

  • [WIP] Add string.format

    [WIP] Add string.format

    This PR adds a format receiver function to CEL strings. The syntax is similar to Python's str.format; {n} is replaced with the nth argument passed to format, so "this {0} a {1}".format(["is", "test"]) turns into "this is a test".

  • How to validate the array of self-defination struct?

    How to validate the array of self-defination struct?

    I have a self-defination struct like this

    type student {
        name string
        age int
    }
    

    then, I generate a array of "student"

    students := make([]*student, 0)
    students = append(students, &student{"123",18}),
    students = append(students, &student{"456",19}),
    students = append(students, &student{"789",20}),
    

    if the age of all the students is more than 17,it returns true,otherwise,returns false What should I do?

  • Normalize error messages from ANTLR

    Normalize error messages from ANTLR

    Feature request checklist

    • [X] There are no issues that match the desired change
    • [X] The change is large enough it can't be addressed with a simple Pull Request
    • [ ] If this is a bug, please file a Bug Report.

    Change Currently, when parse errors are detected, the ANTLR error message is passed through from CEL to the caller with some additional formatting to highlight where the error occurs. A recent update to the CEL grammar resulted in a shift in the error information from ANTLR which has the potential to break upstream tests relying on the exact contents of the original error from ANTLR.

    Example Introduce a flag-guarded change to normalize error messages from ANTLR in order to ensure that errors can be kept consistent even in the face of grammar updates.

    Alternatives considered Strip all ANTLR error messages and replace them with a general "invalid syntax" message since the error from ANTLR itself is not always easy to comprehend.

  • Replace `exprpb.Type` references with `cel.Type`

    Replace `exprpb.Type` references with `cel.Type`

    Feature request checklist

    • [X] There are no issues that match the desired change
    • [X] The change is large enough it can't be addressed with a simple Pull Request
    • [ ] If this is a bug, please file a Bug Report.

    Change The top-level API currently emphasizes using cel.Type values rather than exprpb.Type values in an effort to reduce the protobuf surface area visible on the cel-go APIs. However, the ref.TypeProvider currently exposes a method to FindType and FindFieldType which return an exprpb.Type. This interface is used by a handful of customers to extend the CEL type-system, and creates a disconnect between the top-level API and the extensions.

    The change should introduce a new TypeProvider which can wrap the old style and produce cel.Type values from these methods for use within the type-checker and runtimes.

    Alternatives considered Provide new methods on the existing TypeProvider interface.

    • Functional, but would be a breaking API change for existing users.
    • Introduces a more complex migration burden of having to support both the old and new-style methods.
  • Support context propagation on overloads

    Support context propagation on overloads

    These changes introduce :

    • a new interface functions.Overloader for keeping compatiblity with already defined functions.Overload structures
    • a new structure functions.ContextOverload for defining context capable overloads
    • the extension of the interpreter.Activation interface with context.Context
    • a small test for checking that context cancellation can be catched with underlying overloads

    The idea was to keep API compatibility while propagating the execution context to overload functions.

    Resolves #557

Expression evaluation in golang
Expression evaluation in golang

Gval Gval (Go eVALuate) provides support for evaluating arbitrary expressions, in particular Go-like expressions. Evaluate Gval can evaluate expressio

Dec 27, 2022
A fast script language for Go
A fast script language for Go

The Tengo Language Tengo is a small, dynamic, fast, secure script language for Go. Tengo is fast and secure because it's compiled/executed as bytecode

Dec 30, 2022
🦁 A Super fast and lightweight runtime for JavaScript Scripts

Kimera.js - A super fast and lightweight JavaScript Runtime for Scripts.

Aug 14, 2022
Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)

Common Expression Language The Common Expression Language (CEL) is a non-Turing complete language designed for simplicity, speed, safety, and portabil

Dec 24, 2022
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing

Expr Expr package provides an engine that can compile and evaluate expressions. An expression is a one-liner that returns a value (mostly, but not lim

Jan 1, 2023
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing

Expr Expr package provides an engine that can compile and evaluate expressions. An expression is a one-liner that returns a value (mostly, but not lim

Dec 30, 2022
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing
Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing

Expr Expr package provides an engine that can compile and evaluate expressions. An expression is a one-liner that returns a value (mostly, but not lim

Dec 30, 2022
Go-turing-i2c-cmdline - Controlling the i2c management bus of the turing pi with i2c works fine

go-turing-i2c-cmdline What is it? Controlling the i2c management bus of the turi

Jan 24, 2022
poCo: portable Containers. Create statically linked, portable binaries from container images (daemonless)
poCo: portable Containers. Create statically linked, portable binaries from container images (daemonless)

poCo Containers -> Binaries Create statically linked, portable binaries from container images A simple, static golang bundler! poCo (portable-Containe

Oct 25, 2022
Expression evaluation in golang
Expression evaluation in golang

Gval Gval (Go eVALuate) provides support for evaluating arbitrary expressions, in particular Go-like expressions. Evaluate Gval can evaluate expressio

Dec 27, 2022
Expression evaluation in golang
Expression evaluation in golang

Gval Gval (Go eVALuate) provides support for evaluating arbitrary expressions, in particular Go-like expressions. Evaluate Gval can evaluate expressio

Dec 27, 2022
Arbitrary expression evaluation for golang

govaluate Provides support for evaluating arbitrary C-like artithmetic/string expressions. Why can't you just write these expressions in code? Sometim

Jan 2, 2023
Simple expression evaluation engine for Go

??️ chili Currently in development, Unstable (API may change in future) Simple expression evaluation engine. Expression is one liner that evalutes int

Nov 8, 2022
A blazingly-fast simple-to-use tool to find duplicate files on your computer, portable hard drives etc.

A fast and simple tool to find duplicate files (photos, videos, music, documents) on your computer, portable hard drives etc.

Jan 9, 2023
An implementation of Neural Turing Machines
An implementation of Neural Turing Machines

Neural Turing Machines Package ntm implements the Neural Turing Machine architecture as described in A.Graves, G. Wayne, and I. Danihelka. arXiv prepr

Sep 13, 2022
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.

gev 中文 | English gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily bui

Jan 6, 2023
An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.

ozzo-routing You may consider using go-rest-api to jumpstart your new RESTful applications with ozzo-routing. Description ozzo-routing is a Go package

Dec 31, 2022
Lightweight, fast and dependency-free Cron expression parser (due checker) for Golang (tested on v1.13 and above)

adhocore/gronx gronx is Golang cron expression parser ported from adhocore/cron-expr. Zero dependency. Very fast because it bails early in case a segm

Dec 30, 2022
A terminal based typing test.
A terminal based typing test.

What A terminal based typing test. Installation Linux sudo curl -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt-linux -o /usr/local/bin/tt

Dec 28, 2022
Serverless SOAR (Security Orchestration, Automation and Response) framework for automatic inspection and evaluation of security alert
Serverless SOAR (Security Orchestration, Automation and Response) framework for automatic inspection and evaluation of security alert

DeepAlert DeepAlert is a serverless framework for automatic response of security alert. Overview DeepAlert receives a security alert that is event of

Jan 3, 2023