A Lisp Experiment
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/img new repl image Dec 16, 2017
pkg using go modules Oct 20, 2018
test moved stuff into pkg Sep 20, 2018
.gitignore moved command line into cmd dir Feb 8, 2018
.travis.yml trying to get travis working again Oct 21, 2018
LICENSE.md rename applyArguments Jan 5, 2018
Makefile using go modules Oct 20, 2018
README.md clarify readme Sep 20, 2018
go.mod trying to get travis working again Oct 21, 2018
go.sum trying to get travis working again Oct 21, 2018
main.go using go modules Oct 20, 2018


Sputter (a Lisp Experiment)

Go Report Card Build Status Coverage Status

Sputter is a Lisp Compiler written in Go.

How To Install

Make sure your GOPATH is set, then run go get to retrieve the package.

go get github.com/kode4food/sputter/cmd/sputter

How To Run A Source File

Once you've installed the package, you can run it from GOPATH/bin like so:

sputter somefile.lisp

# or

cat somefile.lisp | sputter

How To Start The REPL

Sputter has a very crude Read-Eval-Print Loop that will be more than happy to start if you call it with no arguments from the terminal:

Current Status

I just started this thing and it's still pretty fragile, but that will change rapidly. The current built-in forms are:

  • Basics: read eval do
  • Branching: if not unless when when-not cond and or
  • Numeric: + - * / mod = != < > <= >= inf -inf inc dec range
  • Numeric Predicates: inf? -inf? nan? even? odd?
  • Values: def let if-let when-let put-ns ns with-ns
  • Symbols and Keywords: sym gensym sym? local? keyword?
  • Functions: defn fn apply partial apply? special-form?
  • Function Composition: juxt comp
  • Threading: -> ->> some-> some->> as-> cond-> cond->>
  • Macros: defmacro macroexpand1 macroexpand macroexpand-all macro?
  • Errors: error raise panic try assert-args
  • Quoting: quote syntax-quote
  • Predicates: eq atom? nil?
  • Sequences: seq cons conj first rest last for-each seq?
  • Lists: list to-list list?
  • Vectors: vector to-vector vector?
  • Associative Arrays: assoc to-assoc assoc?
  • Counted Sequences: len len?
  • Indexed Sequences: nth indexed?
  • Mapped Sequences: get . mapped?
  • Comprehensions: concat map filter reduce take take-while drop
  • Lazy Sequences: lazy-seq partition
  • Metadata: meta with-meta meta?
  • Concurrency: go chan generate future promise promise?
  • Strings: str str! str?
  • I/O: print println pr prn with-open
  • Operating System: time *env* *args* *out* *err* *in*

Documentation for most of these forms may be viewed in the REPL using the doc function.