A Scheme-flavored Lisp implemented in Go.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lisp Begin work on a benchmarking suite Nov 10, 2015
main add tests for some concurrency primitives Aug 19, 2015
samples testing sample Dec 12, 2014
tests add gensym-naked Mar 6, 2016
.gitignore update set.v0 dependency location Aug 6, 2018
Godeps update set.v0 dependency location Aug 6, 2018
LICENSE Tweaked comments and builtin names. Jan 13, 2014
README.md update set.v0 dependency location Aug 6, 2018
binding.go add ability to protect bindings from being overwritten from golisp code Aug 20, 2016
builtins_test.go Reflect move of gocheck. Apr 30, 2015
bytearray_builtins_test.go Reflect move of gocheck. Apr 30, 2015
conscell_test.go Reflect move of gocheck. Apr 30, 2015
data.go update set.v0 dependency location Aug 6, 2018
eval_test.go Reflect move of gocheck. Apr 30, 2015
fib-10-profile.dat Samples for profile experiements Jun 25, 2015
float_math_test.go Reflect move of gocheck. Apr 30, 2015
float_test.go Reflect move of gocheck. Apr 30, 2015
frame.go update set.v0 dependency location Aug 6, 2018
function.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
get_go_deps.rb Remove leftovers from Core Aug 12, 2015
goreadline.go Fixing build constraint on goreadline.go Jan 11, 2015
goreadline_windows.go Added copyright noticce. May 29, 2014
jenkins-mac-build.sh make executable Aug 12, 2015
json_frame_support.go Fix lisp marshaling of empty arrays from JSON Dec 12, 2017
json_support.go Add symbol type to JSON conversions Oct 14, 2015
json_support_test.go update json tests to cover more cases Jul 10, 2017
lisp_test.go fix tests Aug 13, 2015
list_access.go Add SetNth as a first-order function, make the Impl version use it Oct 19, 2015
logging.go Port over recent changes to master. Jun 18, 2015
macro.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
macros_test.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
mapping.dat Sample profile data Jun 23, 2015
number_test.go Reflect move of gocheck. Apr 30, 2015
object_test.go Reflect move of gocheck. Apr 30, 2015
parser.go don't eval multiple times with list->bytearray Jun 14, 2017
parsing_test.go Fix nil test Aug 11, 2015
prim_alist.go Add assq and assv as synonyms of assoc Nov 4, 2015
prim_binary.go Add error-case tests, and add/fix error generation as required. Jun 29, 2015
prim_bytearray.go don't eval multiple times with list->bytearray Jun 14, 2017
prim_channel.go make "<-channel" and "channel<-" shortcuts for reading and writing fr… Aug 25, 2015
prim_concurrency.go fix typos Aug 24, 2015
prim_debug.go update set.v0 dependency location Aug 6, 2018
prim_environment.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
prim_frame.go avoid extra defer/mutex lock calls Jun 14, 2017
prim_io.go Fix an issue with writing to stdout Dec 11, 2015
prim_list_access.go Add last-pair. May 11, 2015
prim_list_functions.go optimize map/for-each/any/every. don't re-traverse the list every step Mar 27, 2017
prim_list_manipulation.go add ability to protect bindings from being overwritten from golisp code Aug 20, 2016
prim_list_set.go Ported complement operation, missed in previous merges to 1.0 Aug 7, 2015
prim_macros.go allow evaling nil again Aug 7, 2015
prim_math.go implement bits->float and float->bits Aug 24, 2016
prim_mutators.go Add SetNth as a first-order function, make the Impl version use it Oct 19, 2015
prim_relative_logical.go Add eqv? and equal? as synonyms of eq? Nov 4, 2015
prim_setup.go add ability to protect bindings from being overwritten from golisp code Aug 20, 2016
prim_special_forms.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
prim_string.go Add parse primitive Dec 23, 2015
prim_system.go fix race condition in gensym Jun 5, 2017
prim_type_predicates.go We didn't have a boolean? predicate Dec 22, 2015
primitive_function.go use an interface instead of int slices for argument restriction values Jun 14, 2017
printing_test.go avoid string scanning for parameter counts for primitive functions du… Jun 14, 2017
profiling.go Use frames for profile data records and call tree nodes. Jul 16, 2015
repl.go Bring up to date with nerw testing framework & version Jul 5, 2015
string_test.go Reflect move of gocheck. Apr 30, 2015
symbol_table_frame.go avoid extra defer/mutex lock calls Jun 14, 2017
symbol_table_frame_test.go BindTo and BindLocallyTo now return errors if the binding is protected Aug 22, 2016
tokenizer.go Update dependecy that was removed Nov 29, 2016
tokenizer_test.go Support reading (i.e. tokenizing/parsing) from a file or a string. Jun 23, 2015
type_test.go Fix bug with a frame function slot calling to a function outside the … Aug 19, 2015
util.go parse all nil values as empty cons Aug 6, 2015
util_test.go Reflect move of gocheck. Apr 30, 2015

README.md

golisp

GoLisp is a simple Lisp language and runtime implemented in Google’s Go programming language. It’s main purpose is integration into a Go application to provide runtime extension and scripting. The core of a basic Lisp is provided, but with limited special forms and primitive functions. More of these will be added as required without having to modify the GoLisp core. Also, a REPL is provided and GoLisp can be used as-is to enter and evaluate code.

It is heavily inspired and influenced by Scheme (MIT/GNU scheme in particular). GoLisp 1.0 is much more in line with Scheme, but it is at it's heart a language for our purposes internally. It's growth and evolution reflect that.

GoLisp evolves along 4 axis:

  • becoming more compatible with MIT/GNU Scheme (GoLisp v1.0 is a huge move forward in this regard)
  • supporting more capabilities of the underlying Go implementation language (e.g. recent work supporting concurrency and channels)
  • our particular needs (e.g. byte array support)
  • useful additions (e.g. frames)

If GoLisp has a form or function that is also in MIT/GNU scheme, we strive to make it work the same way.

As much as possible the internals echo those in MIT/GNU Scheme. For example, the lexical environment structure/handling.

So, while it is intentionally very much like MIT/GNU Scheme, it is not constrained to conform the specification. That said, unless our extensions are used, code will usually be indistinguishable.

A complete language reference and other material is available at http://techblog.steelseries.com/golisp.

A sample application is also available at https://github.com/SteelSeries/golisp-example-app.

GoLisp has the following dependencies:

go get github.com/SteelSeries/set.v0 go get github.com/SteelSeries/bufrr go get gopkg.in/check.v1