urbit/base/mar/talk-report.hoon

126 lines
3.4 KiB
Plaintext
Raw Normal View History

2014-12-06 11:12:52 +03:00
::
2015-06-05 03:27:01 +03:00
:::: /hoon/talk-report/mar
2014-12-06 11:12:52 +03:00
::
/? 314
2015-04-01 23:56:43 +03:00
/- *talk
2014-12-06 11:12:52 +03:00
!:
|_ rep=report
::
++ grab :: convert from
|%
++ noun report :: clam from %noun
--
++ grow
|%
++ mime [/text/json (taco (crip (pojo json)))]
++ json
2014-12-10 02:11:30 +03:00
=> +
2014-12-06 11:12:52 +03:00
|^ %+ joba -.rep
?- -.rep
2015-04-06 22:57:23 +03:00
%cabal (cabl +.rep)
2015-01-26 20:44:09 +03:00
%house a/(turn (~(tap by +.rep)) jose)
2014-12-06 11:12:52 +03:00
%grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~)
2015-01-26 20:44:09 +03:00
%group (jobe local/(grop p.rep) global/%.(q.rep (jome parn grop)) ~)
2014-12-06 11:12:52 +03:00
==
++ joce |=(a=span [%s a])
2015-01-26 20:44:09 +03:00
++ 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]
==
2014-12-10 02:11:30 +03:00
++ jope |=(a=ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
2014-12-06 11:12:52 +03:00
++ 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)
2014-12-06 11:12:52 +03:00
++ phon |=(a=ship (scot %p a))
++ stas |=(status (jobe presence/(joce p) human/(huma q) ~))
2014-12-06 11:12:52 +03:00
++ gram |=(telegram (jobe ship/(jope p) thought/(thot q) ~))
++ thot
|= thought
(jobe serial/(jape <p>) audience/(audi q) statement/(stam r) ~)
::
2015-01-26 20:44:09 +03:00
++ 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
2015-04-06 22:57:23 +03:00
?- -.a
%& (stat p.a)
%| %- crip
?- -.p.a
%twitter "{(trip -.p.a)}/{(trip p.p.a)}"
==
2014-12-06 11:12:52 +03:00
==
::
2015-04-06 22:57:23 +03:00
++ stat
|= a=station ^- cord
(crip "{<p.a>}/{(trip q.a)}")
::
2015-01-26 20:44:09 +03:00
++ stam
|= statement
(jobe date/(jode p) bouquet/(bouq q) speech/(spec r) ~)
::
2014-12-06 11:12:52 +03:00
++ spec
|= a=speech
%+ joba -.a
2015-05-04 23:43:20 +03:00
~| stub/-.a
2015-01-06 02:59:57 +03:00
?+ -.a !!
%lin (jobe say/[%b p.a] txt/[%s q.a] ~)
2015-06-03 21:44:40 +03:00
%url (jobe url/[%s (crip (earf p.a))] ~)
%exp (jobe code/[%s p.a] ~)
%app (jobe app/[%s p.a] txt/[%s q.a] ~)
2015-01-06 02:59:57 +03:00
:: %inv (jobe ship/(jope p.a) party/[%s q.a] ~)
2014-12-06 11:12:52 +03:00
==
::
++ huma
|= human
%^ jobe
hand/?~(hand ~ [%s u.hand])
:- %true
?~ true ~
=+ u.true
(jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~)
~
::
2015-04-06 22:57:23 +03:00
++ cabl
|= cabal
%- jobe :~
loc/(conf loc)
ham/((jome stat conf) ham)
==
::
2014-12-06 11:12:52 +03:00
++ conf
|= config
%- jobe :~
2015-01-26 20:44:09 +03:00
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
2014-12-06 11:12:52 +03:00
==
--
-- --