<commit_before><commit_msg>github pages make no sense<commit_after>document.addEventListener('DOMContentLoaded', function() {
  'use strict';

  const editor = window.ace.edit('editor');
  editor.setTheme('ace/theme/monokai');
  editor.getSession().setMode('ace/mode/javascript');

  const binary = window.ace.edit('binary');
  binary.setReadOnly(true);

  const compileButton = document.getElementById('compile');
  compileButton.addEventListener('click', () => {
    const src = editor.getValue();
    const wasm = window.Walt.getAst(src);
    binary.$blockScrolling = Infinity;
    binary.setValue(wasm.debug(), -1);
    WebAssembly.instantiate(wasm.buffer())
      .then(result => {
        console.log('Module', result.module);
        console.log('Instance', result.instance);
        const exports = result.instance.exports;
        console.log('Exports', Object.keys(result.instance.exports).forEach(
          k => typeof exports[k] === 'function' ?
          console.log(`${k} => ${exports[k]()}`) :
          console.log(`${k} => ${exports[k]}`)
        ));
      });
  });
});
{'fraction_non_alphanumeric': 0.1792279411764706, 'fraction_numerical': 0.0009191176470588235, 'mean_word_length': 3.6538461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, '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': '5168888', 'n_tokens_mistral': 319, 'n_tokens_neox': 314, 'n_words': 50}