mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 16:09:31 +03:00
show.hoon
This commit is contained in:
parent
d809b036dd
commit
36bd690c18
65
try/bin/show.hoon
Normal file
65
try/bin/show.hoon
Normal file
@ -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]]
|
Loading…
Reference in New Issue
Block a user