mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 05:11:46 +03:00
ford %join
This commit is contained in:
parent
26aef3ab54
commit
979898f2bf
@ -38,8 +38,8 @@
|
|||||||
ali=yaki :: ali's commit
|
ali=yaki :: ali's commit
|
||||||
bob=yaki :: bob's commit
|
bob=yaki :: bob's commit
|
||||||
bas=yaki :: mergebase
|
bas=yaki :: mergebase
|
||||||
dal=(map path cage) :: diff(bas,ali)
|
dal=(map path (unit cage)) :: diff(bas,ali)
|
||||||
dob=(map path cage) :: diff(bas,bob)
|
dob=(map path (unit cage)) :: diff(bas,bob)
|
||||||
new=yaki :: merge(dal,dob)
|
new=yaki :: merge(dal,dob)
|
||||||
ank=ankh :: new state
|
ank=ankh :: new state
|
||||||
erg=(map path ,?) :: ergoable changes
|
erg=(map path ,?) :: ergoable changes
|
||||||
@ -98,6 +98,7 @@
|
|||||||
[%done p=(set beam) q=gage] :: literal
|
[%done p=(set beam) q=gage] :: literal
|
||||||
[%dude p=tank q=silk] :: error wrap
|
[%dude p=tank q=silk] :: error wrap
|
||||||
[%dune p=(set beam) q=(unit gage)] :: unit literal
|
[%dune p=(set beam) q=(unit gage)] :: unit literal
|
||||||
|
[%join p=mark q=silk r=silk] :: merge
|
||||||
[%mute p=silk q=(list (pair wing silk))] :: mutant
|
[%mute p=silk q=(list (pair wing silk))] :: mutant
|
||||||
[%pact p=silk q=silk] :: patch
|
[%pact p=silk q=silk] :: patch
|
||||||
[%reef ~] :: kernel reef
|
[%reef ~] :: kernel reef
|
||||||
@ -1229,7 +1230,7 @@
|
|||||||
`(map path ,?)`(~(run by q.ali.dat) |=(lobe %&))
|
`(map path ,?)`(~(run by q.ali.dat) |=(lobe %&))
|
||||||
checkout
|
checkout
|
||||||
::
|
::
|
||||||
?(%mate %meld)
|
?(%meet %mate %meld)
|
||||||
?: =(r.ali.dat r.bob.dat)
|
?: =(r.ali.dat r.bob.dat)
|
||||||
+>.^$(gon `~)
|
+>.^$(gon `~)
|
||||||
?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat)
|
?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat)
|
||||||
@ -1238,9 +1239,9 @@
|
|||||||
$(gem.dat %fine)
|
$(gem.dat %fine)
|
||||||
=+ r=(find-merge-points:he ali.dat bob.dat)
|
=+ r=(find-merge-points:he ali.dat bob.dat)
|
||||||
?~ r
|
?~ r
|
||||||
+>.^$(gon ``[%mate-no-merge-base >ali< >bob< ~])
|
+>.^$(gon ``[%merge-no-merge-base >ali< >bob< ~])
|
||||||
?. ?=([* ~ ~] r)
|
?. ?=([* ~ ~] r)
|
||||||
+>.^$(gon ``[%mate-criss-cross >ali< >bob< ~])
|
+>.^$(gon ``[%merge-criss-cross >ali< >bob< ~])
|
||||||
=. bas.dat n.r
|
=. bas.dat n.r
|
||||||
diff-ali
|
diff-ali
|
||||||
==
|
==
|
||||||
@ -1259,9 +1260,11 @@
|
|||||||
%+ murn (~(tap by q.bas.dat))
|
%+ murn (~(tap by q.bas.dat))
|
||||||
|= [pax=path lob=lobe]
|
|= [pax=path lob=lobe]
|
||||||
^- (unit (pair silk silk))
|
^- (unit (pair silk silk))
|
||||||
=+ (~(get by q.yak) lob)
|
=+ (~(get by q.yak) pax)
|
||||||
?~ -
|
?~ -
|
||||||
~
|
:- ~
|
||||||
|
:- [%done ~ %path !>(pax)]
|
||||||
|
[%done ~ %null !>(~)]
|
||||||
?: =(lob u.-)
|
?: =(lob u.-)
|
||||||
~
|
~
|
||||||
:- ~
|
:- ~
|
||||||
@ -1287,7 +1290,7 @@
|
|||||||
=+ cay=q.p.res
|
=+ cay=q.p.res
|
||||||
?@ p.cay
|
?@ p.cay
|
||||||
+>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~])
|
+>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~])
|
||||||
=| dal=(map path cage)
|
=| dal=(map path (unit cage))
|
||||||
=>
|
=>
|
||||||
|- ^+ +
|
|- ^+ +
|
||||||
?~ p.p.cay
|
?~ p.p.cay
|
||||||
@ -1306,7 +1309,9 @@
|
|||||||
dal
|
dal
|
||||||
%+ ~(put by dal:tal)
|
%+ ~(put by dal:tal)
|
||||||
((hard path) -.q.coy)
|
((hard path) -.q.coy)
|
||||||
[q.i.p.p.cay (slot 3 coy)]
|
?: ?=(%null q.i.p.p.cay)
|
||||||
|
~
|
||||||
|
`[q.i.p.p.cay (slot 3 coy)]
|
||||||
==
|
==
|
||||||
?^ gon
|
?^ gon
|
||||||
+>.$
|
+>.$
|
||||||
@ -1325,7 +1330,7 @@
|
|||||||
=+ cay=q.p.res
|
=+ cay=q.p.res
|
||||||
?@ p.cay
|
?@ p.cay
|
||||||
+>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~])
|
+>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~])
|
||||||
=| dal=(map path cage)
|
=| dal=(map path (unit cage))
|
||||||
=>
|
=>
|
||||||
|- ^+ +
|
|- ^+ +
|
||||||
?~ p.p.cay
|
?~ p.p.cay
|
||||||
@ -1344,7 +1349,9 @@
|
|||||||
dal
|
dal
|
||||||
%+ ~(put by dal:tal)
|
%+ ~(put by dal:tal)
|
||||||
((hard path) -.q.coy)
|
((hard path) -.q.coy)
|
||||||
[q.i.p.p.cay (slot 3 coy)]
|
?: ?=(%null q.i.p.p.cay)
|
||||||
|
~
|
||||||
|
`[q.i.p.p.cay (slot 3 coy)]
|
||||||
==
|
==
|
||||||
?^ gon
|
?^ gon
|
||||||
+>.$
|
+>.$
|
||||||
@ -1354,28 +1361,44 @@
|
|||||||
++ merge
|
++ merge
|
||||||
^+ .
|
^+ .
|
||||||
?+ gem.dat ~| %merge-weird-gem !!
|
?+ gem.dat ~| %merge-weird-gem !!
|
||||||
%mate
|
%meet
|
||||||
=+ (~(int by dal.dat) dob.dat)
|
=+ (~(int by dal.dat) dob.dat)
|
||||||
?^ -
|
?^ -
|
||||||
+(gon ``[%mate-conflict >ali< >bob< >[-]< ~])
|
+(gon ``[%meet-conflict >ali< >bob< >[-]< ~])
|
||||||
=^ new lat.ran :: XX forgot deletes
|
=^ new lat.ran
|
||||||
^- [(map path lobe) (map lobe blob)]
|
^- [(map path lobe) (map lobe blob)]
|
||||||
%+ roll (~(tap by (~(uni by dal.dat) dob.dat)))
|
%+ roll (~(tap by (~(uni by dal.dat) dob.dat)))
|
||||||
=< .(lat lat.ran)
|
=< .(lat lat.ran)
|
||||||
|= [[pax=path cay=cage] new=(map path lobe) lat=(map lobe blob)]
|
|= $: [pax=path cay=(unit cage)]
|
||||||
|
new=(map path lobe)
|
||||||
|
lat=(map lobe blob)
|
||||||
|
==
|
||||||
|
?~ cay
|
||||||
|
[new lat]
|
||||||
=+ ^= bol
|
=+ ^= bol
|
||||||
=+ (~(get by q.bas.dat) pax)
|
=+ (~(get by q.bas.dat) pax)
|
||||||
?~ -
|
?~ -
|
||||||
(make-direct cay)
|
(make-direct u.cay)
|
||||||
(make-delta u.- cay)
|
(make-delta u.- u.cay)
|
||||||
[(~(put by new) pax p.bol) (~(put by lat) p.bol bol)]
|
[(~(put by new) pax p.bol) (~(put by lat) p.bol bol)]
|
||||||
|
=+ ^- [del=(map path ,?) old=(map path lobe)]
|
||||||
|
%+ roll (~(tap by (~(uni by dal.dat) dob.dat)))
|
||||||
|
=< .(old q.bas.dat)
|
||||||
|
|= $: [pax=path cay=(unit cage)]
|
||||||
|
del=(map path ,?)
|
||||||
|
old=(map path lobe)
|
||||||
|
==
|
||||||
|
?^ cay
|
||||||
|
[del old]
|
||||||
|
[(~(put by del) pax %|) (~(del by old) pax)]
|
||||||
=. new.dat
|
=. new.dat
|
||||||
(make-yaki [r.ali.dat r.bob.dat ~] (~(uni by q.bas.dat) new) now)
|
(make-yaki [r.ali.dat r.bob.dat ~] (~(uni by old) new) now)
|
||||||
=. hut.ran (~(put by hut.ran) r.new.dat new.dat)
|
=. hut.ran (~(put by hut.ran) r.new.dat new.dat)
|
||||||
=. erg.dat (~(run by new) |=(lobe %&))
|
=. erg.dat %- ~(uni by del)
|
||||||
|
`(map path ,?)`(~(run by new) |=(lobe %&))
|
||||||
checkout
|
checkout
|
||||||
::
|
::
|
||||||
%meld .(gon ``[%merge-not-implemented ~])
|
?(%mate %meld) .(gon ``[%merge-not-implemented ~])
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ merged
|
++ merged
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
[%done p=(set beam) q=gage] :: literal
|
[%done p=(set beam) q=gage] :: literal
|
||||||
[%dude p=tank q=silk] :: error wrap
|
[%dude p=tank q=silk] :: error wrap
|
||||||
[%dune p=(set beam) q=(unit gage)] :: unit literal
|
[%dune p=(set beam) q=(unit gage)] :: unit literal
|
||||||
|
[%join p=mark q=silk r=silk] :: merge
|
||||||
[%mute p=silk q=(list (pair wing silk))] :: mutant
|
[%mute p=silk q=(list (pair wing silk))] :: mutant
|
||||||
[%pact p=silk q=silk] :: patch
|
[%pact p=silk q=silk] :: patch
|
||||||
[%plan p=beam q=spur r=hood] :: structured assembly
|
[%plan p=beam q=spur r=hood] :: structured assembly
|
||||||
@ -397,8 +398,7 @@
|
|||||||
==
|
==
|
||||||
|= [cof=cafe cay=gage coy=gage]
|
|= [cof=cafe cay=gage coy=gage]
|
||||||
?. &(?=(@ p.cay) ?=(@ p.coy))
|
?. &(?=(@ p.cay) ?=(@ p.coy))
|
||||||
~| %bad-diff-marc
|
(flaw cof leaf/"bad diff marc" ~)
|
||||||
!!
|
|
||||||
?. =(p.cay p.coy)
|
?. =(p.cay p.coy)
|
||||||
%+ flaw cof :_ ~
|
%+ flaw cof :_ ~
|
||||||
leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}"
|
leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}"
|
||||||
@ -415,7 +415,9 @@
|
|||||||
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
|
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
|
||||||
?~ for
|
?~ for
|
||||||
(flaw cof leaf/"bad ++sted:grad" ~)
|
(flaw cof leaf/"bad ++sted:grad" ~)
|
||||||
(make cof %diff [%cast u.for kas] [%cast u.for kos])
|
%^ make cof %diff
|
||||||
|
:- [%cast u.for [%done ~ cay]]
|
||||||
|
[%cast u.for [%done ~ coy]]
|
||||||
?. (slab %diff p.gar)
|
?. (slab %diff p.gar)
|
||||||
(flaw cof leaf/"no ++diff:grad" ~)
|
(flaw cof leaf/"no ++diff:grad" ~)
|
||||||
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
|
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
|
||||||
@ -423,7 +425,7 @@
|
|||||||
%+ cope
|
%+ cope
|
||||||
%^ maul cof
|
%^ maul cof
|
||||||
(slap (slap pox [%cnzy %grad]) [%cnzy %diff])
|
(slap (slap pox [%cnzy %grad]) [%cnzy %diff])
|
||||||
q.coy
|
(slop q.cay q.coy)
|
||||||
|= [cof=cafe dif=vase]
|
|= [cof=cafe dif=vase]
|
||||||
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
|
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
|
||||||
?~ for
|
?~ for
|
||||||
@ -638,6 +640,48 @@
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
++ join
|
||||||
|
|= [cof=cafe for=mark kas=silk kos=silk]
|
||||||
|
^- (bolt gage)
|
||||||
|
%. [cof kas kos]
|
||||||
|
;~ cope
|
||||||
|
;~ coax
|
||||||
|
|=([cof=cafe p=silk q=silk] (make cof p))
|
||||||
|
|=([cof=cafe p=silk q=silk] (make cof q))
|
||||||
|
==
|
||||||
|
|= [cof=cafe cay=gage coy=gage]
|
||||||
|
?. &(?=(@ p.cay) ?=(@ p.coy))
|
||||||
|
(flaw cof leaf/"bad join marc: {<p.cay>} {<p.coy>}" ~)
|
||||||
|
%+ cope (fang cof for [our %main %da now])
|
||||||
|
|= [cof=cafe pro=vase]
|
||||||
|
?. (slab %grad p.pro)
|
||||||
|
(flaw cof leaf/"no ++grad" ~)
|
||||||
|
=+ gar=(slap pro [%cnzy %grad])
|
||||||
|
?. (slab %form p.gar)
|
||||||
|
?. (slab %sted p.gar)
|
||||||
|
(flaw cof leaf/"no ++form:grad nor ++sted:grad" ~)
|
||||||
|
=+ too=((soft ,@tas) q:(slap gar [%cnzy %sted]))
|
||||||
|
?~ too
|
||||||
|
(flaw cof leaf/"bad ++sted:grad" ~)
|
||||||
|
(make cof %join u.too [%done ~ cay] [%done ~ coy])
|
||||||
|
=+ fom=((soft ,@tas) q:(slap gar [%cnzy %form]))
|
||||||
|
?~ fom
|
||||||
|
(flaw cof leaf/"bad ++form:grad" ~)
|
||||||
|
?. &(=(fom p.cay) =(fom p.coy))
|
||||||
|
%+ flaw cof :_ ~
|
||||||
|
leaf/"join on data of bad marks: {(trip p.cay)} {(trip p.coy)}"
|
||||||
|
?: =(q.q.cay q.q.coy)
|
||||||
|
(fine cof cay)
|
||||||
|
?. (slab %join p.gar)
|
||||||
|
(flaw cof leaf/"no ++join:grad" ~)
|
||||||
|
%+ cope
|
||||||
|
%^ maul cof
|
||||||
|
(slap (slap pro [%cnzy %grad]) [%cnzy %join])
|
||||||
|
q.coy
|
||||||
|
|= [cof=cafe dif=vase]
|
||||||
|
(fine cof p.cay dif)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ kale :: mutate
|
++ kale :: mutate
|
||||||
|= [cof=cafe kas=silk muy=(list (pair wing silk))]
|
|= [cof=cafe kas=silk muy=(list (pair wing silk))]
|
||||||
^- (bolt gage)
|
^- (bolt gage)
|
||||||
@ -940,7 +984,8 @@
|
|||||||
|= [cof=cafe cay=gage]
|
|= [cof=cafe cay=gage]
|
||||||
^- (bolt gage)
|
^- (bolt gage)
|
||||||
%+ cool |.(leaf/"ford: casting {<p.cay>} to {<p.kas>}")
|
%+ cool |.(leaf/"ford: casting {<p.cay>} to {<p.kas>}")
|
||||||
?. ?=(@ p.cay) ~| %bad-cast-marc !!
|
?. ?=(@ p.cay)
|
||||||
|
(flaw cof leaf/"bad cast marc" ~)
|
||||||
%+ cope (link cof p.kas p.cay [our %main %da now] q.cay)
|
%+ cope (link cof p.kas p.cay [our %main %da now] q.cay)
|
||||||
|= [cof=cafe vax=vase]
|
|= [cof=cafe vax=vase]
|
||||||
(fine cof [p.kas vax])
|
(fine cof [p.kas vax])
|
||||||
@ -954,6 +999,12 @@
|
|||||||
%dune
|
%dune
|
||||||
?~ q.kas [cof [%2 [%leaf "no data"]~]]
|
?~ q.kas [cof [%2 [%leaf "no data"]~]]
|
||||||
$(kas [%done p.kas u.q.kas])
|
$(kas [%done p.kas u.q.kas])
|
||||||
|
::
|
||||||
|
%join
|
||||||
|
%+ cool
|
||||||
|
|.
|
||||||
|
leaf/"ford: join {<p.kas>} {<`@p`(mug q.kas)>} {<`@p`(mug r.kas)>}"
|
||||||
|
(join cof p.kas q.kas r.kas)
|
||||||
::
|
::
|
||||||
%mute (kale cof p.kas q.kas)
|
%mute (kale cof p.kas q.kas)
|
||||||
%pact
|
%pact
|
||||||
@ -1303,7 +1354,8 @@
|
|||||||
|=([cof=cafe p=silk q=silk] (make cof q))
|
|=([cof=cafe p=silk q=silk] (make cof q))
|
||||||
==
|
==
|
||||||
|= [cof=cafe cay=gage coy=gage]
|
|= [cof=cafe cay=gage coy=gage]
|
||||||
?. &(?=(@ p.cay) ?=(@ p.coy)) ~| %bad-pact-marc !!
|
?. &(?=(@ p.cay) ?=(@ p.coy))
|
||||||
|
(flaw cof leaf/"bad pact marc" ~)
|
||||||
%+ cope (fang cof p.cay [our %main %da now])
|
%+ cope (fang cof p.cay [our %main %da now])
|
||||||
|= [cof=cafe pro=vase]
|
|= [cof=cafe pro=vase]
|
||||||
?. (slab %grad p.pro)
|
?. (slab %grad p.pro)
|
||||||
@ -1315,7 +1367,7 @@
|
|||||||
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
|
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
|
||||||
?~ for
|
?~ for
|
||||||
(flaw cof leaf/"bad ++sted:grad" ~)
|
(flaw cof leaf/"bad ++sted:grad" ~)
|
||||||
(make cof %cast p.cay %pact [%cast u.for kas] kos)
|
(make cof %cast p.cay %pact [%cast u.for [%done ~ cay]] [%done ~ coy])
|
||||||
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
|
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
|
||||||
?~ for
|
?~ for
|
||||||
(flaw cof leaf/"bad ++form:grad" ~)
|
(flaw cof leaf/"bad ++form:grad" ~)
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
[std=term kel=@] :: kelvin version
|
[std=term kel=@] :: kelvin version
|
||||||
[ven=term pro=term kel=@] :: vendor and product
|
[ven=term pro=term kel=@] :: vendor and product
|
||||||
[ven=term pro=term ver=@ kel=@] :: all of the above
|
[ven=term pro=term ver=@ kel=@] :: all of the above
|
||||||
==
|
== ::
|
||||||
++ clue ,[p=chum q=nock r=(list (pair term nock))] :: battery definition
|
++ clue ,[p=chum q=nock r=(list (pair term nock))] :: battery definition
|
||||||
++ coil $: p=?(%gold %iron %lead %zinc) :: core type
|
++ coil $: p=?(%gold %iron %lead %zinc) :: core type
|
||||||
q=type ::
|
q=type ::
|
||||||
|
@ -2902,7 +2902,7 @@
|
|||||||
== ::
|
== ::
|
||||||
++ gilt ,[@tas *] :: presumed gift
|
++ gilt ,[@tas *] :: presumed gift
|
||||||
++ gens ,[p=lang q=gcos] :: general identity
|
++ gens ,[p=lang q=gcos] :: general identity
|
||||||
++ germ ?(%init %fine %that %this %mate %meld) :: merge style
|
++ germ ?(%init %fine %that %this %mate %meet %meld) :: merge style
|
||||||
++ gcos :: id description
|
++ gcos :: id description
|
||||||
$% [%czar ~] :: 8-bit ship
|
$% [%czar ~] :: 8-bit ship
|
||||||
[%duke p=what] :: 32-bit ship
|
[%duke p=what] :: 32-bit ship
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
?~ -
|
?~ -
|
||||||
[leaf/"not working so well" >sih< ~]
|
[leaf/"not working so well" >sih< ~]
|
||||||
?~ are.u
|
?~ are.u
|
||||||
[leaf/"synced" ~]
|
[leaf/"merged" ~]
|
||||||
[leaf/"failed to sync" >p.u.are.u< q.u.are.u]
|
[leaf/"failed to merge" >p.u.are.u< q.u.are.u]
|
||||||
%- flop
|
%- flop
|
||||||
:- i=[ost %pass / %g %cide %$]
|
:- i=[ost %pass / %g %cide %$]
|
||||||
^= t
|
^= t
|
||||||
|
@ -12,5 +12,6 @@
|
|||||||
++ form %mime
|
++ form %mime
|
||||||
++ diff |=(mime +<)
|
++ diff |=(mime +<)
|
||||||
++ pact |=(mime +<)
|
++ pact |=(mime +<)
|
||||||
|
++ join |=([mime mime] +<-)
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
@ -28,5 +28,9 @@
|
|||||||
|= dif=(urge cord)
|
|= dif=(urge cord)
|
||||||
^- wain
|
^- wain
|
||||||
(lurk txt dif)
|
(lurk txt dif)
|
||||||
|
++ join
|
||||||
|
|= [ali=(urge cord) bob=(urge cord)]
|
||||||
|
^- (urge cord)
|
||||||
|
ali
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user