<commit_before>use GTK::Simple;

my $app = GTK::Simple::App.new(title => 'Code Golf Assistant!');

$app.set_content(GTK::Simple::VBox.new(
    my $source  = GTK::Simple::TextView.new(),
    my $chars   = GTK::Simple::Label.new(text => 'Characters: 0'),
    my $elapsed = GTK::Simple::Label.new(),
    my $results = GTK::Simple::TextView.new(),
));

$source.changed.tap({
    $chars.text = "Characters: $source.text.chars()";
});

Supply.interval(1).schedule_on(
    GTK::Simple::Scheduler
).tap(-> $secs {
    $elapsed.text = "Elapsed: $secs seconds";
});

$source.changed.unchanged(1).start({
    (try EVAL .text) // $!.message
}).migrate.schedule_on(GTK::Simple::Scheduler).tap(
    { $results.text = $_ }
);

$app.run();
<commit_msg>Chase unchanged -> stable spec change.<commit_after>use GTK::Simple;

my $app = GTK::Simple::App.new(title => 'Code Golf Assistant!');

$app.set_content(GTK::Simple::VBox.new(
    my $source  = GTK::Simple::TextView.new(),
    my $chars   = GTK::Simple::Label.new(text => 'Characters: 0'),
    my $elapsed = GTK::Simple::Label.new(),
    my $results = GTK::Simple::TextView.new(),
));

$source.changed.tap({
    $chars.text = "Characters: $source.text.chars()";
});

Supply.interval(1).schedule_on(
    GTK::Simple::Scheduler
).tap(-> $secs {
    $elapsed.text = "Elapsed: $secs seconds";
});

$source.changed.stable(1).start({
    (try EVAL .text) // $!.message
}).migrate.schedule_on(GTK::Simple::Scheduler).tap(
    { $results.text = $_ }
);

$app.run();

{'fraction_non_alphanumeric': 0.2242302543507363, 'fraction_numerical': 0.004016064257028112, 'mean_word_length': 4.339285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '2069976', 'n_tokens_mistral': 567, 'n_tokens_neox': 557, 'n_words': 90}