From 18c0f91a5eb353811f67414781186f293cf3d8ac Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 28 Oct 2014 16:13:02 -0700 Subject: [PATCH] Twitter psals, rash poja/xmlp, di:jo millisecond unix date --- arvo/hoon.hoon | 5 ++--- arvo/zuse.hoon | 24 +++++++++++++++++------- main/app/twit/front/hymn.hook | 6 +++--- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 8c72a602a..86ebc78f3 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -4628,9 +4628,8 @@ $(hel t.hel, hev t.hev, rag (done %| [i.hel ~] [i.hev ~])) -- ++ nude :: tree change - |= [a=* b=*] - ^- [p=upas q=upas] - =< [p=(tred a b) q=(tred b a)] + =< |= [a=* b=*] ^- [p=upas q=upas] + [p=(tred a b) q=(tred b a)] |% ++ axes :: locs of nouns |= [a=@ b=*] ^- (map ,* axis) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 66c58d5e4..ec8143801 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -443,7 +443,7 @@ :: ++ unt :: UGT to UTC time |= a=@ - (div (sub a ~1970.1.1) (bex 64)) + (div (sub a ~1970.1.1) ~s1) :: ++ yu :: UTC format constants |% @@ -501,10 +501,10 @@ $(a +.a) == :: -++ poja !: :: parse JSON +++ poja :: parse JSON + =< |=(a=cord (rush a apex)) |% - ++ apex ;~(pose abox obox) :: JSON object - ++ valu :: JSON value + ++ apex :: JSON value %+ knee *json |. ~+ ;~ pfix spac ;~ pose @@ -516,10 +516,11 @@ obox == == + ++ tops ;~(pose abox obox) :: JSON strict :: JSON arrays - ++ abox (stag %a (ifix [sel (ws ser)] (more (ws com) valu))) + ++ abox (stag %a (ifix [sel (ws ser)] (more (ws com) apex))) :: JSON objects - ++ pair ;~(plug ;~(sfix (ws stri) (ws col)) valu) + ++ pair ;~(plug ;~(sfix (ws stri) (ws col)) apex) ++ obje (ifix [(ws kel) (ws ker)] (more (ws com) pair)) ++ obox (stag %o (cook mo obje)) :: JSON booleans @@ -650,6 +651,12 @@ ?. ?=([%s *] jon) ~ (bind (stud (trip p.jon)) |=(a=date (year a))) :: + ++ di :: millisecond date + |= jon=json + %+ bind (ni jon) + |= a=@u ^- @da + (add ~1970.1.1 (div (mul ~s1 a) 1.000)) + :: ++ mu :: true unit |* wit=fist |= jon=json @@ -663,7 +670,7 @@ ++ ni :: number as integer |= jon=json ?. ?=([%n *] jon) ~ - (slaw %ui (cat 3 '0i' p.jon)) + (rush p.jon dem) :: ++ no :: number as cord |= jon=json @@ -903,6 +910,7 @@ `_tam`?~(att bod [' ' (xmla att bod)]) :: ++ xmlp :: xml parser + =< |=(a=cord (rush a apex)) |% ++ apex =+ spa=;~(pose comt whit) @@ -2144,10 +2152,12 @@ -- :: ++ epur :: url/header parser + =< |=(a=cord (rush a apex)) |% ++ apat :: 2396 abs_path %+ cook deft (ifix [fas ;~(pose fas (easy ~))] (more fas smeg)) + ++ apex auri ++ auri %+ cook |= a=purl diff --git a/main/app/twit/front/hymn.hook b/main/app/twit/front/hymn.hook index af28ea926..5e648ebd2 100644 --- a/main/app/twit/front/hymn.hook +++ b/main/app/twit/front/hymn.hook @@ -3,9 +3,9 @@ :::: /hook/hymn/front/twit/app :: /? 314 :: need urbit 314 -/= urbit /:/===/lib/urb:/hymn/ :: urbit library (js) -/= style /:/%%%/style:/hymn/ :: stylesheet (css) -/= application /:/%%%/app:/hymn/ :: application (js) +/= urbit /:/===/lib/urb:/psal/ :: urbit library (js) +/= style /:/%%%/style:/psal/ :: stylesheet (css) +/= application /:/%%%/app:/psal/ :: application (js) !: :::: content ::