Merge branch 'test' of github.com:urbit/urbit-new into test

This commit is contained in:
Galen Wolfe-Pauly 2015-01-29 17:50:44 -08:00
commit 97e1eacfc0
3 changed files with 67 additions and 26 deletions

View File

@ -1597,8 +1597,8 @@
:+ ~ :+ ~
%red %red
:: :+ [p.p.pul q.p.pul r.p.pul] :: :+ [p.p.pul q.p.pul r.p.pul]
:+ [| q.p.pul r.p.pul] :: XX https :+ [| q.p.pul r.p.pul] :: XX https
[~ /gul] [p.q.pul /gul] :: XX js discrimination
:- [%url (crip (earn pul(p.p |)))] :- [%url (crip (earn pul(p.p |)))]
?~ whu ~ ?~ whu ~
[%who (rsh 3 1 (scot %p u.whu))]~ [%who (rsh 3 1 (scot %p u.whu))]~
@ -1797,6 +1797,12 @@
++ lash :: user is authorized ++ lash :: user is authorized
|=(a=ship (~(has ju aut.ced) %$ (scot %p a))) |=(a=ship (~(has ju aut.ced) %$ (scot %p a)))
:: ::
++ redi :: js login redirect
|= pul=purl ^- tape
"window.location = '{(earn pul)}".
"{?~(r.pul "?" "&")}url=' +".
"encodeURIComponent(window.location)"
::
++ step :: step in work ++ step :: step in work
|- ^+ + |- ^+ +
=^ zib +.$ =^ zib +.$
@ -1932,9 +1938,13 @@
%= pip %= pip
pez pez
:- %fin :- %fin
=+ pul=p.som.pip
?: ?=([~ %js] p.q.pul) :: XX js discrimination
[%mid /application/javascript (tact (redi pul(p.q ~)))]
=. p.q.pul ~
:- %raw :- %raw
:+ 307 :+ 307
[%location (crip (earn p.som.pip))]~ [%location (crip (earn pul))]~
~ ~
== ==
:: ::

View File

@ -68,6 +68,7 @@
++ silt ++ silt
$% [%rodeo-report p=report] :: refresh $% [%rodeo-report p=report] :: refresh
[%twit-stat p=twit-stat] :: tweet reciept [%twit-stat p=twit-stat] :: tweet reciept
[%twit-feed p=(list twit-stat)] :: tweet reciept
== ==
++ move ,[p=bone q=(mold note gift)] :: all actions ++ move ,[p=bone q=(mold note gift)] :: all actions
++ hapt ,[p=ship q=path] :: app instance ++ hapt ,[p=ship q=path] :: app instance
@ -87,8 +88,6 @@
$: %t :: $: %t ::
$% [%wait p=@da] :: $% [%wait p=@da] ::
== == == :: == == == ::
++ twim :: twitter endpoints
$%([%stat p=@uv]) ::
-- --
|_ [hid=hide house] |_ [hid=hide house]
++ ra :: transaction core ++ ra :: transaction core
@ -178,27 +177,28 @@
pa-abet:(~(pa-friend pa man u.pur) tay sih) pa-abet:(~(pa-friend pa man u.pur) tay sih)
:: ::
++ ra-twitter :: %twitter response ++ ra-twitter :: %twitter response
|= [met=twim sih=sign] |= [[num=@ud man=span] sih=sign]
^+ +> ^+ +>
?+ sih ~|([%rodeo-bad-twitter sih] !!) ?+ sih ~|([%rodeo-bad-twitter sih] !!)
[%g ?(%nice %mean) ~] [%g ?(%nice %mean) ~]
+> +>
[%g %mean ^]
(ra-repeat num [%| %twitter man] sih)
[%g %rush %twit-stat *] [%g %rush %twit-stat *]
~& got-tweet/p.p.sih (ra-repeat num [%| %twitter man] [%g %nice ~])
+>
== ==
:: ::
++ ra-repeat :: %repeat response ++ ra-repeat :: %repeat response
|= [num=@ud her=ship man=span sih=sign] |= [num=@ud pan=partner sih=sign]
=+ oot=(~(get by q.outbox) num) =+ oot=(~(get by q.outbox) num)
?~ oot ~& [%ra-repeat-none num] +>.$ ?~ oot ~& [%ra-repeat-none num] +>.$
=. q.outbox (~(del by q.outbox) num) =. q.outbox (~(del by q.outbox) num)
=. q.u.oot =. q.u.oot
=+ olg=(~(got by q.u.oot) [%& her man]) =+ olg=(~(got by q.u.oot) pan)
%+ ~(put by q.u.oot) [%& her man] %+ ~(put by q.u.oot) pan
:- -.olg :- -.olg
?+ sih !! ?+ sih !!
[%g %mean *] ~&([%rodeo-repeat-rejected num her man sih] %rejected) [%g %mean *] ~&([%rodeo-repeat-rejected num pan sih] %rejected)
[%g %nice ~] %received [%g %nice ~] %received
== ==
(ra-think | our.hid u.oot ~) (ra-think | our.hid u.oot ~)
@ -305,19 +305,20 @@
+>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip)) +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
:: ::
++ ra-tweet :: send to /twit ++ ra-tweet :: send to /twit
|= [who=span sey=serial * sta=statement] |= [man=span tip=thought]
~! sta =* sta r.tip
?> ?=(%lin -.r.sta) ?> ?=(%lin -.r.sta)
%^ ra-emil =. q.outbox (~(put by q.outbox) p.outbox tip)
%^ ra-emil(p.outbox +(p.outbox))
:* ost :* ost
%pass /twitter/stat/(scot %uv sey) %pass /twitter/stat/(scot %ud p.outbox)/[man]
%g %mess %g %mess
[our.hid /twit] our.hid [our.hid /twit] our.hid
[%twit-do !>(`twit-do`[who %post sey q.r.sta])] [%twit-do !>(`twit-do`[man %post p.tip q.r.sta])]
== ==
:* ost :* ost
%pass /twitter/stat/(scot %uv sey) %pass /twitter/stat/(scot %ud p.outbox)/[man]
[%g %show [our.hid /twit] our.hid /post/(scot %uv sey)] [%g %show [our.hid /twit] our.hid /post/(scot %uv p.tip)]
== ==
~ ~
++ pa :: story core ++ pa :: story core
@ -378,7 +379,6 @@
++ pa-friend :: subscribed update ++ pa-friend :: subscribed update
|= [tay=partner sih=sign] |= [tay=partner sih=sign]
^+ +> ^+ +>
?> ?=(& -.tay)
?+ sih ~|([%rodeo-bad-friend sih] !!) ?+ sih ~|([%rodeo-bad-friend sih] !!)
[%g %nice ~] [%g %nice ~]
+>.$ +>.$
@ -389,8 +389,20 @@
~& [%pa-friend-mean +>.sih] ~& [%pa-friend-mean +>.sih]
pa-monitor(sources.shape (~(del in sources.shape) tay)) pa-monitor(sources.shape (~(del in sources.shape) tay))
:: ::
[%g %rush %twit-feed *]
%- pa-lesson
%+ turn p.p.sih |= twit-stat
^- telegram
:^ our.hid :: XX inaccurate
(shas %twit id)
`audience`[[tay [& ~ tay] %received] `~] :: current party?
^- statement
:+ now
~ :: XX hashtags
[%lin & txt]
[%g %rush %rodeo-report *] [%g %rush %rodeo-report *]
:: ~& [%pa-friend-report +>+.sih] :: ~& [%pa-friend-report +>+.sih]
?> ?=(& -.tay)
=. +> %+ pa-scrub ost =. +> %+ pa-scrub ost
:_ ~ :_ ~
:- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
@ -425,6 +437,9 @@
?- -.tay ?- -.tay
%| ~& tweet-abjure/p.p.tay %| ~& tweet-abjure/p.p.tay
!! !!
:: :~ :- /friend/nuke/[man]/twitter/[p.p.tay]
:: [%g %nuke [our.hid /twit] our.hid]
:: ==
:: ::
%& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]]
:~ :- /friend/nuke/[man]/(scot %p p.p.tay)/[q.p.tay] :~ :- /friend/nuke/[man]/(scot %p p.p.tay)/[q.p.tay]
@ -442,7 +457,9 @@
=+ num=(fall (~(get by sequence) tay) 0) =+ num=(fall (~(get by sequence) tay) 0)
?- -.tay ?- -.tay
%| ~& tweet-acquire/p.p.tay %| ~& tweet-acquire/p.p.tay
!! :~ :- /friend/show/[man]/twitter/[p.p.tay]
[%g %show [our.hid /twit] our.hid /user/[p.p.tay]]
==
:: ::
%& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] %& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
:~ :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] :~ :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
@ -643,11 +660,11 @@
[%twitter *] [%twitter *]
=- ra-abet:(~(ra-twitter ra ost ~) met sih) =- ra-abet:(~(ra-twitter ra ost ~) met sih)
^= met ^= met
?+ t.pax ~& [%rodeo-twitter-strange-path pax] !! ?+ t.pax ~| [%rodeo-twitter-strange-path pax] !!
:: [%mine @ @ ~] :: [%mine @ @ ~]
:: [i.t.pax i.t.t.t.pax] :: [i.t.pax i.t.t.t.pax]
[%stat @ ~] [%stat @ @ ~]
[i.t.pax (slav %uv i.t.t.pax)] [(slav %ud i.t.t.pax) i.t.t.t.pax]
== ==
:: ::
[%friend *] [%friend *]
@ -655,13 +672,16 @@
?. =(%show i.t.pax) ?. =(%show i.t.pax)
~& [%pour-friend-nuke-nuke pax] ~& [%pour-friend-nuke-nuke pax]
[~ +>.$] [~ +>.$]
=+ [man tay]=[i.t.t.pax [%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]] =+ man=i.t.t.pax
=+ ?: ?=(%twitter i.t.t.t.pax)
tay=[%| i.t.t.t.pax i.t.t.t.t.pax]
tay=[%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]
ra-abet:(~(ra-friend ra ost ~) man tay sih) ra-abet:(~(ra-friend ra ost ~) man tay sih)
:: ::
[%repeat *] [%repeat *]
?> ?=([@ @ @ ~] t.pax) ?> ?=([@ @ @ ~] t.pax)
=+ [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax] =+ [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax]
ra-abet:(~(ra-repeat ra ost ~) num her man sih) ra-abet:(~(ra-repeat ra ost ~) num [%& her man] sih)
== ==
:: ::
++ pull ++ pull

11
main/app/time/core.hook Normal file
View File

@ -0,0 +1,11 @@
:: Time an operation, usage :time foo, |time :foo
::
:::: /hook/core/time/app
::
/+ sh-utils
|_ [hide ~]
++ peer ,_`.
++ poke--args (add-resp [%pass /(scot %da lat) %t %wait lat] ,_`.)
++ pour |=([@ a=path *] %.(+< (args-into-gate +> ,_(resu a))))
++ resu |=(a=path tang/[>`@dr`(sub lat (slav %da -.a))<]~)
--