Evalable

Aleks-Daniel Jakimenko-Aleksejev edited this page Sep 17, 2017 · 6 revisions

Evalable is just Committable that defaults to HEAD.

Evalable also answers on m: commands if camelia is not around.

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

While it has never been a goal to replace camelia, over the months committable has gained several advantages. Who knows, maybe one day there will be enough reasons to switch to it?

Usage examples

Basics

<AlexDaniel> eval: say 42
<evalable6> AlexDaniel, rakudo-moar 488ca6f06: OUTPUT: «42»

Camelia replacement

<AlexDaniel> m: say 42
<camelia> rakudo-moar 488ca6: OUTPUT: «42␤»
*** camelia (~p6eval@ns1.niner.name) has quit: Ping timeout: 264 seconds
<AlexDaniel> m: say 42
<evalable6> AlexDaniel, rakudo-moar 488ca6f06: OUTPUT: «42»

Magical code auto-detection

<AlexDaniel> say you forget to start your message with “m:”
<AlexDaniel> say 42
<evalable6> AlexDaniel, rakudo-moar 488ca6f06: OUTPUT: «42»

Often times people wonder how can it guess which messages are supposed to be eval-ed.

The code for it is rather confusing, but @ipatrol++ wrote a nice simple explanation:

So it only works on “say”, intentionally omits “say I”, omits anything that ends in a period, question mark, or exclamation point, automatically operates on say “…”, and otherwise requires a word/nonword character ratio of 10 or less.

These rules were created by grepping through IRC history with Quotable.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.