<commit_before>#include <QApplication>
#include <QMainWindow>
#include <QDesktopWidget>
#include <QSize>

#include <GL/glut.h>

#include "Alpha.h"
#include "Bootstrapper.hpp"
#include "gl/ScreenGLWidget.hpp"

void centerApp(QMainWindow& window)
{
    QSize appSize(800, 600);
    window.resize(appSize);

    QDesktopWidget* desktop = QApplication::desktop();

    int desktopArea = desktop->width() * desktop->height();
    int appArea = appSize.width() * appSize.height();
    if (((float)appArea / (float)desktopArea) > 0.75f) {
        // Just maximize it if the desktop isn't significantly
        // bigger than our app's area.
        window.showMaximized();
    } else {
        // Center the app on the primary monitor.
        QPoint windowLocation = desktop->screenGeometry(desktop->primaryScreen()).center();
        windowLocation.setX(windowLocation.x() - appSize.width() / 2);
        windowLocation.setY(windowLocation.y() - appSize.height() / 2);
        window.move(windowLocation);
        window.show();
    }
}

int runLegacyAlpha(QApplication& app, QMainWindow& gui)
{
    Alpha alpha;
    gui.setCentralWidget(&alpha);

    return app.exec();
}

int runAlpha(QApplication& app, QMainWindow& gui)
{
    Bootstrapper alphaBootstrapper;
    nt::gl::ScreenGLWidget screenWidget;

    screenWidget.setScreen(&alphaBootstrapper.getScreen());

    gui.setCentralWidget(&screenWidget);

    return app.exec();
}

int main(int argc, char *argv[])
{
	glutInit(&argc, argv);
    QApplication app(argc, argv);

    QMainWindow gui;
    gui.setWindowTitle("Alpha");
    centerApp(gui);

    return runLegacyAlpha(app, gui);
}
<commit_msg>main: run the new rendering hierarchy by default<commit_after>#include <QApplication>
#include <QMainWindow>
#include <QDesktopWidget>
#include <QSize>

#include <GL/glut.h>

#include "Alpha.h"
#include "Bootstrapper.hpp"
#include "gl/ScreenGLWidget.hpp"

void centerApp(QMainWindow& window)
{
    QSize appSize(800, 600);
    window.resize(appSize);

    QDesktopWidget* desktop = QApplication::desktop();

    int desktopArea = desktop->width() * desktop->height();
    int appArea = appSize.width() * appSize.height();
    if (((float)appArea / (float)desktopArea) > 0.75f) {
        // Just maximize it if the desktop isn't significantly
        // bigger than our app's area.
        window.showMaximized();
    } else {
        // Center the app on the primary monitor.
        QPoint windowLocation = desktop->screenGeometry(desktop->primaryScreen()).center();
        windowLocation.setX(windowLocation.x() - appSize.width() / 2);
        windowLocation.setY(windowLocation.y() - appSize.height() / 2);
        window.move(windowLocation);
        window.show();
    }
}

int runLegacyAlpha(QApplication& app, QMainWindow& gui)
{
    Alpha alpha;
    gui.setCentralWidget(&alpha);

    return app.exec();
}

int runAlpha(QApplication& app, QMainWindow& gui)
{
    Bootstrapper alphaBootstrapper;
    nt::gl::ScreenGLWidget screenWidget;

    screenWidget.setScreen(&alphaBootstrapper.getScreen());

    gui.setCentralWidget(&screenWidget);

    return app.exec();
}

int main(int argc, char *argv[])
{
	glutInit(&argc, argv);
    QApplication app(argc, argv);

    QMainWindow gui;
    gui.setWindowTitle("Alpha");
    centerApp(gui);

    return runAlpha(app, gui);
}

{'fraction_non_alphanumeric': 0.1356390977443609, 'fraction_numerical': 0.006616541353383459, 'mean_word_length': 3.6582633053221287, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, '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': '1010608', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1026, 'n_words': 229}