urbit/main/bin/reset.hoon
2013-09-28 13:21:18 -07:00

36 lines
766 B
Plaintext

!:
:: /=main=/fun/reset/hoon
::
=> .(-< `who=@p`-<)
|= [est=time *]
|= arg=*
=+ ^= lok ^- case
?: =(~ arg) [%da est]
?> =(~ +.arg)
((hard case) -.arg)
=+ cav=(scot (dime lok))
=+ top=`path`[(scot %p who) %arvo cav ~]
=+ pax=`path`(weld top `path`[%hoon ~])
~& %reset-start
=+ gen=(reck pax)
~& %reset-parsed
=+ ken=q:(~(mint ut %noun) %noun gen)
=+ all=.*(0 ken)
~& %reset-compiled
:_ ~
:- [%xx %volt all]
^- (list gift)
=+ ^= vay ^- (list ,[p=@tas q=@tas])
:~ [%$ %zuse]
[%a %ames]
[%b %batz]
[%c %clay]
[%d %dill]
[%e %eyre]
==
%+ turn vay
|= [a=@tas b=@tas]
=+ pax=(weld top `path`[b ~])
=+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~])))
`gift`[%xx %veer a pax txt]