spirit

module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2020 License: GPL-3.0

README

Spirit

Spirit is a scripting, functional language inspired by Clojure. Spirit does not target JVM machines instead it's interpreted line by line. This has the advantage of fast startup and suitable for scripting environment.

Background

This programming language is just an experiment for me to tinker and mess around in building programming language. I always wanted to build my own programming language and implement some of the things that may have on another language to this language. Lisp-like syntax is chosen because it is easy to parse, consistent and elegant. But, as you see the syntax is not directly inherited from Lisp rather the syntax is much, much similar to Clojure.

Data Types

  • String
  • Number
  • List
  • Vector
  • HashMap
  • Set
  • Atom
  • Future

Differences

These are the differences that I deliberately made to differ from Clojure.

  • Function hoisting for defn and defmacro
  • Function apply in clojure is equivalent to <> in spirit
  • All functions that acts on Seq returns the same concrete type Seq. For example, map on Vector returns Vector instead of List
  • Keyword is used instead of String as key when parsing JSON object.
  • Object Oriented system

Directories

Path Synopsis
cmd
Package sabre provides data structures, reader for reading LISP source into data structures and functions for evluating forms against a context.
Package sabre provides data structures, reader for reading LISP source into data structures and functions for evluating forms against a context.
repl
Package repl provides a REPL implementation and options to expose internal features through a read-eval-print-loop.
Package repl provides a REPL implementation and options to expose internal features through a read-eval-print-loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL