shrub/mar/talk/command.hoon
Philip C Monk c9539452e2 Merge remote-tracking branch 'origin/newunix'
Conflicts:
	urb/urbit.pill
	urb/zod/base/mar/bit-accounts.hoon
	urb/zod/base/mar/bit-addr-made.hoon
	urb/zod/base/mar/bit-addr-request.hoon
	urb/zod/base/mar/bit-api-call.hoon
	urb/zod/base/mar/bit-get-token.hoon
	urb/zod/base/mar/bit-transaction.hoon
	urb/zod/base/mar/bit/accounts.hoon
	urb/zod/base/mar/bit/addr-made.hoon
	urb/zod/base/mar/bit/addr-request.hoon
	urb/zod/base/mar/bit/api-call.hoon
	urb/zod/base/mar/bit/get-token.hoon
	urb/zod/base/mar/bit/transaction.hoon
	urb/zod/base/mar/cloud-auth.hoon
	urb/zod/base/mar/cloud-secret.hoon
	urb/zod/base/mar/cloud/auth.hoon
	urb/zod/base/mar/cloud/secret.hoon
	urb/zod/base/mar/dill-belt.hoon
	urb/zod/base/mar/dill-blit.hoon
	urb/zod/base/mar/dill/belt.hoon
	urb/zod/base/mar/dill/blit.hoon
	urb/zod/base/mar/oct3-move.hoon
	urb/zod/base/mar/oct3-update.hoon
	urb/zod/base/mar/oct3/move.hoon
	urb/zod/base/mar/oct3/update.hoon
	urb/zod/base/mar/oct4-move.hoon
	urb/zod/base/mar/oct4-update.hoon
	urb/zod/base/mar/oct4/move.hoon
	urb/zod/base/mar/oct4/update.hoon
	urb/zod/base/mar/sole-action.hoon
	urb/zod/base/mar/sole-effect.hoon
	urb/zod/base/mar/sole/action.hoon
	urb/zod/base/mar/sole/effect.hoon
	urb/zod/base/mar/talk-command.hoon
	urb/zod/base/mar/talk-report.hoon
	urb/zod/base/mar/talk/command.hoon
	urb/zod/base/mar/talk/report.hoon
	urb/zod/mar/bit-accounts.hoon
	urb/zod/mar/bit-addr-made.hoon
	urb/zod/mar/bit-addr-request.hoon
	urb/zod/mar/bit-api-call.hoon
	urb/zod/mar/bit-get-token.hoon
	urb/zod/mar/bit-transaction.hoon
	urb/zod/mar/cloud-auth.hoon
	urb/zod/mar/cloud-auth/door.hook
	urb/zod/mar/cloud-secret.hoon
	urb/zod/mar/cloud-secret/door.hook
	urb/zod/mar/dill-belt.hoon
	urb/zod/mar/dill-blit.hoon
	urb/zod/mar/oct3-move.hoon
	urb/zod/mar/oct3-update.hoon
	urb/zod/mar/oct4-move.hoon
	urb/zod/mar/oct4-update.hoon
	urb/zod/mar/sole-action.hoon
	urb/zod/mar/sole-effect.hoon
	urb/zod/mar/talk-command.hoon
	urb/zod/mar/talk-report.hoon
2015-06-23 19:28:46 -04:00

101 lines
2.7 KiB
Plaintext

::
:::: /hoon/talk-command/mar
::
/? 314
/- *talk
!:
|_ cod=command
::
++ grab :: convert from
|%
++ noun command :: clam from %noun
++ json
=> [jo ..command]
|= a=json ^- command
=- (need ((of -) a))
=< :~ publish/(ar thot)
review/(ar thot)
design/(ot party/so config/(mu conf) ~)
==
|%
++ op :: parse keys of map
|* [fel=_rule wit=fist]
%+ cu mo
%- ci :_ (om wit)
|= a=(map cord ,_(need *wit))
^- (unit (list ,_[(wonk *fel) (need *wit)]))
(zl (turn (~(tap by a)) (head-rush fel)))
::
++ as :: array as set
:: |*(a=fist (cu sa (ar a))) :: XX types
|* a=fist
%- cu :_ (ar a)
~(gas in *(set ,_(need *a)))
::
++ lake |*(a=_,* $+(json (unit a)))
++ peach
|* a=_[rule rule]
|= tub=nail
^- (like (each ,_(wonk (-.a)) ,_(wonk (+.a))))
%. tub
;~(pose (stag %& -.a) (stag %| +.a))
::
++ head-rush
|* a=_rule
|* [b=cord c=*]
=+ nit=(rush b a)
?~ nit ~
(some [u.nit c])
::
::
++ thot
^- $+(json (unit thought))
%- ot :~
serial/(ci (slat %uv) so)
audience/audi
statement/stam
==
::
++ audi (op parn memb) :: audience
++ auri (op parn (ci (soft presence) so))
++ memb (ot envelope/lope delivery/(ci (soft delivery) so) ~)
++ lope (ot visible/bo sender/(mu (su parn)) ~)
::
++ parn
^- $+(nail (like partner))
%+ peach
;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft passport)
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
::
++ eval
|= a=(trel ,@da bouquet ?(speech [%eval p=@t])) ^- statement
?. ?=(%eval -.r.a) a
=+ pax=[&1:% &2:% (scot %da p.a) |3:%]
=- a(r [%fat tank/- %exp p.r.a])
p:(mule |.([(sell (slap !>(..zuse) (rain pax p.r.a)))]~))
::
++ stam
^- $+(json (unit statement))
%+ cu eval
=- (ot date/di bouquet/(as (ar so)) speech/(of -) ~)
:~ lin/(ot say/bo txt/so ~)
url/(su aurf:urlp)
eval/so
:: exp/(cu |=(a=cord [a ~]) so)
:: inv/(ot ship/(su fed:ag) party/(su urs:ab) ~)
==
::
::
++ conf
^- $+(json (unit config))
%- ot :~
sources/(as (su parn))
caption/so
:- %cordon
(ot posture/(ci (soft posture) so) list/(as (su fed:ag)) ~)
==
--
-- --