From 36bd690c1817d27d516d4f6490d7542c229e2ba7 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Thu, 31 Jul 2014 11:17:51 -0400 Subject: [PATCH] show.hoon --- try/bin/show.hoon | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 try/bin/show.hoon diff --git a/try/bin/show.hoon b/try/bin/show.hoon new file mode 100644 index 0000000000..77a0c4ae83 --- /dev/null +++ b/try/bin/show.hoon @@ -0,0 +1,65 @@ +!: +:: /=try=/bin/revert/hoon +:: Call with desk & change to revert +:: +=> .(-< `who=@p`-<) +=> .(+ =>(+ ^/=/main/=/lib/pony)) +|= [est=time eny=@uw] +|= $: des=span + cas=@ud + ~ + == +=+ dom=((hard dome) .^(%cv /=/[des]/=)) +%- (posh (add ~s1 est)) +|= tim=@da +^- bowl +:_ ~ +^- (list gift) +=+ ran=((hard rang) .^(%cu /(scot %p who)/main/(scot %da tim))) +=+ hed=(~(got by hut.ran) (~(got by hit.dom) cas)) +?~ p.hed !! +=+ par=(~(got by hut.ran) i.p.hed) +=+ ^= dif + %- %~ zerg ze + :+ est dom ran + [par hed] +=+ ^= sla + |= pat=path + %+ roll %+ turn pat |= t=@t (cat 3 '/' t) + |= [t=@t a=@t] + (cat 3 a t) +%- |= lin=(list ,@t) + %+ turn lin + |= lan=@t ^- gift + [%la %leaf (trip lan)] +%+ roll (~(tap by dif) ~) +|= [[pat=path mis=miso] lin=(list ,@t)] +?- -.mis + %del [(cat 3 '%del ' (sla pat)) lin] + %ins [(cat 3 '%ins ' (sla pat)) lin] + %mut ?> ?=(%c -.q.p.mis) + ::=+ ^= con + :: %- (hard (list ,@t)) + :: %- %~ zaul ze + :: :+ est dom ran + :: (~(got by q.par) pat) + %+ welp lin + %+ welp [(cat 3 '%mut ' (sla pat)) ~] + ^- (list ,@t) + =< q + %+ roll ((hard (urge ,@t)) p.q.p.mis) + |= [p=(unce ,@t) [q=(list ,@t) r=@ud]] + ?- -.p + %& [q (add r p.p)] + %| =+ new=((hard (list ,@t)) p.p) + =+ old=((hard (list ,@t)) q.p) + :_ (add r (lent p.p)) + ^- (list ,@t) + %+ welp q + %+ welp :_ ~ (cat 3 '%chunk ' (scot %u r)) + %+ welp :_ ~ 'previous line !!!!here' + %+ welp %+ turn old |= t=@t (cat 3 '-< ' t) + %+ turn new |= t=@t (cat 3 '+> ' t) + == +== +::`gift`[%og des [let hit hut lat]]