@@ -1,33 +1,36 @@
11# 
22
3−Prybar is a universal interpreter front-end. Same interface, same REPL, different languages.
3+Prybar is a universal interpreter front-end. Same interface, same
4+REPL, different languages.
45
56## Why
67
7−At [Repl.it](https://repl.it) we're in the business of running REPLs. As it happens to be
8−every language implements them differently. We wanted them to all behave the same: run code and drop into a REPL!
8+At [Repl.it](https://repl.it) we're in the business of running REPLs.
9+As it happens to be, every language implements them differently. We
10+wanted them to all behave the same: run code and drop into a REPL!
911
1012## How it works
1113
12−Prybar, written in Golang, maintains a common command-line interface that calls into
13−a select language backend. The language backends are implemented using cgo and the language's C-bindings.
14+Prybar, written in Golang, maintains a common command-line interface
15+that calls into a select language backend. When possible, the language
16+backends are implemented using cgo and the language's C-bindings.
17+Otherwise, they make use of a small script written in the host
18+language which starts a Prybar-compatible REPL.
1419
1520## Usage
1621
17−```
18−Usage of ./prybar-language:
19− -I like -i, but never use language REPL
20− -c string
21− code to run
22− -e string
23− expression to print
24− -i interactive
25− -ps1 string
26− PS1 (default "--> ")
27− -ps2 string
28− PS2 (default "... ")
29− -q quiet
30−```
22+ Usage: ./prybar-LANG [FLAGS] [FILENAME]...
23+ -I interactive (use readline repl)
24+ -c string
25+ execute without printing result
26+ -e string
27+ evaluate and print result
28+ -i interactive (use language repl)
29+ -ps1 string
30+ repl prompt (default "--> ")
31+ -ps2 string
32+ repl continuation prompt (default "... ")
33+ -q don't print language version
3134
3235## Language Support
3336
@@ -44,23 +47,36 @@ Usage of ./prybar-language:
4447| Julia | ✔ | ✗ | ✔ | ✔ | ✗ | ✔ |
4548| OCaml | ✔ | ✔ | ✔ | ✔ | ✗ | ✔ |
4649
47−## Building
50+## Build and run
4851
49−Prybar uses a Unix make file to build each Prybar binary with `pkg-config` to find language dependencies on your system.
52+Prybar uses Docker to make it easy to get started with development.
53+First, you must [install Docker](https://docs.docker.com/install/).
54+Then, run:
5055
51−### Linux
56+ $ docker build . -t prybar
5257
53−See [Dockerfile](Dockerfile) for hints what packages to install on linux.
58+to create a Docker image containing the Prybar code and all of its
59+dependencies. Building the image also includes compiling the Prybar
60+binaries (there is one for each supported language).
5461
55−### OSX
62+To run the code in a Docker container:
5663
57−```
58−brew install go r ruby python python@2 lua spidermonkey opam
59−```
64+ $ docker run --rm -it prybar
65+ # ./prybar-python3 -h
6066
61−## Docker
67+The directory contains one `./prybar-LANG` binary for each supported
68+language `LANG` ([see the `languages` subdirectory of this
69+repository](languages)).
6270
63−The script `./extract.sh` can be used to compile and produce a tarball containing all the Prybar binaries. Each binary will be named `prybar-<language>`. You can build all languages by running `make` in the repo's root or run `make prybar-<language>` to build a specific language.
71+When you make changes to the code, you must re-run `docker build` to
72+create a new Docker image before you can run it with `docker run`.
73+
74+### Distribution
75+
76+The script `./extract.sh` can be used to compile and produce a tarball
77+containing all the Prybar binaries. You can run it on its own; it will
78+automatically compile a new Docker image if necessary and extract the
79+binaries from a running container.
6480
6581## License
6682
@@ -78,7 +94,8 @@ GNU General Public License for more details.
7894
7995You should have received a copy of the GNU General Public License
8096along with this program; if not, write to the Free Software
81−Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
97+Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA
98+02110-1335, USA.
8299
83100See the COPYING file for more information regarding the GNU General
84101Public License.