<commit_before>Mill
====

Mill is a preprocessor that adds coroutine support to C language.

The result of preprocessing are standard C source and header files that can be
added directly to your C projects.

WARNING: THIS PROJECT IS UNDER DEVELOPMENT! DO NOT USE YET!

## Prerequisites

* Install Ruby
* Install libuv from here: https://github.com/joyent/libuv

The former is needed at compilation time, the latter at both compilation time
and runtime.

## Example

```
#include <stdio.h>
#include <msleep.h>

coroutine stopwatch ()
{
    void *s1;
    void *s2;
    endvars;

    s1 = call msleep (1000);
    s2 = call msleep (2000);

    while (1) {
        wait;
        if (@who == s1)
            printf ("1 second elapsed!\n");
        if (@who == s2)
            printf ("2 seconds elapsed!\n");
    }
}

int main ()
{
    stopwatch ();
    return 0;
}
```

Note that the two 'msleep' coroutines are run in parallel with the main thread!

## Usage

```
mill stopwatch.mill
gcc -o stopwatch stopwatch.c stopwatch.c -luv
./stopwatch
```

## Documentation

### Introduction to coroutines

Coroutines are a way to implement cooperative multitasking in a rather simple
and developer-friendly manner.

If you are not familiar with coroutines, check the wikipedia article here:

https://en.wikipedia.org/wiki/Coroutine

A nice explanation of how to implement coroutines in C can be found here:

http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html

### Mill
<commit_msg>Minor fix to README<commit_after>Mill
====

Mill is a preprocessor that adds coroutine support to C language.

The result of preprocessing are standard C source and header files that can be
added directly to your C projects.

WARNING: THIS PROJECT IS UNDER DEVELOPMENT! DO NOT USE YET!

## Prerequisites

* Install Ruby
* Install libuv from here: https://github.com/joyent/libuv

The former is needed at compilation time, the latter at both compilation time
and runtime.

## Example

```
#include <stdio.h>
#include <msleep.h>

coroutine stopwatch ()
{
    void *s1;
    void *s2;
    endvars;

    s1 = call msleep (1000);
    s2 = call msleep (2000);

    while (1) {
        wait;
        if (@who == s1)
            printf ("1 second elapsed!\n");
        if (@who == s2)
            printf ("2 seconds elapsed!\n");
    }
}

int main ()
{
    stopwatch ();
    return 0;
}
```

Note that the two 'msleep' coroutines are running in parallel with the main
thread!

## Usage

```
mill stopwatch.mill
gcc -o stopwatch stopwatch.c stopwatch.c -luv
./stopwatch
```

## Documentation

### Introduction to coroutines

Coroutines are a way to implement cooperative multitasking in a rather simple
and developer-friendly manner.

If you are not familiar with coroutines, check the wikipedia article here:

https://en.wikipedia.org/wiki/Coroutine

A nice explanation of how to implement coroutines in C can be found here:

http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html

### Mill

{'fraction_non_alphanumeric': 0.09716599190283401, 'fraction_numerical': 0.012145748987854251, 'mean_word_length': 3.2357142857142858, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '2782748', 'n_tokens_mistral': 959, 'n_tokens_neox': 914, 'n_words': 361}