<commit_before>module Haxor
  class Consts
    MAJOR = 0
    MINOR = 2
    PATCH = 0
    GEM_VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
    VERSION = (MAJOR << 16) | (MINOR << 8) | PATCH

    ROOT_PATH = __dir__ + '/../..'

    WORD_SIZE = 8 # 64bit
    WORD_UNPACK = 'q<'

    RESERVED_MEM = 2048 # 1024 for CPU, 1024 for IVT
    IVT_ADDR     = 1024

    # OpCode
    OPCODE_CMD_MASK = 0x0000_0000_0000_00ff
    OPCODE_FLG_MASK = 0xffff_ffff_ffff_ff00
    OPCODE_FLG_OFFSET = 8
    OPCODE_FLG_DA = 1 << OPCODE_FLG_OFFSET # dereference A operand
    OPCODE_FLG_DB = 2 << OPCODE_FLG_OFFSET # dereference B operand

    # Flags Registry Flags
    FR_ZERO    = 1 << 0 # a-b == 0
    FR_SIGN    = 1 << 1 # a-b < 0
  end
end<commit_msg>make it little easier to extend<commit_after>module Haxor
  class Consts
    MAJOR = 0
    MINOR = 2
    PATCH = 0
    GEM_VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
    VERSION = (MAJOR << 16) | (MINOR << 8) | PATCH

    ROOT_PATH = __dir__ + '/../..'

    WORD_SIZE = 8 # 64bit
    WORD_UNPACK = 'q<'

    RESERVED_MEM = 2048 # 1024 for CPU, 1024 for IVT
    IVT_ADDR     = 1024

    # OpCode
    OPCODE_CMD_MASK = 0x0000_0000_0000_00ff
    OPCODE_FLG_MASK = 0xffff_ffff_ffff_ff00
    OPCODE_FLG_OFFSET = 8
    OPCODE_FLG_DA = (1 << 0) << OPCODE_FLG_OFFSET # dereference A operand
    OPCODE_FLG_DB = (1 << 1) << OPCODE_FLG_OFFSET # dereference B operand

    # Flags Registry Flags
    FR_ZERO    = 1 << 0 # a-b == 0
    FR_SIGN    = 1 << 1 # a-b < 0
  end
end
{'fraction_non_alphanumeric': 0.10901749663526245, 'fraction_numerical': 0.07133243606998654, 'mean_word_length': 2.458139534883721, 'pattern_counts': {'":': 0, '<': 35, '<?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': '1635423', 'n_tokens_mistral': 700, 'n_tokens_neox': 609, 'n_words': 144}