<commit_before>// StoryMaster Simulator
// <NAME> (c) 2014
//
// See LICENSE for licensing information.
//
// simulator.cpp - Main file for the sample StoryMaster simulator.

#include <cstdio>

#include <iostream>

#include <storymaster.h>

int main(int argc, const char *argv[])
{
  sm_core core;
  sm_scene scene;

  sm_core_init(&core);
  sm_scene_init(&scene, &core, "examples/dialog.scene.lua", "dialog");

  return 0;
}
<commit_msg>Simulator now malloc/frees all memory.<commit_after>// StoryMaster Simulator
// <NAME> (c) 2014
//
// See LICENSE for licensing information.
//
// simulator.cpp - Main file for the sample StoryMaster simulator.

#include <cstdlib>
#include <cstdio>

#include <iostream>

#include <storymaster.h>

int main(int argc, const char *argv[])
{
  sm_core *core = (sm_core *)(malloc(sizeof(sm_core)));
  sm_scene *scene = (sm_scene *)(malloc(sizeof(sm_scene)));

  sm_core_init(core);
  sm_scene_init(scene, core, "examples/dialog.scene.lua", "dialog");

  // ...

  sm_scene_deinit(scene);
  sm_core_deinit(core);

  free(scene);
  free(core);

  return 0;
}

{'fraction_non_alphanumeric': 0.15321100917431194, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 4.170616113744076, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '1185227', 'n_tokens_mistral': 406, 'n_tokens_neox': 376, 'n_words': 98}