Merge commit '5d933' into ford-turbo-original

This commit is contained in:
Curtis Yarvin 2018-08-17 11:31:23 -07:00
commit 0d9af017e7

View File

@ -27,16 +27,13 @@
$% {$thud ~} :: proxied death $% {$thud ~} :: proxied death
{$this p/? q/clip r/httq} :: proxied request {$this p/? q/clip r/httq} :: proxied request
{$meta vase} :: type check {$meta vase} :: type check
== == ::
$: $f :: to %ford
$% {$exec p/@p q/(unit {beak silk:ford})} ::
{$wasp p/@p q/@uvH r/?} ::
== == :: == == ::
$: $g :: to %gall $: $g :: to %gall
$% {$deal p/sock q/cush:gall} :: full transmission $% {$deal p/sock q/cush:gall} :: full transmission
== == == ==
$: $t :: $: $t ::
$% [%build our=@p live=? schematic=schematic:ford-api] :: $% [%build our=@p live=? schematic=schematic:ford-api]
[%kill our=@p]
== == == :: == == == ::
++ sign :: in result $<- ++ sign :: in result $<-
$% $: $a :: by %ames $% $: $a :: by %ames
@ -51,10 +48,6 @@
== == :: == == ::
$: $e :: by self $: $e :: by self
$% {$thou p/httr} :: response for proxy $% {$thou p/httr} :: response for proxy
== == ::
$: $f :: by %ford
$% {$made p/@uvH q/gage:ford} ::
{$news p/@uvH} ::
== == :: == == ::
$: $t $: $t
$% [%made date=@da result=made-result:ford-api] :: $% [%made date=@da result=made-result:ford-api] ::
@ -780,7 +773,7 @@
:: == :: ==
:: ~& eyre-them+(en-purl p.u.p.kyz) :: ~& eyre-them+(en-purl p.u.p.kyz)
=+ usr=?~(p.kyz '~' (scot %ta u.p.kyz)) =+ usr=?~(p.kyz '~' (scot %ta u.p.kyz))
(back hi+/[usr]/[q.kyz] %hiss r.kyz) (back-turbo hi+/[usr]/[q.kyz] %hiss r.kyz)
:: ::
$they :: inbound response $they :: inbound response
=+ kas=(need (~(get by q.ask) p.kyz)) =+ kas=(need (~(get by q.ask) p.kyz))
@ -798,7 +791,7 @@
:: ~& did-thud+[-.lid hen] :: ~& did-thud+[-.lid hen]
?- -.lid ?- -.lid
$exec $exec
(pass-note p.lid %f [%exec our ~]) (pass-note p.lid %t [%kill our])
:: ::
$poll $poll
?. (~(has by wix) p.lid) ?. (~(has by wix) p.lid)
@ -935,7 +928,7 @@
$diff $diff
?. ?=($json p.p.cuf) ?. ?=($json p.p.cuf)
:: ~> %slog.`%*(. >[%backing p.p.cuf %q-p-cuf]< &3.+> (sell q.p.cuf)) :: ~> %slog.`%*(. >[%backing p.p.cuf %q-p-cuf]< &3.+> (sell q.p.cuf))
(back tee %json p.cuf) (back-turbo tee %json p.cuf)
(get-rush:(ire-ix p.tee) q.tee ((hard json) q.q.p.cuf)) (get-rush:(ire-ix p.tee) q.tee ((hard json) q.q.p.cuf))
:: ::
$quit ~&(quit+tee (get-quit:(ire-ix p.tee) q.tee)) $quit ~&(quit+tee (get-quit:(ire-ix p.tee) q.tee))
@ -947,30 +940,13 @@
abut:(ire-ix p.tee) abut:(ire-ix p.tee)
=> wake:(ire-ix p.tee) => wake:(ire-ix p.tee)
(give-json 200 ~ (frond:enjs %beat %b &)) (give-json 200 ~ (frond:enjs %beat %b &))
::
$news :: dependency updated
:: the only use of $news now is for the $on dependency tracking
::
?. ?=({$on ~} tee)
~&(e+lost+[tee hen] +>.$)
%+ roll ~(tap in (~(get ju liz) p.sih))
=< .(con ..axon(liz (~(del by liz) p.sih)))
|= {sus/(each duct ixor) con/_..axon}
=. ..axon con
?- -.sus
%& (give-json(hen p.sus) 200 ~ %s (scot %uv p.sih))
%| (get-even:(ire-ix p.sus) +.sih)
==
:: ::
$made $made
=. our (need hov) :: XX =. our (need hov) :: XX
=| ses/(unit hole) =| ses/(unit hole)
|- ^+ ..axon |- ^+ ..axon
:: hack: we must disambiguate between %f and %t %made responses
::
?: ?=([%t %made *] sih)
?+ tee ~& [%tee tee] !! ?+ tee ~& [%tee tee] !!
{$si ~} (give-turbo-sigh result.sih) {$si $~} (give-turbo-sigh result.sih)
{$se ^} (get-made:(dom-vi q.tee) p.tee result:sih) {$se ^} (get-made:(dom-vi q.tee) p.tee result:sih)
:: ::
{$ay ^} {$ay ^}
@ -979,129 +955,59 @@
[%| tang.result.sih] [%| tang.result.sih]
?: ?=([%complete %error *] result.sih) ?: ?=([%complete %error *] result.sih)
[%| message.build-result.result.sih] [%| message.build-result.result.sih]
~& [%build-result build-result.result.sih]
[%& [p q.q]:(result-to-cage:ford-api build-result.result.sih)] [%& [p q.q]:(result-to-cage:ford-api build-result.result.sih)]
(ames-gram (slav %p p.tee) %got-inner (slav %uv q.tee) res) (ames-gram (slav %p p.tee) got-inner+~ (slav %uv q.tee) res)
::
:: ::
{$ha *} {$ha *}
%- emule |. ^+ ..apex %- emule |. ^+ ..apex
?: ?=([%incomplete *] result.sih) ?: ?=([%incomplete *] result.sih)
~& [%fail-on-incomplete result.sih]
(fail-turbo 404 tang.result.sih) (fail-turbo 404 tang.result.sih)
?: ?=([%complete %error *] result.sih) ?: ?=([%complete %error *] result.sih)
~& [%fail-on-error result.sih]
(fail-turbo 404 message.build-result.result.sih) (fail-turbo 404 message.build-result.result.sih)
~& [%inside-turbo-ha-handler tee]
=/ cay=cage (result-to-cage:ford-api build-result.result.sih) =/ cay=cage (result-to-cage:ford-api build-result.result.sih)
?: ?=($red-quri p.cay) ?: ?=($red-quri p.cay)
=+ url=(apex:en-purl ((hard quri) q.q.cay)) =+ url=(apex:en-purl ((hard quri) q.q.cay))
(give-thou 307 [location+(crip url)]~ ~) (give-thou 307 [location+(crip url)]~ ~)
:: (give-html:abet 200 ~ (redir:xml url)) :: (give-html:abet 200 ~ (redir:xml url))
?. ?=($mime p.cay) ?. ?=($mime p.cay)
~& [%mime-casting-inside-turbo-response tee]
=+ bek=(norm-beak -:(need (de-beam p.tee))) =+ bek=(norm-beak -:(need (de-beam p.tee)))
=+ tee-ses=?~(ses tee [%ac u.ses tee]) =+ tee-ses=?~(ses tee [%ac u.ses tee])
:: TODO: Why cast here? Shouldn't the cast wrap the previous result? :: TODO: Why cast here? Shouldn't the cast wrap the previous result?
:: ::
(exec-turbo-live tee-ses [%cast [p q]:bek %mime [%$ cay]]) (exec-turbo-live tee-ses [%cast [p q]:bek %mime [%$ cay]])
:: (exec-live tee-ses bek [%flag [p.sih `~] %cast %mime [%$ p.q.sih]])
~| q.q.cay
=+ cug=?~(ses ~ cug:(~(got by wup) u.ses)) =+ cug=?~(ses ~ cug:(~(got by wup) u.ses))
=+ ((hard {mit/mite rez/octs}) q.q.cay) =+ ((hard {mit/mite rez/octs}) q.q.cay)
:: TODO: Used to use dep for etag control. :: TODO: This used to use dep for etag control.
:: ::
:: =+ dep=(crip "W/{(en-json %s (scot %uv p.sih))}") :: =+ dep=(crip "W/{(en-json %s (scot %uv p.sih))}")
=+ hit=[200 ~[content-type+(en-mite mit)] ~ rez] :: etag+dep =+ hit=[200 ~[content-type+(en-mite mit)] ~ rez] :: etag+dep
~& [%giving-turbo-thou tee] ~& [%giving-turbo-thou tee]
(give-thou (add-cookies cug hit)) (give-thou (add-cookies cug hit))
==
:: ?> ?=([%f %made *] sih)
:: ~! sih
?< ?=($tabl -.q.sih)
?- tee
$@(~ {?($on $ow) *}) ~|(e+ford+lost+tee !!)
{$of @ ~} ~|(e+ford+lost+tee !!)
{$si ~} !! ::(give-sigh q.sih)
{$se ^} !! ::(get-made:(dom-vi q.tee) p.tee [p q]:sih)
{$ay ^} !!
:: ::
{$hi ^} {$hi ^}
?: ?=(%| -.q.sih) ?. ?=([%complete %success *] result.sih)
(give-sigh q.sih) :: XX crash? (give-turbo-sigh result.sih)
=* cay p.q.sih ::
=/ cay/cage (result-to-cage:ford-api build-result.result.sih)
?> ?=($hiss p.cay) ?> ?=($hiss p.cay)
?: =('~' p.tee) ?: =('~' p.tee)
(eyre-them tee q.cay) (eyre-them tee q.cay)
=+ usr=(slav %ta p.tee) =+ usr=(slav %ta p.tee)
=+ ((hard {pul/purl ^}) q.q.cay) =+ ((hard {pul/purl ^}) q.q.cay)
?. ?=(%& -.r.p.pul) ?. ?=($& -.r.p.pul)
~& [%auth-lost usr (head:en-purl p.pul)] ~& [%auth-lost usr (head:en-purl p.pul)]
(eyre-them tee q.cay) (eyre-them tee q.cay)
(get-req:(dom-vi usr (scag 2 p.r.p.pul)) q.tee q.cay) (get-req:(dom-vi usr (scag 2 p.r.p.pul)) q.tee q.cay)
:: ::
:: {$hi ^}
:: ?: ?=(%| -.q.sih)
:: (give-sigh q.sih) :: XX crash?
:: =* cay p.q.sih
:: ?> ?=($hiss p.cay)
:: (eyre-them p.tee q.cay)
::
{$he *} :: XX hack
=. ..axon $(tee p.tee)
%_ ..axon
mow %+ turn mow
|= a/move
?+ q.a a
{$give $thou *} a(r.p.p.q ~)
{$pass ^} ?.(=(p.tee p.q.a) a a(p.q tee))
== ==
::
{$of @ ^} {$of @ ^}
?: ?=(%| -.q.sih) ?: ?=([%incomplete *] result.sih)
((slog p.q.sih) +>.^$) :: XX get-even %mean ((slog tang.result.sih) +>.^$)
?: ?=([%complete %error *] result.sih)
((slog message.build-result.result.sih) +>.^$)
=/ cay=cage (result-to-cage:ford-api build-result.result.sih)
%+ get-rush:(ire-ix p.tee) q.tee %+ get-rush:(ire-ix p.tee) q.tee
?> ?=($json p.p.q.sih) :: XX others ?> ?=($json p.cay) :: XX others
((hard json) q.q.p.q.sih) ((hard json) q.q.cay)
::
{$at ^}
?: ?=(%| -.q.sih) $(tee q.tee)
?. ?=($js -.p.q.sih)
~& e+at-lost+[-.p.q.sih q.tee]
$(tee q.tee)
?> ?=(@ q.q.p.q.sih)
=. ses (some p.tee)
=+ cyz=(~(got by wup) p.tee)
=^ jon ..ya ~(stat-json ya p.tee cyz)
$(tee q.tee, q.q.p.q.sih (add-json jon q.q.p.q.sih))
::
{$ac ^} ?>((~(has by wup) p.tee) $(ses `p.tee, tee q.tee))
{$ha *}
%- emule |. ^+ ..apex
?. ?=(%& -.q.sih)
~& %fail
(fail 404 p.sih p.q.sih)
=* cay p.q.sih
?: ?=($red-quri p.cay)
~& %red-quri-case
=+ url=(apex:en-purl ((hard quri) q.q.cay))
(give-thou 307 [location+(crip url)]~ ~)
:: (give-html:abet 200 ~ (redir:xml url))
?. ?=($mime p.cay)
~& [%mime-casting-to-turbo tee]
=+ bek=(norm-beak -:(need (de-beam p.tee)))
=+ tee-ses=?~(ses tee [%ac u.ses tee])
:: TODO: Why cast here? Shouldn't the cast wrap the previous result?
::
(exec-turbo-live tee-ses [%cast [p q]:bek %mime [%$ cay]])
:: (exec-live tee-ses bek [%flag [p.sih `~] %cast %mime [%$ p.q.sih]])
~| q.q.cay
=+ cug=?~(ses ~ cug:(~(got by wup) u.ses))
=+ ((hard {mit/mite rez/octs}) q.q.cay)
=+ dep=(crip "W/{(en-json %s (scot %uv p.sih))}")
=+ hit=[200 ~[etag+dep content-type+(en-mite mit)] ~ rez]
~& [%main-give-thou tee]
(give-thou (add-cookies cug hit))
== ==
== ==
:: ::
@ -1141,17 +1047,12 @@
++ ames-gram ++ ames-gram
|=({him/ship gam/gram} (pass-note ~ %a %want [our him] [%e -.gam ~] +.gam)) |=({him/ship gam/gram} (pass-note ~ %a %want [our him] [%e -.gam ~] +.gam))
:: ::
++ back :: %ford bounce ++ back-turbo
|= {tea/whir mar/mark cay/cage} |= [tea=whir mar=mark cay=cage]
~& [%baby-got-back tea mark] =/ disc [p q]:(norm-beak -.top)
(execute tea (norm-beak -.top) [%cast mar $+cay]) %^ execute-turbo tea live=%.n
:: ^- schematic:ford-api
++ cast-old-thou [%cast disc mar [%$ cay]]
|= {mar/mark cay/cage}
~& %cast-old-thou
?: ?=($httr mar) (give-sigh %& cay)
%^ execute si+~ (norm-beak -.top)
[%alts [%cast mar $+cay] [%cast %recoverable-error $+cay] ~]
:: ::
++ cast-thou :: turbo ++ cast-thou :: turbo
|= [mar=mark cay=cage] |= [mar=mark cay=cage]
@ -1160,7 +1061,6 @@
(give-sigh %& cay) (give-sigh %& cay)
~& [%cast-thou mar] ~& [%cast-thou mar]
%^ execute-turbo si+~ live=%.n %^ execute-turbo si+~ live=%.n
:: %^ execute si+~ (norm-beak -.top)
=/ =beak (norm-beak -.top) =/ =beak (norm-beak -.top)
[%alts [%cast [p q]:beak mar $+cay] [%cast [p q]:beak %recoverable-error $+cay] ~] [%alts [%cast [p q]:beak mar $+cay] [%cast [p q]:beak %recoverable-error $+cay] ~]
:: ::
@ -1171,8 +1071,10 @@
:: ~& del-deps+[a (~(get ju liz) a)] :: ~& del-deps+[a (~(get ju liz) a)]
?: (~(has by liz) a) +>.$ ?: (~(has by liz) a) +>.$
=- -(hen hen.+) =- -(hen hen.+)
~& %f-del-deps :: TODO: %wasp is no longer supported.
(pass-note(hen `~) on+~ %f [%wasp our a |]) ::
~& %deprecated-del-deps
+>.$
:: ::
++ new-deps ++ new-deps
|= {a/@uvH b/(each duct ixor)} ^+ +>.$ |= {a/@uvH b/(each duct ixor)} ^+ +>.$
@ -1182,18 +1084,10 @@
=. liz (~(put ju liz) a b) =. liz (~(put ju liz) a b)
?: had +>.$ ?: had +>.$
=- -(hen hen.+) =- -(hen hen.+)
~& %f-new-deps :: TODO: %wasp is no longer supported.
(pass-note(hen `~) on+~ %f [%wasp our a &])
:: ::
++ ford-req ~& %deprecated-new-deps
|= {bek/beak kas/silk:ford} +>.$
~& [%ford-req bek]
[%f [%exec our `[bek kas]]]
++ exec-live
|= {tea/whir req/{beak silk:ford}}
=. lyv (~(put by lyv) hen [%exec tea])
~& %exec-live
(execute tea req)
:: ::
++ exec-turbo-live ++ exec-turbo-live
|= [tea=whir req=schematic:ford-api] |= [tea=whir req=schematic:ford-api]
@ -1207,13 +1101,6 @@
[%dude [|.(+)]:[%leaf "eyre: execute {<tea>}"] request] [%dude [|.(+)]:[%leaf "eyre: execute {<tea>}"] request]
== ==
:: ::
++ execute
|= {tea/whir bek/beak sil/silk:ford}
~& [%old-execute tea]
%+ pass-note tea
:^ %f %exec our
`[bek [%dude [|.(+)]:[%leaf "eyre: execute {<tea>}"] sil]]
::
++ fail ++ fail
|= {sas/@ud dep/@uvH mez/tang} |= {sas/@ud dep/@uvH mez/tang}
^+ +> ^+ +>
@ -1292,7 +1179,6 @@
++ del-deps (teba ^del-deps) ++ del-deps (teba ^del-deps)
++ new-deps (teba ^new-deps) ++ new-deps (teba ^new-deps)
++ ames-gram (teba ^ames-gram) ++ ames-gram (teba ^ames-gram)
++ exec-live (teba ^exec-live)
++ exec-turbo-live (teba ^exec-turbo-live) ++ exec-turbo-live (teba ^exec-turbo-live)
++ give-html (teba ^give-html) ++ give-html (teba ^give-html)
++ give-thou (teba ^give-thou) ++ give-thou (teba ^give-thou)
@ -1342,12 +1228,6 @@
^- schematic:ford-api ^- schematic:ford-api
[%bake %red-quri r.pez [[p q] s]:s.pez] [%bake %red-quri r.pez [[p q] s]:s.pez]
== ==
:: :: TODO: this needs reworking here.
:: ::
:: =+ req=[%bake mar=q.pez [r s]:pez]
:: =+ red=req(mar %red-quri)
:: (exec-live p.pez -.s.pez `silk:ford`[%alts ~[req red]])
:: ::
$red $red
=+ url=(en-purl hat pok(p [~ %html]) quy) =+ url=(en-purl hat pok(p [~ %html]) quy)
@ -2135,7 +2015,6 @@
:: ::
:: Interfaces :: Interfaces
:: ::
++ get-news _build
++ get-quay |=(quy/quay (call %receive-auth-query-string quay+!>(quy))) ++ get-quay |=(quy/quay (call %receive-auth-query-string quay+!>(quy)))
++ get-req |=(a/{mark vase:hiss} pump(req (~(put to req) hen a))) ++ get-req |=(a/{mark vase:hiss} pump(req (~(put to req) hen a)))
++ get-thou ++ get-thou