Giter Club home page Giter Club logo

lispirito's Introduction

lispirito

A portable LISP implementation for memory-constrained systems. It works from MOS 6502 to modern ARM/Intel 64-bit machines.

Project Goals

  • Binary size smaller than 31.5K on MOS 6502, yet capable with modern architectures.
  • Macro expansion support for syntatic sugar.
  • Depend on a minimal set of libc functions.
  • The code should be small and pedagogical, easy to understand.

Notably missing features

  • Although a good subset of R7RS-small functions are covered, many are left out due to space (notably vectors and maps). It should be fairly straightfoward to extend the implementation to add them, but that would increase the footprint past our size goal of 31.5K.

Getting started

If you are compiling lispirito in a modern system, just a simple make clean; make install should work.

To include debugging, add -DDEBUG=1 to your build command. To include some standard lambdas and macros, add -DINITIAL_ENVIROMENT=1 to your build command. Make sure you have heap memory for this! If you are on 6502 systems, you likely/unfortunately do not. In that case, you can either:

  • Type the definitions you want in the REPL, maximally saving space; or
  • Edit the lambdas.h and macros.h files to include only the definitions you need.

If you are compiling lispirito for MOS 6502 (in particular Ben Eater's machine), first download the LLVM-MOS SDK in the link below, and place it alongside this project directory. You might want to adjust the CXX location in your Makefile depending on where your SDK is. You can find the SDK here:

If you are using macOS, make sure to remove the quarantine of the file before extracting it.

$ xattr -d com.apple.quarantine llvm-mos-macos.tar.xz

Tweaks

You can change the default definitions of Integral and Real in extra.h to best accomodate the build to your system.

Have fun!

lispirito's People

Contributors

hammurabi-mendes avatar

Stargazers

Dan Higdon avatar zhonghua avatar S Pearman avatar  avatar Arin avatar  avatar w1n5t0n avatar Alex Strasheim avatar  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.