A Scheme-flavored Lisp implemented in Go.
Go Scheme NewLisp Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lisp
main
samples
tests
.gitignore
Godeps
LICENSE
README.md
binding.go
builtins_test.go
bytearray_builtins_test.go
conscell_test.go
data.go
eval_test.go
fib-10-profile.dat
float_math_test.go
float_test.go
frame.go
function.go
get_go_deps.rb
goreadline.go
goreadline_windows.go
jenkins-mac-build.sh
json_frame_support.go
json_support.go
json_support_test.go
lisp_test.go
list_access.go
logging.go
macro.go
macros_test.go
mapping.dat
number_test.go
object_test.go
parser.go
parsing_test.go
prim_alist.go
prim_binary.go
prim_bytearray.go
prim_channel.go
prim_concurrency.go
prim_debug.go
prim_environment.go
prim_frame.go
prim_io.go
prim_list_access.go
prim_list_functions.go
prim_list_manipulation.go
prim_list_set.go
prim_macros.go
prim_math.go
prim_mutators.go
prim_relative_logical.go
prim_setup.go
prim_special_forms.go
prim_string.go
prim_system.go
prim_type_predicates.go
primitive_function.go
printing_test.go
profiling.go
repl.go
string_test.go
symbol_table_frame.go
symbol_table_frame_test.go
tokenizer.go
tokenizer_test.go
type_test.go
util.go
util_test.go

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 gopkg.in/fatih/set.v0 go get github.com/SteelSeries/bufrr go get gopkg.in/check.v1