urbit/app/hood.hoon

193 lines
9.8 KiB
Plaintext
Raw Normal View History

2015-06-12 00:53:32 +03:00
:: :: ::
2016-02-05 06:05:37 +03:00
:::: /hoon/hood/app :: ::
2015-05-11 21:05:14 +03:00
:: :: ::
/? 310 :: zuse version
2016-04-13 03:10:53 +03:00
/+ sole, talk, helm, kiln, drum, write, womb :: libraries
[. helm kiln drum]
2015-05-11 21:05:14 +03:00
:: :: ::
:::: :: ::
!: :: ::
=> |% :: module boilerplate
2016-05-02 21:56:00 +03:00
++ hood-old ::
{?($0 $1) lac/(map @tas hood-part-old)} ::
++ hood-1 ::
2016-05-02 21:56:00 +03:00
{$1 lac/(map @tas hood-part)} ::
2015-05-11 21:05:14 +03:00
++ hood-good ::
2015-12-20 23:50:45 +03:00
|* hed/hood-head ::
|= paw/hood-part ::
2015-05-11 21:05:14 +03:00
?- hed ::
2015-12-09 04:54:26 +03:00
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) ::
2016-04-13 03:10:53 +03:00
$womb ?>(?=($womb -.paw) `part:womb`paw) ::
2016-02-12 02:29:52 +03:00
$write ?>(?=($write -.paw) `part:write`paw) ::
2015-05-11 21:05:14 +03:00
== ::
++ hood-head _-:*hood-part ::
2015-05-12 23:10:22 +03:00
++ hood-make ::
2015-12-20 23:50:45 +03:00
|* {our/@p hed/hood-head} ::
2015-05-11 21:05:14 +03:00
?- hed ::
$drum (drum-make our) ::
2015-12-09 04:54:26 +03:00
$helm *helm-part ::
$kiln *kiln-part ::
2016-04-13 03:10:53 +03:00
$womb *part:womb ::
$write *part:write ::
2015-05-11 21:05:14 +03:00
== ::
++ hood-part-old ?(hood-part drum-part-old) ::
++ hood-port ::
|= paw/hood-part-old ^- hood-part ::
?+ -.paw paw ::
2016-05-02 21:56:00 +03:00
$drum (drum-port paw) ::
== ::
:: ::
2015-05-11 21:05:14 +03:00
++ hood-part ::
$% {$drum $2 drum-pith-2} ::
2015-12-09 04:54:26 +03:00
{$helm $0 helm-pith} ::
{$kiln $0 kiln-pith} ::
{$womb $1 pith:womb} ::
2016-02-12 02:29:52 +03:00
{$write $0 pith:write} ::
2015-05-11 21:05:14 +03:00
== ::
-- ::
:: :: ::
:::: :: ::
:: :: ::
2015-12-20 23:50:45 +03:00
|_ $: hid/bowl :: system state
hood-1 :: server state
2015-05-11 21:05:14 +03:00
== ::
2015-12-21 00:16:39 +03:00
++ able :: find+make part
2015-12-20 23:50:45 +03:00
|* hed/hood-head
2015-05-11 21:05:14 +03:00
=+ 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
|* {(list) hood-part}
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
2015-05-11 21:05:14 +03:00
:: :: ::
:::: :: ::
:: :: ::
2016-05-02 21:56:00 +03:00
++ prep
|= old/(unit hood-old) ^- (quip _!! +>) ::
:- ~
?~ old +>
+>(lac (~(run by lac.u.old) hood-port))
::
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-12-20 23:50:45 +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
::
2015-09-17 01:39:11 +03:00
++ coup-kiln-reload ::
2015-12-20 23:50:45 +03:00
|= {way/wire saw/(unit tang)}
2015-09-17 01:39:11 +03:00
~? ?=(^ saw) [%kiln-reload-lame u.saw]
[~ +>]
::
2015-09-26 03:23:06 +03:00
++ coup-kiln-overload ::
2015-12-20 23:50:45 +03:00
|= {way/wire saw/(unit tang)}
2015-09-26 03:23:06 +03:00
~? ?=(^ saw) [%kiln-overload-lame u.saw]
[~ +>]
::
2016-04-19 01:15:35 +03:00
++ poke-hood-load
|= dat/hood-part
?> =(our src)
~& loaded+-.dat
[~ %_(+> lac (~(put by lac) -.dat dat))]
::
++ coup-drum-phat (wrap take-coup-phat):from-drum
++ coup-helm-hi (wrap coup-hi):from-helm
2016-08-20 00:07:34 +03:00
++ coup-helm-ask (wrap coup-ask):from-helm
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
2015-06-04 01:16:32 +03:00
++ from-lib
2015-12-15 01:24:20 +03:00
|* _[%helm ..$ _abet]:(helm)
2015-06-04 01:16:32 +03:00
=> .(+< [identity start finish]=+<)
=- [wrap=- *start] :: usage (wrap handle-arm):from-foo
2015-12-20 23:50:45 +03:00
|* handle/_finish
2015-06-04 01:16:32 +03:00
|= _+<.handle
=. +>.handle (start hid (able identity))
(ably (handle +<))
2015-05-17 22:39:03 +03:00
::
2015-12-15 01:21:10 +03:00
++ from-drum (from-lib %drum [..$ _se-abet]:(drum))
++ from-helm (from-lib %helm [..$ _abet]:(helm))
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln))
2016-04-13 03:10:53 +03:00
++ from-womb (from-lib %womb [..$ _abet]:(womb))
2016-02-12 02:29:52 +03:00
++ from-write (from-lib %write [..$ _abet]:(write))
2015-05-28 05:46:58 +03:00
::
2015-12-20 23:50:45 +03:00
++ init-helm |=({way/wire *} [~ +>])
2016-02-12 02:29:52 +03:00
++ made-write (wrap made):from-write
2015-09-17 02:40:53 +03:00
++ made-kiln (wrap take-made):from-kiln
++ mere-kiln (wrap take-mere):from-kiln
++ mere-kiln-sync (wrap take-mere-sync):from-kiln
2015-09-26 03:23:06 +03:00
++ wake-kiln-overload (wrap take-wake-overload):from-kiln
2015-09-17 02:40:53 +03:00
++ note-helm (wrap take-note):from-helm
++ onto-drum (wrap take-onto):from-drum
++ peer-drum (wrap peer):from-drum
2016-04-13 03:10:53 +03:00
++ peek-x-womb peek-x:(womb hid (able %womb))
2016-04-27 00:29:07 +03:00
++ peer-scry-x-womb (wrap peer-scry-x):from-womb
2015-09-17 02:40:53 +03:00
++ poke-dill-belt (wrap poke-dill-belt):from-drum
2016-04-30 02:18:59 +03:00
++ poke-drum-put (wrap poke-put):from-drum
2015-09-17 02:40:53 +03:00
++ poke-drum-link (wrap poke-link):from-drum
2015-10-20 23:48:11 +03:00
++ poke-drum-unlink (wrap poke-unlink):from-drum
++ poke-drum-exit (wrap poke-exit):from-drum
2015-09-17 02:40:53 +03:00
++ poke-drum-start (wrap poke-start):from-drum
++ poke-helm-hi (wrap poke-hi):from-helm
2016-02-06 01:17:30 +03:00
++ poke-helm-init (wrap poke-init):from-helm :: XX used?
2016-04-13 03:48:55 +03:00
::++ poke-helm-invite (wrap poke-invite):from-helm
2015-09-17 02:40:53 +03:00
++ poke-helm-mass (wrap poke-mass):from-helm
++ poke-helm-reload (wrap poke-reload):from-helm
++ poke-helm-reload-desk (wrap poke-reload-desk):from-helm
++ poke-helm-reset (wrap poke-reset):from-helm
2015-12-08 03:57:54 +03:00
++ poke-helm-deset (wrap poke-deset):from-helm
++ poke-helm-serve (wrap poke-serve):from-helm
2015-09-17 02:40:53 +03:00
++ poke-helm-send-hi (wrap poke-send-hi):from-helm
++ poke-helm-send-ask (wrap poke-send-ask):from-helm
2015-09-17 02:40:53 +03:00
++ poke-helm-verb (wrap poke-verb):from-helm
++ poke-helm-begin (wrap poke-begin):from-helm
++ poke-hood-sync (wrap poke-sync):from-kiln
2016-02-26 02:19:44 +03:00
++ poke-hood-init-sync (wrap poke-init-sync):from-kiln
2016-05-07 02:21:29 +03:00
++ poke-kiln-info (wrap poke-info):from-kiln
2015-09-17 02:40:53 +03:00
++ poke-kiln-label (wrap poke-label):from-kiln
++ poke-kiln-merge (wrap poke-merge):from-kiln
++ poke-kiln-cancel (wrap poke-cancel):from-kiln
++ poke-kiln-mount (wrap poke-mount):from-kiln
++ poke-kiln-rm (wrap poke-rm):from-kiln
++ poke-kiln-schedule (wrap poke-schedule):from-kiln
2016-01-07 01:08:46 +03:00
++ poke-kiln-track (wrap poke-track):from-kiln
2015-09-17 02:40:53 +03:00
++ poke-kiln-sync (wrap poke-sync):from-kiln
++ poke-kiln-syncs (wrap poke-syncs):from-kiln
2015-09-17 02:40:53 +03:00
++ poke-kiln-start-autoload (wrap poke-start-autoload):from-kiln
++ poke-kiln-autoload (wrap poke-autoload):from-kiln
2015-09-26 03:23:06 +03:00
++ poke-kiln-overload (wrap poke-overload):from-kiln
2015-09-17 02:40:53 +03:00
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
++ poke-kiln-unsync (wrap poke-unsync):from-kiln
2016-04-13 03:48:55 +03:00
++ poke-womb-invite (wrap poke-invite):from-womb
2016-04-19 01:15:35 +03:00
++ poke-womb-save (wrap poke-save):from-womb
2016-04-13 03:48:55 +03:00
++ poke-womb-obey (wrap poke-obey):from-womb
2016-08-12 03:35:14 +03:00
++ poke-womb-bonus (wrap poke-bonus):from-womb
2016-04-13 03:48:55 +03:00
++ poke-womb-claim (wrap poke-claim):from-womb
++ poke-womb-do-ticket (wrap poke-do-ticket):from-womb
2016-04-15 03:04:19 +03:00
++ poke-womb-do-claim (wrap poke-do-claim):from-womb
2016-04-13 03:48:55 +03:00
++ poke-womb-rekey (wrap poke-rekey):from-womb
++ poke-womb-report (wrap poke-report):from-womb
2016-04-15 02:52:37 +03:00
++ poke-womb-manage (wrap poke-manage):from-womb
++ poke-womb-recycle (wrap poke-recycle):from-womb
++ poke-womb-manage-old-key (wrap poke-manage-old-key):from-womb
2016-04-13 03:48:55 +03:00
++ poke-womb-release (wrap poke-release):from-womb
2016-08-11 00:50:41 +03:00
++ poke-womb-release-ships (wrap poke-release-ships):from-womb
2016-04-13 03:48:55 +03:00
++ poke-womb-reinvite (wrap poke-reinvite):from-womb
2016-04-30 02:18:59 +03:00
++ poke-womb-replay-log (wrap poke-replay-log):from-womb
++ poke-write-sec-atom (wrap poke-sec-atom):from-write
2016-02-12 02:29:52 +03:00
++ poke-write-paste (wrap poke-paste):from-write
++ poke-write-comment (wrap poke-comment):from-write
++ poke-write-fora-post (wrap poke-fora-post):from-write
++ poke-write-plan-info (wrap poke-plan-info):from-write
++ poke-write-plan-account (wrap poke-plan-account):from-write
2016-02-12 02:29:52 +03:00
++ poke-write-tree (wrap poke-tree):from-write
++ poke-write-wipe (wrap poke-wipe):from-write
2015-09-17 02:40:53 +03:00
++ poke-will (wrap poke-will):from-helm
++ quit-drum-phat (wrap quit-phat):from-drum
++ reap-drum-phat (wrap reap-phat):from-drum
++ woot-helm (wrap take-woot):from-helm
++ writ-kiln-autoload (wrap take-writ-autoload):from-kiln
++ writ-kiln-sync (wrap take-writ-sync):from-kiln
2015-05-11 21:05:14 +03:00
--