<commit_before>* GHCJS Examples
** hello
Hello World example, uses the bare minimum of functions from
=ghcjs-dom= to get text into the browser window.
** embed
Only slightly more elaborate than =hello=, sets a large chunk of
static HTML, and then selects several elements by id.  The use of
~documentGetElementById~ is important.  The use of ~embedFile~ is not
so important.  Both will disappear as I move to better libraries for
constructing HTML.
** hamlet
Use =hamlet= and =blaze-html= to create the inner HTML content.<commit_msg>explain timer in README<commit_after>* GHCJS Examples
** hello
Hello World example, uses the bare minimum of functions from
=ghcjs-dom= to get text into the browser window.
** embed
Only slightly more elaborate than =hello=, sets a large chunk of
static HTML, and then selects several elements by id.  The use of
~documentGetElementById~ is important.  The use of ~embedFile~ is not
so important.  Both will disappear as I move to better libraries for
constructing HTML.
** hamlet
Use =hamlet= and =blaze-html= to create the inner HTML content.
** timer
A countdown timer using an MVar event queue to tie the knot.  Callbacks on DOM elements add events to the queue.  A single Haskell thread pops events from the queue and updates the (global) state.  A ~render~ function is called in a loop by ~requestAnimationFrame~ and updates the DOM based on the global state.
{'fraction_non_alphanumeric': 0.05575411007862759, 'fraction_numerical': 0.0, 'mean_word_length': 4.533596837944664, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6379136', 'n_tokens_mistral': 373, 'n_tokens_neox': 364, 'n_words': 217}