Giter Club home page Giter Club logo

sputter's Introduction

Sputter (a Lisp Experiment)

Go Report Card Build Status Coverage Status

Sputter is a Lisp Environment written in Go. Basically, it's just me having some fun and trying to improve my Go skills. That means you're unlikely to find something you'd want to use in production here. On the other hand, if you want to join in on the fun, you're more than welcome to.

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.

sputter's People

Contributors

kode4food 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.