updated %ford silk interface as per specification

This commit is contained in:
Anton Dyudin 2015-07-06 17:02:29 -07:00
parent 88f038b860
commit 1c57c4d4f5
8 changed files with 93 additions and 92 deletions

View File

@ -242,7 +242,7 @@
++ dy-slam :: call by ford
|= [way=wire gat=vase sam=vase]
^+ +>+>
(dy-ford way %call [%done ~ %noun gat] [%done ~ %noun sam])
(dy-ford way %call [%$ %noun gat] [%$ %noun sam])
::
++ dy-diff :: send effects, abet
|= fec=sole-effect
@ -423,12 +423,12 @@
::
++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage
++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase
++ dy-silk-vase |=(vax=vase [%done ~ %noun vax]) :: vase to silk
++ dy-silk-vase |=(vax=vase [%$ %noun vax]) :: vase to silk
++ dy-silk-config :: configure
|= [cag=cage cig=dojo-config]
^- silk
:+ %ride [%cnzy %$]
:+ %mute [%done ~ cag]
:+ %mute [%$ cag]
^- (list (pair wing silk))
:* :- [[~ 12] ~]
(dy-silk-vase !>([now=now.hid eny=eny.hid bec=he-beak]))
@ -494,7 +494,7 @@
%ec [/hand [%cast p.q.u.cud (dy-mare q.q.u.cud)]]
%ex [/hand (dy-mare p.q.u.cud)]
%tu :- /hand
:+ %done ~
:- %$
:- %noun
|- ^- vase
?~ p.q.u.cud !!
@ -506,7 +506,7 @@
++ dy-mare :: build expression
|= gen=twig
^- silk
[%ride gen [[%done ~ %$ dy-twig-head] [%reef ~]]]
[%ride gen [[%$ %$ dy-twig-head] [%reef ~]]]
::
++ dy-step :: advance project
|= nex=@ud
@ -552,7 +552,7 @@
(he-card %send way [him dap] cop)
::
++ he-diff :: emit update
|= fec=sole-effect
|= fec=sole-effect
^+ +>
(he-card %diff %sole-effect fec)
::

View File

@ -109,7 +109,7 @@
++ sh :: per console
|_ $: coz=(list command) :: talk actions
she=shell
==
==
++ sh-expr wide:(vang & [&1:% &2:% (scot %da now.hid) |3:%])
::
++ sh-scad :: command parser

View File

@ -310,11 +310,11 @@
%+ turn `(list path)`mus
|= a=path
^- (pair silk silk)
:- [%done ~ %path !>(a)]
:- [%$ %path !>(a)]
:+ %cast %mime
=+ (need (need (read-x:ze let.dom a)))
?: ?=(%& -<)
[%done ~ p.-]
[%$ p.-]
(lobe-to-silk:ze a p.-)
==
==
@ -512,9 +512,9 @@
%+ turn ins
|= [pax=path mis=miso]
?> ?=(%ins -.mis)
:- [%done ~ %path -:!>(*path) pax]
:- [%$ %path -:!>(*path) pax]
=+ =>((flop pax) ?~(. %$ i))
[%cast - [%done ~ p.mis]]
[%cast - [%$ p.mis]]
==
:* hen %pass
[%diffing (scot %p who) syd (scot %da wen) ~]
@ -525,8 +525,8 @@
?> ?=(%dif -.mis)
=+ (need (need (read-x:ze let.dom pax)))
?> ?=(%& -<)
:- [%done ~ %path -:!>(*path) pax]
[%pact [%done ~ p.-] [%done ~ p.mis]]
:- [%$ %path -:!>(*path) pax]
[%pact [%$ p.-] [%$ p.mis]]
==
:* hen %pass
[%castifying (scot %p who) syd (scot %da wen) ~]
@ -535,9 +535,9 @@
%+ turn mut
|= [pax=path mis=miso]
?> ?=(%mut -.mis)
:- [%done ~ %path -:!>(*path) pax]
:- [%$ %path -:!>(*path) pax]
=+ (lobe-to-mark:ze (~(got by q:(aeon-to-yaki:ze let.dom)) pax))
[%cast - [%done ~ p.mis]]
[%cast - [%$ p.mis]]
==
==
::
@ -555,7 +555,7 @@
(lobe-to-silk:ze pax (~(got by q:(aeon-to-yaki:ze let.dom)) pax))
=+ (slag (dec (lent pax)) pax)
=+ ?~(- %$ i.-)
[%cast - [%done ~ p.mis]]
[%cast - [%$ p.mis]]
::
%ins
:- [%casting (scot %p who) syd (scot %da wen) pax]
@ -563,7 +563,7 @@
^- silk
=+ (slag (dec (lent pax)) pax)
=+ ?~(- %$ i.-)
[%cast - [%done ~ p.mis]]
[%cast - [%$ p.mis]]
==
::
++ apply-edit
@ -665,9 +665,9 @@
^- (list (pair silk silk))
%+ turn cat
|= [pax=path cay=cage]
:- [%done ~ %path -:!>(*path) pax]
:- [%$ %path -:!>(*path) pax]
=+ (lobe-to-silk:ze pax (~(got by q:(aeon-to-yaki:ze let.dom)) pax))
[%diff - [%done ~ cay]]
[%diff - [%$ cay]]
==
::
++ take-mutating
@ -769,16 +769,16 @@
%+ turn (~(tap in sum))
|= a=path
^- (pair silk silk)
:- [%done ~ %path !>(a)]
:- [%$ %path !>(a)]
=+ b=(~(got by can) a)
?: ?=(%del -.b)
[%done ~ %null !>(~)]
[%$ %null !>(~)]
=+ (~(get by mim.u.dok) a)
?^ - [%done ~ %mime !>(u.-)]
?^ - [%$ %mime !>(u.-)]
:+ %cast %mime
=+ (need (need (read-x:ze let.dom a)))
?: ?=(%& -<)
[%done ~ p.-]
[%$ p.-]
(lobe-to-silk:ze a p.-)
==
==
@ -827,7 +827,7 @@
%+ turn (~(tap by hat))
|= [a=path b=lobe]
^- (pair silk silk)
:- [%done ~ %path !>(a)]
:- [%$ %path !>(a)]
(lobe-to-silk:ze a b)
==
==
@ -1005,12 +1005,12 @@
:: |= a=plop
:: ?- -.a
:: %delta
:: :- [%done ~ %blob !>([%delta p.a q.a *cage])]
:: [%vale p.r.a him q.r.a]
:: :- [%$ %blob !>([%delta p.a q.a *cage])]
:: [%vale p.r.a q.r.a]
:: ::
:: %direct
:: :- [%done ~ %blob !>([%direct p.a *cage])]
:: [%vale p.q.a him q.q.a]
:: :- [%$ %blob !>([%direct p.a *cage])]
:: [%vale p.q.a q.q.a]
:: ::
:: %indirect ~| %foreign-indirect-not-implemented !!
:: ==
@ -1023,7 +1023,7 @@
:* hen %pass
[%foreign-x (scot %p who) (scot %p for) syd car (scot cas) pax]
%f %exec who [for syd cas] ~
%vale p.peg for q.peg
%vale p.peg q.peg
==
::
++ take-foreign-x
@ -1051,12 +1051,12 @@
|= a=plop
?- -.a
%delta
:- [%done ~ %blob !>([%delta p.a q.a *page])]
[%vale p.r.a for q.r.a]
:- [%$ %blob !>([%delta p.a q.a *page])]
[%vale p.r.a q.r.a]
::
%direct
:- [%done ~ %blob !>([%direct p.a *page])]
[%vale p.q.a for q.q.a]
:- [%$ %blob !>([%direct p.a *page])]
[%vale p.q.a q.q.a]
::
%indirect ~| %foreign-indirect-not-implemented !!
==
@ -1221,12 +1221,12 @@
?: =([~ lob] lol)
=+ (need (need (read-x let.dom pax)))
?> ?=(%& -<)
[%done ~ p.-]
[%$ p.-]
=+ bol=(~(got by lat.ran) lob)
?- -.bol
%direct [%volt ~ q.bol]
%indirect [%volt ~ q.bol]
%delta [%pact $(lob q.q.bol) [%volt ~ r.bol]]
%direct [%volt q.bol]
%indirect [%volt q.bol]
%delta [%pact $(lob q.q.bol) [%volt r.bol]]
==
::
++ page-to-lobe |=(page (shax (jam +<)))
@ -1914,7 +1914,7 @@
?: =(u.a u.-)
~
:- ~
:- [%done ~ %path !>(pax)]
:- [%$ %path !>(pax)]
[%diff (lobe-to-silk pax lob) (lobe-to-silk pax u.a)]
==
::
@ -2016,8 +2016,8 @@
=+ ^= for
=+ (slag (dec (lent pax)) pax)
?~(- %$ i.-)
:- [%done ~ %path !>(pax)]
[%join for [%done ~ cal] [%done ~ cob]]
:- [%$ %path !>(pax)]
[%join for [%$ cal] [%$ cob]]
==
==
::
@ -2048,12 +2048,12 @@
?~ cay
~
:- ~
:- [%done ~ %path !>(pax)]
:- [%$ %path !>(pax)]
=+ (~(get by q.bas.dat) pax)
?~ -
~| %mate-strange-diff-no-base
!!
[%pact (lobe-to-silk pax u.-) [%done ~ u.cay]]
[%pact (lobe-to-silk pax u.-) [%$ u.cay]]
==
::
++ built
@ -2169,7 +2169,7 @@
^- (unit (pair silk silk))
?: (~(has by bop.dat) pax)
~
`[[%done ~ %path !>(pax)] (merge-lobe-to-silk:he pax lob)]
`[[%$ %path !>(pax)] (merge-lobe-to-silk:he pax lob)]
==
::
++ checked-out
@ -2212,10 +2212,10 @@
%+ turn (~(tap in sum))
|= a=path
^- (pair silk silk)
:- [%done ~ %path !>(a)]
:- [%$ %path !>(a)]
=+ b=(~(got by erg.dat) a)
?. b
[%done ~ %null !>(~)]
[%$ %null !>(~)]
:+ %cast %mime
(lobe-to-silk:zez a (~(got by q.new.dat) a))
==
@ -2293,15 +2293,14 @@
?: =([~ lob] lol)
=+ (need (need (read-x let.dom pax)))
?> ?=(%& -<)
[%done ~ p.-]
[%$ p.-]
?: =([~ lob] lal)
:+ %done ~
(need (bind q.ank:(descend-path:(zu (need alh)) pax) tail))
[%$ +:(need q.ank:(descend-path:(zu (need alh)) pax))]
=+ bol=(~(got by lat.ran) lob)
?- -.bol
%direct [%volt ~ q.bol]
%indirect [%volt ~ q.bol]
%delta [%pact $(lob q.q.bol) [%volt ~ r.bol]]
%direct [%volt q.bol]
%indirect [%volt q.bol]
%delta [%pact $(lob q.q.bol) [%volt r.bol]]
==
::
++ reduce-merge-points

View File

@ -756,8 +756,8 @@
?. ?=(%mime p.cay)
=+ bek=-:(need (tome p.tee))
=+ bik=?+(r.bek bek [%ud %0] bek(r da/now))
=- (pass-note tee (ford-req bik [%flag p.sih -]))
=- `silk`[%cast %mime %done ~ cay(q.q -)]
=- (pass-note tee (ford-req bik [%flag [p.sih `~] -]))
=- `silk`[%cast %mime %$ cay(q.q -)]
?. ?=([%ud 0] r.bek) q.q.cay
?+ p.cay q.q.cay :: inject dependency long-poll
%urb =| urb=[[%html ~] [[%head ~] marl] [[%body ~] manx marl] ~]
@ -796,7 +796,7 @@
::
++ back :: %ford bounce
|= [tea=whir mar=mark cay=cage]
(pass-note tea (ford-req root-beak [%cast mar %done ~ cay]))
(pass-note tea (ford-req root-beak [%cast mar %$ cay]))
::
++ ford-kill (pass-note ~ %f [%exec our *beak ~]) :: XX unused
++ ford-req |=([bek=beak kas=silk] [%f [%exec our bek `kas]])

View File

@ -509,8 +509,8 @@
?~ for
(flaw cof leaf/"bad ++sted:grad" ~)
%^ make cof %diff
:- [%cast u.for [%done ~ cay]]
[%cast u.for [%done ~ coy]]
:- [%cast u.for `cay]
[%cast u.for `coy]
?. (slab %diff p.gar)
(flaw cof leaf/"no ++diff:grad" ~)
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
@ -760,7 +760,7 @@
=+ too=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ too
(flaw cof leaf/"bad ++sted:grad" ~)
(make cof %join u.too [%done ~ cay] [%done ~ coy])
(make cof %join u.too `cay `coy)
=+ fom=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ fom
(flaw cof leaf/"bad ++form:grad" ~)
@ -805,7 +805,7 @@
?~ too
(flaw cof leaf/"bad ++sted:grad" ~)
%+ make cof
[%mash u.too [p.mas q.mas [%done ~ cay]] [p.mos q.mos [%done ~ coy]]]
[%mash u.too [p.mas q.mas `cay] [p.mos q.mos `coy]]
=+ fom=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ fom
(flaw cof leaf/"bad ++form:grad" ~)
@ -927,7 +927,7 @@
(fine cof bem(r [%ud ((hard ,@) +.+:(need u.von))]))
::
++ lave :: validate
|= [cof=cafe for=mark his=ship som=*]
|= [cof=cafe for=mark som=*]
^- (bolt vase)
((lake for) cof [%noun som])
::
@ -1059,6 +1059,7 @@
%+ cope ((~(got by mal) i.wuy) cof arg)
|= [cof=cafe hoc=vase]
(cope (lope cof i.wuy t.wuy hoc) (flux some))
::
++ lime :: load beam
|= [cof=cafe for=mark bem=beam arg=heel]
=+ [mob=bem mer=(flop arg)]
@ -1154,13 +1155,14 @@
;~ cope
;~ coax
|=([cof=cafe p=silk q=silk] (cope ^$(cof cof, kas p.kas) furl))
|=([cof=cafe p=silk q=silk] (cope ^$(cof cof, kas q.kas) furl))
|=([cof=cafe p=silk q=silk] (cope ^$(cof cof, kas q.kas) furl))
== :: XX merge %tabl
::
|= [cof=cafe bor=cage heg=cage] ^- (bolt gage)
(faun cof (slop q.bor q.heg))
==
::
%$ (fine cof %& p.kas)
%bake
:: ~& > [p.kas (tope q.kas)]
:: %+ cool |.(leaf/"ford: bake {<p.kas>} {<(tope q.kas)>}")
@ -1238,25 +1240,26 @@
%+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}")
(diff cof p.kas q.kas)
::
%done [cof %0 p.kas %& q.kas]
%dude (cool |.(p.kas) $(kas q.kas))
%dune
?~ q.kas [cof [%2 p.kas [%leaf "no data"]~]]
$(kas [%done p.kas u.q.kas])
::
%dude (cool p.kas $(kas q.kas))
%file
%+ cool |.(leaf/"ford: file {<p.kas>}")
(lear cof p.kas)
::
%flag
?~ p.kas $(kas q.kas)
=+ dap=(~(get by deh.bay) p.kas)
?~ dap ~&(flag-missed/p.kas $(kas q.kas))
=+ dep=?-(-.u.dap %init p.u.dap, %sent q.u.dap, %done [[bek ~] ~ ~])
=+ rez=$(kas q.kas) :: XX revisit ^ during dependency review
=+ rez=$(kas q.kas)
?: ?=(%1 -.q.rez) rez
rez(p.q (~(uni in p.q.rez) `(set beam)`dep))
::
=- rez(p.q -)
|- ^- (set beam)
?~ p.kas p.q.rez
=. p.q.rez $(p.kas l.p.kas)
=. p.q.rez $(p.kas r.p.kas)
?^ n.p.kas
(~(put in p.q.rez) n.p.kas)
=+ dap=(~(get by deh.bay) n.p.kas)
?~ dap ~&(flag-missed/n.p.kas p.q.rez)
%- ~(uni in p.q.rez) ^- (set beam)
?-(-.u.dap %init p.u.dap, %sent q.u.dap, %done [[bek ~] ~ ~])
:: XX revisit ^ during dependency review
%join
%+ cool
|.
@ -1300,17 +1303,17 @@
==
::
%vale
%+ cool |.(leaf/"ford: vale {<p.kas>} {<q.kas>} {<`@p`(mug r.kas)>}")
%+ cope (lave cof p.kas q.kas r.kas)
%+ cool |.(leaf/"ford: vale {<p.kas>} {<`@p`(mug q.kas)>}")
%+ cope (lave cof p.kas q.kas)
(flux |=(vax=vase `gage`[%& p.kas vax]))
::
%volt
%+ cool |.(leaf/"ford: volt {<p.q.kas>}")
%+ cope $(kas [%bunt p.q.kas])
%+ cool |.(leaf/"ford: volt {<p.p.kas>}")
%+ cope $(kas [%bunt p.p.kas])
%- tabl-run
|= [cof=cafe cay=cage]
^- (bolt gage)
[cof %0 p.kas %& p.q.kas p.q.cay q.q.kas]
(fine cof [%& p.p.kas p.q.cay q.p.kas])
==
::
++ malt :: cached slit
@ -1665,7 +1668,7 @@
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ for
(flaw cof leaf/"bad ++sted:grad" ~)
(make cof %cast p.cay %pact [%cast u.for [%done ~ cay]] [%done ~ coy])
(make cof %cast p.cay %pact [%cast u.for `cay] `coy)
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ for
(flaw cof leaf/"bad ++form:grad" ~)

View File

@ -459,7 +459,7 @@
?: ?=(%doff +>-.q.hin)
%+ mo-pass
[%use pax]
[%f %exec our byk.pap ~ %vale p.+>+.q.hin our q.+>+.q.hin]
[%f %exec our byk.pap ~ %vale +.p.q.hin]
ap-abet:(ap-pout:pap t.t.t.pax +>.q.hin)
==
::
@ -487,11 +487,11 @@
?: ?=(%puff -.cub)
%+ mo-pass
[%sys %val (scot %p q.q.pry) dap ~]
[%f %exec our (mo-beak dap) ~ %vale p.cub our q.cub]
[%f %exec our (mo-beak dap) ~ %vale +.cub]
?: ?=(%punk -.cub)
%+ mo-pass
[%sys %val (scot %p q.q.pry) dap ~]
[%f %exec our (mo-beak dap) ~ %cast p.cub %done ~ q.cub]
[%f %exec our (mo-beak dap) ~ %cast p.cub %$ q.cub]
ap-abet:(ap-club:(ap-abed:ap dap pry) cub)
::
++ mo-club :: local action
@ -510,7 +510,7 @@
[%sys %req (scot %p him) dap (scot %ud num) ~]
^- note-arvo
?- -.rok
:: %m [%f %exec our (mo-beak dap) ~ %vale p.rok our q.rok]
:: %m [%f %exec our (mo-beak dap) ~ %vale p.rok q.rok]
%m [%g %deal [him our] dap %puff p.rok q.rok]
%s [%g %deal [him our] dap %peer p.rok]
%u [%g %deal [him our] dap %pull ~]
@ -600,7 +600,7 @@
?: =(mar p.cay) [%give %unto p.q.cov]
:+ %pass
[%sys %pel dap ~]
[%f %exec our (mo-beak dap) ~ %cast mar %done ~ cay]
[%f %exec our (mo-beak dap) ~ %cast mar %$ cay]
::
%pass
:+ %pass `path`[%use dap p.q.cov]

View File

@ -2520,18 +2520,17 @@
++ milk (trel ship desk silk) :: sourced silk
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%bake p=mark q=beam r=path] :: local synthesis
$% [%$ p=cage] :: literal
[%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
[%bunt p=mark] :: example of mark
[%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate
[%core p=beam] :: build program
[%diff p=silk q=silk] :: diff
[%done p=(set beam) q=cage] :: literal
[%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit cage)] :: unit literal
[%dude p=(trap tank) q=silk] :: error wrap
[%file p=beam] :: from clay
[%flag p=@uvH q=silk] :: re-apply user deps
[%flag p=(set $|(@uvH beam)) q=silk] :: add dependencies
[%join p=mark q=silk r=silk] :: merge
[%mash p=mark q=milk r=milk] :: annotate
[%mute p=silk q=(list (pair wing silk))] :: mutant
@ -2540,8 +2539,8 @@
[%reef ~] :: kernel reef
[%ride p=twig q=silk] :: silk thru twig
[%tabl p=(list (pair silk silk))] :: list
[%vale p=mark q=ship r=*] :: validate [our his]
[%volt p=(set beam) q=(cask ,*)] :: unsafe add type
[%vale p=mark q=*] :: validate
[%volt p=(cask ,*)] :: unsafe add type
== ::
::::
++ gage :: recursive cage/tang

View File

@ -366,7 +366,7 @@
%+ turn (~(tap in p.are))
|= pax=path
^- (pair silk silk)
:- [%done ~ %path -:!>(*path) pax]
:- [%$ %path -:!>(*path) pax]
=+ base=[%file [our tic %da now] (flop pax)]
=+ alis=[%file [her sud cas] (flop pax)]
=+ bobs=[%file [our syd %da now] (flop pax)]