Giter Club home page Giter Club logo

let-go's Introduction

Squishy loafer

Tests

let-go

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

This is a bytecode compiler and VM for a language closely resembling Clojure, a Clojure dialect, if you will.

Here are some nebulous goals in no particular order:

  • Quality entertainment,
  • Making it legal to write Clojure at your Go dayjob,
  • Implement as much of Clojure as possible - including persistent data types and true concurrency,
  • Provide comfy two-way interop for arbitrary functions and types,
  • AOT (let-go -> standalone binary) would be nice eventually,
  • Strech goal: let-go bytecode -> Go translation.

Here are the non goals:

  • Stellar performance (cough cough, it seems to be faster than Joker),
  • Being a drop-in replacement for clojure/clojure at any point,
  • Being a linter/formatter/tooling for Clojure in general.

Current status

It can eval a Clojure-like lisp. It's semi-good for solving Advent of Code problems but not for anything more serious yet.

There are some goodies:

  • Macros with syntax quote,
  • Reader conditionals,
  • Destructuring,
  • Multi-arity functions,
  • Atoms, channels & go-blocks a'la core.async,
  • Regular expressions (the Go flavor),
  • Simple json, http and os namespaces,
  • Many functions ported from clojure.core,
  • REPL with syntax-highlighting and completions,
  • Simple nREPL server that seems to work with BetterThanTomorrow/calva,

I'm currently contemplating:

  • Dynamic variables,
  • Exceptions & more comprehensive runtime errors,
  • Numeric tower i.e. floats, bignums and other exotic number species,
  • Optimized persistent data-structures and laziness,
  • Records and protocols,
  • A real test suite would be nice,

Examples

See:

Try online

Check out this bare-bones online REPL. It runs a WASM build of let-go in your browser!

Prerequisites and installation

Building or running let-go from source requires Go 1.19.

go install github.com/nooga/let-go@latest

Try it out:

let-go

Running from source

The best way to play with let-go right now is to clone this repo and run the REPL like this:

go run . 

To run an expression:

go run . -e '(+ 1 1)'

To run a file:

go run . test/hello.lg

Use the -r flag to run the REPL after the interpreter has finished with files and -e:

go run . -r test/simple.lg                # will run simple.lg first, then open up a REPL
go run . -r -e '(* fun 2)' test/simple.lg # will run simple.lg first, then (* fun 2) and REPL 

๐Ÿค“ Follow me on twitter ๐Ÿฌ Check out monk.io

let-go's People

Contributors

alimpfard avatar fossabot avatar nooga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.