mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 05:26:56 +03:00
report grow:json compiles
This commit is contained in:
parent
a4c23968b5
commit
e9b6ebae2b
@ -4,7 +4,9 @@
|
|||||||
::
|
::
|
||||||
|_ [hide ~]
|
|_ [hide ~]
|
||||||
++ peek
|
++ peek
|
||||||
|= ^
|
|= [@ pax=path]
|
||||||
|
:: ?: |
|
||||||
|
:: radio-report/(report grams/[7 "foo" ~])
|
||||||
=+ :+ dat=(trip '{ping: {party:"rom", presence:"talk"}}')
|
=+ :+ dat=(trip '{ping: {party:"rom", presence:"talk"}}')
|
||||||
=- dat2=(trip -)
|
=- dat2=(trip -)
|
||||||
'''
|
'''
|
||||||
@ -36,6 +38,7 @@
|
|||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
:- %hymn
|
:- %hymn
|
||||||
|
^- manx
|
||||||
;html
|
;html
|
||||||
;head
|
;head
|
||||||
;script(src "/gen/main/lib/urb.js");
|
;script(src "/gen/main/lib/urb.js");
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
:~ own/so
|
:~ own/so
|
||||||
say/so
|
say/so
|
||||||
exp/(cu |=(a=cord [a ~]) 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) ~)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
::
|
::
|
||||||
|
90
main/mar/radio-report/door.hook
Normal file
90
main/mar/radio-report/door.hook
Normal 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
|
||||||
|
==
|
||||||
|
--
|
||||||
|
-- --
|
||||||
|
|
@ -9,6 +9,8 @@
|
|||||||
[%publish (list thought)] :: originate
|
[%publish (list thought)] :: originate
|
||||||
[%review (list thought)] :: deliver
|
[%review (list thought)] :: deliver
|
||||||
[%ping (pair span presence)] :: declare status
|
[%ping (pair span presence)] :: declare status
|
||||||
|
:: ping:{room:"foo" presence:"hear"}
|
||||||
|
:: ping:["foo", "hear"]
|
||||||
== ::
|
== ::
|
||||||
++ config :: party configuration
|
++ config :: party configuration
|
||||||
$: sources=(set station) :: pulls from
|
$: sources=(set station) :: pulls from
|
||||||
@ -24,7 +26,7 @@
|
|||||||
== ::
|
== ::
|
||||||
++ presence ?(%hear %talk) :: status type
|
++ presence ?(%hear %talk) :: status type
|
||||||
++ report :: unified rush/rust
|
++ report :: unified rush/rust
|
||||||
$: [%house (set span)] :: meta-changes
|
$% [%house (set span)] :: meta-changes
|
||||||
[%grams (pair ,@ud (list telegram))] :: thoughts
|
[%grams (pair ,@ud (list telegram))] :: thoughts
|
||||||
[%group (map ship status)] :: presence
|
[%group (map ship status)] :: presence
|
||||||
[%config config] :: reconfigure
|
[%config config] :: reconfigure
|
||||||
|
Loading…
Reference in New Issue
Block a user