<commit_before>solid - a minimalist language with a tiny VM ![Build Status] (https://travis-ci.org/chameco/Solid.png)
============================================

Solid is a simple, elegant language with a super simple C API. Yes, that means you can embed it into your application or game with almost no effort.

Installation
-------------

You'll want Bison (3.0.0), Flex (2.5), and a C compiler.

The Makefile should automagically fetch other dependencies and stuff. Just do:

    git clone http://github.com/chameco/Solid
    cd Solid
    make && sudo make install

Usage
------
Running a file is simple: `solid test.sol`.
To start a REPL (which is currently really bad, and doesn't have line continuation stuff), just run `solid`.

Syntax
------
Assignment: `x = 1`.

Basic math: `1 + 2`, or since operators are just functions, `+(1, 2)`.

Branching: `if 1 == 1 print("hello there")`.

Looping: `while 1 == 1 print("solid is still the best")`.

Blocks: Anywhere you can have a single expression, you can have a block. Blocks start with either `do` or `{`, and end with `end` or `}`. There are no formal rules about which to use, but I've taken to using `do` and `end` on multi-line blocks, and curlies for one-liners. Examples:

    c = 0
    while c < 10 do
    	print(c)<commit_msg>Updated the docs to reflect new makefile.<commit_after>solid - a minimalist language with a tiny VM ![Build Status] (https://travis-ci.org/chameco/Solid.png)
============================================

Solid is a simple, elegant language with a super simple C API. Yes, that means you can embed it into your application or game with almost no effort.

Installation
-------------

You'll want Bison (3.0.0), Flex (2.5), and a C compiler.

The Makefile should automagically fetch other dependencies and stuff.

To tell `make` where you want it to place the binary, you can set
`INSTALL_DIR` to a directory. Likewise, changing `PREFIX_DIR` to a
directory will modify where `make` places libs and header files.
`PREFIX_DIR` should contain the sub-directories `/share`, `/lib`,
and `/include`.

If not defined, `PREFIX_DIR` and `INSTALL_DIR` will default to
`/usr/local` and `PREFIX_DIR/bin`, respectively.

After you've fiddled with your setup, you can just do this:

    git clone http://github.com/chameco/Solid
    cd Solid
    make && sudo make INSTALL_DIR=/foo/bar install

To uninstall, just run this from the source directory:

    sudo make uninstall

Making sure that if you changed `INSTALL_DIR`, you'll need to
specify that again, for now.

Usage
------
Running a file is simple: `solid test.sol`.
To start a REPL (which is currently really bad, and doesn't have line continuation stuff), just run `solid`.

Syntax
------
Assignment: `x = 1`.

Basic math: `1 + 2`, or since operators are just functions, `+(1, 2)`.

Branching: `if 1 == 1 print("hello there")`.

Looping: `while 1 == 1 print("solid is still the best")`.

Blocks: Anywhere you can have a single expression, you can have a block. Blocks start with either `do` or `{`, and end with `end` or `}`. There are no formal rules about which to use, but I've taken to using `do` and `end` on multi-line blocks, and curlies for one-liners. Examples:

    c = 0
    while c < 10 do
    	print(c)
{'fraction_non_alphanumeric': 0.1352433764633395, 'fraction_numerical': 0.010474430067775724, 'mean_word_length': 3.612215909090909, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3032552', 'n_tokens_mistral': 991, 'n_tokens_neox': 936, 'n_words': 463}