Giter VIP home page Giter VIP logo

miamiruby / clasp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clasp-developers/clasp

2.0 2.0 0.0 96.03 MB

clasp Common Lisp environment

Batchfile 0.09% Shell 1.34% Python 5.81% Makefile 0.46% HTML 3.65% C 9.81% C++ 32.56% Assembly 28.84% Groff 0.02% Objective-C 0.04% Yacc 0.40% IDL 0.01% QML 0.01% XSLT 0.01% Common Lisp 16.22% Awk 0.01% Gnuplot 0.07% Emacs Lisp 0.01% TeX 0.65% Lex 0.01%

clasp's Introduction

Clasp

-- Update May 19, 2015 Clasp has a developers mailing list.

-- Update Jan 25, 2015 -- Please read regarding installing Clasp

Note: EXTERNALS_BUILD_TARGET_DIR and CLASP_BUILD_TARGET_DIR are not required any more in locals.config. There is a new variable EXTERNALS_SOURCE_DIR that you set to the path of the exterals-clang source directory.

If you have questions come ask them on IRC at freenode #clasp

Clasp is a Common Lisp implementation that interoperates with C++ and uses LLVM for just-in-time (JIT) compilation to native code. See http://drmeister.wordpress.com/2014/09/18/announcing-clasp/ for the initial announcement.

Clasp is not yet a full ANSI compliant Common Lisp - if you find differences between Clasp and the Common Lisp standard they are considered bugs in Clasp and please feel free to report them.

Libraries that clasp depends on can be obtained using the repository: externals-clasp
Currently you must build externals-clasp prior to building Clasp - we will eliminate the need for this in future releases.

Systems Clasp has built on

Clasp needs an advanced C++ compiler that supports C++11 (minimum clang 3.5 or gcc 4.8).

Clasp also needs a very specific version of the llvm/clang 3.6 libraries that are not part of a standard release. This version of the llvm/clang3.6 is included in externals-clasp. Incidentally, the externals-clasp/llvm3.6 builds a clang3.6 compiler, which can be used by the Clasp build system to compile Clasp.

Systems that Clasp is known to build on
OS X 10.10 using Xcode 6.4 [IMPORTANT - see (https://github.com/drmeister/clasp/wiki/Building-Clasp-on-OS-X-requires-using-the-open-source-version-of-Clang)
Debian Testing(Jessie) - see issue #22
Debian Unstable(Sid)
Gentoo Linux - see issue #20
Arch Linux
OpenSuse 13.1 - see issue #19
Debian Stable (Wheezy) - see issue #21
Ubuntu 14.04 - see issue #26

If you get lots of errors showing missing header files then you can uncomment and set CLASP_CLANG_PATH in clasp/locals.config to use the system clang (version>3.6.1). On Linux there may be the additional problem that libstd++ may need to be brought up to date.

If you experience problems with the systems above please submit an issue here or come see us on #clasp on irc.freenode.net

Building Clasp

To build Clasp from within the top level directory do the following.

  1. You need to download and build the externals-clasp repository
  • it contains all of the external libraries that Clasp depends on and it downloads the specific version of LLVM 3.6 that Clasp needs.
  1. Copy local.config.darwin or local.config.linux to local.config depending on your system

  2. Edit local.config and configure it for your system. The following configuration variables affect the build process.

Variable Description
EXTERNALS_SOURCE_DIR This defines where Clasp build will find the externals-clasp libraries. I use $HOME/local/externals-clasp. This is the directory that contains the externals-clasp source.
TARGET_OS Currently either linux or darwin
PJOBS The number of processors you have available to build with.
Set PJOBS <= the number of cores you have.
Also if you have less than 8GB memory you should set PJOBS to 2 or 1,
otherwise your system will swap like crazy
CXXFLAGS If you set this export CXXFLAGS = -v it will print more debugging info
during the build
  1. Make both the mps and boehm versions of Clasp (see note 1 for other options).
# make

If you see the error "fatal error: 'core_scrape_flag.h' file not found" just stop the build with control-C and type "make" again. It will sort itself out. It's something to do with the order in which boost-build builds things but I haven't sorted it out yet.

  1. Add the directory in $CLASP_BUILD_TARGET_DIR/MacOS (OS X) or $CLASP_BUILD_TARGET_DIR/bin (linux) (from local.config) to your PATH

  2. To run the MPS version of Clasp use

# clasp_mps_o

and to run the Boehm version of Clasp use

# clasp_boehm_o
  1. When the Clasp REPL prompt appears you can type Common Lisp commands.
Starting Clasp 0.1... loading image... it takes a few seconds
Loading .clasprc
Top level.
> (defun hello-world () (print "Clasp is running.  Huzzah!!!"))

HELLO-WORLD
> (hello-world)

"Clasp is running.  Huzzah!!!"
"Clasp is running.  Huzzah!!!"
> (quit)

Clasp will run within Emacs using *inferior-lisp* and in the future Clasp will have a SLIME interface (volunteer programmers will be showered with appreciation and praise!).

Note 1: You can make just one version of Clasp

# make boostbuildv2-build 

and then to make the boehm version of Clasp use

# make clasp-boehm

or to make the mps version of Clasp use

# make clasp-mps

External libraries

If you want to install the external libraries separately its more complicated because Clasp requires a particular version of LLVM/Clang3.6 which hasn't been officially released yet but is present in externals-clang. This should all become easier in a couple of months when LLVM/Clang3.6 is released.
These are the requirements as of Sep 28, 2014.
LLVM/clang 3.5 compiler
Boost build v2
boost libraries ver 1.55
Boehm 7.2
gmp-6.0.0
expat-2.0.1
zlib-1.2.8
readline-6.2

Acknowledgments

Clasp was supported by the Defense Threat Reduction Agency (DOD-DTRA) (HDTRA1-09-1-0009) the National Institutes of Health (NIH/NIGMS Grant number: 2R01GM067866-07A2) and the National Science Foundation (Grant number: 1300231)

clasp's People

Contributors

bike avatar cwndrws avatar domesticmouse avatar drmeister avatar erm410 avatar georgiy-tugai avatar keens avatar mband avatar wasamasa avatar

Stargazers

 avatar  avatar

Watchers

 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.