1
1
mirror of https://github.com/kanaka/mal.git synced 2024-10-26 22:28:26 +03:00
mal/impls/cpp
Joel Martin 8a19f60386 Move implementations into impls/ dir
- Reorder README to have implementation list after "learning tool"
  bullet.

- This also moves tests/ and libs/ into impls. It would be preferrable
  to have these directories at the top level.  However, this causes
  difficulties with the wasm implementations which need pre-open
  directories and have trouble with paths starting with "../../". So
  in lieu of that, symlink those directories to the top-level.

- Move the run_argv_test.sh script into the tests directory for
  general hygiene.
2020-02-10 23:50:16 -06:00
..
tests Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
.gitignore Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Core.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Debug.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
docker.sh Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Dockerfile Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Environment.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Environment.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Makefile Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
MAL.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Reader.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
ReadLine.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
ReadLine.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
README.md Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
RefCountedPtr.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
run Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
StaticList.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step0_repl.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step1_read_print.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step2_eval.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step3_env.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step4_if_fn_do.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step5_tco.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step6_file.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step7_quote.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step8_macros.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step9_try.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
stepA_mal.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
String.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
String.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Types.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Types.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Validation.cpp Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Validation.h Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00

Compilation notes

Mac OSX

This C++ implementation was developed on Mac OS X Yosemite, and uses the stock g++ compiler.

The only other requirement is GNU Readline, which I got from homebrew.

brew install readline

You may need to edit the READLINE path in the Makefile.

Ubuntu 14.10/15.04

This should compile on Ubuntu 14.10 and 15.04 with the following packages

apt-get install clang-3.5 libreadline-dev make

Docker

For everyone else, there is a Dockerfile and associated docker.sh script which can be used to make and run this implementation.

* build the docker image

    ./docker build

* make the MAL binaries:

    ./docker make

* run one of the implementations:

    ./docker run ./stepA_mal

* open a shell inside the docker container:

    ./docker run