mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 07:59:22 +03:00
Merge branch 'radio' of https://github.com/urbit/urbit into radio
This commit is contained in:
commit
ceb953337b
@ -205,6 +205,8 @@
|
||||
++ lamp
|
||||
|= con=(unit coin)
|
||||
^- (unit path)
|
||||
?: ?=([~ %$ %tas @] con)
|
||||
(some [q.p.u.con]~)
|
||||
?. ?=([~ %many *] con) ~
|
||||
%- zl:jo
|
||||
%+ turn p.u.con
|
||||
@ -572,7 +574,9 @@
|
||||
::
|
||||
++ away :: application path
|
||||
|= pax=path ^- path
|
||||
=+ imc=[%many (turn imp |=(a=span [%$ %ta a]))]
|
||||
=+ ?: &(?=([@tas ~] imp) ((sane %tas) i.imp))
|
||||
imc=[%$ %tas i.imp]
|
||||
imc=[%many (turn imp |=(a=span [%$ %ta a]))]
|
||||
[%a (scot %p our) ~(rent co imc) pax]
|
||||
::
|
||||
++ bear :: write backward
|
||||
|
@ -422,31 +422,46 @@
|
||||
" " "+0000"
|
||||
==
|
||||
::
|
||||
++ stud :: parse UTC format
|
||||
|= cud=tape
|
||||
^- (unit date)
|
||||
=- ?~ tud ~
|
||||
`[[%.y &3.u.tud] &2.u.tud &1.u.tud &4.u.tud &5.u.tud &6.u.tud ~]
|
||||
^= tud
|
||||
%+ rust cud
|
||||
;~ plug
|
||||
;~(pfix (stun [5 5] next) dim:ag)
|
||||
++ stud !: :: parse UTC format
|
||||
=< |= a=cord :: expose parsers
|
||||
%+ biff (rush a (more sepa elem))
|
||||
|= b=(list ,_(wonk *elem)) ^- (unit date)
|
||||
=- ?.((za:jo -) ~ (some (zp:jo -)))
|
||||
^+ =+ [*date u=unit]
|
||||
*[(u ,_[a y]) (u ,_m) (u ,_d.t) (u ,_+.t) ~]
|
||||
:~ :: XX types
|
||||
|-(?~(b ~ ?.(?=(%y -.i.b) $(b t.b) `+.i.b)))
|
||||
|-(?~(b ~ ?.(?=(%m -.i.b) $(b t.b) `+.i.b)))
|
||||
|-(?~(b ~ ?.(?=(%d -.i.b) $(b t.b) `+.i.b)))
|
||||
|-(?~(b ~ ?.(?=(%t -.i.b) $(b t.b) `+.i.b)))
|
||||
==
|
||||
|%
|
||||
::
|
||||
%+ cook
|
||||
|= a=tape
|
||||
=+ b=0
|
||||
|- ^- @
|
||||
?: =(a (snag b (turn mon:yu |=(a=tape (scag 3 a)))))
|
||||
+(b)
|
||||
$(b +(b))
|
||||
(ifix [ace ace] (star alf))
|
||||
++ snug
|
||||
|= a=wall
|
||||
|= b=tape
|
||||
=+ [pos=1 len=(lent b)]
|
||||
|- ^- (unit ,@u)
|
||||
?~ a ~
|
||||
?: =(b (scag len i.a))
|
||||
`pos
|
||||
$(pos +(pos), a t.a)
|
||||
::
|
||||
;~(sfix dim:ag ace)
|
||||
;~(sfix dim:ag col)
|
||||
;~(sfix dim:ag col)
|
||||
dim:ag
|
||||
(cold ~ (star next))
|
||||
==
|
||||
::
|
||||
++ sepa ;~(pose ;~(plug com (star ace)) (plus ace))
|
||||
++ elem
|
||||
;~ pose
|
||||
(stag %t t) (stag %y y) (stag %m m) (stag %d d)
|
||||
(stag %w w) (stag %z z)
|
||||
==
|
||||
::
|
||||
++ y (stag %& (bass 10 (stun 3^4 dit)))
|
||||
++ m (sear (snug mon:yu) (plus alf))
|
||||
++ d (bass 10 (stun 1^2 dit))
|
||||
++ t [;~(plug - - + (easy ~))]:[;~(sfix d col) d]
|
||||
++ w (sear (snug wik:yu) (plus alf))
|
||||
++ z [;~(plug (mask "-+") . .)]:(bass 10 (stun 2^2 dit))
|
||||
--
|
||||
::
|
||||
++ unt :: UGT to UTC time
|
||||
|= a=@
|
||||
@ -513,15 +528,14 @@
|
||||
|%
|
||||
++ apex :: JSON value
|
||||
%+ knee *json |. ~+
|
||||
;~ pfix spac
|
||||
;~ pose
|
||||
(cold ~ (jest 'null'))
|
||||
(stag %b bool)
|
||||
(stag %s stri)
|
||||
(cook |=(s=tape [%n p=(rap 3 s)]) numb)
|
||||
abox
|
||||
obox
|
||||
==
|
||||
%+ ifix [spac spac]
|
||||
;~ pose
|
||||
(cold ~ (jest 'null'))
|
||||
(stag %b bool)
|
||||
(stag %s stri)
|
||||
(cook |=(s=tape [%n p=(rap 3 s)]) numb)
|
||||
abox
|
||||
obox
|
||||
==
|
||||
++ tops ;~(pose abox obox) :: JSON strict
|
||||
:: JSON arrays
|
||||
@ -799,7 +813,7 @@
|
||||
++ da :: UTC date
|
||||
|= jon=json
|
||||
?. ?=([%s *] jon) ~
|
||||
(bind (stud (trip p.jon)) |=(a=date (year a)))
|
||||
(bind (stud p.jon) |=(a=date (year a)))
|
||||
::
|
||||
++ di :: millisecond date
|
||||
%- cu :_ ni
|
||||
@ -2929,7 +2943,7 @@
|
||||
[%b p=?] :: boolean
|
||||
[%o p=(map ,@t json)] :: object
|
||||
[%n p=@ta] :: number
|
||||
[%s p=@ta] :: string
|
||||
[%s p=@t] :: string
|
||||
== ::
|
||||
++ jsot :: strict json top
|
||||
$% [%a p=(list json)] :: array
|
||||
|
5
main/app/bang/core.hook
Normal file
5
main/app/bang/core.hook
Normal file
@ -0,0 +1,5 @@
|
||||
|_ [hide ~]
|
||||
++ poke-bang-args
|
||||
|* [ost=bone @ a=^ ~]
|
||||
:_(+> [ost %pass / a]~)
|
||||
--
|
@ -68,10 +68,12 @@
|
||||
:- '2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl'
|
||||
'jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8'
|
||||
==
|
||||
=> ~(. twit key lat.hid `@`eny.hid)
|
||||
|%
|
||||
++ post
|
||||
|= txt=cord ^- hiss
|
||||
(~(stat-upda twit key lat.hid `@`eny.hid) [%status txt]~ ~)
|
||||
++ post |=(a=cord `hiss`(stat-upda [%status a]~ ~))
|
||||
++ stalk |=(a=span `hiss`(stat-user [%screen-name a]~ ~))
|
||||
::
|
||||
++ line (ar:jo stat:twir) :: parse timeline
|
||||
--
|
||||
::
|
||||
++ ra :: transaction core
|
||||
@ -246,7 +248,7 @@
|
||||
?< (gth (lent msg) 140)
|
||||
%+ ra-emit ost
|
||||
:+ %pass /tweet/(scot %ud ost)
|
||||
[%e [%them ~ (post:ti (crip msg))]]
|
||||
[%e %them ~ (post:ti (crip msg))]
|
||||
== ==
|
||||
::
|
||||
++ ra-record :: add to party
|
||||
@ -372,7 +374,9 @@
|
||||
|= tay=station
|
||||
=+ num=(fall (~(get by sequence) tay) 0)
|
||||
?- -.tay
|
||||
%| !!
|
||||
%| ~& tweet-asked/p.p.tay
|
||||
:- /twitter/[p.p.tay]
|
||||
[%e %them ~ (stalk:ti p.p.tay)]
|
||||
%& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
|
||||
:- /friend/show/[man]
|
||||
[%g %show [p.p.tay /rodeo] our.hid /fm/[q.p.tay]/(scot %ud num)]
|
||||
@ -527,6 +531,17 @@
|
||||
:: ~& sih=sih
|
||||
=+ sih=((hard sign) sih)
|
||||
?+ pax ~& [%rodeo-strange-path pax] !!
|
||||
[%twitter @ ~]
|
||||
?> ?=(%thou +<.sih)
|
||||
?. &(=(2 (div p.p.sih 100)) ?=(^ r.p.sih))
|
||||
~& timeline-lost/[p `(unit ,[@ @t])`r]:[p.sih .]
|
||||
[~ +>.$]
|
||||
~& :- %timeline-found
|
||||
^- (list thought)
|
||||
%+ turn (need %.(q.u.r.p.sih ;~(biff poja line:ti)))
|
||||
|= [id=@u who=@ta now=@da txt=@t] ^- thought
|
||||
[(shaf %twit id) [[[%| twitter/who] %received] `~] now %say txt]
|
||||
[~ +>.$]
|
||||
[%tweet ^]
|
||||
?> ?=(%thou +<.sih)
|
||||
~& ?: =(2 (div p.p.sih 100))
|
||||
|
@ -113,6 +113,18 @@
|
||||
:::: library
|
||||
::
|
||||
|%
|
||||
++ twir :: response parsers
|
||||
|%
|
||||
++ stat
|
||||
=> jo
|
||||
^- $+(json (unit ,[id=@u who=@ta now=@da txt=@t]))
|
||||
%- ot
|
||||
:~ id/ni
|
||||
user/(ot ['screen_name' so] ~)
|
||||
['created_at' da]
|
||||
text/so
|
||||
==
|
||||
--
|
||||
++ twit
|
||||
=> |% :: request structures
|
||||
++ dev ,@t :: device name
|
||||
|
Loading…
Reference in New Issue
Block a user