<commit_before>Layering
========

There are many classes involved in the Ammonite REPL that can conceivably be
thought of as "the thing which runs your code". This diagram roughly breaks
down the relationship between these classes:

```
        Main
         |
         |
         |
        Repl-------------
         |               |
         |              FrontEnd
         |
        Interpreter---------------------
         |               |              |
         |              Compiler       Pressy
         |
        Evaluator
```

The distribution of responsibilities is

- `Evaluator`: runs Java bytecode

  Manages classloaders, caching, etc. to make that happen

- `Interpreter`: runs Scala source code
  
  Made up of `Evaluator` + `Compiler` (and `Pressy`). Runs source code by 
  compiling it via `Compiler` and sending it to `Evaluator` to execute 
 
- `Repl`: runs user-input

  Made up of `Interpreter` + `FrontEnd`, handles the full pipeline from taking
  user input at the command prompt to executing it 

- `Main`: a nicer API/CLI around `Repl`

  Provides the nice external-API and CLI in a separate place from all the 
  messy `Repl` internals<commit_msg>tweak-layering-docs<commit_after>Layering
========

There are many classes involved in the Ammonite REPL that can conceivably be
thought of as "the thing which runs your code". This diagram roughly breaks
down the relationship between these classes:

```
        Main
         |
         |
         |
        Repl-------------
         |               |
         |              FrontEnd
         |
        Interpreter---------------------
         |               |              |
         |              Compiler       Pressy
         |
        Evaluator
```

The distribution of responsibilities is

- `Evaluator`: runs Java bytecode

  Manages classloaders, caching, etc. to make that happen

- `Interpreter`: runs Scala source code
  
  Made up of `Evaluator` + `Compiler` (and `Pressy`). Runs source code by 
  compiling it via `Compiler` and sending it to `Evaluator` to execute 
 
- `Repl`: runs user-input

  Made up of `Interpreter` + `FrontEnd`, handles the full pipeline from taking
  user input at the command prompt to executing it 

- `Main`: a nicer API/CLI around `Repl`

  Provides the nice external-API and CLI in a separate place from all the 
  messy `Repl` internals
  
  
This is the ideal layering that we want to achieve. It's likely that the 
current implementation does not entirely line up with this, and there is code
living in places it shouldn't, but over time we should try to move it to this
layering.
{'fraction_non_alphanumeric': 0.08951798010711554, 'fraction_numerical': 0.0, 'mean_word_length': 1.9783599088838268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5869796', 'n_tokens_mistral': 719, 'n_tokens_neox': 679, 'n_words': 301}