report grow:json compiles

This commit is contained in:
Anton Dyudin 2014-12-06 00:12:52 -08:00
parent a4c23968b5
commit e9b6ebae2b
4 changed files with 98 additions and 3 deletions

View File

@ -4,7 +4,9 @@
::
|_ [hide ~]
++ peek
|= ^
|= [@ pax=path]
:: ?: |
:: radio-report/(report grams/[7 "foo" ~])
=+ :+ dat=(trip '{ping: {party:"rom", presence:"talk"}}')
=- dat2=(trip -)
'''
@ -36,6 +38,7 @@
}
'''
:- %hymn
^- manx
;html
;head
;script(src "/gen/main/lib/urb.js");

View File

@ -72,7 +72,7 @@
:~ own/so
say/so
exp/(cu |=(a=cord [a ~]) so)
inv/(ot ship/(su fed:ag) room/(su urs:ab) ~)
inv/(ot ship/(su fed:ag) party/(su urs:ab) ~)
==
::
::

View File

@ -0,0 +1,90 @@
::
:::: /hook/door/radio-report/mar
::
/? 314
/- *radio
!:
=< ~& json:~(grow . (report grams/[7 "foo" ~])) .
|_ rep=report
::
++ grab :: convert from
|%
++ noun report :: clam from %noun
--
++ grow
|%
++ mime [/text/json (taco (crip (pojo json)))]
++ json
|^ %+ joba -.rep
?- -.rep
%config ~! rep (conf +.rep)
%house [%a (turn (~(tap by +.rep)) joce)]
%grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~)
%group %.(+.rep (jome phon stas))
==
++ joce |=(a=span [%s a])
++ jope |=(a=ship (jape +:<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)])
::
::
++ phon |=(a=ship (scot %p a))
++ gram |=(telegram (jobe ship/(jope p) thought/(thot q) ~))
++ thot
|= thought
(jobe serial/(jape <p>) audience/(audi q) statement/(stam r) ~)
::
++ audi (jome stan joce)
++ stan
|= a=station ^- cord
%- crip
?~ -.a "{<p.p.a>}/{(trip q.p.a)}"
?- -.p.a
%twitter "{(trip -.p.a)}/{(trip p.p.a)}"
==
::
++ stam |=(statement (jobe time/(jode p) speech/(spec q) ~))
++ spec
|= a=speech
%+ joba -.a
?- -.a
?(%own %say) [%s p.a]
%exp (jobe code/[%s p.a] done/?~(q.a ~ (joke u.q.a)) ~)
%inv (jobe ship/(jope p.a) party/[%s q.a] ~)
==
::
++ stas |=(status (jobe presence/(joce p) time/(jode q) human/(huma r) ~))
++ huma
|= human
%^ jobe
hand/?~(hand ~ [%s u.hand])
:- %true
?~ true ~
=+ u.true
(jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~)
~
::
++ conf
|= config
%- jobe :~
sources/[%a (turn (~(tap in sources)) |=(a=station [%s (stan a)]))]
=- cordon/(jobe white/[%b -.cordon] list/[%a -] ~)
(turn (~(tap in p.cordon)) jope) :: XX jase
==
--
-- --

View File

@ -9,6 +9,8 @@
[%publish (list thought)] :: originate
[%review (list thought)] :: deliver
[%ping (pair span presence)] :: declare status
:: ping:{room:"foo" presence:"hear"}
:: ping:["foo", "hear"]
== ::
++ config :: party configuration
$: sources=(set station) :: pulls from
@ -24,7 +26,7 @@
== ::
++ presence ?(%hear %talk) :: status type
++ report :: unified rush/rust
$: [%house (set span)] :: meta-changes
$% [%house (set span)] :: meta-changes
[%grams (pair ,@ud (list telegram))] :: thoughts
[%group (map ship status)] :: presence
[%config config] :: reconfigure