<commit_before>(*
** For trying out some OOP ideas
*)

(* ****** ****** *)

(*
abstype symbol_type
typedef symbol = symbol_type
*)
typedef symbol = string

(* ****** ****** *)

abstype class_type = ptr
typedef class = class_type

(* ****** ****** *)

abstype class_vars = ptr
abstype class_methods = ptr

(* ****** ****** *)

abstype object_type = ptr
typedef object = object_type

(* ****** ****** *)

fun class_get_vars (class): class_vars
fun class_get_methods (class): class_methods

(* ****** ****** *)
//
fun object_new(class): object
//
fun object_new_int(int): object
fun object_new_float(double): object
fun object_new_string(string): object
//
(* ****** ****** *)

fun object_get_class(object): class
overload .class with object_get_class

(* ****** ****** *)
//
datatype value =
  | VALnil of ()
  | VALint of int
  | VALfloat of double
  | VALstring of string
  | VALobject of object
//
typedef valuelst = List0 (value)
//
(* ****** ****** *)
//
datatype method =
  | MTDnil of ()
  | MTDfun of (valuelst -> value)
  | MTDclo of (valuelst -<cloref1> value)<commit_msg>Updating: very minorly improving<commit_after>(*
** For trying out some OOP ideas
*)

(* ****** ****** *)

(*
abstype symbol_type
typedef symbol = symbol_type
*)
typedef symbol = string

(* ****** ****** *)

abstype class_type = ptr
typedef class = class_type

(* ****** ****** *)

abstype class_vars = ptr
abstype class_methods = ptr

(* ****** ****** *)

abstype object_type = ptr
typedef object = object_type

(* ****** ****** *)

fun class_get_vars (class): class_vars
fun class_get_methods (class): class_methods

(* ****** ****** *)
//
fun object_new(class): object
//
fun object_new_int(int): object
fun object_new_float(double): object
fun object_new_string(string): object
//
(* ****** ****** *)

fun object_get_class(object): class
overload .class with object_get_class

(* ****** ****** *)
//
datatype value =
  | VALnil of ()
  | VALint of int
  | VALfloat of double
  | VALstring of string
  | VALobject of object
//
(*
  | {a:type} VALboxed of (a)
*)
//
typedef valuelst = List0 (value)
//
(* ****** ****** *)
//
datatype method =
  | MTDnil of ()
  | MTDfun of (valuelst -> value)
  | MTDclo of (valuelst -<cloref1> value)
{'fraction_non_alphanumeric': 0.21064501578709968, 'fraction_numerical': 0.0018042399639152007, 'mean_word_length': 4.158139534883721, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '249782', 'n_tokens_mistral': 792, 'n_tokens_neox': 768, 'n_words': 192}