Kocircuit
Ko: A generic type-safe language for concurrent, stateful, deadlock-free systems and protocol manipulations
Install / Use
/learn @kocircuit/KocircuitREADME
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).
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
339.5kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
