<commit_before># This file is the first thing loaded on startup.

console.originalLog = console.log
console.log = (thing) ->
  OSX.NSLog thing.toString() if thing?
  console.originalLog(thing)


# load require() function
root = OSX.NSBundle.mainBundle.resourcePath
code = OSX.NSString.stringWithContentsOfFile "#{root}/src/require.js"
eval "(function(){ #{code} })(this);"

console.log 'require tests:'
console.log require.resolve 'underscore'
console.log require.resolve 'osx'
console.log require.resolve 'ace/requirejs/text!ace/css/editor.css'
console.log require.resolve 'ace/keyboard/keybinding'

this._ = require 'underscore'<commit_msg>use JSCocoa to eval require.js - shows up in web inspector!<commit_after># This file is the first thing loaded on startup.

console.originalLog = console.log
console.log = (thing) ->
  OSX.NSLog thing.toString() if thing?
  console.originalLog(thing)


# load require() function
root = OSX.NSBundle.mainBundle.resourcePath
code = OSX.NSString.stringWithContentsOfFile path = "#{root}/src/require.js"
__jsc__.evalJSString_withScriptPath code, path

console.log 'require tests:'
console.log require.resolve 'underscore'
console.log require.resolve 'osx'
console.log require.resolve 'ace/requirejs/text!ace/css/editor.css'
console.log require.resolve 'ace/keyboard/keybinding'

this._ = require 'underscore'
{'fraction_non_alphanumeric': 0.12184249628528974, 'fraction_numerical': 0.0, 'mean_word_length': 5.444976076555024, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6774315', 'n_tokens_mistral': 426, 'n_tokens_neox': 416, 'n_words': 106}