1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-09 18:06:35 +03:00
mal/impls/cpp
Vasilij Schneidermann bcbbb57eaf cpp: Avoid readline memory leak
Closes #550
2021-02-14 11:58:33 +01: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 Change quasiquote algorithm 2020-08-11 01:01:56 +02: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 cpp: Avoid readline memory leak 2021-02-14 11:58:33 +01: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 Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
step8_macros.cpp Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
step9_try.cpp Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
stepA_mal.cpp Change quasiquote algorithm 2020-08-11 01:01:56 +02: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