Skip to content


Aleks-Daniel Jakimenko-Aleksejev edited this page Aug 8, 2019 · 11 revisions

This is an IRC bot for running code at a given commit of Rakudo. It can be addressed by its full name ('committable6') or its short names ('commit', 'c').

You can find some extra examples in tests: committable.t

Usage examples


<MasterDuke> commit: f583f22 say $*PERL.compiler.version
<committable6> MasterDuke, 娄芦f583f22禄:
<AlexDaniel> commit: HEAD say lines[0]
<committable6> AlexDaniel, 娄芦HEAD禄: 鈾ヰ煢 陹涖幉鈧娾鸡馃偞猝库専鈸溾壒鈩烩咅煒︹馃尩鈥傪煐般尣鈳⑩灨 馃悕馃挃鈥凁煑悈光疅饪佱殌狻嶃嵎饨

Run something across all available releases

<AlexDaniel> commit: releases say $*PERL
<committable6> AlexDaniel, 娄芦2015.10,2015.11禄: Perl 6 (6.b)鈵ぢβ2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07,2016.08,HEAD禄: Perl 6 (6.c)

6.c releases have a shortcut:

<AlexDaniel> 6c: say (42, 24).pick
<committable6> AlexDaniel, 娄2015.12,2016.02,2016.07.1,2016.08.1: 芦24禄 娄2016.01.1,2016.03,2016.04,2016.05,2016.06,HEAD(1668b4f): 芦42禄

Large output

If the output is too big to fit into one IRC message, it will be uploaded and you will be given a link.

<AlexDaniel> commit: HEAD .say for ^1000
<committable6> AlexDaniel,

Multiple commits

<AlexDaniel> commit: 2016.02,2016.03,9ccd848,HEAD say 鈥榟ello鈥
<committable6> AlexDaniel, 娄芦2016.02,2016.03,9ccd848,HEAD禄: hello
<AlexDaniel> commit: HEAD~100,HEAD say $*PERL.compiler.version
<committable6> AlexDaniel, 娄芦HEAD~10禄: v2016.07.1.169.g.4.dd.6223鈵ぢβ獺EAD禄: v2016.08.1.35.g.575.dda.1
<AlexDaniel> commit: 2016.03^^,2016.03 say 42
<committable6> AlexDaniel, 娄芦2016.03^^,2016.03禄: 42


You can try specifying a range. Keep in mind that it may time out if you try something that takes significant amount of time to run. It will only allow you run it across 1000 commits (you probably don't want anything bigger than that).

<AlexDaniel> commit: 2016.02..2016.03 say ^1000 .grep: -> $n {([+] ^$n .grep: -> $m {$m and $n %% $m}) == $n }
<committable6> AlexDaniel,

As always, it will group commits that have the same output.

Special characters

All ASCII control characters are converted into their printable unicode equivalents:

<AlexDaniel> commit: HEAD say (.chr for ^128).join
<committable6> AlexDaniel, 娄芦HEAD禄: 鈵鈵佲悅鈵冣悇鈵呪悊鈵団悎鈵夆悿鈵嬧悓鈵嶁悗鈵忊悙鈵戔悞鈵撯悢鈵曗悥鈵椻悩鈵欌悮鈵涒悳鈵濃悶鈵 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~鈵

Note that instead of it prints .

Speaking of , you can use it for multiline output:

<AlexDaniel> commit: HEAD # This is a comment 鈵 say 锝ello world!锝
<committable6> AlexDaniel, 娄芦HEAD禄: hello world!

External files

If your source code is too large, you can upload it somewhere.

<AlexDaniel> committable6: HEAD
<committable6> AlexDaniel, Successfully fetched the code from the provided URL.
<committable6> AlexDaniel, 娄芦HEAD禄: url test

Note that you have to provide a 鈥渞aw鈥 link. It does not care if it is on github or not, it will accept any url as long as the mime type is OK:

<AlexDaniel> committable6: HEAD
<committable6> AlexDaniel, It looks like a URL, but mime type is 鈥榯ext/html鈥 while I was expecting something with 鈥榯ext/plain鈥 or 鈥榩erl鈥 in it. I can only understand raw links, sorry.