mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-21 05:41:43 +03:00
waypoint
This commit is contained in:
parent
0e128a1a3e
commit
428aaa0674
122
arvo/clay.hoon
122
arvo/clay.hoon
@ -297,7 +297,9 @@
|
|||||||
++ echo :: announce changes
|
++ echo :: announce changes
|
||||||
|= [wen=@da mim=(map path mime) lem=nori]
|
|= [wen=@da mim=(map path mime) lem=nori]
|
||||||
^+ +>
|
^+ +>
|
||||||
=. yel
|
~& [%echoing syd]
|
||||||
|
%_ +>.$
|
||||||
|
yel
|
||||||
=+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)]
|
=+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)]
|
||||||
?- -.lem
|
?- -.lem
|
||||||
| :_ yel
|
| :_ yel
|
||||||
@ -310,39 +312,6 @@
|
|||||||
?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';')
|
?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';')
|
||||||
[%leaf (spud (weld pre p.i.q.p.lem))]
|
[%leaf (spud (weld pre p.i.q.p.lem))]
|
||||||
==
|
==
|
||||||
?~ hez +>.$
|
|
||||||
?. ?=(%& -.lem) +>.$
|
|
||||||
=+ ^= ceq
|
|
||||||
|= a=miso
|
|
||||||
?| ?=(%del -.a)
|
|
||||||
&(?=(%ins -.a) ?=(%mime -.+.a))
|
|
||||||
&(?=(%mut -.a) ?=(%mime -.+>.a))
|
|
||||||
==
|
|
||||||
=. wok
|
|
||||||
:+ ~
|
|
||||||
%+ murn `(list ,[path miso])`q.p.lem
|
|
||||||
|= [a=path b=miso]
|
|
||||||
?: ?=(%del -.b) (some a ~)
|
|
||||||
(bind (~(get by mim) a) |=(c=mime [a (some c)]))
|
|
||||||
%+ murn `(list ,[path miso])`q.p.lem
|
|
||||||
|=([a=path b=miso] ?:((ceq b) ~ (some a)))
|
|
||||||
?> ?=(^ wok)
|
|
||||||
?~ lon.u.wok
|
|
||||||
apply-ergo
|
|
||||||
%_ +>.$
|
|
||||||
tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]]))
|
|
||||||
%- welp :_ tag
|
|
||||||
^- (list ,[duct path note])
|
|
||||||
%+ murn `(list ,[path miso])`q.p.lem
|
|
||||||
|= [a=path b=miso]
|
|
||||||
?: (ceq b)
|
|
||||||
~
|
|
||||||
%- some
|
|
||||||
:+ u.hez
|
|
||||||
[%ergoing (scot %p who) syd a]
|
|
||||||
:* %f %exec who ~ %cast %mime %done ~
|
|
||||||
~|(%bad-echo (need (read:ze %x [%ud let.dom] a)))
|
|
||||||
==
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ edit :: apply changes
|
++ edit :: apply changes
|
||||||
@ -356,7 +325,7 @@
|
|||||||
+>.$
|
+>.$
|
||||||
(echo:(checkout-ankh u.hat) wen ~ lem)
|
(echo:(checkout-ankh u.hat) wen ~ lem)
|
||||||
?. =(~ dok)
|
?. =(~ dok)
|
||||||
~& %already-applying-changes !!
|
~& %already-applying-changes +>
|
||||||
=+ ^= sop
|
=+ ^= sop
|
||||||
|= [a=path b=miso]
|
|= [a=path b=miso]
|
||||||
^- ?
|
^- ?
|
||||||
@ -432,16 +401,14 @@
|
|||||||
++ apply-edit
|
++ apply-edit
|
||||||
|= wen=@da
|
|= wen=@da
|
||||||
^+ +>
|
^+ +>
|
||||||
=^ hat +>.$
|
~& [%applying-edit syd]
|
||||||
|
=+ ^= hat
|
||||||
(edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok))
|
(edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok))
|
||||||
?~ dok ~& %no-changes !!
|
?~ dok ~& %no-changes !!
|
||||||
?^ lon.u.dok ~& %not-done-diffing !!
|
?^ lon.u.dok ~& %not-done-diffing !!
|
||||||
?~ hat
|
?~ -.hat
|
||||||
(echo(dok ~) wen mim.u.dok %& *cart sot.u.dok)
|
([echo(dok ~)]:.(+>.$ +.hat) wen mim.u.dok %& *cart sot.u.dok)
|
||||||
%^ echo:(checkout-ankh(dok ~) u.hat)
|
(checkout-ankh u.-.hat)
|
||||||
wen
|
|
||||||
mim.u.dok
|
|
||||||
[%& *cart sot.u.dok]
|
|
||||||
::
|
::
|
||||||
++ apply-ergo
|
++ apply-ergo
|
||||||
^+ .
|
^+ .
|
||||||
@ -516,17 +483,31 @@
|
|||||||
++ take-patch
|
++ take-patch
|
||||||
|= res=(each bead (list tank))
|
|= res=(each bead (list tank))
|
||||||
^+ +>
|
^+ +>
|
||||||
|
~& [%taking-patch syd]
|
||||||
?: ?=(%| -.res)
|
?: ?=(%| -.res)
|
||||||
%_ +>.$
|
%_ +>.$
|
||||||
|
dok ~
|
||||||
yel
|
yel
|
||||||
[[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel]
|
[[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel]
|
||||||
==
|
==
|
||||||
%_ +>.$
|
=^ hat +>.$
|
||||||
ank.dom
|
(edit:ze now %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok))
|
||||||
|
?~ dok ~& %no-dok +>.$
|
||||||
|
?^ lon.u.dok ~& %not-done-diffing !!
|
||||||
|
=>
|
||||||
|
%= .
|
||||||
|
+>.$
|
||||||
|
?< ?=(~ hat)
|
||||||
|
%^ echo:(checkout-ankh u.hat)
|
||||||
|
now
|
||||||
|
mim.u.dok
|
||||||
|
[%& *cart sot.u.dok]
|
||||||
|
==
|
||||||
|
?~ dok ~& %no-dok +>.$
|
||||||
|
?^ lon.u.dok ~& %not-done-diffing !!
|
||||||
=+ cay=q.p.res
|
=+ cay=q.p.res
|
||||||
?@ p.cay ~| %patch-bad-marc !!
|
?@ p.cay ~| %patch-bad-marc !!
|
||||||
%- checkout-ankh:ze
|
=+ ^= can
|
||||||
%- mo
|
|
||||||
|- ^- (list ,[path cage])
|
|- ^- (list ,[path cage])
|
||||||
?~ p.p.cay
|
?~ p.p.cay
|
||||||
~
|
~
|
||||||
@ -543,6 +524,40 @@
|
|||||||
!!
|
!!
|
||||||
:- ((hard path) -.q.coy)
|
:- ((hard path) -.q.coy)
|
||||||
[q.i.p.p.cay (slot 3 coy)]
|
[q.i.p.p.cay (slot 3 coy)]
|
||||||
|
=. ank.dom (checkout-ankh:ze (mo can))
|
||||||
|
?~ hez +>.$(dok ~)
|
||||||
|
=+ ^= ceq
|
||||||
|
|= a=miso
|
||||||
|
?| ?=(%del -.a)
|
||||||
|
&(?=(%ins -.a) ?=(%mime -.+.a))
|
||||||
|
&(?=(%mut -.a) ?=(%mime -.+>.a))
|
||||||
|
==
|
||||||
|
=. wok
|
||||||
|
:+ ~
|
||||||
|
%+ murn sot.u.dok
|
||||||
|
|= [a=path b=miso]
|
||||||
|
?: ?=(%del -.b) (some a ~)
|
||||||
|
(bind (~(get by mim.u.dok) a) |=(c=mime [a (some c)]))
|
||||||
|
%+ murn sot.u.dok
|
||||||
|
|=([a=path b=miso] ?:((ceq b) ~ (some a)))
|
||||||
|
?> ?=(^ wok)
|
||||||
|
?~ lon.u.wok
|
||||||
|
apply-ergo(dok ~)
|
||||||
|
%_ +>.$
|
||||||
|
dok ~
|
||||||
|
tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]]))
|
||||||
|
%- welp :_ tag
|
||||||
|
^- (list ,[duct path note])
|
||||||
|
%+ murn sot.u.dok
|
||||||
|
|= [a=path b=miso]
|
||||||
|
?: (ceq b)
|
||||||
|
~
|
||||||
|
%- some
|
||||||
|
:+ u.hez
|
||||||
|
[%ergoing (scot %p who) syd a]
|
||||||
|
:* %f %exec who ~ %cast %mime %done ~
|
||||||
|
~|((crip <[%bad-echo syd let.dom a]>) (need (read:ze %x [%ud let.dom] a)))
|
||||||
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ take-ergo
|
++ take-ergo
|
||||||
@ -769,8 +784,8 @@
|
|||||||
(blab p.i.xiq p.q.i.xiq u.u.cas)
|
(blab p.i.xiq p.q.i.xiq u.u.cas)
|
||||||
==
|
==
|
||||||
=+ nao=(case-to-aeon:ze q.p.q.i.xiq)
|
=+ nao=(case-to-aeon:ze q.p.q.i.xiq)
|
||||||
?~ nao $(xiq t.xiq, xaq [i.xiq xaq])
|
?~ nao ~& [%not-waking syd] $(xiq t.xiq, xaq [i.xiq xaq])
|
||||||
$(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq))
|
~& [%waking syd] $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq))
|
||||||
::
|
::
|
||||||
|
|
|
|
||||||
=+ mot=`moot`p.q.i.xiq
|
=+ mot=`moot`p.q.i.xiq
|
||||||
@ -842,7 +857,8 @@
|
|||||||
|= [[pat=path gar=lobe] bat=(map path blob)]
|
|= [[pat=path gar=lobe] bat=(map path blob)]
|
||||||
?: (~(has in sar) pat) :: has update
|
?: (~(has in sar) pat) :: has update
|
||||||
bat
|
bat
|
||||||
(~(put by bat) pat (lobe-to-blob gar)) :: use original
|
%+ ~(put by bat) pat
|
||||||
|
~|((crip <pat gar (lent (~(tap by lat.ran)))>) (lobe-to-blob gar)) :: use original
|
||||||
^= bar ^- (map path blob)
|
^= bar ^- (map path blob)
|
||||||
%+ roll lar
|
%+ roll lar
|
||||||
|= [[pat=path mys=misu] bar=(map path blob)]
|
|= [[pat=path mys=misu] bar=(map path blob)]
|
||||||
@ -1012,7 +1028,10 @@
|
|||||||
++ make-nako :: gack a through b
|
++ make-nako :: gack a through b
|
||||||
|= [a=aeon b=aeon]
|
|= [a=aeon b=aeon]
|
||||||
^- [(map aeon tako) aeon (set yaki) (set blob)]
|
^- [(map aeon tako) aeon (set yaki) (set blob)]
|
||||||
!!
|
:^ hit.dom
|
||||||
|
let.dom
|
||||||
|
(sa `(list yaki)`(turn (~(tap by hut.ran)) |=([tako yaki] +<+)))
|
||||||
|
(sa `(list blob)`(turn (~(tap by lat.ran)) |=([lobe blob] +<+)))
|
||||||
::
|
::
|
||||||
++ query :: query:ze
|
++ query :: query:ze
|
||||||
|= ren=?(%u %v %x %y %z) :: endpoint query
|
|= ren=?(%u %v %x %y %z) :: endpoint query
|
||||||
@ -1068,7 +1087,8 @@
|
|||||||
|= [lag=(map path blob) sta=(map lobe blob)] :: fix lat
|
|= [lag=(map path blob) sta=(map lobe blob)] :: fix lat
|
||||||
^- [(map lobe blob) (map path lobe)]
|
^- [(map lobe blob) (map path lobe)]
|
||||||
%+ roll (~(tap by lag) ~)
|
%+ roll (~(tap by lag) ~)
|
||||||
|= [[pat=path bar=blob] [lut=_sta gar=(map path lobe)]]
|
=< .(lut sta)
|
||||||
|
|= [[pat=path bar=blob] [lut=(map lobe blob) gar=(map path lobe)]]
|
||||||
?~ (~(has by lut) p.bar)
|
?~ (~(has by lut) p.bar)
|
||||||
[lut (~(put by gar) pat p.bar)]
|
[lut (~(put by gar) pat p.bar)]
|
||||||
:- (~(put by lut) p.bar bar)
|
:- (~(put by lut) p.bar bar)
|
||||||
|
@ -113,11 +113,11 @@
|
|||||||
;~ pose
|
;~ pose
|
||||||
(stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col)))
|
(stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col)))
|
||||||
(stag %end ;~(pfix col sem ;~(pose (stag %& dem) (stag %| sym))))
|
(stag %end ;~(pfix col sem ;~(pose (stag %& dem) (stag %| sym))))
|
||||||
(stag %del ;~(pfix hep ace loca))
|
:: (stag %del ;~(pfix hep ace loca))
|
||||||
(stag %mut ;~(pfix col ace ;~(plug loca expg)))
|
:: (stag %mut ;~(pfix col ace ;~(plug loca expg)))
|
||||||
(stag %ins ;~(pfix lus ace ;~(plug loca (opts expg))))
|
:: (stag %ins ;~(pfix lus ace ;~(plug loca (opts expg))))
|
||||||
(stag %help ;~(pfix wut ace ;~(pfix col sym)))
|
(stag %help ;~(pfix wut ace ;~(pfix col sym)))
|
||||||
(stag %path (full ;~(sfix loca(pax paf) (star ace))))
|
:: (stag %path (full ;~(sfix loca(pax paf) (star ace))))
|
||||||
(stag %var ;~(plug ;~(pfix tis sym) expg))
|
(stag %var ;~(plug ;~(pfix tis sym) expg))
|
||||||
(stag %rvar ;~(pfix ;~(plug tis tis) sym))
|
(stag %rvar ;~(pfix ;~(plug tis tis) sym))
|
||||||
(stag %hoon expr)
|
(stag %hoon expr)
|
||||||
|
Loading…
Reference in New Issue
Block a user