Merge remote-tracking branch 'ohAitch/zuseflat-users' into plastic-boot

This commit is contained in:
C. Guy Yarvin 2016-12-02 11:32:34 -08:00
commit c81681f19a
41 changed files with 447 additions and 275 deletions

View File

@ -2,17 +2,18 @@
:::: /hoon/ask/app
::
/? 310
/+ sole, womb
/+ sole, womb, prey
[. sole]
|%
++ card
$% {$diff $sole-effect sole-effect}
{$poke wire {ship $hood} $womb-invite {cord reference invite}:womb}
{$poke wire {ship $hood} $womb-invite {cord invite}:womb}
==
++ invited ?($new $sent $ignored)
++ email @t
--
::
=, ^gall
|_ $: bow/bowl
adr/(map email {time invited})
sos/(map bone sole-share)
@ -153,7 +154,7 @@
^- card
:^ %poke /invite/(scot %t ask) [(need wom) %hood]
:- %womb-invite
^- {cord reference invite}:womb
^- {cord invite}:womb
=+ inv=(scot %uv (end 7 1 eny.bow))
[inv `&+our.bow [ask 1 0 "You have been invited to Urbit: {(trip inv)}" ""]]
[inv [ask 1 0 "You have been invited to Urbit: {(trip inv)}" ""]]
--

View File

@ -1,17 +1,18 @@
:: :: ::
:::: /hoon/dojo/app :: ::::
:: :: ::
/? 314 :: arvo kelvin
/? 309 :: arvo kelvin
/- sole, lens :: console structures
/+ sole :: console library
[. sole]
=, space:clay
=, space:userlib
=, format
:: :: ::
:::: :: ::::
:: :: ::
=> |% :: external structures
++ house :: all state
$: $4
$: $5
egg/@u :: command count
hoc/(map bone session) :: conversations
== ::
@ -111,7 +112,8 @@
:: ::
:::: ::
:: ::
|_ $: hid/bowl:^gall :: system state
=, ^gall
|_ $: hid/bowl :: system state
house :: program state
== ::
++ he :: per session
@ -186,6 +188,7 @@
::
++ dp-hoof :: ++ford-hoof twig
;~ plug
:(stag %sand %f ;~(pose (cold %| tar) (easy %&)))
:(stag %sand %tas sym)
%- dp-twig-punt
;~ (glue fas)
@ -226,7 +229,7 @@
;~(pose sym (easy dp-default-app))
==
++ dp-beam :: ++beam
%+ cook |=(a/path =+((tome a) ?^(- u [he-beak (flop a)])))
%+ cook |=(a/path =+((de-beam a) ?^(- u [he-beak (flop a)])))
=+ vez=(vang | dp-path)
(sear plex:vez (stag %conl poor:vez))
::
@ -236,11 +239,11 @@
auru:urlp:url:eyre
::
++ dp-model ;~(plug dp-server dp-config) :: ++dojo-model
++ dp-path (tope he-beam) :: ++path
++ dp-path (en-beam he-beam) :: ++path
++ dp-server (stag 0 (most fas sym)) :: ++dojo-server
++ dp-twig tall:(vang | dp-path) :: ++twig
++ dp-rood :: 'dir' twig
=> (vang | (tope dir))
=> (vang | (en-beam dir))
;~ pose
rood
::
@ -470,9 +473,9 @@
?: ?=({@ $~} pax) ~[i.pax %home '0']
?: ?=({@ @ $~} pax) ~[i.pax i.t.pax '0']
pax
=. dir (need (tome pax))
=. dir (need (de-beam pax))
=- +>(..dy (he-diff %tan - ~))
rose+[" " `~]^~[leaf+"=%" (smyt (tope he-beak s.dir))]
rose+[" " `~]^~[leaf+"=%" (smyt (en-beam he-beak s.dir))]
==
::
$poke
@ -490,7 +493,7 @@
%info
/file
our.hid
(foal (tope p.p.mad) cay)
(foal (en-beam p.p.mad) cay)
==
::
$flat
@ -816,7 +819,7 @@
=. egg +(egg)
=- ?~(msg ..he-diff (he-diff %tan leaf+u.msg ~))
^- msg/(unit tape)
?+ (clan:title:jael our.hid) ~
?+ (clan:title our.hid) ~
$pawn ?+ egg ~
$5 `":: To request a planet, run |ask 'your@email.co'"
== ==
@ -1071,7 +1074,7 @@
?- -.sink.com
$stdout [%show %0]
$output-file $(sink.com [%command (cat 3 '@' pax.sink.com)])
$output-clay [%file (need (tome pax.sink.com))]
$output-clay [%file (need (de-beam pax.sink.com))]
$url [%http %post `~. url.sink.com]
$to-api !!
$send-api [%poke our.hid api.sink.com]
@ -1090,19 +1093,22 @@
--
::
++ prep
=+ session-1==+(*session _-(poy *(unit)))
=+ session-4==+(*session _-(lib *(list), sur *(list)))
=+ session-1==+(*session-4 _-(poy *(unit)))
=+ session-0==+(*session-1 _[_say syd=desk * _|2.-])
:: ,_`..prep
=+ ^= hoze
$% {$0 p/(map bone session-0)}
{$1 p/(map bone session-1)}
{$2 p/(map bone session-1)}
{$3 p/(map bone session)}
{$3 p/(map bone session-4)}
{$4 p/@ q/(map bone session-4)}
==
|= old/(unit ?(house hoze)) ^+ [~ ..prep]
?~ old `..prep
?+ -.u.old !!
$4 `..prep(+<+ u.old)
$4 $(-.u.old %5, q.u.old (~(run by q.u.old) |=(session-4 +<(sur ~, lib ~))))
$5 `..prep(+<+ u.old)
==
::
:: pattern: ++ foo |=(data he-abet:(~(he-foo he (~(got by hoc) ost)) data))
@ -1118,7 +1124,7 @@
::
++ peer-sole
~? !=(our.hid src.hid) [%dojo-peer-stranger ost.hid src.hid]
?> (team:title:jael our.hid src.hid)
?> (team:title our.hid src.hid)
=^ moz .
?. (~(has by hoc) ost.hid) [~ .]
~& [%dojo-peer-replaced ost.hid]

View File

@ -47,6 +47,7 @@
--
=+ connector=(connector move sub-result) :: Set up connector library
::
=, ^gall
|_ $: hid/bowl
hook/(map @t {id/@t listeners/(set bone)}) :: map events to listeners
==

View File

@ -12,6 +12,7 @@
{$gh-issue-comment issue-comment:gh}
==
--
=, ^gall
|_ {hid/bowl *}
++ poke-path
|= pax/path

View File

@ -53,6 +53,7 @@
(star ;~(pose (cold '+' (just '-')) (cold '/' (just '_')) next))
--
::
=, ^gall
|_ $: hid/bowl count/@
web-hooks/(map @t {id/@t listeners/(set bone)})
received-ids/(list @t)

View File

@ -48,7 +48,8 @@
:: :: ::
:::: :: ::
:: :: ::
|_ $: hid/bowl:^gall :: system state
=, ^gall
|_ $: hid/bowl :: system state
hood-1 :: server state
== ::
++ able :: find+make part

View File

@ -8,6 +8,7 @@
==
--
::
=, ^gall
|_ {hid/bowl connections/(set {app/term source/path station/knot})}
++ poke-noun
|= arg/*

View File

@ -5,8 +5,9 @@
/- talk, sole
/+ talk, sole, time-to-id, twitter
/= seed /~ !>(.)
=, space:clay
=, js:eyre
=, space:userlib
=, format
=, unity
::
::::
::
@ -180,7 +181,8 @@
q.nb
--
--
|_ {hid/bowl:^gall house}
=, ^gall
|_ {hid/bowl house}
++ ra :: per transaction
|_ moves/(list move)
++ sh :: per console
@ -219,7 +221,7 @@
;~ pose
(cold [our.hid man.she] col)
;~(pfix cen (stag our.hid sym))
;~(pfix fas (stag (sein:title:jael our.hid) sym))
;~(pfix fas (stag (sein:title our.hid) sym))
::
%+ cook
|= {a/@p b/(unit term)}
@ -1648,7 +1650,7 @@
?- p.cordon.shape
$black &
$green &
$brown (team:title:jael our.hid her)
$brown (team:title our.hid her)
$white (~(has in q.cordon.shape) her)
==
::
@ -1847,7 +1849,8 @@
(pa-sauce ost.hid [%quit ~]~)
=+ ^= ruv ^- (unit river)
%+ biff
(zl:jo (turn pax ;~(biff slay |=(a/coin `(unit dime)`?~(-.a a ~)))))
%- drop-list
(turn pax ;~(biff slay |=(a/coin `(unit dime)`?~(-.a a ~))))
|= paf/(list dime)
?~ paf
$(paf [%ud (sub (max 64 count) 64)]~)
@ -1958,7 +1961,7 @@
++ sn-curt :: render name in 14
|= mup/?
^- tape
=+ raw=(cite:title:jael p.one)
=+ raw=(cite:title p.one)
(runt [(sub 14 (lent raw)) ' '] raw)
::
++ sn-nick
@ -1978,7 +1981,7 @@
?: =(q.one man)
":"
['%' (trip q.one)]
?: =(p.one (sein:title:jael our.hid))
?: =(p.one (sein:title our.hid))
['/' (trip q.one)]
=+ wun=(scow %p p.one)
?: =(q.one (main p.one))
@ -2222,7 +2225,7 @@
~? !=(src.hid our.hid) [%peer-talk-stranger src.hid]
:: ~& [%talk-peer src.hid ost.hid pax]
?: ?=({$sole *} pax)
?> (team:title:jael our.hid src.hid)
?> (team:title our.hid src.hid)
~? (~(has by shells) ost.hid) [%talk-peer-replaced ost.hid pax]
ra-abet:(ra-console:ra src.hid t.pax)
:: ~& [%talk-peer-data ost.hid src.hid pax]
@ -2318,7 +2321,7 @@
^- move
=+ ^- paf/path
=+ day=(year %*(. (yore now.hid) +.t +:*tarp))
%+ tope [our.hid %home da+now.hid]
%+ en-beam [our.hid %home da+now.hid]
/talk-telegrams/(scot %da day)/[man]/talk
=+ grams:(~(got by stories) man)
[ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])]

View File

@ -7,6 +7,7 @@
::
:::: ~fyr
::
=, ^eyre
|%
++ twit-path :: valid peer path
$% {$cred $~} :: credential info
@ -59,11 +60,7 @@
++ endpoint endpoint:reqs:twitter :: outgoing target
++ param param:reqs:twitter :: twit-req paramters
++ print print:twitter :: their serialization
++ parse parse:twitter :: and deserialization
::
:: ++ twit args:reqs:twitter :: arugment types
:: ++ twir parse:twitter :: reparsers
:: ++ twip print:twitter :: printers
--
::
::::
@ -174,7 +171,7 @@
~& sigh-tang+pax
%- (slog (flop tan))
=+ ^- git/gift
=+ err='' ::%.(q:(need r.hit) ;~(biff poja mean:twir)) :: XX parse?
=+ err='' ::%.(q:(need r.hit) ;~(biff poja mean:reparse:twitter)) :: XX parse?
:^ %diff %ares %bad-http
tan
:: [leaf/"HTTP Code {<p.hit>}" (turn (need err) mean:render:twit)]

View File

@ -7,7 +7,7 @@
:::: :::::: ames structures
:: :: ::
=, ^ames
=, crypto:ames
=, crypto
|% ::
++ bait {p/skin q/@ud r/dove} :: fmt nrecvd spec
++ bath :: per friend
@ -576,7 +576,7 @@
?>((pier i.wet) [i.wet ~])
?~ q.p.q.i.wet
?>((meld i.wet i.law) [i.wet law])
=+ rul=(sein:title:jael r.p.q.i.wet)
=+ rul=(sein:title r.p.q.i.wet)
|- ^- wyll
?: ?& =(rul r.p.q.i.law)
=(p.p.q.i.law u.q.p.q.i.wet)
@ -595,7 +595,7 @@
++ melt :: proper connect
|= {new/deyd old/deyd}
^- ?
=+ rac=(clan:title:jael r.p.q.new)
=+ rac=(clan:title r.p.q.new)
?& =(r.new r.old) :: match fake
?~ q.p.q.new
?& =(r.p.q.old r.p.q.new)
@ -603,7 +603,7 @@
==
?& &(!=(%pawn rac) !=(%czar rac))
|(=(0 p.p.q.new) =(%earl rac))
=(r.p.q.old (sein:title:jael r.p.q.new))
=(r.p.q.old (sein:title r.p.q.new))
=(p.p.q.old u.q.p.q.new)
==
==
@ -624,7 +624,7 @@
++ pier !: :: initial deyd
|= wed/deyd
^- $&
?> =+ rac=(clan:title:jael r.p.q.wed)
?> =+ rac=(clan:title r.p.q.wed)
=+ loy=(haul:suite r.q.wed)
?: &(r.wed =(rac %czar)) %&
?> =(0 p.p.q.wed)
@ -978,7 +978,7 @@
++ born :: born:as:go
|= {now/@da her/@p tic/@pG ges/gens pub/pass} :: register user
^- {(unit wyll) _+>}
?. =(our (sein:title:jael her)) [~ +>.$]
?. =(our (sein:title her)) [~ +>.$]
=+ nes=sen
=+ ryt=(end 6 1 (shaf %tick (mix her (shax sec:ex:q.nes))))
?. =(tic ryt)
@ -1106,7 +1106,7 @@
::
++ xeno :: xeno:lax:as:go
^- (list ship) :: foreign canon
(saxo:title:jael her)
(saxo:title her)
::
++ xong :: xong:lax:as:go
^- (list ship) :: route unto
@ -1230,7 +1230,7 @@
::
++ xen :: canon
|- ^- (list ship)
(saxo:title:jael our)
(saxo:title our)
::
++ yew :: best wyll for
|= her/ship
@ -1238,7 +1238,7 @@
=+ gel=(~(get by hoc.saf) her)
?^ gel
lew.wod.u.gel
?:((lth her 256) ~ $(her (sein:title:jael her)))
?:((lth her 256) ~ $(her (sein:title her)))
-- :: --as:go
::
++ ha !: :: adopt new license
@ -1256,7 +1256,7 @@
our
:* %- flop
|- ^- (list ship)
?:((lth our 256) ~ =+(seg=(sein:title:jael our) [seg $(our seg)]))
?:((lth our 256) ~ =+(seg=(sein:title our) [seg $(our seg)]))
::
(turn mac |=({p/life q/ring} [p q (weur:suite q)]))
wil
@ -1376,7 +1376,7 @@
:: install it as a symmetric key.
::
=+ key=(shax ger)
=+ dad=(sein:title:jael her)
=+ dad=(sein:title her)
~& [%user-auth her `@p`ger `@p`(mug key)]
=+ gus=(need (~(us go ton.fox) her))
=+ diz=(wasc:(myx:gus dad) key)
@ -1385,10 +1385,10 @@
[out fox]
::
++ doze
%+ hunt:chrono:behn `(add now ~s32)
%^ hunt lth `(add now ~s32)
|- ^- (unit @da)
?~ zac.fox ~
;: hunt:chrono:behn
;: (cury hunt lth)
$(zac.fox l.zac.fox)
$(zac.fox r.zac.fox)
doze:(um p.n.zac.fox)
@ -1466,7 +1466,7 @@
++ doze :: doze:um:am
|- ^- (unit @da) :: wakeup time
?~ wab.weg ~
;: hunt:chrono:behn
;: (cury hunt lth)
$(wab.weg l.wab.weg)
$(wab.weg r.wab.weg)
doze:(ho p.n.wab.weg)
@ -2167,7 +2167,7 @@
!>
?~ wul
(scot %p his)
(gnow:title:jael his q.q.q:((hard deyd) -.u.wul))
(gnow:title his q.q.q:((hard deyd) -.u.wul))
?: ?=({$gcos $~} tyl)
=+ wul=$(tyl [%wyll ~])
?~(wul ~ ``[%noun !>(`gcos`q.q.q:((hard deyd) -.u.wul))])
@ -2180,7 +2180,7 @@
%+ bind (rick mar his lew.wod.u.fod)
|=(a/wyll `[%noun !>(a)])
?: ?=({$tick $~} tyl)
?. =(our (sein:title:jael his)) ~
?. =(our (sein:title his)) ~
``[%noun !>((end 6 1 (shaf %tick (mix his (shax sec:ex:q:sen:u.gys)))))]
~
?: ?=({$buck $~} tyl)

View File

@ -1622,11 +1622,11 @@
::
$next ~
$many
%+ hunt:chrono:behn
%^ hunt lth
?. ?=($da -.p.q.rov) ~
?.((lth now p.p.q.rov) ~ [~ p.p.q.rov])
?. ?=($da -.q.q.rov) ~
?.((lth now p.q.q.rov) [~ now] [~ p.q.q.rov])
(hunt gth [~ now] [~ p.q.q.rov])
==
fun
+>.$
@ -2188,7 +2188,6 @@
=+ mar=(lobe-to-mark u.lob)
?. ?=($hoon mar)
[~ ~ %| u.lob]
=* differ differ:clay
=* lines lines:clay
:^ ~ ~ %&
:+ mar [%atom %t ~]
@ -3287,7 +3286,7 @@
?< (~(has by fat.ruf) p.q.hic)
(~(put by fat.ruf) p.q.hic [-(hun hen)]:[*room .])
==
=+ [bos=(sein:title:jael p.q.hic) can=(clan:title:jael p.q.hic)]
=+ [bos=(sein:title p.q.hic) can=(clan:title p.q.hic)]
%- zing ^- (list (list move))
:~ ?: =(bos p.q.hic) ~
[hen %pass /init-merge %c %merg p.q.hic %base bos %kids da+now %init]~

View File

@ -121,7 +121,7 @@
$heft heft
$tick =+ ^= ges ^- gens:^ames
:- %en
=+ can=(clan:title:jael p.kyz)
=+ can=(clan:title p.kyz)
?- can
$czar [%czar ~]
$duke [%duke %anon ~]
@ -269,12 +269,12 @@
++ init :: initialize
~& [%dill-init our ram]
=+ myt=(flop (need tem))
=+ can=(clan:title:jael our)
=+ can=(clan:title our)
=. tem ~
=. moz :_(moz [hen %pass / %c %merg our %home our %base da+now %init])
=. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]])
=. +> ?: ?=(?($czar $pawn) can) +>
(sync %base (sein:title:jael our) %kids)
(sync %base (sein:title our) %kids)
=. +> ?: ?=(?($czar $pawn) can)
(sync %home our %base)
(init-sync %home our %base)

View File

@ -3,13 +3,14 @@
::::
|= pit/vase
=, ^eyre
=, crypto:ames
=, space:clay
=, crypto
=, bytes:eyre
=, js:eyre
=, url:eyre
=, wired:eyre
=, wired
=, xml:eyre
=, unity
=, format
=> =~
|% :: interfaces
++ move {p/duct q/(wind note gift:able)} :: local move
@ -237,7 +238,6 @@
=+ fel=(most cab (sear wick urt:ab))
|=(a/knot `(unit {p/term q/path})`(rush a fel))
::
++ rolt |=(a/wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
++ wush
|= {wid/@u tan/tang}
^- wall
@ -264,7 +264,7 @@
=- (jobe fail+s+typ mess+(jape mez) ~)
^- {typ/term mez/tape}
?~ err [%fail "Unknown Error"]
[p.u.err (rolt (wush 160 q.u.err))]
[p.u.err (of-wall (wush 160 q.u.err))]
::
++ resp :: mimed response
|= {sas/@uG mit/mite rez/@} ^- httr
@ -273,7 +273,7 @@
::
++ add-links :: x-urbit:// urls
|= a/wall ^- marl
?. [x-urbit-links=&] [;/((rolt a))]~ :: default disable
?. [x-urbit-links=&] [;/((of-wall a))]~ :: default disable
|- ^- marl
?~ a ~
=^ pax i.a :: parse path if any
@ -789,7 +789,7 @@
::
$born +>.$(ged hen) :: register external
$serv
=< ~&([%serving (tope top)] .)
=< ~&([%serving (en-beam top)] .)
?^(p.kyz +>.$(top p.kyz) +>.$(q.top p.kyz))
::
$crud
@ -1049,7 +1049,7 @@
(give-thou 307 [location+(crip url)]~ ~)
:: (give-html:abet 200 ~ (redir:xml url))
?. ?=($mime p.cay)
=+ bek=(norm-beak -:(need (tome (need (puck p.tee)))))
=+ bek=(norm-beak -:(need (de-beam (need (puck p.tee)))))
(exec-live ac+q.tee bek [%flag [p.sih `~] %cast %mime [%$ cay]])
(give-mime q.tee p.sih cay)
::
@ -1259,8 +1259,8 @@
::
++ as-lens
=< abet
:: (process-parsed [%mess [our %dojo] %lens-command /lens (need grab-json)])
((teba ~(new lens ~)) (need grab-json))
:: (process-parsed [%mess [our %dojo] %lens-command /lens grab-json])
((teba ~(new lens ~)) grab-json)
::
++ resolve
|= {cug/(list @t) pez/pest} ^+ done
@ -1285,7 +1285,7 @@
::
++ resolve-bake
|= {ses/(unit hole) dom/(unit @t) men/mend mar/mark arg/coin bem/beam}
=+ wir=[%at (pack [- +]:(tope -.bem ~)) (fall ses %$) men ?~(dom ~ [u.dom]~)]
=+ wir=[%at (pack [- +]:(en-beam -.bem ~)) (fall ses %$) men ?~(dom ~ [u.dom]~)]
=. -.bem (norm-beak -.bem)
=+ req=[%bake mar arg bem]
=+ red=[%bake %red-quri arg bem]
@ -1310,14 +1310,22 @@
&
::
++ grab-json
^- json
?. ?=(?($post $put $delt) mef)
~|(bad-method+mef !!)
?~ bod
~|(%no-body !!)
(need (poja q.u.bod))
::
++ grab-json-soft
^- (unit json)
?. ?=(?($post $put $delt) mef)
~
?~(bod ~ (poja q.u.bod))
::
++ need-body |*(a/fist:jo (need (biff grab-json a)))
++ grab-oryx
^- (unit oryx)
=+ oxe=(biff grab-json (ot oryx+so ~):jo)
=+ oxe=(biff grab-json-soft =>(dejs-soft (ot oryx+so ~)))
?^ oxe oxe
(~(get by (molt quy)) %oryx)
::
@ -1357,14 +1365,14 @@
++ is-spur |(?~(q.pok & ((sane %ta) i.q.pok)))
++ as-beam :: /~sipnym/desk/3/...
^- (unit beam)
=+ =< tyk=(zl:jo (turn q.pok .)) :: a path whose elements
=+ =< tyk=(drop-list (turn q.pok .)) :: a path whose elements
|=(a/knot `(unit tyke)`(rush a gasp:vast)) :: are in /=foo==/=bar
?~ tyk ~ :: syntax
=+ %- posh:(vang & (tope top)) :: that the base path
=+ %- posh:(vang & (en-beam top)) :: that the base path
[[~ (zing u.tyk)] ~] :: can interpolate into
?~ - ~ ::
=+ (plex:vast %conl u) :: staticly, and make a
(biff - tome) :: valid beam
(biff - de-beam) :: valid beam
::
++ as-aux-request :: /~/... req parser
^- (unit perk)
@ -1429,10 +1437,11 @@
{@ @ $~} [our (raid but %tas %tas ~)]
{@ @ @ $~} (raid but %p %tas %tas ~)
==
:^ %mess [p q]:dir r.dir
=; x/{wir/wire mez/json}
[%mess [p q]:dir r.dir wir.x mez.x]
=+ wir=(~(get by (molt quy)) 'wire')
?^ wir [(stab u.wir) (need grab-json)] :: XX distinguish
(need-body (ot wire+(cu stab so) xyro+some ~):jo)
?^ wir [(stab u.wir) grab-json] :: XX distinguish
%.(grab-json =>(dejs (ot wire+(cu stab so) xyro+same ~)))
::
$in
~| expect+[%post 'application+json' /'@uv' '?PUT/DELETE']
@ -1450,7 +1459,7 @@
$(but [(scot %p our) but])
?> ?=(?($delt $put) mef)
=+ :- hap=[(slav %p i.but) (slav %tas -.t.but)]
wir=(need-body (ot wire+(cu stab so) ~):jo)
wir=%.(grab-json =>(dejs (ot wire+(cu stab so) ~)))
[%subs mef hap u.p.pok wir +.t.but]
::
$auth
@ -1464,14 +1473,13 @@
$get [%json ~]
$put
~| parsing+bod
[%try (need-body (ot ship+(su fed:ag) code+(mu so) ~):jo)]
:- %try
%.(grab-json =>(dejs (ot ship+(su fed:ag) code+(mu so) ~)))
::
$delt
~| parsing+bod
=+ jon=(need (poja q:(need bod)))
?> ?=($o -.jon)
=+ sip=(~(get by p.jon) %ship)
[%del ?~(sip ~ [~ (need ((su:jo fed:ag) u.sip))])]
:- %del
%.(grab-json =>(dejs-soft (ot ship+(su fed:ag))))
== ==
==
--
@ -1503,7 +1511,7 @@
=+ ext=(fall p.pok %urb)
=+ bem=?-(-.hem $beam p.hem, $spur [-.top (weld p.hem s.top)])
~| bad-beam+q.bem
?< =([~ 0] (sky [151 %noun] %cw (tope bem(+ ~, r [%da now]))))
?< =([~ 0] (sky [151 %noun] %cw (en-beam bem(+ ~, r [%da now]))))
=+ men=?+(mef !! $get mef, $head mef) :: redact result
=+ arg=(fcgi payload fcgi-cred)
=+ [%bake men ext arg bem]
@ -1689,7 +1697,7 @@
%- jobe :~
oryx+s+orx
ixor+s+(oryx-to-ixor orx)
sein+(jape +:<(sein:title:jael our)>)
sein+(jape +:<(sein:title our)>)
ship+(jape +:<our>)
user+(jape +:<(fall get-user anon)>) :: XX crash on unsaved session?
==
@ -1861,7 +1869,7 @@
..lens :: (give-json 200 ~ (joba %okey-dokey %b &))
=+ tag=(flop `tang`[>[%eyre-lens-fail p.u.a]< q.u.a])
%- (slog tag)
(give-json:abet 500 ~ (jape (rolt (wush 160 tag))))
(give-json:abet 500 ~ (jape (of-wall (wush 160 tag))))
::
++ get-diff
|= fec/json ^+ ..lens
@ -1922,7 +1930,7 @@
+12.q
=+ ^= ato
%- sky
[[151 %noun] %cx (tope root-beak [%atom (flop %_(dom . sec+dom))])]
[[151 %noun] %cx (en-beam root-beak [%atom (flop %_(dom . sec+dom))])]
=+ key=?~(ato '' ;;(@t u.ato)) :: XX jael
=. key
?~ key ''

View File

@ -4,7 +4,7 @@
::::
|= pit/vase
=, ^ford
=, space:clay
=, format
=> =~
:: structures
|%
@ -248,7 +248,7 @@
|= {dep/@uvH dap/(set beam)}
%+ turn (~(tap in dap))
|= bem/beam
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
:^ hen %pass [(scot %p our) (scot %uv dep) (en-beam bem)]
[%c %warp [our p.bem] q.bem ~]
::
++ awap :: get next revision
@ -280,7 +280,7 @@
mow
=< (welp :_(mow (turn (~(tap in p.u.dap)) .)))
|= bem/beam
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
:^ hen %pass [(scot %p our) (scot %uv dep) (en-beam bem)]
[%c [%warp [our p.bem] q.bem ~ [%next %z r.bem (flop s.bem)]]]
== ==
::
@ -310,7 +310,7 @@
==
++ camp-wire :: encode block
|= {van/vane ren/care:^clay bem/beam} ^- wire
[(scot %p our) (scot %ud num) van ren (tope bem)]
[(scot %p our) (scot %ud num) van ren (en-beam bem)]
::
++ camp :: request a file
|= {van/vane ren/care:^clay bem/beam}
@ -361,8 +361,8 @@
$0
:: ~& :- %clef-new
:: ?+ sem `term`sem
:: $hood [%hood (tope &1.q.q.hoc)]
:: $bake [%bake `mark`&1.q.q.hoc (tope |2.q.q.hoc)]
:: $hood [%hood (en-beam &1.q.q.hoc)]
:: $bake [%bake `mark`&1.q.q.hoc (en-beam |2.q.q.hoc)]
:: ==
:- p=(came p.nuf `calx`[sem `calm`[now p.q.nuf] q.q.hoc q.q.nuf])
q=q.nuf
@ -452,7 +452,7 @@
=+ ren=((soft care:^clay) (rsh 3 1 i.pax))
?~ ren
(err "blocking not care: {<i.pax>}")
=+ zis=(tome t.pax)
=+ zis=(de-beam t.pax)
?~ zis
(err "blocking not beam: {<t.pax>}")
?: ?=($g (end 3 1 i.pax))
@ -603,9 +603,9 @@
++ fade :: compile to hood
~/ %fade
|= {cof/cafe bem/beam}
:: ~& fade+(tope bem)
:: ~& fade+(en-beam bem)
^- (bolt hood)
%+ cool |.(leaf+"ford: fade {<[(tope bem)]>}")
%+ cool |.(leaf+"ford: fade {<[(en-beam bem)]>}")
%+ cope (liar cof %*(. bem s [%hoon s.bem]))
|= {cof/cafe cay/cage}
%+ (clef %hood) (fine cof bem(r [%ud 0]) cay)
@ -627,7 +627,7 @@
%+ cope une
|= {cof/cafe bom/(unit beam)} ^- (bolt beam)
?^ bom (fine cof u.bom)
(flaw cof leaf+"fame: no {<(tope bem)>}" ~)
(flaw cof leaf+"fame: no {<(en-beam bem)>}" ~)
%+ (clef %path) (fine cof bem)
|= {cof/cafe bem/beam}
=^ pax bem [(flop s.bem) bem(s ~)]
@ -659,7 +659,7 @@
|= {cof/cafe opt/(map term beam)} ^- (bolt (unit beam))
?~ opt (flue cof)
?: ?=({^ $~ $~} opt) (fine cof `q.n.opt)
=+ all=(~(run by `(map term beam)`opt) tope)
=+ all=(~(run by `(map term beam)`opt) en-beam)
(flaw cof leaf+"fame: fork {<all>}" ~)
--
::
@ -671,7 +671,7 @@
++ fair :: hood parsing rule
|= bem/beam
?> ?=({$ud $0} r.bem) :: XX sentinel
=+ vez=(vang & (tope bem))
=+ vez=(vang & (en-beam bem))
=< hood
|%
++ case
@ -683,7 +683,7 @@
::
++ mota ;~(pfix pat mota:vez) :: atom odor
++ hath (sear plex (stag %conl poor)):vez :: hood path
++ have (sear tome ;~(pfix fas hath)) :: hood beam
++ have (sear de-beam ;~(pfix fas hath)) :: hood beam
++ hith :: static path
=> vez
(sear plex (stag %conl (more fas hasp)))
@ -720,8 +720,7 @@
(most gap hoop)
==
::
++ hoof
%+ cook |=(a/^hoof a)
++ hoot
;~ plug
sym
;~ pose
@ -731,6 +730,13 @@
==
==
::
++ hoof
%+ cook |=(a/^hoof a)
;~ pose
(stag %| ;~(pfix tar hoot))
(stag %& hoot)
==
::
++ hoop
;~ pose
(stag %| ;~(pfix ;~(plug fas fas gap) have))
@ -988,7 +994,7 @@
++ lace :: load file
|= {cof/cafe for/mark bem/beam}
^- (bolt vase)
%+ cool |.(leaf+"ford: load {<for>} {<(tope bem)>}")
%+ cool |.(leaf+"ford: load {<for>} {<(en-beam bem)>}")
=. s.bem [for s.bem]
%+ cope (liar cof bem)
|= {cof/cafe cay/cage} ^- (bolt vase)
@ -1071,12 +1077,12 @@
|= {cof/cafe bem/beam}
^- (bolt cage)
?: =([%ud 0] r.bem)
(flaw cof [leaf+"ford: no data: {<(tope bem(s ~))>}"]~)
(flaw cof [leaf+"ford: no data: {<(en-beam bem(s ~))>}"]~)
=+ von=(syve [151 %noun] ~ %cx bem)
?~ von
[p=cof q=[%1 [[%c %x bem ~] ~ ~]]]
?~ u.von
(flaw cof leaf+"file not found" (smyt (tope bem)) ~)
(flaw cof leaf+"file not found" (smyt (en-beam bem)) ~)
(fine cof u.u.von)
::
++ lily
@ -1119,7 +1125,7 @@
%+ cope (lima cof for bem)
|= {cof/cafe vux/(unit vase)}
?^ vux (fine cof u.vux)
(flaw cof leaf+"ford: no {<for>} at {<(tope bem)>}" ~)
(flaw cof leaf+"ford: no {<for>} at {<(en-beam bem)>}" ~)
::
++ link :: translate
~/ %link
@ -1236,8 +1242,8 @@
:: =+ ^= pre
:: ?+ -.kas `term`-.kas
:: ^ %cell
:: $bake [-.kas p.kas (tope r.kas) ~(rent co (abbrev q.kas))]
:: $core [-.kas (tope p.kas)]
:: $bake [-.kas p.kas (en-beam r.kas) ~(rent co (abbrev q.kas))]
:: $core [-.kas (en-beam p.kas)]
:: ==
:: ~? !=(%$ pre) [dyv `term`(cat 3 %make (fil 3 dyv ' ')) pre]
:: =- ~? !=(%$ pre) [dyv `term`(cat 3 %made (fil 3 dyv ' ')) pre] -
@ -1266,7 +1272,7 @@
$bake
^- (bolt gage)
%+ cool
|.(leaf+"ford: bake {<p.kas>} {<(tope r.kas)>} {~(rend co q.kas)}")
|.(leaf+"ford: bake {<p.kas>} {<(en-beam r.kas)>} {~(rend co q.kas)}")
%+ cope (lamp cof r.kas)
|= {cof/cafe bem/beam}
%+ cope (lime cof p.kas q.kas bem)
@ -1316,7 +1322,7 @@
(flux |=(vax/vase [%& p.kas vax]))
::
$core
%+ cool |.(leaf+"ford: core {<(tope p.kas)>}")
%+ cool |.(leaf+"ford: core {<(en-beam p.kas)>}")
(cope (lear cof p.kas) (flux |=(a/vase [%& %core a])))
::
$diff
@ -1569,7 +1575,7 @@
$for
=+ opt=|.(>(turn p.hon |=({a/path ^} a))<)
|- ^- (bolt cage)
?~ p.hon (flaw cof leaf+"ford: no match" >(tope how)< *opt ~)
?~ p.hon (flaw cof leaf+"ford: no match" >(en-beam how)< *opt ~)
?: =(p.i.p.hon (scag (lent p.i.p.hon) (flop s.how)))
^$(hon q.i.p.hon)
$(p.hon t.p.hon)
@ -1620,12 +1626,12 @@
(flux |=(a/vase noun+a))
::
$see
=+ vez=(vang & (tope how))
=+ vez=(vang & (en-beam how))
=+ tuz=(posh:vez p.hon)
?~ tuz (flaw cof leaf+"bad tusk: {<p.hon>}" ~)
=+ pax=(plex:vez %conl u.tuz)
?~ pax (flaw cof leaf+"bad path: {<u.tuz>}" ~)
=+ bem=(tome u.pax)
=+ bem=(de-beam u.pax)
?~ bem (flaw cof leaf+"bad beam: {<u.pax>}" ~)
$(hon q.hon, how u.bem)
::
@ -1642,7 +1648,7 @@
?: p.hon
=. arg ?.(lit arg many+~)
(cope (make cof %bake q.hon arg how) furl)
%+ cool |.(leaf+"ford: hook {<q.hon>} {<(tope how)>}")
%+ cool |.(leaf+"ford: hook {<q.hon>} {<(en-beam how)>}")
%+ cope (fade cof how)
|= {cof/cafe hyd/hood}
%+ cope (abut:(meow how arg) cof hyd)
@ -1654,10 +1660,13 @@
^- (bolt _..head)
?~ bir
(fine cof ..head)
=+ byf=(~(get by rop) p.i.bir)
=. boy
?: p.i.bir boy
(welp boy [[%use [%limb q.i.bir] [%$ 1]] ~])
=+ byf=(~(get by rop) q.i.bir)
?^ byf
?. =(`hoof`i.bir `hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf i.bir]>}"]~)
?. =(+:`hoof`i.bir +:`hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf q.i.bir]>}"]~)
$(bir t.bir)
%+ cope (fame cof (hone %sur i.bir))
|= {cof/cafe bem/beam}
@ -1670,7 +1679,7 @@
boy boy
how how
rop %+ ~(put by (~(uni by rop) rop.sel))
p.i.bir
q.i.bir
[i.bir [%tow (flop boy.sel)]]
==
^^^$(cof cof, bir t.bir)
@ -1678,17 +1687,20 @@
++ hone :: plant hoof
|= {way/@tas huf/hoof}
^- beam
?~ q.huf
how(s ~[p.huf way])
[[q.u.q.huf q.how p.u.q.huf] ~[p.huf way]]
?~ r.huf
how(s ~[q.huf way])
[[q.u.r.huf q.how p.u.r.huf] ~[q.huf way]]
::
++ neck :: consume libraries
|= {cof/cafe bir/(list hoof)}
^- (bolt _..neck)
?~ bir (fine cof ..neck)
=+ byf=(~(get by bil) p.i.bir)
=. boy
?: p.i.bir boy
(welp boy [[%use [%limb q.i.bir] [%$ 1]] ~])
=+ byf=(~(get by bil) q.i.bir)
?^ byf
?. =(`hoof`i.bir `hoof`p.u.byf)
?. =(+:`hoof`i.bir +:`hoof`p.u.byf)
(flaw cof [%leaf "library mismatch: {<~[p.u.byf i.bir]>}"]~)
$(bir t.bir)
%+ cope (fame cof (hone %lib i.bir))
@ -1701,7 +1713,7 @@
%= sel
how how
bil %+ ~(put by (~(uni by bil) bil.sel))
p.i.bir
q.i.bir
[i.bir [%tow (flop boy.sel)]]
==
^^^$(cof cof, bir t.bir)
@ -1713,7 +1725,7 @@
$& (fine cof ..wilt(boy [p.hop boy]))
$|
=. r.p.hop ?:(?=({$ud $0} r.p.hop) r.how r.p.hop)
%+ cool |.(leaf+"ford: wilt {<[(tope p.hop)]>}")
%+ cool |.(leaf+"ford: wilt {<[(en-beam p.hop)]>}")
%+ cope (lend cof p.hop)
|= {cof/cafe arc/arch}
?: (~(has by dir.arc) %hoon)
@ -1740,7 +1752,7 @@
[`(map term foot)`[[p.n.all [%ash [%tow boy.sel]]] lef rig] sel]
|= {cof/cafe mav/(map term foot) sel/_..wilt}
?~ mav
(flaw cof [%leaf "source missing: {<(tope p.hop)>}"]~)
(flaw cof [%leaf "source missing: {<(en-beam p.hop)>}"]~)
(fine cof sel(boy [[%core mav] boy]))
==
--
@ -1748,7 +1760,7 @@
++ pact-hoon :: .hoon special case
|= {a/@t b/(urge:^clay cord)} ^- @t
~| %lurk-hoon
(role:lines:clay (lurk:differ:clay (lore:lines:clay a) b))
(role:lines:clay (lurk:differ (lore:lines:clay a) b))
::
++ pact :: patch
|= {cof/cafe kas/silk kos/silk}
@ -1796,7 +1808,7 @@
=. kig (~(del in kig) +<-.$)
?~ rot
=^ dep deh.bay (daze ~ deh.bay) :: dependencies?
amok:(expo [%made dep %| (smyt ren (tope bem)) ~])
amok:(expo [%made dep %| (smyt ren (en-beam bem)) ~])
=+ (cat 3 van ren)
exec(keg (~(put by keg) [- bem] r.u.rot))
::
@ -1837,7 +1849,7 @@
%+ biff +<
|= cay/cage ^- (unit cage)
?. -:(nets:wa +.ref `span`p.q.cay) :: error if bad type
~& :^ %ford-syve-lost `path`[tem (tope bem)]
~& :^ %ford-syve-lost `path`[tem (en-beam bem)]
want=;;(span +.ref)
have=p.q.cay
~
@ -1946,13 +1958,13 @@
=^ mos bay
=+ dep=(slaw %uv i.t.tea)
?^ dep
=+ bem=(need (tome t.t.tea))
=+ bem=(need (de-beam t.t.tea))
abet:(~(axun za [our hen [now eny ski] ~] bay) tea u.dep bem q.hin)
?> ?=({@ @ ^} t.t.tea)
=+ :* num=(slav %ud i.t.tea)
van=((hard vane) i.t.t.tea)
ren=((hard care:^clay) i.t.t.t.tea)
bem=(need (tome t.t.t.t.tea))
bem=(need (de-beam t.t.t.t.tea))
==
abet:(~(axon za [our hen [now eny ski] ~] bay) num [van ren bem] q.hin)
[mos ..^$(pol (~(put by pol) our bay))]

View File

@ -570,7 +570,7 @@
^- move
:- (~(got by r.zam) p.cov)
?- -.q.cov
?($slip $sick) !!
$slip !!
$give
?< =(0 p.cov)
?. ?=($diff -.p.q.cov)

View File

@ -252,6 +252,13 @@
|* b/*
?.((a b) ~ [~ u=b])
::
++ hunt :: first of units
|* {ord/$-({* *} ?) one/(unit) two/(unit)}
^- (unit ?(_,.+.one _,.+.two))
?~ one two
?~ two one
?:((ord ,.+.one ,.+.two) one two)
::
++ lift :: lift mold (fmap)
|* a/mold :: flipped
|* b/(unit) :: curried
@ -9702,7 +9709,6 @@
|* {a/$-(* *) b/$-(* *)} :: forward+reverse
$% {$pass p/path q/a} :: advance
{$slip p/a} :: lateral
{$sick p/b} :: lame refactoring
{$give p/b} :: retreat
== ::
++ wire path :: event pretext
@ -10029,13 +10035,6 @@
%+ bind (song yav)
|= {hil/mill vel/worm}
[%& [%give hil] vel]
::
{$sick p/{p/@tas q/*}}
%- (bond |.([%| p.p.q.caq]))
=^ yav p.sew (~(spot wa p.sew) 3 caq)
%+ bind (song yav)
|= {hil/mill vel/worm}
[%& [%sick hil] vel]
::
{$slip p/@tas q/{p/@tas q/*}}
%- (bond |.([%| p.q.q.caq]))
@ -10239,12 +10238,6 @@
$slip
~? !lac [%slip p.gum (@tas +>-.q.p.r.gum) q.gum]
[p.p.r.gum ~ q.gum q.p.r.gum]
::
$sick
?> ?=(^ q.gum)
?> ?=(^ i.q.gum)
~? !lac [%sick p.gum (@tas +>-.p.r.gum) `duct`q.gum]
[i.i.q.gum ?~(t.i.q.gum ~ [~ t.i.q.gum]) t.q.gum p.r.gum]
==
::
++ kick :: new main loop

View File

@ -19,8 +19,8 @@
=, pki:^jael
=, rights:^jael
=, able:^jael
=, title:jael
=, crypto:ames
=, title
=, crypto
=* womb womb:^jael
=, jael
:: ::::
@ -913,7 +913,7 @@
~(able ~(ex ur urb) who)
::
++ read-womb
=, wired:eyre :: XX ":eyre"
=, wired :: XX ":eyre"
=, womb
|= pax/path ^- (unit scry:womb)
?~ pax ~

View File

@ -163,7 +163,7 @@
++ doze :: sleep until
|- ^- (unit @da)
?~ pol ~
;: hunt
;: (cury hunt lth)
$(pol l.pol)
$(pol r.pol)
~(to-wait et p.n.pol q.n.pol)
@ -332,7 +332,7 @@
++ to-wait
|- ^- (unit @da)
?~ sal.bah ~
;: hunt
;: (cury hunt lth)
$(sal.bah l.sal.bah)
$(sal.bah r.sal.bah)
wait:(to-rail p.n.sal.bah q.n.sal.bah)

View File

@ -299,13 +299,13 @@
== ::
++ task :: in request ->$
$% {$boat $~} :: pier rebooted
{$drop p/@p q/@tas} :: cancel pending merge
{$info p/@p q/@tas r/nori} :: internal edit
{$drop p/@p q/desk} :: cancel pending merge
{$info p/@p q/desk r/nori} :: internal edit
{$init p/@p} :: report install
{$into p/@tas q/? r/mode} :: external edit
{$merg p/@p q/@tas r/@p s/@tas t/case u/germ} :: merge desks
{$mont p/@tas q/@p r/@tas s/path} :: mount to unix
{$ogre p/$@(@tas beam)} :: delete mount point
{$into p/desk q/? r/mode} :: external edit
{$merg p/@p q/desk r/@p s/desk t/case u/germ} :: merge desks
{$mont p/desk q/@p r/desk s/path} :: mount to unix
{$ogre p/$@(desk beam)} :: delete mount point
{$warp p/sock q/riff} :: file request
{$wegh $~} :: report memory
{$went p/sack q/path r/@ud s/coop} :: response confirm
@ -696,7 +696,7 @@
fan/(list horn) :: resources
src/(list hoop) :: program
== ::
++ hoof (pair term (unit (pair case ship))) :: resource reference
++ hoof (trel ? term (unit (pair case ship))) :: resource reference
++ hoop :: source in hood
$% {$& p/twig} :: direct twig
{$| p/beam} :: resource location
@ -2894,7 +2894,7 @@
++ format ^?
|%
:: :: ++to-wain:format
++ to-wain :: atom to line list
++ to-wain :: atom to line list
~% %lore ..is ~
|= lub/@
=| tez/(list @t)
@ -2913,7 +2913,7 @@
?: =(0 lub) (flop tez)
$(lub (rsh 3 +(i.wor) lub), tez [meg.wor tez])
:: :: ++of-wain:format
++ of-wain :: line list to atom
++ of-wain :: line list to atom
|= tez/(list @t)
=| {our/@ i/@ud}
|- ^- @
@ -2924,13 +2924,17 @@
?: =(0 i)
$(i +(i), tez t.tez, our i.tez)
$(i +(i), tez t.tez, our (cat 3 (cat 3 our 10) i.tez))
:: :: ++to-path:format
++ to-path :: beam to path
:: :: ++of-wall:format
++ of-wall :: line list to tape
|= a/wall ^- tape
?~(a ~ "{i.a}\0a{$(a t.a)}")
:: :: ++en-beam:format
++ en-beam :: beam to path
|= bem/beam
^- path
[(scot %p p.bem) q.bem (scot r.bem) (flop s.bem)]
:: :: ++of-path:format
++ of-path :: parse path to beam
:: :: ++de-beam:format
++ de-beam :: parse path to beam
|= pax/path
^- (unit beam)
?. ?=({* * * *} pax) ~
@ -2978,6 +2982,145 @@
-- ::enjs
:: :: ++dejs:format
++ dejs :: json reparser
=> |% ++ grub * :: result
++ fist $-(json grub) :: reparser instance
-- ::
|%
:: :: ++ar:dejs:format
++ ar :: array as list
|* wit/fist
|= jon/json ^- (list _(wit *json))
?> ?=({$a *} jon)
(turn p.jon wit)
:: :: ++at:dejs:format
++ at :: array as tuple
|* wil/(pole fist)
|= jon/json
?> ?=({$a *} jon)
((at-raw wil) p.jon)
:: :: ++at-raw:dejs:format
++ at-raw :: array as tuple
|* wil/(pole fist)
|= jol/(list json)
?~ jol !!
?- wil :: mint-vain on empty
:: {wit/* t/*}
{* t/*}
=> .(wil [wit ~]=wil)
?~ t.wil ?^(t.jol !! (wit.wil i.jol))
[(wit.wil i.jol) ((at-raw t.wil) t.jol)]
==
:: :: ++bo:dejs:format
++ bo :: boolean
|=(jon/json ?>(?=({$b *} jon) p.jon))
:: :: ++bu:dejs:format
++ bu :: boolean not
|=(jon/json ?>(?=({$b *} jon) !p.jon))
:: :: ++ci:dejs:format
++ ci :: maybe transform
|* {poq/gate wit/fist}
|= jon/json
(need (poq (wit jon)))
:: :: ++cu:dejs:format
++ cu :: transform
|* {poq/gate wit/fist}
|= jon/json
(poq (wit jon))
:: :: ++di:dejs:format
++ di :: millisecond date
%+ cu
|= a/@u ^- @da
(add ~1970.1.1 (div (mul ~s1 a) 1.000))
ni
:: :: ++mu:dejs:format
++ mu :: true unit
|* wit/fist
|= jon/json
?~(jon ~ (some (wit jon)))
:: :: ++ne:dejs:format
++ ne :: number as real
|= jon/json
^- (unit @rd)
:: please implement me, it's not that hard!
!!
:: :: ++ni:dejs:format
++ ni :: number as integer
|= jon/json
?> ?=({$n *} jon)
(rash p.jon dem)
:: :: ++no:dejs:format
++ no :: number as cord
|=(jon/json ?>(?=({$n *} jon) p.jon))
:: :: ++of:dejs:format
++ of :: object as frond
|* wer/(pole {cord fist})
|= jon/json
?> ?=({$o {@ *} $~ $~} jon)
|-
?- wer :: mint-vain on empty
:: {{key/@t wit/*} t/*}
{{key/@t *} t/*}
=> .(wer [[~ wit] ~]=wer)
?: =(key.wer p.n.p.jon)
[key.wer ~|(key+key.wer (wit.wer q.n.p.jon))]
?~ t.wer ~|(bad-key+p.n.p.jon !!)
((of t.wer) jon)
==
:: :: ++ot:dejs:format
++ ot :: object as tuple
|* wer/(pole {cord fist})
|= jon/json
?> ?=({$o *} jon)
((ot-raw wer) p.jon)
:: :: ++ot-raw:dejs:format
++ ot-raw :: object as tuple
|* wer/(pole {cord fist})
|= jom/(map @t json)
?- wer :: mint-vain on empty
:: {{key/@t wit/*} t/*}
{{key/@t *} t/*}
=> .(wer [[~ wit] ~]=wer)
=/ ten ~|(key+key.wer (wit.wer (~(got by jom) key.wer)))
?~(t.wer ten [ten ((ot-raw t.wer) jom)])
==
:: :: ++om:dejs:format
++ om :: object as map
|* wit/fist
|= jon/json
?> ?=({$o *} jon)
(~(run by p.jon) wit)
:: :: ++op:dejs:format
++ op :: parse keys of map
|* {fel/rule wit/fist}
|= jon/json ^- (map _(wonk *fel) _*wit)
=/ jom ((om wit) jon)
%- malt
%+ turn (~(tap by jom))
|* {a/cord b/*}
=> .(+< [a b]=+<)
[(rash a fel) b]
:: :: ++pe:dejs:format
++ pe :: prefix
|* {pre/* wit/fist}
(cu |*(* [pre +<]) wit)
:: :: ++sa:dejs:format
++ sa :: string as tape
|=(jon/json ?>(?=({$s *} jon) (trip p.jon)))
:: :: ++so:dejs:format
++ so :: string as cord
|=(jon/json ?>(?=({$s *} jon) p.jon))
:: :: ++su:dejs:format
++ su :: parse string
|* sab/rule
|= jon/json ^+ (wonk *sab)
?> ?=({$s *} jon)
(rash p.jon sab)
:: :: ++ul:dejs:format
++ ul :: null
|=(jon/json ?~(jon ~ !!))
-- ::dejs
:: :: ++dejs-soft:format
++ dejs-soft :: json reparse to unit
=, unity
=> |% ++ grub (unit *) :: result
++ fist $-(json grub) :: reparser instance
@ -2986,7 +3129,7 @@
:: :: ++ar:dejs:format
++ ar :: array as list
|* wit/fist
|= jon/json
|= jon/json ^- (unit (list _(need (wit *json))))
?. ?=({$a *} jon) ~
%- drop-list
|-
@ -2997,15 +3140,20 @@
|* wil/(pole fist)
|= jon/json
?. ?=({$a *} jon) ~
=+ raw=((at-raw wil) p.jon)
?.((all-full raw) ~ (some (need-tuple raw)))
((at-raw wil) p.jon)
:: :: ++at-raw:dejs:format
++ at-raw :: array as tuple
|* wil/(pole fist)
|= jol/(list json)
?~ wil ~
:- ?~(jol ~ (-.wil i.jol))
((at-raw +.wil) ?~(jol ~ t.jol))
?~ jol ~
?- wil :: mint-vain on empty
:: {wit/* t/*}
{* t/*}
=> .(wil [wit ~]=wil)
?~ t.wil ?^(t.jol ~ (wit.wil i.jol))
%+ both (wit.wil i.jol)
((at-raw t.wil) t.jol)
==
:: :: ++bo:dejs:format
++ bo :: boolean
|=(jon/json ?.(?=({$b *} jon) ~ [~ u=p.jon]))
@ -3055,24 +3203,33 @@
|= jon/json
?. ?=({$o {@ *} $~ $~} jon) ~
|-
?~ wer ~
?: =(-.-.wer p.n.p.jon)
((pe -.-.wer +.-.wer) q.n.p.jon)
((of +.wer) jon)
?- wer :: mint-vain on empty
:: {{key/@t wit/*} t/*}
{{key/@t *} t/*}
=> .(wer [[~ wit] ~]=wer)
?: =(key.wer p.n.p.jon)
((pe key.wer wit.wer) q.n.p.jon)
?~ t.wer ~
((of t.wer) jon)
==
:: :: ++ot:dejs:format
++ ot :: object as tuple
|* wer/(pole {cord fist})
|= jon/json
?. ?=({$o *} jon) ~
=+ raw=((ot-raw wer) p.jon)
?.((all-full raw) ~ (some (need-tuple raw)))
((ot-raw wer) p.jon)
:: :: ++ot-raw:dejs:format
++ ot-raw :: object as tuple
|* wer/(pole {cord fist})
|= jom/(map @t json)
?~ wer ~
=+ ten=(~(get by jom) -.-.wer)
[?~(ten ~ (+.-.wer u.ten)) ((ot-raw +.wer) jom)]
?- wer :: mint-vain on empty
:: {{key/@t wit/*} t/*}
{{key/@t *} t/*}
=> .(wer [[~ wit] ~]=wer)
=/ ten (biff (~(get by jom) key.wer) wit.wer)
?~ t.wer ten
(both ten ((ot-raw t.wer) jom))
==
:: :: ++om:dejs:format
++ om :: object as map
|* wit/fist
@ -3082,15 +3239,14 @@
:: :: ++op:dejs:format
++ op :: parse keys of map
|* {fel/rule wit/fist}
%+ cu my
%- ci :_ (om wit)
|= a/(map cord _(need *wit))
^- (unit (list _[(wonk *fel) (need *wit)]))
=- (drop-list (turn (~(tap by a)) -))
|= jon/json ^- (unit (map _(wonk *fel) _*wit))
=/ jom ((om wit) jon)
?~ jom ~
%- drop-map
%- malt
%+ turn (~(tap by jom))
|* {a/cord b/*}
=+ nit=(rush a fel)
?~ nit ~
(some [u.nit b])
(both (rush a fel) (some b))
:: :: ++pe:dejs:format
++ pe :: prefix
|* {pre/* wit/fist}
@ -3112,7 +3268,7 @@
:: :: ++ul:dejs:format
++ ul :: null
|=(jon/json ?~(jon (some ~) ~))
-- ::dejs
-- ::dejs-soft
--
:: ::
:::: ++differ :: (2d) hunt-mcilroy
@ -4107,13 +4263,6 @@
~(rud at h.t.yed) ":" ~(rud at m.t.yed) ":" ~(rud at s.t.yed)
" " "+0000"
==
:: :: ++hunt:chrono:
++ hunt :: first of unit dates
|= {one/(unit @da) two/(unit @da)}
^- (unit @da)
?~ one two
?~ two one
?:((lth u.one u.two) one two)
:: :: ++stud:chrono:
++ stud :: parse UTC format
=< |= a/cord
@ -4365,7 +4514,7 @@
-- ::pubsub
--
::
++ zuse %310 :: hoon+zuse kelvin
++ zuse %309 :: hoon+zuse kelvin
++ gift-arvo :: out result <-$
$? gift:able:^ames
gift:able:^behn
@ -4407,30 +4556,19 @@
::
::
:: XX transitional alias layer
++ ames ^?
|%
++ crypto crypto:+
++ number number:+
--
++ behn ^?
|%
++ chrono chrono:userlib
--
++ ames [crypto=crua=[en=en de=de]:crua:crypto] :: hardcoded vere interface
++ behn !!
++ clay ^?
|%
++ differ differ:+
++ lines [[lore=to-wain role=of-wain]:format unix:userlib]
++ space [[tome=of-path tope=to-path]:format space:userlib]
--
++ dill !!
++ eyre ^?
|%
++ base64 [sifo=en-base64 ofis=de-base64]:mime:html
++ bytes [moon=en-mite taco=as-octs tact=as-octt]:mime:html
++ unity-old [zl=drop-list zm=drop-map za=all-full zp=need-tuple]:unity
++ js
:+ [pojo=en-json poja=de-json]:html
jo=[dejs:format unity-old]
:- [pojo=en-json poja=de-json]:html
=> format ^?
|%
++ joba frond:enjs
@ -4451,13 +4589,8 @@
++ urlp de-purl
++ fuel fuel:+
--
++ wired wired:+
--
++ ford !!
++ gall pubsub:userlib
++ jael ^?
|%
++ title title:+
--
++ gall !!
++ jael !!
-- ::

View File

@ -11,7 +11,7 @@
{{pax/path pot/$@($~ {v/@tas $~})} $~}
==
?~ pot
=+ bem=(need (tome:space:clay pax))
=+ bem=(need (de-beam:format pax))
$(pot ~[?^(s.bem i.s.bem q.bem)])
:- %kiln-mount
[pax v.pot]

View File

@ -4,7 +4,6 @@
::
/? 310
=* xml xml:eyre
=, js:eyre
=, lines:clay
=+ =~
|%
@ -13,21 +12,22 @@
--
|%
++ htm-enty :: XX belongs in zuse
=, space:clay
=, space:userlib
=, format
~+
=- |= tub/nail ^- (like @t) %. tub :: export context
=+(parse:xml enty(ent mapping))
^- mapping/(map knot @tF)
=+ pax=/==2%%/html5-entities/json :: XX %%/
=+ maf=%.(pax ;~(biff file (soft json) (om so):jo))
=+ maf=%.(pax ;~(biff file (soft json) (om so):dejs-soft))
?^ maf u.maf
~& no-enty+pax
(my amp+'&' quot+'"' apos+'\'' lt+'<' gt+'>' ~) :: fallback
::
++ skem-symb (star ;~(pose dot alp))
++ skem-set ~+ ^- (set cord) :: URI schemes
:: (sa `wain`/http/https/javascript)
=- (silt `wain`(rash - (more gah (cook crip skem-symb))))
:: (silt `wain`/http/https/javascript)
=- (silt `wain`(rash - (more gah (cook crip skem-symb))))
'''
coap doi javascript aaa aaas about acap cap cid crid data dav dict dns file
ftp geo go gopher h323 http https iax icap im imap info ipp iris iris.beep

View File

@ -3,8 +3,6 @@
:::: /hoon/rend/down-jet/lib
::
/? 310
=* xml xml:eyre
=, url:eyre
::
|%
++ into-inner
@ -48,6 +46,8 @@
$(a t.a)
::
++ sing :: elem to manx
=* xml xml:eyre
=, js:eyre
=> |%
++ first-word
|= a/tape
@ -156,6 +156,7 @@
--
::
++ sung
=, url:eyre
|= lim/kids
=+ had=*(unit mane)
|^ ^- marl

View File

@ -77,7 +77,7 @@
|= our/ship
%- ~(gas in *(set well:^gall))
^- (list well:^gall)
=+ myr=(clan:title:jael our)
=+ myr=(clan:title our)
?: ?=($pawn myr)
[[%base %talk] [%base %dojo] ~]
?: ?=($earl myr)
@ -88,8 +88,8 @@
|= our/ship
%- ~(gas in *(set gill:^gall))
^- (list gill:^gall)
?: ?=($earl (clan:title:jael our))
[[(sein:title:jael our) %talk] [our %dojo] ~]
?: ?=($earl (clan:title our))
[[(sein:title our) %talk] [our %dojo] ~]
[[our %talk] [our %dojo] ~]
::
++ drum-make :: initial part
@ -147,7 +147,7 @@
++ peer ::
|= pax/path
~| [%drum-unauthorized our+our.hid src+src.hid] :: ourself
?> (team:title:jael our.hid src.hid) :: or our own moon
?> (team:title our.hid src.hid) :: or our own moon
=< se-abet =< se-view
(se-text "[{<src.hid>}, driving {<our.hid>}]")
::
@ -787,8 +787,8 @@
%_ pom
cad
;: welp
?. ?=($earl (clan:title:jael p.gyl))
(cite:title:jael p.gyl)
?. ?=($earl (clan:title p.gyl))
(cite:title p.gyl)
(scow %p p.gyl)
::
":"

View File

@ -74,9 +74,9 @@
|= hood-begin =< abet
?> ?=($~ bur)
=+ buz=(shaz :(mix (jam ges) eny))
=+ loy=(pit:nu:crub:crypto:ames 512 buz)
=+ loy=(pit:nu:crub:crypto 512 buz)
%- emit(bur `[his [0 sec:ex:loy]~])
[%wont /helm/ticket [our (sein:title:jael his)] /a/ta his tic ges pub:ex:loy]
[%wont /helm/ticket [our (sein:title his)] /a/ta his tic ges pub:ex:loy]
::
++ poke-spawn
|= {him/ship key/@pG} =< abet
@ -169,7 +169,7 @@
=< abet
%- emil(bur ~)
:~ [%cash /helm p.u.bur q.u.bur u.wil]
[%poke /helm [our %hood] %hood-unsync %base (sein:title:jael our) %kids]
[%poke /helm [our %hood] %hood-unsync %base (sein:title our) %kids]
==
::
++ poke-verb :: toggle verbose

View File

@ -6,7 +6,8 @@
:::: :: ::
:: :: ::
=, ^clay
=, space:clay
=, space:userlib
=, format
|% :: ::
++ kiln-part {$kiln $0 kiln-pith} :: kiln state
++ kiln-pith ::
@ -93,7 +94,7 @@
::
++ poke-mount
|= kiln-mount
=+ bem=(tome pax)
=+ bem=(de-beam pax)
?~ bem
=+ "can't mount bad path: {<pax>}"
abet:(spam leaf+- ~)
@ -102,7 +103,7 @@
++ poke-unmount
|= mon/kiln-unmount
?^ mon
=+ bem=(tome mon)
=+ bem=(de-beam mon)
?~ bem
=+ "can't unmount bad path: {<mon>}"
abet:(spam leaf+- ~)

1
lib/prey.hoon Normal file
View File

@ -0,0 +1 @@
prey:pubsub:userlib

View File

@ -12,7 +12,7 @@
|_ bol/bowl:^gall
++ main :: main story
|= our/ship ^- cord
=+ can=(clan:title:jael our)
=+ can=(clan:title our)
?+ can %porch
$czar %court
$king %floor

View File

@ -8,10 +8,10 @@
=+ sur-twit:^twitter :: XX
=, ^eyre
=, bytes:eyre
=, js:eyre
=, format
=, url:eyre
=, xml:eyre
=, chrono:behn
=, chrono:userlib
::
:::: functions
::
@ -69,26 +69,31 @@
~
~[scr+a tid+(tid:print b)]
--
++ parse :: json reparsers
++ parse ^? :: text parsers
|%
++ ce |*({a/_* b/fist:jo} (cu:jo |=(c/a c) b)) :: output type
++ user (cook crip (plus ;~(pose aln cab)))
--
::
++ reparse :: json reparsers
=, parse
|%
++ ce =>(dejs |*({a/_* b/fist} (cu |=(c/a c) b))) :: output type
++ fasp |*(a/{@tas *} [(hep-to-cab -.a) +.a])
++ usor (cook crip (plus ;~(pose aln cab)))
++ mean (ot errors+(ar (ot message+so code+ni ~)) ~):jo
++ mean (ot errors+(ar (ot message+so code+ni ~)) ~):dejs
++ post
=+ jo
=, ^?(dejs)
%+ ce post:sur-twit
%- ot
:~ id+ni
user+(ot (fasp screen-name+(su usor)) ~)
user+(ot (fasp screen-name+(su user)) ~)
(fasp created-at+(cu year (ci stud so)))
text+(cu crip (su (star escp:^parse))) :: parse html escapes
==
++ usel
=+ jo
=, ^?(dejs)
%+ ce (list who/@ta)
=- (ot users+(ar -) ~)
(ot (fasp screen-name+(su usor)) ~)
(ot (fasp screen-name+(su user)) ~)
--
++ print
=+ args:reqs

View File

@ -3,8 +3,8 @@
:: :: ::
/? 310 :: version
/+ talk, old-phon
=, wired:eyre
=, title:jael
=, wired
=, title
=, womb:^jael
:: :: ::
:::: :: ::
@ -388,9 +388,9 @@
=+ pas=`@uw`(shas %back eny)
~& [%backing-up pas=pas]
=; dif (emit %info /backup [our dif])
%+ foal:space:clay
%+ foal:space:userlib
(welp pax /jam-crub)
[%jam-crub !>((en:crub:crypto:ames pas (jam `part`+:abet)))]
[%jam-crub !>((en:crub:crypto pas (jam `part`+:abet)))]
::
++ poke-rekey :: extend wyll
|= $~

View File

@ -4,7 +4,8 @@
::
/? 310
/- plan-diff, plan-acct
=, space:clay
=, format
=, space:userlib
|%
++ part {$write $0 pith} :: no state
++ pith $~
@ -30,10 +31,10 @@
++ poke-wipe
|= sup/path ^+ abet :: XX determine extension, beak
=+ ext=%md
?~ (file (tope beak-now [ext sup]))
?~ (file (en-beam beak-now [ext sup]))
~|(not-found+[ext `path`(flop sup)] !!)
=- abet:(emit %info write+~ our -)
(fray (tope beak-now [ext sup]))
(fray (en-beam beak-now [ext sup]))
::
++ poke-tree
|= {sup/path mim/mime} ^+ abet :: XX determine extension, beak
@ -54,7 +55,7 @@
=; sob/soba:^clay
?~(sob abet abet:(emit %info write+~ our `toro:^clay`[q.byk %& sob]))
=+ pax=`path`/web/plan
=+ paf=(tope beak-now (flop pax))
=+ paf=(en-beam beak-now (flop pax))
?~ [fil:.^(arch %cy paf)]
=+ ins=(pact-plan [['' ''] ~] dif)
[pax %ins plan+!>(ins)]~
@ -116,7 +117,7 @@
|= {hot/host:^eyre dat/@}
?> ?=($& -.hot)
=. p.hot (scag 2 p.hot) :: ignore subdomain
=. dat (scot %uw (en:crua:crypto:ames ames-secret dat))
=. dat (scot %uw (en:crua:crypto ames-secret dat))
(poke--data [`%atom [%sec p.hot]] %mime / (taco:bytes:eyre dat))
::
++ poke--data
@ -136,7 +137,7 @@
?+ -.res ~|(gage+-.res !!)
$| (mean p.res)
$& =- abet:(emit %info write+~ our -)
(foal :(welp (tope beak-now ~) pax /[-.p.res]) p.res)
(foal :(welp (en-beam beak-now ~) pax /[-.p.res]) p.res)
==
--

View File

@ -2,14 +2,14 @@
:::: /hoon/ask-mail/mar
::
/? 310
=, js:eyre
=, format
=, bytes:eyre
|_ txt/cord
::
++ grab :: convert from
|%
++ noun @t :: clam from %noun
++ json (cork so:jo need)
++ json so:dejs
--
++ grow
|%

View File

@ -3,13 +3,13 @@
::
/? 310
=, bytes:eyre
=, js:eyre
=, format
|_ txt/cord
::
++ grab :: convert from
|%
++ noun @t :: clam from %noun
++ json (cork so:jo need)
++ json so:dejs
--
++ grow
|%

View File

@ -8,6 +8,7 @@
::
=, ^eyre
=, js:eyre
=, format
|_ recoverable-error
++ grab
|%
@ -17,7 +18,12 @@
~! a
?+ p.a ~|(non-recoverable+p.a !!)
$429 :+ p.a %rate-limit
%.(%x-rate-limit-reset ;~(biff ~(get by (malt q.a)) poja ni:jo))
%. %x-rate-limit-reset
;~ biff
~(get by (malt q.a))
poja
ni:dejs-soft
==
==
--
++ grow |% ++ tank >[+<]< --

View File

@ -3,10 +3,11 @@
::
/? 310
=, js:eyre
=, format
|_ all/(list ship)
++ grab |%
++ noun (list ship)
++ json (corl need (ar (su fed:ag)):jo)
++ json (ar (su fed:ag)):dejs
--
++ grow |%
++ json `^json`[%a (turn all |=(a/ship (jape +:<a>)))]

View File

@ -28,8 +28,7 @@
++ wush
|= {wid/@u tan/tang}
^- tape
=+ rolt=|=(a/wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a)))))
(rolt (turn (flop tan) |=(a/tank (rolt (wash 0^wid a)))))
(of-wall (turn (flop tan) |=(a/tank (of-wall (wash 0^wid a)))))
::
++ purge :: discard ++styx style
|= a/styx ^- tape

View File

@ -8,7 +8,7 @@
++ grab
|%
++ noun (list post:twitter)
++ json (corl need (ar:jo post:parse:twitter))
++ json (ar:dejs post:reparse:twitter)
++ httr (cork httr-to-json json) :: XX mark translation
--
++ grow

View File

@ -7,7 +7,7 @@
++ grab
|%
++ noun post:twitter
++ json (corl need post:parse:twitter)
++ json post:reparse:twitter
++ httr (cork httr-to-json json) :: XX mark translation
--
++ grow

View File

@ -7,7 +7,7 @@
++ grab
|%
++ noun (list who/@ta)
++ json (corl need usel:parse:twitter)
++ json usel:reparse:twitter
++ httr (cork httr-to-json json) :: XX mark translation
--
++ grow

View File

@ -4,7 +4,7 @@
/? 310
::
=, ^clay
=, differ:clay
=, differ
=, lines:clay
=, bytes:eyre
|_ txt/wain
@ -13,7 +13,7 @@
|%
++ mime |=({p/mite:^eyre q/octs:^eyre} (lore q.q))
++ noun wain :: clam from %noun
++ json :(corl lore need so:jo:js:eyre)
++ json (corl lore so:dejs:format)
--
++ grow
=> v=.

View File

@ -6,7 +6,7 @@
/= tub /$ |=({bem/beam *} (flop s.bem))
/= aut
/$ %+ cork fuel:url:eyre :: after parsing params,
=, title:jael
=, title
|= gas/epic:^eyre ^- ? :: check that the fcgi
%+ lien (~(tap in (~(get ju aut.ced.gas) %$))) :: has an identity
|=(a/knot !=(%pawn (clan (slav %p a)))) :: which isn't a comet

View File

@ -8,10 +8,10 @@
/= dat /^ tree-include /tree-include/
/= kid /^ (map knot tree-include)
/_ /tree-include/
=, format
=, js:eyre
=, bytes:eyre
=, base64:eyre
=, space:clay
::
::::
::
@ -59,7 +59,7 @@
:- -.a
?- -.a
$name (from-type +.a ?^(s.bem i.s.bem q.bem))
$beak (from-type +.a (crip (spud (tope bem(s /)))))
$beak (from-type +.a (crip (spud (en-beam bem(s /)))))
$path (from-type +.a (crip (spud (flop s.bem))))
$spur (from-type +.a (crip (spud s.bem)))
$bump (from-type +.a bump.dat)