GithubHelp home page GithubHelp logo

mattyw / edgar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tcort/edgar

0.0 3.0 0.0 198 KB

a small LISP Interpreter written in C

License: GNU General Public License v3.0

Common Lisp 12.06% C 56.87% C++ 6.81% Elixir 3.14% Shell 21.12%

edgar's Introduction

edgar

Build Status

edgar is a small LISP Interpreter written in C. It doesn't have a lot of built-in functions yet, but it is already quite functional. It allows users to define functions and supports some of the classic introduction to LISP programs like factorial, fibonacci, GCD, LCM, and more.

Requirements

  • C compiler and standard build tools (make, sh, ...).
  • GNU MP
  • valgrind (optional - adds memory error/leak checks)
  • wine (optional - runs tests on mingw32 cross builds)

Building

Standard autotools build (make check runs the test suite):

$ autoreconf -i
$ ./configure --prefix=/usr
$ make
$ make check
# make install

Note: autoreconf -i is only needed if there is no configure script.

Cross Compiling (Target: mingw32)

Is edgar running too fast for you? You can cross compile it and run it in wine to slow things down a bit. Here's how do it assuming your cross toolchain is in your path and named i686-pc-mingw32.

The first step is to setup a cross build prefix and install libgmp there.

mkdir -p $HOME/tmp/xbuild
cd $HOME/tmp/xbuild
wget ftp://ftp.gmplib.org/pub/gmp-5.1.2/gmp-5.1.2.tar.bz2
tar jpvxf gmp-5.1.2.tar.bz2
cd gmp-5.1.2
./configure --host=i686-pc-mingw32 --prefix=$HOME/tmp/xbuild/prefix
make
make install
cd ..

The next step is to cross build edgar.

tar zvxf edgar-1.0.tar.gz
cd edgar-1.0
LDFLAGS="-L$HOME/tmp/xbuild/prefix/lib" CPPFLAGS="-I$HOME/tmp/xbuild/prefix/include" ./configure --host=i686-pc-mingw32 --prefix=$HOME/tmp/xbuild/prefix
make
make check
cp src/edgar.exe $HOME
cd ~
wine edgar.exe

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

edgar's People

Contributors

tcort avatar mattyw avatar

Watchers

 avatar James Cloos avatar  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.