Coder Social home page Coder Social logo

abyss-lisp's Introduction

Abyss Lisp

Description

A prototype of a Lisp dialect.

Very much a work in progress at this time.

It is primarily based on Kernel.

The goal for Abyss Lisp is an interpreted language as a compiler. The plan is to include what is effectively the internals of a compiler in the built ins. And provide abstractions on top of the built ins to conveniently write code to be compiled.

Building

Prerequisites:

  • SBCL (developed on version 2.3.x)
  • re2c (version 3.0)
  • A C++ compiler with char8_t from C++20
  • CMake or Meson
  • CFFI
  • A version of libffi supported by CFFI.
  • (for unit tests only) FiveAM

It is recommended to install and setup quicklisp.

The source for Abyss will need to be in a location searched by ASDF. With quicklisp setup, it will search the 'local-projects' subdirectory of the quicklisp installation directory.

Configure and build the C++ portion of the project with CMake or Meson. Example commands below assume the root of the Abyss source is the current working directory.

Example for CMake:

> cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
> cmake --build build

Example for Meson:

> meson setup build --buildtype release
> meson compile -C build
> ./build/abyss-ffi-enum-gen

The abyss-ffi-enum-gen program generates 'src/ffi/enums.lisp'. CMake handles this step, Meson does not.

There are two environment variables that are used for the Lisp portion of the build.

  • ABYSS_BUILD_PATH: the directory to place generated executables
  • ABYSS_LIB_PATH: the directory containing the shared library for the parser When building the executable it should the the long term location of the library It is also used when the programs are run for an alternative location

If not given an absolute path, it will be assumed relative to the current working directory.

For SBCL:

> export ABYSS_BUILD_PATH="build/"
> export ABYSS_LIB_PATH="build/"
> sbcl --eval "(asdf:oos 'asdf:program-op :abyss/viewer)"
> sbcl --eval "(asdf:oos 'asdf:program-op :abyss/bench)"

The syntax for setting an environment variable in PowerShell is

$Env:ABYSS_BUILD_PATH = "build\\"

The command line programs built are:

  • abyss-lex: a command line lexer debug aid
  • abyss-parse: a command line parser debug aid
  • abyss-viewer: a command line debug aid to see the loaded code
  • abyss-bench: a single script file runner that times evaluation

Usage:

> ./build/abyss-lex "examples/fib.abyss"
> ./build/abyss-parse "examples/fib.abyss"
> ./build/abyss-viewer "examples/fib.abyss"
> ./build/abyss-bench "examples/fib.abyss"

Note: if you set ABYSS_LIB_PATH to a location you plan to install to later, the above usage examples would need it set to the build directory.

Installation

Not applicable at this time.

Usage

Not applicable at this time.

Developers

  • Adam Armstrong

License

The project's code is under the ISC license, see the LICENSE file for details.

It is also included in files along side the source code.

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.