<commit_before>[Alloy™](http://alloy-lang.github.io) [![BuildStatus](https://travis-ci.org/alloy-lang/alloy.svg?branch=master)](https://travis-ci.org/alloy-lang/alloy)
========

Why the name change?
------
Apparently Ink is an already existing language, that's been in development for 3 years. Rather than
hassling with the purchasing of domains/channels from it's current creator, we thought we'd just
choose a name that wasn't already taken. We **promise** this will be the last time we change the name!

About Alloy
------

Alloy (formerly Jayfor/Ink) is a programming language written in C. The goals of this language are:

* Speed
* Simplicity
* Cleanliness

We created Alloy because we love writing C, and love the simplicity of C; we also wanted to evolve C
into something more modern, and easier to use.

IRC
------
We have an IRC where we discuss Alloy, and other stuff too, come join! If you want to help contribute,
we highly suggest you join the IRC :)

* server: irc.freenode.net
* channel: #alloy-lang

A taste of Alloy
------
Warning, this is still (potentially) subject to change. Also a disclaimer,
the syntax below is very incosistent and is just to show what's possible in the 
language.
```rust
struct Whatever {
	int x = 10
	int y
}

fn do_stuff(int a, int b): int {
	int x = 5
	while ((a + b) > 10) -> x = (x + 1)

	match x {
		(x == 12) {
			loop {
				if ((a + x) > 21) -> break
			}
			return x
		}
		(x < 2) {
			for _ :(a, b) {
				a = (x + 1)
			}
		}
		(x == 29) -> return a
		_ {
			return 1337
		}
	}

	if (x > 21) {
		return (x - 21)
	}
}

fn main() {
	do_stuff(125, 25)
}
```
Status
------

The language is still in development. More information/specifics
can be found in [`/docs/`](/docs/). The compiler is written in C
and uses LLVM as its backend.

Building
--------

To build you will need:

 - [`LLVM >= 3.4`](http://llvm.org/releases/download.html)
 - A suitable GNU C compiler (any one of the below will do fine):
   - [`clang >= 3.4.0`](http://llvm.org/releases/download.html)
   - [`gcc >= 4.8.1`](https://gcc.gnu.org/) (change `LCC` and 
     `LCXX` in the [makefile](/Makefile) to `gcc` and `g++`, respectively)

```bash
# clone the repository
git clone -v https://github.com/alloy-lang/alloy.git
    
# cd into the repository
cd alloy

# build
make

# run a program
cd tests

# run the test bash script
# if some of these fail, it might be because
# the developers have changed the document
./alloyctest.sh
```

Contributing
------------

Something not working? Open an [Issue](https://github.com/alloy-lang/alloy/issues)
or send us a [Pull Request](https://github.com/alloy-lang/alloy/pulls)
on GitHub.

See [CONTRIBUTING.md](/CONTRIBUTING.md).

License
-------

Alloy is licensed under the [MIT License](/LICENSE.md).
<commit_msg>add premake4 to build guide in readme<commit_after>[Alloy™](http://alloy-lang.github.io) [![BuildStatus](https://travis-ci.org/alloy-lang/alloy.svg?branch=master)](https://travis-ci.org/alloy-lang/alloy)
========

Why the name change?
------
Apparently Ink is an already existing language, that's been in development for 3 years. Rather than
hassling with the purchasing of domains/channels from it's current creator, we thought we'd just
choose a name that wasn't already taken. We **promise** this will be the last time we change the name!

About Alloy
------

Alloy (formerly Jayfor/Ink) is a programming language written in C. The goals of this language are:

* Speed
* Simplicity
* Cleanliness

We created Alloy because we love writing C, and love the simplicity of C; we also wanted to evolve C
into something more modern, and easier to use.

IRC
------
We have an IRC where we discuss Alloy, and other stuff too, come join! If you want to help contribute,
we highly suggest you join the IRC :)

* server: irc.freenode.net
* channel: #alloy-lang

A taste of Alloy
------
Warning, this is still (potentially) subject to change. Also a disclaimer,
the syntax below is very incosistent and is just to show what's possible in the 
language.
```rust
struct Whatever {
	int x = 10
	int y
}

fn do_stuff(int a, int b): int {
	int x = 5
	while ((a + b) > 10) -> x = (x + 1)

	match x {
		(x == 12) {
			loop {
				if ((a + x) > 21) -> break
			}
			return x
		}
		(x < 2) {
			for _ :(a, b) {
				a = (x + 1)
			}
		}
		(x == 29) -> return a
		_ {
			return 1337
		}
	}

	if (x > 21) {
		return (x - 21)
	}
}

fn main() {
	do_stuff(125, 25)
}
```
Status
------

The language is still in development. More information/specifics
can be found in [`/docs/`](/docs/). The compiler is written in C
and uses LLVM as its backend.

Building
--------

To build you will need:

 - [`llvm >= 3.4`](http://llvm.org/releases/download.html)
 - [`premake4 >= 4.1`](http://industriousone.com/premake/download)
 - A suitable GNU C compiler (any one of the below will do fine):
   - [`clang >= 3.4.0`](http://llvm.org/releases/download.html)
   - [`gcc >= 4.8.1`](https://gcc.gnu.org/) (change `LCC` and 
     `LCXX` in the [makefile](/Makefile) to `gcc` and `g++`, respectively)

```bash
# clone the repository
git clone -v https://github.com/alloy-lang/alloy.git
    
# cd into the repository
cd alloy

# build
premake4 gmake
make

# run a program
cd tests

# run the test bash script
# if some of these fail, it might be because
# the developers have changed the document
./alloyctest.sh
```

Contributing
------------

Something not working? Open an [Issue](https://github.com/alloy-lang/alloy/issues)
or send us a [Pull Request](https://github.com/alloy-lang/alloy/pulls)
on GitHub.

See [CONTRIBUTING.md](/CONTRIBUTING.md).

License
-------

Alloy is licensed under the [MIT License](/LICENSE.md).

{'fraction_non_alphanumeric': 0.14240282685512368, 'fraction_numerical': 0.013604240282685512, 'mean_word_length': 3.075593952483801, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6898202', 'n_tokens_mistral': 2079, 'n_tokens_neox': 1885, 'n_words': 724}