urbit/main/app/helm/core.hook
Philip C Monk dd0716eb72 Merge branch 'master' into typedclay
Conflicts:
	n/t.c
	urb/urbit.pill
	urb/zod/main/app/reload/core.hook
	urb/zod/main/app/shell/core.hook
	urb/zod/main/app/solid/core.hook
	urb/zod/main/arvo/dill.hoon
	urb/zod/main/arvo/eyre.hoon
	urb/zod/main/arvo/ford.hoon
	urb/zod/main/arvo/gall.hoon
	urb/zod/main/arvo/hoon.hoon
	urb/zod/main/mar/json/door.hook
	urb/zod/main/mar/md/door.hook
	urb/zod/main/mar/txt/door.hook
	v/raft.c
	v/unix.c
2015-04-22 20:18:19 -04:00

202 lines
7.7 KiB
Plaintext

:: :: ::
:::: /hook/core/helm/app :: ::
:: :: ::
/? 314 :: zuse version
/- *sole :: structures
/+ sole :: libraries
:: :: ::
:::: :: ::
!: :: ::
=> |% :: principal structures
++ helm-house :: all state
$: %0 :: state version
bur=(unit (pair ship mace)) :: requesting ticket
hoc=(map bone helm-session) :: consoles
== ::
++ helm-session ::
$: say=sole-share ::
mud=(unit (sole-dialog ,@ud)) ::
== ::
++ funk (pair ,@ ,@) ::
++ begs ,[his=@p tic=@p eny=@t ges=gens] :: begin data
++ helm-wish ::
$| $? %reset :: reset kernel
%verb :: verbose mode
== ::
$% [%reload p=(list term)] :: reload vanes
[%sync p=@tas q=@p r=@tas ~] ::
== ::
++ dill-flog :: sent to %dill
$% [%crud p=%hax-init [%leaf p=tape] ~] :: initialize ship
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
== ::
:: ::
++ gift :: out result <-$
$% [%mean p=ares] :: error
[%nice ~] :: acknowledge
[%rush %sole-effect sole-effect] :: effect
== ::
++ hapt ,[p=ship q=path] ::
++ move ,[p=bone q=(mold note gift)] ::
++ note-gall :: note to %gall
$% [%mess p=[p=ship q=path] q=ship r=cage] ::
[%show p=[p=ship q=path] q=ship r=path] ::
[%took p=[p=ship q=path] q=ship] ::
== ::
++ note-dill :: system command
$% [%flog p=dill-flog] ::
== ::
++ note-clay :: filesystem command
$% [%font p=@p q=@tas r=@p s=@tas] ::
== ::
++ note :: out request $->
$% [%c note-clay] ::
[%d note-dill] ::
[%g note-gall] ::
== ::
-- ::
:: ::
:::: ::
:: ::
|_ $: hid=hide :: system state
helm-house :: program state
== ::
++ he :: per session
|_ [[ost=bone moz=(list move)] helm-session] ::
++ he-abet :: resolve
[(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] ::
:: ::
++ he-give :: emit gift
|= git=gift
%_(+> moz [[ost %give git] moz])
::
++ he-wish-reset
^+ .
=- %_(+ moz (weld zum moz))
^= zum %- flop ^- (list move)
=+ top=`path`/(scot %p our.hid)/main/(scot %da lat.hid)/arvo
:- [ost %pass /reset %d %flog %vega (weld top `path`/hoon)]
%+ turn
^- (list ,[p=@tas q=@tas])
:~ [%$ %zuse]
[%a %ames]
[%c %clay]
[%d %dill]
[%e %eyre]
[%f %ford]
[%g %gall]
[%t %time]
==
|= [p=@tas q=@tas]
=+ pax=`path`(welp top /[q])
=+ txt=((hard ,@) .^(%cx (welp pax /hoon)))
[ost %pass /reset %d %flog %veer p pax txt]
::
++ he-wish-reload
|= all=(list term)
%_ +>.$
moz
%- weld
:_ moz
%+ turn all
=+ ark=(arch .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/arvo))
=+ van=(~(tap by r.ark))
|= nam=@tas
=. nam
?. =(1 (met 3 nam))
nam
=+ ^- zaz=(list ,[p=span ~])
(skim van |=([a=term ~] =(nam (end 3 1 a))))
?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz
=+ tip=(end 3 1 nam)
=+ pax=[(scot %p our.hid) %main (scot %da lat.hid) %arvo nam %hoon ~]
:* ost
%pass
/reload
%d
%flog
[%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))]
==
==
::
++ he-wish-sync
|= [syd=@tas her=@p sud=@tas ~]
%_ .
moz
:_ moz
[ost %pass /sync %c %font our.hid syd her sud]
==
::
++ he-wish-verb
%_ .
moz
:_ moz
[ost %pass /verb %d %flog %verb ~]
==
++ he-wish-init
|= him=ship
%_ +>.$
moz
:_ moz
[ost %pass /init %d %flog %crud %hax-init leaf/(scow %p him) ~]
==
--
::
++ hake :: poke core
|= [ost=bone her=ship]
?> =(her our.hid)
~(. he [ost [ost %give %nice ~]~] (fall (~(get by hoc) ost) *helm-session))
::
++ poke-helm-reset
|= [ost=bone her=ship ~]
~& %poke-helm-reset
he-abet:he-wish-reset:(hake ost her)
::
++ poke-helm-verb
|= [ost=bone her=ship ~]
~& %poke-helm-verb
he-abet:he-wish-verb:(hake ost her)
::
++ poke-helm-init
|= [ost=bone her=ship him=ship]
~& %poke-helm-init
he-abet:(he-wish-init:(hake ost her) him)
::
++ poke-helm-reload
|= [ost=bone her=ship all=(list term)]
~& %poke-helm-reload
he-abet:(he-wish-reload:(hake ost her) all)
::
++ poke-helm-sync
|= [ost=bone her=ship all=[@tas @p @tas ~]]
~& %poke-helm-sync
he-abet:(he-wish-sync:(hake ost her) all)
::
++ poke-helm-begin
|= [ost=bone you=ship begs]
~& %poke-helm-begin
?> ?=(~ bur)
=+ buz=(shax :(mix (jam ges) eny))
=+ loy=(bruw 2.048 buz)
:_ +>.$(bur `[his [0 sec:ex:loy]~])
:~ :* ost %pass /ticketing %a %want [our.hid (sein his)] /q/ta
his tic ges pub:ex:loy
==
[ost %give %nice ~]
==
::
++ poke-will
|= [ost=bone you=ship wil=(unit will)]
?> ?=(^ bur)
:_ +>.$(bur ~)
?~ wil
[ost %give %mean ~ %rejected ~]~
:~ [ost %pass / %a %cash p.u.bur q.u.bur u.wil]
[ost %pass / %c %plug our.hid %main (sein our.hid) %main]
[ost %give %nice ~]
==
--