<commit_before>-- Copyright 2007-2009 <NAME><att>caladbolg.net. See LICENSE.

local textadept = _G.textadept

package.path = _HOME..'/core/?.lua;'..package.path
if not WIN32 then
  package.cpath = _HOME..'/core/?.so;'..package.cpath
else
  package.cpath = _HOME..'/core/?.dll;'..package.cpath
end

_USERHOME = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')..'/.textadept/'
local lfs = require 'lfs'
if not lfs.attributes(_USERHOME) then lfs.mkdir(_USERHOME) end

_LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers/'

_THEME = 'light'
local f = io.open(_USERHOME..'/theme', 'rb')
if f then
  theme = f:read('*line'):match('[^\r\n]+')
  f:close()
  if theme and #theme > 0 then _THEME = theme end
end

require 'iface'<commit_msg>No need for package.cpath in core/init.lua anymore.<commit_after>-- Copyright 2007-2009 <NAME><att>caladbolg.net. See LICENSE.

local textadept = _G.textadept

package.path = _HOME..'/core/?.lua;'..package.path

_USERHOME = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')..'/.textadept/'
local lfs = require 'lfs'
if not lfs.attributes(_USERHOME) then lfs.mkdir(_USERHOME) end

_LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers/'

_THEME = 'light'
local f = io.open(_USERHOME..'/theme', 'rb')
if f then
  theme = f:read('*line'):match('[^\r\n]+')
  f:close()
  if theme and #theme > 0 then _THEME = theme end
end

require 'iface'
{'fraction_non_alphanumeric': 0.18631732168850074, 'fraction_numerical': 0.017467248908296942, 'mean_word_length': 3.963898916967509, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '291699', 'n_tokens_mistral': 562, 'n_tokens_neox': 527, 'n_words': 123}