shrub/mar/sole/effect.hoon

61 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-04-10 09:57:04 +03:00
::
2015-12-20 14:48:17 +03:00
:::: /hoon#sole-effect#mar
2015-04-10 09:57:04 +03:00
::
/? 314
/- sole
2015-04-10 09:57:04 +03:00
!:
::::
::
[sole .]
2015-04-10 09:57:04 +03:00
|%
++ mar-sole-change :: XX dependency
2015-12-10 12:17:19 +03:00
|_ cha+sole-change
2015-04-10 09:57:04 +03:00
++ grow
|% ++ json
^- ^json
=+ cha
2015-12-20 14:48:17 +03:00
=< (jobe ted#(. ted) ler#a#~[(jone own.ler) (jone his.ler)] ~)
2015-12-10 12:17:19 +03:00
|= det+sole-edit
2015-04-14 23:38:37 +03:00
?- -.det
2015-12-10 12:17:19 +03:00
$nop [%s 'nop']
$mor [%a (turn p.det ..$)]
$del (joba %del (jone p.det))
$set (joba %set (jape (tufa p.det)))
2015-12-20 14:48:17 +03:00
$ins (joba %ins (jobe at#(jone p.det) cha#s#(tuft q.det) ~))
2015-04-10 09:57:04 +03:00
==
--
--
++ wush
2015-12-10 12:17:19 +03:00
|= {wid+@u tan+tang}
2015-04-10 09:57:04 +03:00
^- tape
2015-12-13 05:51:23 +03:00
=+ rolt=|=(a+wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a)))))
(rolt (turn (flop tan) |=(a+tank (rolt (wash 0^wid a)))))
2015-04-10 09:57:04 +03:00
::
--
!:
2015-12-13 05:51:23 +03:00
|_ sef+sole-effect
2015-04-10 09:57:04 +03:00
::
++ grab :: convert from
|%
++ noun sole-effect :: clam from %noun
--
++ grow
|%
++ json
^- ^json
2015-12-10 12:17:19 +03:00
?+ -.sef
2015-12-20 14:48:17 +03:00
~|(unsupported-effect#-.sef !!)
2015-12-13 05:51:23 +03:00
$mor [%a (turn p.sef |=(a+sole-effect json(sef a)))]
2015-12-10 12:17:19 +03:00
$err (joba %hop (jone p.sef))
$txt (joba %txt (jape p.sef))
$tan (joba %tan (jape (wush 160 p.sef)))
$det (joba %det json:~(grow mar-sole-change +.sef))
$pro
2015-12-20 14:48:17 +03:00
(joba %pro (jobe vis#b#vis.sef tag#s#tag.sef cad#(jape cad.sef) ~))
2015-12-10 12:17:19 +03:00
::
?($bel $clr $nex)
(joba %act %s -.sef)
2015-04-10 09:57:04 +03:00
==
--
--