shrub/mar/talk/report.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

135 lines
3.6 KiB
Plaintext

::
:::: /hoon/talk-report/mar
::
/? 314
/- *talk
!:
|_ rep=report
::
++ grab :: convert from
|%
++ noun report :: clam from %noun
--
++ grow
|%
++ mime [/text/json (taco (crip (pojo json)))]
++ json
=> +
|^ %+ joba -.rep
?- -.rep
%cabal (cabl +.rep)
%house a/(turn (~(tap by +.rep)) jose)
%grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~)
%group (jobe local/(grop p.rep) global/%.(q.rep (jome parn grop)) ~)
==
++ joce |=(a=span [%s a])
++ jose
|= [a=span b=posture c=cord]
(jobe name/[%s a] posture/[%s a] caption/[%s b] ~)
::
++ jove
|= [a=envelope b=delivery]
%- jobe :~
envelope/(jobe visible/[%b p.a] sender/?~(q.a ~ s/(parn u.q.a)) ~)
delivery/[%s b]
==
++ jope |=(a=ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
++ joke |=(a=tank [%s (role (turn (wash 0^80 a) crip))])
++ jode |=(a=time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1)))
:: ++ jase
:: |* a=,json
:: |= b=(set ,_+<.a) ^- json
:: ~! b
:: [%a (turn (~(tap in b)) a)]
::
++ jome :: stringify keys
|* [a=_cord b=_json]
|= c=(map ,_+<.a ,_+<.b)
(jobe (turn (~(tap by c)) (both a b)))
::
++ both :: cons two gates
|* [a=_,* b=_,*]
|=(c=_[+<.a +<.b] [(a -.c) (b +.c)])
::
::
++ grop (jome phon stas) :: (map ship status)
++ phon |=(a=ship (scot %p a))
++ stas |=(status (jobe presence/(joce p) human/(huma q) ~))
++ gram |=(telegram (jobe ship/(jope p) thought/(thot q) ~))
++ thot
|= thought
(jobe serial/(jape <p>) audience/(audi q) statement/(stam r) ~)
::
++ audi (jome parn jove)
++ bouq
|= a=bouquet
a/(turn (~(tap in a)) |=(b=path a/(turn b |=(c=span s/c))))
::
++ parn
|= a=partner ^- cord
?- -.a
%& (stat p.a)
%| %- crip
?- -.p.a
%twitter "{(trip -.p.a)}/{(trip p.p.a)}"
==
==
::
++ stat
|= a=station ^- cord
(crip "{<p.a>}/{(trip q.a)}")
::
++ stam
|= statement
(jobe date/(jode p) bouquet/(bouq q) speech/(spec r) ~)
::
++ spec
|= a=speech
%+ joba -.a
?+ -.a ~|(stub/-.a !!)
%lin (jobe say/[%b p.a] txt/[%s q.a] ~)
%url (jobe url/[%s (crip (earf p.a))] ~)
%exp (jobe code/[%s p.a] ~)
%app (jobe app/[%s p.a] txt/[%s q.a] ~)
%fat (jobe fat/(tors p.a) taf/$(a q.a) ~)
:: %inv (jobe ship/(jope p.a) party/[%s q.a] ~)
==
::
++ tors
|= a=torso
%+ joba -.a
?- -.a
%text [%s (role +.a)]
%tank [%a (turn +.a joke)]
%name (jobe nom/s/p.a mon/$(a q.a) ~)
==
::
++ huma
|= human
%^ jobe
hand/?~(hand ~ [%s u.hand])
:- %true
?~ true ~
=+ u.true
(jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~)
~
::
++ cabl
|= cabal
%- jobe :~
loc/(conf loc)
ham/((jome stat conf) ham)
==
::
++ conf
|= config
%- jobe :~
sources/[%a (turn (~(tap in sources)) |=(a=partner [%s (parn a)]))]
caption/[%s caption]
=- cordon/(jobe posture/[%s -.cordon] list/[%a -] ~)
(turn (~(tap in q.cordon)) jope) :: XX jase
==
--
-- --