Raku / evalbot

IRC bot for executing Raku code
https://raku.org/community/irc
17 stars 14 forks source link

Truncation of output is done before comparison #2

Closed BenGoldberg1 closed 11 years ago

BenGoldberg1 commented 11 years ago

Here's an example of me talking to the evalbot on irc: [22:23] rpn: .say for 1..200 [22:23] niecza v24-95-ga6d4c5f: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␠[22:23] ..pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83␤ [22:23] ..rakudo 67c6fd: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤8

All three perl6 implementations originally produced the same output (I hope!) but the results were not consolidated into one line, like the following:

[22:27] rpn: .say for 1..80 [22:27] rakudo 67c6fd, niecza v24-95-ga6d4c5f, pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76â

Also, on a related note, when truncation occurs, the output is missing a » to match the « after the word OUTPUT.

Mouq commented 11 years ago

I'm having trouble figuring out how to test this on my own computer, but it looks like the fix would be in lib/EvalbotExecuter and might be moving L98-102 ( https://github.com/perl6/evalbot/blob/master/lib/EvalbotExecuter.pm#L98-102 ) to after L113, after truncation occurs.

Mouq commented 11 years ago

No, I was completely incorrect

Mouq commented 11 years ago

As the title issue is fixed, I'm closing this issue. The missing "»" bug will go in it's own issue.