ko

package module
v0.0.0-...-dc6f9f8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

README

Build Status

Ko

Experimental

The Ko language, library & tools are in active development, so do expect things to change.

Introduction

Ko is a concurrent, immutable, functional language.

Ko is both generic (function arguments and return values do not declare types) and type-safe (a new static-type inference algorithm ensures deep static type safety everywhere).

Ko is built on top of the Go runtime, in order to benefit from Go's rich ecosystem of integrations with industrial technologies.

Existing Go libraries and clients can be "exposed" in Ko with little relative effort. Protocol definitions, like Protocol Buffers or OpenAPI, can also be exposed in Ko using simple code-generation.

Getting started

To install the Ko interpreter, run:

go get -u github.com/kocircuit/kocircuit/lang/ko

Learning Ko

Perhaps the best way to learn the language is by reading sequentially through our step-by-step lessons.

Design, specifications and theory

An initial formal specification of the language (its underlying computational model, its syntax and its type system) can be found in the evolving Ko Handbook.

Why use Ko?

There are four main aspects of Ko which make it an interesting proposal:

  • Language. Ko is generic and at the same time entirely type-safe. Genericity means that functions do not have to declare argument and return value types, which makes them highly reusable. At the same time, when entire Ko programs are compiled against external protocols, services or types, they are fully-verified for type compliance.

  • Types. Ko uses a type-system which is the common denominator of industry protocol standards, like Protocol Buffers, Thrift, OpenAPI, and so on. These type systems are captured by structures, sequences (repeated types), primitive types, optional types and map types. This type system is already familiar to most programmers.

  • Architecture. The forthcoming Ko compiler compiles Ko programs to a high-level intermediate representation (IR) which can be used to code-generate an actual implementation in any language (e.g. Go, Java, C++, etc.) with relatively little effort. The IR produced by the Ko compiler is a collection of functions in SSA form, with deep type annotations everywhere.

  • Integrations. The Ko interpreter, being built on top of Go, can gain access to any technology available in Go by binding dynamically to it with little effort. This includes libraries and clients written in Go, as well as standards like Protocol Buffers and OpenAPI which have bindings for Go. The forthcoming Ko compiler, being a code-generating technology, can benefit from integrations with any target language, as described in the architecture bullet (above).

Documentation

Index

Constants

View Source
const KoVersion = "R0"

Variables

This section is empty.

Functions

func SanitizeKoCompilerSourcePath

func SanitizeKoCompilerSourcePath(file string) string

Types

This section is empty.

Directories

Path Synopsis
bootstrap
asm/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
integrate/shapers/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
source/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
types/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
lang
circuit/ir/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
circuit/kahnsort
Package kahnsort provides topological sorting using Kahn's algorithm.
Package kahnsort provides topological sorting using Kahn's algorithm.
go/eval
Package eval provides evaluation of Ko circuits.
Package eval provides evaluation of Ko circuits.
go/eval/symbol/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
ko
lib
os

Jump to

Keyboard shortcuts

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