urbit/base/ape/hood.hoon

108 lines
5.5 KiB
Plaintext
Raw Normal View History

2015-06-12 00:53:32 +03:00
:: :: ::
:::: /hoon/hood/ape :: ::
2015-05-11 21:05:14 +03:00
:: :: ::
/? 314 :: zuse version
2015-05-14 22:24:43 +03:00
/+ sole, talk, helm, kiln, drum :: libraries
2015-05-11 21:05:14 +03:00
:: :: ::
:::: :: ::
!: :: ::
=> |% :: module boilerplate
++ hood-0 ::
,[%0 lac=(map ,@tas hood-part)] ::
2015-05-11 21:05:14 +03:00
++ hood-good ::
|* hed=hood-head ::
|= paw=hood-part ::
?- hed ::
2015-05-16 03:23:40 +03:00
%drum ?>(?=(%drum -.paw) `drum-part`paw) ::
2015-05-12 03:31:37 +03:00
%helm ?>(?=(%helm -.paw) `helm-part`paw) ::
%kiln ?>(?=(%kiln -.paw) `kiln-part`paw) ::
2015-05-11 21:05:14 +03:00
== ::
++ hood-head ,_-:*hood-part ::
2015-05-12 23:10:22 +03:00
++ hood-make ::
|* [our=@p hed=hood-head] ::
2015-05-11 21:05:14 +03:00
?- hed ::
%drum (drum-port our) ::
2015-05-12 23:10:22 +03:00
%helm *helm-part ::
%kiln *kiln-part ::
2015-05-11 21:05:14 +03:00
== ::
++ hood-part ::
$% [%drum %0 drum-pith] ::
[%helm %0 helm-pith] ::
[%kiln %0 kiln-pith] ::
2015-05-11 21:05:14 +03:00
== ::
-- ::
:: :: ::
:::: :: ::
:: :: ::
2015-05-28 06:48:25 +03:00
|_ $: hid=bowl :: system state
hood-0 :: server state
2015-05-11 21:05:14 +03:00
== ::
++ able :: find/make part
|* hed=hood-head
=+ rep=(~(get by lac) hed)
=+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed))
2015-05-12 23:10:22 +03:00
((hood-good hed) par)
2015-05-11 21:05:14 +03:00
::
++ ably :: save part
2015-05-12 03:31:37 +03:00
|* [moz=(list) rep=hood-part]
[(flop moz) %_(+> lac (~(put by lac) -.rep rep))]
2015-05-11 21:05:14 +03:00
:: :: ::
:::: :: ::
:: :: ::
2015-05-30 10:53:19 +03:00
++ coup-kiln-fancy (wrap take-coup-fancy):from-kiln
2015-05-14 22:24:43 +03:00
++ coup-kiln-spam ::
2015-05-28 10:56:08 +03:00
|= [way=wire saw=(unit tang)]
2015-05-14 22:24:43 +03:00
~? ?=(^ saw) [%kiln-spam-lame u.saw]
2015-06-12 00:53:32 +03:00
[~ +>]
2015-05-14 22:24:43 +03:00
::
++ coup-drum-phat (wrap take-coup-phat):from-drum
++ coup-helm-hi (wrap coup-hi):from-helm
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
2015-06-04 01:16:32 +03:00
++ from-lib
|* _[%helm ..$ ,_abet]:(helm-work)
2015-06-04 01:16:32 +03:00
=> .(+< [identity start finish]=+<)
=- [wrap=- *start] :: usage (wrap handle-arm):from-foo
|* handle=_finish
|= _+<.handle
=. +>.handle (start hid (able identity))
(ably (handle +<))
2015-05-17 22:39:03 +03:00
::
++ from-drum (from-lib %drum [..$ ,_se-abet]:(drum-work))
++ from-helm (from-lib %helm [..$ ,_abet]:(helm-work))
++ from-kiln (from-lib %kiln [..$ ,_abet]:(kiln-work))
2015-05-28 05:46:58 +03:00
::
2015-06-04 00:18:13 +03:00
++ poke-dill-belt (wrap poke-dill-belt):from-drum
++ poke-helm-init (wrap poke-init):from-helm
2015-06-18 01:31:44 +03:00
++ poke-helm-verb (wrap poke-verb):from-helm
++ poke-helm-send-hi (wrap poke-send-hi):from-helm
++ poke-helm-hi (wrap poke-hi):from-helm
++ poke-hood-link (wrap poke-link):from-drum
2015-06-04 00:18:13 +03:00
++ poke-hood-mass (wrap poke-mass):from-helm
++ poke-hood-sync (wrap poke-sync):from-kiln
++ poke-hood-unsync (wrap poke-unsync):from-kiln
++ poke-hood-unix (wrap poke-unix):from-kiln
++ poke-hood-begin (wrap poke-begin):from-helm
++ poke-hood-invite (wrap poke-invite):from-helm
2015-06-04 00:18:13 +03:00
++ poke-hood-merge (wrap poke-merge):from-kiln
++ poke-hood-reload (wrap poke-reload):from-helm
++ poke-hood-reset (wrap poke-reset):from-helm
++ poke-hood-start (wrap poke-start):from-drum
++ poke-hood-reload-desk (wrap poke-reload-desk):from-helm
++ poke-kiln-cp (wrap poke-cp):from-kiln
++ poke-kiln-rm (wrap poke-rm):from-kiln
++ poke-kiln-mv (wrap poke-mv):from-kiln
++ poke-kiln-schedule (wrap poke-schedule):from-kiln
2015-06-04 00:18:13 +03:00
++ poke-will (wrap poke-will):from-helm
++ mere-kiln (wrap take-mere):from-kiln
++ mere-kiln-sync (wrap take-mere-sync):from-kiln
++ made-kiln (wrap take-made):from-kiln
++ init-helm |=([way=wire *] [~ +>])
++ note-helm (wrap take-note):from-helm
++ reap-drum-phat (wrap reap-phat):from-drum
2015-06-04 00:18:13 +03:00
++ onto-drum (wrap take-onto):from-drum
++ peer-drum (wrap peer):from-drum
++ quit-drum-phat (wrap quit-phat):from-drum
2015-06-23 03:47:19 +03:00
++ woot-helm (wrap take-woot):from-helm
2015-06-04 00:18:13 +03:00
++ writ-kiln-sync (wrap take-writ):from-kiln
2015-05-11 21:05:14 +03:00
--