<commit_before>require! \stream-snitch
pty = require \pty.js

term =
  # TODO abort on failure
  # XX use -s instead of travis wget'd pill
  pty.spawn './urbit' <[-B urbit.pill -A .. -cFI zod zod]> 
     .on \data -> process.stdout.write it
     
term.pipe (new stream-snitch /dojo> /g).on \match ->
    console.log "\n\n---\nnode: got dojo!\n---\n\n"
    set-timeout (-> process.exit 0), 1000 # should probably test further
    
term.pipe (new stream-snitch /ford: /g).on \match ->
    console.log "\n\n---\nnode: detected error\n---\n\n"
    set-timeout (-> process.exit 1), 1000
    
set-timeout ...
  -> console.log "\n\n---\nnode: timed out after 5 min\n---"
  5*60000<commit_msg>only match first error/success<commit_after>require! \stream-snitch
pty = require \pty.js

term =
  # TODO abort on failure
  # XX use -s instead of travis wget'd pill
  pty.spawn './urbit' <[-B urbit.pill -A .. -cFI zod zod]> 
     .on \data -> process.stdout.write it
     
fin = no
term.pipe (new stream-snitch /dojo> /g).on \match ->
    return if fin
    fin := yes
    console.log "\n\n---\nnode: got dojo!\n---\n\n"
    set-timeout (-> process.exit 0), 1000 # should probably test further
    
term.pipe (new stream-snitch /ford: /g).on \match ->
    return if fin
    fin := yes
    console.log "\n\n---\nnode: detected error\n---\n\n"
    set-timeout (-> process.exit 1), 1000
    
set-timeout ...
  -> console.log "\n\n---\nnode: timed out after 5 min\n---"
  5*60000
{'fraction_non_alphanumeric': 0.17647058823529413, 'fraction_numerical': 0.023255813953488372, 'mean_word_length': 2.1666666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '4176227', 'n_tokens_mistral': 574, 'n_tokens_neox': 541, 'n_words': 156}