Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile so new users can quickly try out the language #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down