diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..d60b1cff1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM gcc:latest + +RUN apt-get update && apt-get -y install llvm-dev +RUN git clone https://github.com/c3d/xl.git +WORKDIR xl +RUN make install +WORKDIR .. +RUN mkdir app +WORKDIR app +ENTRYPOINT ["/usr/local/bin/xl", "-i", "/dev/stdin"] diff --git a/README.md b/README.md index b1fdf462f..680a7400b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ the standard library in XL. You can replace these constructs if you want, or add your own. Adding a new kind of loop is not more difficult in XL than adding a function, and it uses the same syntax. +* [Docker Quickstart](#docker-quickstart) * [Simple examples](#a-few-simple-examples) * [Dialects and use cases](#dialects-and-use-cases) * [If you come from another language](#if-you-come-from-another-language) @@ -49,6 +50,17 @@ also available in [asciidoc format](docs/HANDBOOK.adoc) and and presently extremely messy, incomplete and inaccurate. +## Docker Quickstart + +To quickly try out the intrepreter, install Docker and run the following commands: + +``` +docker build . -t xl +docker run -i xl +``` + +(Note: to see output, you need to send an EOF signal using Control-D) + ## A few simple examples A program computing the factorial of numbers between 1 and 5 would be