From 45b26586c12539f46f003b9e2d5690a52e8e594e Mon Sep 17 00:00:00 2001 From: Joseph Bryan Date: Thu, 16 Jun 2016 22:09:31 -0400 Subject: [PATCH] updates +moon to produce an error message instead of a stack trace ...when run from a moon or comet also replaces binary math with `++clan`, allows ~zod to ticket, and uses %tang/%leaf instead of %noun --- gen/moon.hoon | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gen/moon.hoon b/gen/moon.hoon index 333a1eeef..278018931 100644 --- a/gen/moon.hoon +++ b/gen/moon.hoon @@ -10,8 +10,10 @@ $~ $~ == -:- %noun -?> =(1 (met 5 p.bec)) +:- %tang :_ ~ :- %leaf +=+ ran=(clan p.bec) +?: ?=({?($earl $pawn)} ran) + "can't create a moon from a {?:(?=($earl ran) "moon" "comet")}" =+ mon=(mix (lsh 5 1 (end 5 1 eny)) p.bec) =+ tic=.^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon)) "moon: {<`@p`mon>}; ticket: {<`@p`tic>}"