mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
Various fixes and improvements.
This commit is contained in:
parent
9f22287791
commit
a4bec78419
66
arvo/jael.hoon
Normal file
66
arvo/jael.hoon
Normal file
@ -0,0 +1,66 @@
|
||||
:: %jael, secret storage
|
||||
::
|
||||
:::: /hoon/jael
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %jael state
|
||||
$: %0 ::
|
||||
all=(map ship ,[p=@ q=safe]) :: entropy, secrets
|
||||
== ::
|
||||
++ mort ,[p=@da q=duct r=@] :: a mortal secret
|
||||
++ gift :: out result <-$
|
||||
$% [%done p=path q=@] :: key expired
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
$% [%drop p=@p q=path r=@] :: discard key
|
||||
[%junk p=@] :: add entropy
|
||||
[%show p=@p q=path] :: read subtree
|
||||
[%tell p=@ q=path r=@da s=@] :: save key
|
||||
== ::
|
||||
++ safe ,[p=(unit ,@) q=(map ,@ta safe)] :: secret tree
|
||||
++ move ,[p=duct q=[%give p=gift]] :: local move
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %jael-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
:: actually scry
|
||||
~
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~])))
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
127
arvo/kahn.hoon
Normal file
127
arvo/kahn.hoon
Normal file
@ -0,0 +1,127 @@
|
||||
:: %kahn, social state
|
||||
::
|
||||
:::: /hoon/kahn
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %kahn state
|
||||
$: %0 ::
|
||||
all=(map ship axel) :: state by owner
|
||||
== ::
|
||||
++ axel :: all social state
|
||||
$: rod=(list ship) :: ancestry upward
|
||||
myn=(map ship girl) :: daughters
|
||||
==
|
||||
++ axon :: all descendants
|
||||
$: [%a p=hulk q=hulk r=hulk] :: carrier
|
||||
[%b p=hulk q=hulk] :: cruiser
|
||||
[%c p=hulk] :: destroyer
|
||||
[%d p=hulk] :: yacht
|
||||
[%e p=ship] :: submarine
|
||||
== ::
|
||||
++ clan :: ranked group
|
||||
$: pec=rank :: membership bar
|
||||
who=(set ship) :: members
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
$: [%notice p=ship q=action]
|
||||
==
|
||||
++ girl :: daughter record
|
||||
$: hop=pony :: status
|
||||
tip=rank :: rank
|
||||
fig=(set narc) :: other identities
|
||||
gor=(set ,@tas) :: memberships
|
||||
out=(unit ship) :: stepmother
|
||||
res=(unit ,@da) :: reserved until
|
||||
== ::
|
||||
++ hulk :: social state
|
||||
$: rod=(list ship) :: ancestry upward
|
||||
myn=(map ship girl) :: daughter status
|
||||
cir=(map ,@tas clan) :: daughter groups
|
||||
== ::
|
||||
++ kiss :: change
|
||||
$: [%reserve p=@ud q=@ud] :: reserve class/num
|
||||
[%renew ~] :: self-renew
|
||||
[%modify p=ship q=action] ::
|
||||
[%await p=(unit trigger)] :: subscribe actions
|
||||
==
|
||||
++ trigger
|
||||
$: (set ship)
|
||||
(set clan)
|
||||
(set rank)
|
||||
(set pony)
|
||||
==
|
||||
++ action
|
||||
$: %warm -> %cold
|
||||
%cold -> %here
|
||||
%cold -> %fake
|
||||
%cold -> %free
|
||||
* -> %dead
|
||||
* -> %left
|
||||
*: tip
|
||||
*: add, subtract fig
|
||||
*: add, subtract gor
|
||||
adopt: external to free
|
||||
==
|
||||
++ narc path :: contact path
|
||||
++ pony :: daughter status
|
||||
$? %cold :: virginal
|
||||
%dead :: inoperative
|
||||
%fake :: virtual
|
||||
%free :: exported
|
||||
%here :: hosted
|
||||
%left :: divorced
|
||||
%warm :: reserved
|
||||
== ::
|
||||
++ rank :: privilege
|
||||
$? %0 :: enemy
|
||||
%1 :: guest
|
||||
%2 :: customer/vendor
|
||||
%3 :: member/employee
|
||||
%4 :: admin/officer
|
||||
%5 :: self/god
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
102
arvo/lunt.hoon
Normal file
102
arvo/lunt.hoon
Normal file
@ -0,0 +1,102 @@
|
||||
:: %lunt, fleet job control
|
||||
::
|
||||
:::: /hoon/lunt
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %lunt state
|
||||
$: %0 ::
|
||||
all=(map ship axil) :: state by owner
|
||||
== ::
|
||||
++ born ,[p=brat q=(unit ship)] :: task identity
|
||||
++ brat ,@ud :: task number
|
||||
++ bulb ::
|
||||
$: p=@p :: ship identity
|
||||
q=home :: server data
|
||||
== ::
|
||||
++ home :: storage access
|
||||
$: pad=@uvH :: passcode
|
||||
huc=husk :: log server
|
||||
|
||||
== ::
|
||||
++ hulk :: checkpoint service
|
||||
$% [%astr p=
|
||||
++ husk :: log server
|
||||
$: pro=@tas :: protocol
|
||||
cap=@uvH :: access code
|
||||
srv=(list (pair ,@ud clip)) :: server cluster
|
||||
== ::
|
||||
++ gift :: result
|
||||
$: [%die p=brat] :: kill
|
||||
[%int p=brat] :: interrupt
|
||||
[%run p=brat q=@p r=home] :: load
|
||||
[%say p=brat q=(list ovum)] :: send events
|
||||
[%new p=brat q=@p r=home s=(list ovum)] :: create
|
||||
== ::
|
||||
++ kiss :: request
|
||||
$: [%com p=@p] :: toggle computer
|
||||
[%end p=brat] :: local end
|
||||
[%fan p=@ud] :: set local fanout
|
||||
[%kil ~] :: terminate ship
|
||||
[%int ~] :: interrupt ship
|
||||
[%new p=@p q=(set ,@p) q=home r=@uvI] :: create ship
|
||||
[%run p=@p q=home] :: run existing ship
|
||||
[%say p=(list ovum)] :: remote events
|
||||
[%sto p=husk] :: toggle logger
|
||||
== ::
|
||||
++ axil ::
|
||||
$: bus=(unit ,@p) :: master
|
||||
loc=@ud :: local resources
|
||||
hen=(unit duct) :: effect duct
|
||||
ent=@ :: entropy
|
||||
seq=@ :: brat sequence
|
||||
why=(map duct born) :: hosted ships
|
||||
how=(map born duct) :: reverse why
|
||||
hut=(map born home) :: storage control
|
||||
sto=(set husk) :: storage resources
|
||||
com=(set ship) :: compute resources
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
94
arvo/musk.hoon
Normal file
94
arvo/musk.hoon
Normal file
@ -0,0 +1,94 @@
|
||||
:: %musk, realm management
|
||||
::
|
||||
:::: /hoon/musk
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %musk state
|
||||
$: %0 ::
|
||||
all=(map ship axil) :: state by owner
|
||||
== ::
|
||||
++ axil ::
|
||||
$: kid=(map ship girl) :: daughters
|
||||
deq=(map narc ship) :: reverse address
|
||||
siq=(map ship (list clan)) :: ship to clans
|
||||
kes=(map clan (list ship)) :: clan to ships
|
||||
== ::
|
||||
++ clan ,@tas :: group identity
|
||||
++ narc :: contact address
|
||||
$: [%$ p=ship] :: urbit
|
||||
[%m p=@t q=@t] :: email p@q
|
||||
[%f p=@t] :: facebook
|
||||
[%g p=@t] :: google
|
||||
[%p p=@t] :: phone message
|
||||
[%t p=@t] :: twitter
|
||||
== ::
|
||||
++ pony :: daughter status
|
||||
$% [%cold ~] :: virginal
|
||||
[%dead ~] :: written off
|
||||
[%fake ~] :: virtual
|
||||
[%free ~] :: downloaded
|
||||
[%here ~] :: hosted
|
||||
[%left p=(unit ship)] :: run away to
|
||||
== ::
|
||||
++ rank :: relative privilege
|
||||
$? %0 :: enemy
|
||||
%1 :: neighbor
|
||||
%2 :: guest/customer
|
||||
%3 :: friend/employee
|
||||
%4 :: officer/family
|
||||
%5 :: self/admin
|
||||
== ::
|
||||
++ girl ::
|
||||
$: hop=pony :: status
|
||||
tag=(unit ,@tas) :: petname
|
||||
tip=rank :: rank
|
||||
fig=(set narc) :: identities
|
||||
loc=(unit ,[p=@da q=@ud r=clip]) :: last position
|
||||
sym=(set ,[p=@ q=@uvH]) :: symmetric keys?
|
||||
wyl=will :: crypto will
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user