Clojure-esque extension language for Go.

Squishy loafer

Tests

let-go

Greetings loafers! (λ-gophers haha, get it?)

This is supposed to be a compiler and bytecode VM for a language resembling Clojure as close as possible.

Now, I know about candid82/joker and I 💛 it. Though, it has some drawbacks and design choices that I'd like to avoid.

Here are some nebulous goals in no particular order:

  • Quality entertainment,
  • Implement as much of Clojure as possible - including persistent data types and true concurrency,
  • Provide comfy two-way interop for arbitrary functions and types,
  • Serve primarily as an embedded extension language,
  • Standalone interpreter mode and AOT (let-go -> standalone binary) would be nice eventually,
  • Strech goal: let-go bytecode -> Go translation.

Here are the non goals:

  • Stellar performance,
  • Being a drop-in replacement for clojure/clojure at any point,
  • Being a linter/formatter/tooling for Clojure in general.

Current status

It doesn't do much yet - just started laying down the basics. Come back in a couple of months to see cool demos.

See compiler tests if you're really interested.

Owner
Marcin Gasperowicz
Your average programming language tourist.
Marcin Gasperowicz
Similar Resources

⚙️ A k6 extension for Tarantool

xk6-tarantool This is a k6 extension using the xk6 system. ❗ This is a proof of concept, isn't supported by the k6 team, and may break in the future.

Nov 29, 2022

Worker failover support for PostgreSQL Citus extension using pg_auto_failover.

citus-failover Worker failover support for citus community version using pg_auto_failover. What is this? This is a simple service to monitor changes i

Dec 7, 2022

Lambda Extension for iamlive

iamlive Lambda Extension The iamlive Lambda Extension helps generate a least-privilege IAM policy by monitoring the AWS calls made within the Lambda e

Dec 17, 2022

Kubernetes OS Server - Kubernetes Extension API server exposing OS configuration like sysctl via Kubernetes API

KOSS is a Extension API Server which exposes OS properties and functionality using Kubernetes API, so it can be accessed using e.g. kubectl. At the moment this is highly experimental and only managing sysctl is supported. To make things actually usable, you must run KOSS binary as root on the machine you will be managing.

May 19, 2021

k6 prometheus output extension

xk6-prometheus A k6 extension implements Prometheus HTTP exporter as k6 output extension. Using xk6-prometheus output extension you can collect metric

Nov 22, 2022

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

Introduction General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game. Features Compatible with a

Aug 19, 2022

Standalone client for proxies of Windscribe browser extension

windscribe-proxy Standalone Windscribe proxy client. Younger brother of opera-proxy. Just run it and it'll start a plain HTTP proxy server forwarding

Dec 29, 2022

An extension for the GitHub Cli application that displays your current contribution graph

An extension for the GitHub Cli application that displays your current contribution graph

gh-graph An extension for the GitHub Cli application that displays your current contribution graph in the terminal (logged out contribution graph) Ins

Sep 29, 2021

An extension for discordgo to create a Discord bot quickly using the Builder pattern.

botbuilder An extension for discordgo to create a Discord bot quickly using the Builder pattern. Example usage: package main import ( "log" "os"

Oct 12, 2022

Small gh extension that suggests issues to work on in a given GitHub repository

gh contribute being a gh extension for finding issues to help with in a GitHub repository. This extension suggests an issue in a given repository to w

Dec 24, 2022

entviz is an ent extension that provides visualization of the schema graph

entviz is an ent extension that provides visualization of the schema graph

entviz entviz is an ent extension that creates visual graph (html file) of your ent's schema. install go get github.com/hedwigz/entviz add this exten

Dec 9, 2022

being a gh extension that runs animated terminal "screensavers"

gh-screensaver being a gh extension that runs animated terminal "screensavers" usage gh screensaver run a random screensaver gh screensaver -s pipes r

Nov 29, 2022

extension of SMx crypto support for go standard lib

Crypto Extension support of China crypto standards for go lib. You can simply copy and replace them to [your_go_src_path]/crypto Use as vendor is alte

Sep 21, 2022

gh extension for bumping version of a repository

gh extension for bumping version of a repository

gh bump a gh extension for bumping version of a repository. Usage gh bump with another repository. gh bump -R repository Installation gh extension

Dec 14, 2022

a gh extension that prints out an oblique strategy

gh-oblique being a gh extension that prints one of the oblique strategies install gh extension install vilmibm/gh-oblique run $ gh oblique Be dirty.

Dec 13, 2022

A plugin for running Open Policy Agent (OPA) in AWS Lambda as a Lambda Extension.

opa-lambda-extension-plugin A custom plugin for running Open Policy Agent (OPA) in AWS Lambda as a Lambda Extension. To learn more about how Lambda Ex

Jan 2, 2023

PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes.

GalaxyKube -- PolarDB-X Operator PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes. It follo

Dec 19, 2022

GitHub CLI extension to preview your markdown similar to the style of GitHub.

GitHub CLI extension to preview your markdown similar to the style of GitHub.

gh markdown-preview GitHub CLI extension to preview your markdown similar to the style of GitHub gh markdown-preview is a GitHub CLI extension to prev

Jan 8, 2023

ROFL eXtension Debugger - for League of Legends replay files

ROFLXD - ROFL eXtension Debugger This is an incomplete project. The original goal of this project was to convert GLR replays to a form that was playab

Nov 27, 2022
Comments
  • Closed over values are retained forever after an invoke

    Closed over values are retained forever after an invoke

    https://gist.github.com/alimpfard/8a04fd0816036ed314098964b3131588#gistcomment-3657876

    A hacky solution would be to just introduce a "clear closure" op (a more interesting solution could be to have something akin to leave take care of cleaning up functions post-invoke):

    Hacky solution
    diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go
    index 304beba..d2c977c 100644
    --- a/pkg/compiler/compiler.go
    +++ b/pkg/compiler/compiler.go
    @@ -205,6 +205,7 @@ func (c *Context) leaveFn(ctx *Context) {
     
     	// if we have a closure on our hands then add closed overs
     	if ctx.isClosure {
    +		c.emit(vm.OPPCK)
     		for _, clo := range ctx.closedOvers {
     			_ = clo.source().emit()
     			c.emit(vm.OPPAK)
    diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go
    index 41828a0..45afb9b 100644
    --- a/pkg/vm/vm.go
    +++ b/pkg/vm/vm.go
    @@ -45,6 +45,7 @@ const (
     
     	OPLDK // load closed over LDK (index int32)
     	OPPAK // push closed over value to a closure
    +	OPPCK // clear closed over values
     
     	OPREC // loop recurse REC (offset int32, argc int32)
     	OPREF // function recurse REF (argc int32)
    @@ -67,6 +68,7 @@ func OpcodeToString(op uint8) string {
     		"LDV",
     		"LDK",
     		"PAK",
    +		"PCK",
     		"REC",
     		"REF",
     	}
    @@ -492,6 +494,19 @@ func (f *Frame) Run() (Value, error) {
     			fun.closedOvers = append(fun.closedOvers, val)
     			f.ip++
     
    +		case OPPCK:
    +			idx := f.sp - 1
    +			if idx < 0 {
    +				return NIL, NewExecutionError("PCK stack overflow")
    +			}
    +			cls := f.stack[idx]
    +			if cls.Type() != FuncType {
    +				return NIL, NewExecutionError("PCK expected a Fn")
    +			}
    +			fun := cls.(*Func)
    +			fun.closedOvers = nil
    +			f.ip++
    +
     		case OPREF:
     			arity, err := f.code.Get32(f.ip + 1)
     			if err != nil {
    
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

  • Top-level `do`-s don't support `defmacro` inside

    Top-level `do`-s don't support `defmacro` inside

    Consider:

    (defmacro dude [] `(+ 1 2 3))
    (dude) ;; => 6
    

    However, wrapped in do:

    (do
      (defmacro dude [] `(+ 1 2 3))
      (dude)) ;; => (+ 1 2 3)
    

    This happens because it gets compiled into

    1. def dude fn
    2. set-macro! dude
    3. call dude

    When executing this, we have already left the compiler so the fact that dude is a macro doesn't matter, it's just a plain function to the VM. The compiler didn't know (dude) is to be macro-expanded because set-macro! was only executed after compiler finished.

a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

Nov 15, 2022
This is an open source project for commonly used functions for the Go programming language.

Common Functions This is an open source project for commonly used functions for the Go programming language. This package need >= go 1.3 Code Conventi

Jan 8, 2023
hdq - HTML DOM Query Language for Go+

hdq - HTML DOM Query Language for Go+ Summary about hdq hdq is a Go+ package for processing HTML documents. Tutorials Collect links of a html page How

Dec 13, 2022
Rest Api Generator for Golang Programming Language

Rest Api Generator for Golang Programming Language

Nov 29, 2021
Small Clojure interpreter, linter and formatter.
Small Clojure interpreter, linter and formatter.

Joker is a small Clojure interpreter, linter and formatter written in Go. Installation On macOS, the easiest way to install Joker is via Homebrew: bre

Dec 30, 2022
Carbon for Golang, an extension for Time

Carbon A simple extension for Time based on PHP's Carbon library. Features: Time is embedded into Carbon (provides access to all of Time's functionali

Dec 20, 2022
Theia Go Extension

Theia Go Extension An extension for the Theia-IDE to support the Go language, using the Go language server. Getting started Install nvm. curl -o- http

Nov 4, 2022
Go extension for VS Code
Go extension for VS Code

Go for Visual Studio Code The VS Code Go extension provides rich language support for the Go programming language. Quick Start Welcome! ???? Whether y

Jan 7, 2023
kubequery is a Osquery extension that provides SQL based analytics for Kubernetes clusters

kubequery powered by Osquery kubequery is a Osquery extension that provides SQL based analytics for Kubernetes clusters kubequery will be packaged as

Dec 27, 2022
Client extension for interacting with Kubernetes clusters from your k6 tests.

⚠️ This is a proof of concept As this is a proof of concept, it won't be supported by the k6 team. It may also break in the future as xk6 evolves. USE

Jan 2, 2023