mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 14:58:10 +03:00
Can boot subs now!
This commit is contained in:
parent
38122c5b5a
commit
fb24594e9e
@ -1,6 +1,7 @@
|
||||
::
|
||||
:: batz (4b), shell
|
||||
::
|
||||
!:
|
||||
|= pit=vase
|
||||
=> =~
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -58,6 +59,7 @@
|
||||
== == ::
|
||||
$: %c :: to %clay
|
||||
$% [%info p=@p q=@tas r=nori] ::
|
||||
[%merg p=@p q=@tas r=mizu] ::
|
||||
[%warp p=sock q=riff] ::
|
||||
== == ::
|
||||
$: %d :: to %dill
|
||||
@ -920,6 +922,7 @@
|
||||
?~ p.gud +>.^^$
|
||||
$(p.gud t.p.gud, +>.^^$ ^$(gud i.p.gud))
|
||||
%ok (gram ~ %pass ~ %c %info who p.gud q.gud)
|
||||
%og (gram ~ %pass ~ %c %merg who p.gud q.gud)
|
||||
%sc good:+>.^$(sac ?~(p.gud ?~(sac ~ +.sac) [u.p.gud sac]))
|
||||
%sp !!
|
||||
%sq =+ tea=(bist %ma r.gud)
|
||||
@ -1390,7 +1393,7 @@
|
||||
:- :- [hen [%give q.hic]]
|
||||
?: =(bos p.q.hic) ~
|
||||
:_ ~
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update %init")]]
|
||||
..^^$(dez (~(put by dez) hen [[p.q.hic (bard p.q.hic)] ~]))
|
||||
::
|
||||
?(%make %sith)
|
||||
@ -1462,7 +1465,7 @@
|
||||
:- :- [hen [%give p.q.hin]]
|
||||
?: =(bos p.p.q.hin) ~
|
||||
:_ ~
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update %init")]]
|
||||
..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] ~]))
|
||||
==
|
||||
?> ?=(^ u.dus)
|
||||
@ -1472,7 +1475,7 @@
|
||||
[[[%b ~] hen] [%sick %hail ~]]
|
||||
?: =(bos p.p.q.hin) ~
|
||||
:_ ~
|
||||
[[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
[[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update %init")]]
|
||||
==
|
||||
..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] u.dus]))
|
||||
=+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
|
||||
|
131
arvo/clay.hoon
131
arvo/clay.hoon
@ -17,14 +17,16 @@
|
||||
[%init p=@p] :: report install
|
||||
[%into p=@p q=@tas r=nori] :: external edit
|
||||
[%invo p=@p q=@tas r=nori] :: external noun edit
|
||||
[%merg p=@p q=@tas r=mizu] :: internal change
|
||||
[%wake ~] :: timer activate
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
[%warp p=sock q=riff] :: file request
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
++ nako $: gar=(map ,@ud tako) :: new ids
|
||||
bar=(set blob) :: new content
|
||||
let=@ud :: next id
|
||||
lar=(set yaki) :: new commits
|
||||
bar=(set blob) :: new content
|
||||
== ::
|
||||
++ note :: out request $->
|
||||
$% $: %a :: to %ames
|
||||
@ -124,7 +126,7 @@
|
||||
|= [hen=duct oan=@ud mun=mood]
|
||||
^+ +>
|
||||
=+ vid=(~(avid ze lim dom ran) oan mun)
|
||||
?~ vid (blob hen) (blab hen mun u.vid)
|
||||
?~ vid (blub hen) (blab hen mun u.vid)
|
||||
::
|
||||
++ blab :: ship result
|
||||
|= [hen=duct mun=mood dat=*]
|
||||
@ -132,16 +134,11 @@
|
||||
+>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn])
|
||||
::
|
||||
++ bleb :: ship sequence
|
||||
|= [hen=duct ins=@ud hip=(list frog)]
|
||||
|= [hen=duct ins=@ud hip=nako]
|
||||
^+ +>
|
||||
?~ hip +>
|
||||
%= $
|
||||
hip t.hip
|
||||
ins +(ins)
|
||||
+> (blab hen [%w [%ud ins] ~] i.hip)
|
||||
==
|
||||
(blab hen [%w [%ud ins] ~] hip)
|
||||
::
|
||||
++ blob :: ship stop
|
||||
++ blub :: ship stop
|
||||
|= hen=duct
|
||||
%_(+> byn [[hen ~] byn])
|
||||
::
|
||||
@ -203,7 +200,7 @@
|
||||
?~ ver
|
||||
(duce hen rav)
|
||||
?~ u.ver
|
||||
(blob hen)
|
||||
(blub hen)
|
||||
(blab hen p.rav u.u.ver)
|
||||
::
|
||||
|
|
||||
@ -213,14 +210,14 @@
|
||||
(duce hen rav)
|
||||
=+ huy=(~(aeon ze lim dom ran) q.p.rav)
|
||||
?: &(?=(^ huy) |((lth u.huy u.nab) &(=(0 u.huy) =(0 u.nab))))
|
||||
(blob hen)
|
||||
(blub hen)
|
||||
=+ top=?~(huy let.dom u.huy)
|
||||
=+ fud=(gack:(ze 0 dom ran) u.nab let)
|
||||
=+ fud=(~(gack ze lim dom ran) u.nab let.dom)
|
||||
=. +>.$ (bleb hen u.nab fud)
|
||||
?^ huy
|
||||
(blob hen)
|
||||
(blub hen)
|
||||
=+ ^= ptr ^- case
|
||||
[%ud +(let)]
|
||||
[%ud +(let.dom)]
|
||||
(duce hen `rave`[%| ptr q.p.rav])
|
||||
==
|
||||
::
|
||||
@ -253,17 +250,22 @@
|
||||
::
|
||||
++ edis :: apply subscription
|
||||
|= nak=nako
|
||||
~& [%apply-nako let.nak]
|
||||
~& [%apply-nako-ids gar.nak]
|
||||
~& [%apply-nako-yaki lar.nak]
|
||||
~& [%nako-old-hut hut.ran]
|
||||
^+ +>
|
||||
%= +>
|
||||
hit.dom (~(uni by hit.dom) gar.nak)
|
||||
let.dom let.nak
|
||||
lat.ran %+ roll (~(tap in bar.nak) ~)
|
||||
|= [sar=blob yeb=_lat.ran]
|
||||
~! yeb
|
||||
~! (zaax sar)
|
||||
=< .(yeb lat.ran)
|
||||
|= [sar=blob yeb=(map lobe blob)]
|
||||
=+ zax=(zaax sar)
|
||||
%+ ~(put by yeb) zax sar
|
||||
hut.ran %+ roll (~(tap in lar.nak) ~)
|
||||
|= [sar=yaki yeb=_hut.ran]
|
||||
=< .(yeb hut.ran)
|
||||
|= [sar=yaki yeb=(map tako yaki)]
|
||||
%+ ~(put by yeb) r.sar sar
|
||||
==
|
||||
::
|
||||
@ -272,6 +274,26 @@
|
||||
^+ +>
|
||||
(echo:wake:(edit wen lem) hen wen lem)
|
||||
::
|
||||
++ exem :: execute merge
|
||||
|= [hen=duct wen=@da mer=mizu] :: aka direct change
|
||||
~& [%apply-mizu-hit q.mer]
|
||||
~& [%apply-mizu-hut hut.r.mer]
|
||||
~& [%apply-mizu-let p.mer]
|
||||
=. +>.$ %= +>.$
|
||||
ran r.mer
|
||||
let.dom p.mer
|
||||
hit.dom q.mer
|
||||
==
|
||||
=+ ^= hed :: head commit
|
||||
=< q
|
||||
%- need
|
||||
%- ~(get by hut.ran)
|
||||
%- need
|
||||
%- ~(get by hit.dom)
|
||||
let.dom
|
||||
=. ank.dom (~(azel ze lim dom ran) hed) :: real checkout
|
||||
echo:wake :: notify or w/e
|
||||
::
|
||||
++ knit :: external change
|
||||
|= [inx=@ud rot=riot]
|
||||
^+ +>
|
||||
@ -303,10 +325,11 @@
|
||||
=+ nex=(~(get by haw.u.ref) nez)
|
||||
?~ nex +>+.^$
|
||||
?~ u.nex +>+.^$ :: should never happen
|
||||
=. +>+.^$ =+ roo=(edis ((hard nako) u.u.nex))
|
||||
?>(?=(^ ref.roo) roo)
|
||||
~& [%nako-new-hut hut.ran]
|
||||
%= $
|
||||
haw.u.ref (~(del by haw.u.ref) nez)
|
||||
+>+.^$ =+ roo=(edis ((hard nako) u.u.nex))
|
||||
?>(?=(^ ref.roo) roo)
|
||||
==
|
||||
::
|
||||
++ wake :: update subscribers
|
||||
@ -321,8 +344,8 @@
|
||||
=+ cas=?~(ref ~ (~(get by haw.u.ref) `mood`p.q.i.xiq))
|
||||
?^ cas
|
||||
%= $
|
||||
nako t.xiq
|
||||
..wake ?~ u.cas (blob p.i.xiq)
|
||||
xiq t.xiq
|
||||
..wake ?~ u.cas (blub p.i.xiq)
|
||||
(blab p.i.xiq p.q.i.xiq u.u.cas)
|
||||
==
|
||||
=+ nao=(~(aeon ze lim dom ran) q.p.q.i.xiq)
|
||||
@ -339,20 +362,19 @@
|
||||
?: =(let.dom u.nab)
|
||||
$(xiq t.xiq, xaq [i.xiq xaq])
|
||||
?> ?=(^ hit.dom)
|
||||
=+ ptr=[%da p.i.hit.dom]
|
||||
=+ ptr=[%ud +(let.dom)]
|
||||
::=+ fud=(flop (scag (sub let.dom u.nab) `(list frog)`hit.dom))
|
||||
=+ fud=(gack:(ze 0 dom ran) u.nab let.dom)
|
||||
=+ fud=`nako`(~(gack ze lim dom ran) u.nab let.dom)
|
||||
%= $
|
||||
xiq t.xiq
|
||||
xaq [[p.i.xiq [%| ptr q.mot]] xaq]
|
||||
..wake (bleb p.i.xiq let.dom fud)
|
||||
==
|
||||
=+ yad=(slag (sub let.dom u.huy) `(list frog)`hit.dom)
|
||||
::=+ fud=(flop (scag (sub u.huy u.nab) yad))
|
||||
=+ fud=(gack:(ze 0 dom ran) u.nab u.huy)
|
||||
=+ fud=(~(gack ze lim dom ran) u.nab u.huy)
|
||||
%= $
|
||||
xiq t.xiq
|
||||
..wake (blob:(bleb p.i.xiq +(u.nab) fud) p.i.xiq)
|
||||
..wake (blub:(bleb p.i.xiq +(u.nab) fud) p.i.xiq)
|
||||
==
|
||||
==
|
||||
--
|
||||
@ -365,7 +387,7 @@
|
||||
=+ ^= red ^- rede
|
||||
=+ yit=(~(get by rus.rug) syd)
|
||||
?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome])
|
||||
((de now ~ ~ ran.ruf) [who him] syd red)
|
||||
((de now ~ ~) [who him] syd red ran.ruf)
|
||||
::
|
||||
++ posh
|
||||
|= [him=ship syd=desk red=rede ruf=raft]
|
||||
@ -390,8 +412,8 @@
|
||||
doze:(di saz)
|
||||
::
|
||||
++ pish
|
||||
|= [syd=@ta red=rede]
|
||||
%_(+> dos.yar (~(put by dos.yar) syd [qyx.red dom.red]))
|
||||
|= [syd=@ta red=rede run=rang]
|
||||
%_(+> dos.yar (~(put by dos.yar) syd [qyx.red dom.red]), ran.ruf run)
|
||||
::
|
||||
++ wake
|
||||
=+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a))
|
||||
@ -400,14 +422,14 @@
|
||||
|- ^+ +
|
||||
?~ saz +
|
||||
=+ sog=abet:wake:(di i.saz)
|
||||
$(saz t.saz, moz (weld moz -.sog), ..wake (pish i.saz +.sog))
|
||||
$(saz t.saz, moz (weld moz -.sog), ..wake (pish i.saz +.sog ran.ruf))
|
||||
::
|
||||
++ di
|
||||
|= syd=@ta
|
||||
=+ ^= saq ^- dojo
|
||||
=+ saq=(~(get by dos.yar) syd)
|
||||
?~(saq *dojo u.saq)
|
||||
((de now hun.yar hez.yar ran.ruf) [who who] syd now p.saq ~ q.saq)
|
||||
((de now hun.yar hez.yar) [who who] syd [now p.saq ~ q.saq] ran.ruf)
|
||||
--
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -438,6 +460,17 @@
|
||||
%init
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))]
|
||||
::
|
||||
%merg :: direct state up
|
||||
=^ mos ruf
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ ^= zat
|
||||
(exem:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
=+ zot=abet.zat
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hic +.zot ran.zat)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
?(%info %into)
|
||||
?: =(%$ q.q.hic)
|
||||
?. ?=(%into -.q.hic) [~ ..^$]
|
||||
@ -445,9 +478,11 @@
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
|
||||
=^ mos ruf
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
=+ ^= zat
|
||||
(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
=+ zot=abet.zat
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
=. une (pish:une q.q.hic +.zot ran.zat)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
@ -458,9 +493,11 @@
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
|
||||
=^ mos ruf
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
=+ ^= zat
|
||||
(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
=+ zot=abet:zat
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
=. une (pish:une q.q.hic +.zot ran.zat)
|
||||
abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
@ -469,11 +506,13 @@
|
||||
?: =(p.p.q.hic q.p.q.hic)
|
||||
=+ une=(un p.p.q.hic now ruf)
|
||||
=+ wex=(di:une p.q.q.hic)
|
||||
=+ ^= woo
|
||||
=+ ^= wao
|
||||
?~ q.q.q.hic
|
||||
abet:(ease:wex hen)
|
||||
abet:(eave:wex hen u.q.q.q.hic)
|
||||
[-.woo abet:(pish:une p.q.q.hic +.woo)]
|
||||
(ease:wex hen)
|
||||
(eave:wex hen u.q.q.q.hic)
|
||||
=+ ^= woo
|
||||
abet:wao
|
||||
[-.woo abet:(pish:une p.q.q.hic +.woo ran.wao)]
|
||||
=+ wex=(do now p.q.hic p.q.q.hic ruf)
|
||||
=+ ^= woo
|
||||
?~ q.q.q.hic
|
||||
@ -517,6 +556,7 @@
|
||||
::
|
||||
++ scry :: inspect
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
~& [%scry [his syd] tyl]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
=+ got=(~(has by fat.ruf) his)
|
||||
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))
|
||||
@ -543,12 +583,11 @@
|
||||
?> ?=([@ @ ~] tea)
|
||||
=+ syd=(need (slaw %tas i.tea))
|
||||
=+ inx=(need (slaw %ud i.t.tea))
|
||||
=+ ^= zat
|
||||
=< wake
|
||||
(knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
|
||||
=^ mos ruf
|
||||
=+ ^= zat
|
||||
=< wake
|
||||
(knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
|
||||
=+ ^= zot
|
||||
abet.zat
|
||||
=+ zot=abet.zat
|
||||
[-.zot (posh q.p.+.q.hin syd +.zot ruf)]
|
||||
[mos ..^$(ran.ruf ran.zat)] :: merge in new obj
|
||||
::
|
||||
|
100
arvo/zuse.hoon
100
arvo/zuse.hoon
@ -1063,6 +1063,8 @@
|
||||
^- (unit ,@ud)
|
||||
?- -.lok
|
||||
%da
|
||||
~& [%let let]
|
||||
~& [%hit hit]
|
||||
?: (gth p.lok lim) ~
|
||||
|- ^- (unit ,@ud)
|
||||
?: =(0 let) [~ 0] :: avoid underflow
|
||||
@ -1105,40 +1107,46 @@
|
||||
^- (set lobe)
|
||||
=+ yak=(need (~(get by hut) tak))
|
||||
%+ roll (~(tap by q.yak) ~)
|
||||
|= [[path lob=lobe] bar=_bar]
|
||||
|= [[path lob=lobe] far=_bar]
|
||||
^- (set lobe)
|
||||
?~ (~(has in b) lob) :: don't need
|
||||
bar
|
||||
=+ gar=(need (~(get by lat) lob))
|
||||
?- -.gar
|
||||
%direct (~(put in bar) lob)
|
||||
%direct (~(put in far) lob)
|
||||
%delta (~(put in $(lob q.gar)) lob)
|
||||
%indirect (~(put in $(lob s.gar)) lob)
|
||||
==
|
||||
++ garf :: garg & repack
|
||||
|= [b=(set lobe) a=(set tako)]
|
||||
^- [(set tako) (set lobe)]
|
||||
[a (garg a b)]
|
||||
[a (garg b a)]
|
||||
::
|
||||
++ pack
|
||||
|= [a=tako b=tako] :: pack a through b
|
||||
|= [a=(unit tako) b=tako] :: pack a through b
|
||||
^- [(set tako) (set lobe)]
|
||||
?: =(a b) [~ ~]
|
||||
=+ sar=(zule r:(need (~(get by hut) a)))
|
||||
=+ yak=(need (~(get by hut) b))
|
||||
=+ ^= sar
|
||||
?~ a ~
|
||||
(zule r:(need (~(get by hut) u.a)))
|
||||
=+ yak=`yaki`(need (~(get by hut) b))
|
||||
%+ garf (garg ~ sar) :: get lobes
|
||||
|- ^- (set tako) :: walk onto sar
|
||||
?: (~(has in sar) r.yak)
|
||||
~
|
||||
=+ ber=`(set tako)`(~(put in `(set tako)`~) `tako`r.yak)
|
||||
%- ~(uni in ber)
|
||||
^- (set tako)
|
||||
%+ roll p.yak
|
||||
|= [yek=tako bar=(set tako)]
|
||||
?~ (~(has in bar) yek) :: save some time
|
||||
^- (set tako)
|
||||
?: (~(has in bar) yek) :: save some time
|
||||
bar
|
||||
%- ~(uni in bar)
|
||||
$(yak (need (~(get by hut) yek)))
|
||||
^$(yak (need (~(get by hut) yek)))
|
||||
::
|
||||
++ hack
|
||||
|= [a=(set tako) b=(set lobe)]
|
||||
~& [%hack a b]
|
||||
^- [(set yaki) (set blob)]
|
||||
:- %- sa %+ turn (~(tap by a) ~)
|
||||
|= tak=tako
|
||||
@ -1147,22 +1155,27 @@
|
||||
|= lob=lobe
|
||||
(need (~(get by lat) lob))
|
||||
::
|
||||
++ gack :: gack a through b
|
||||
++ gack !: :: gack a through b
|
||||
|= [a=@ud b=@ud]
|
||||
^- [(map ,@ud tako) (set yaki) (set blob)]
|
||||
:_ %- hack %+ pack %- need (~(get by hit) a)
|
||||
%- need (~(get by hit) b)
|
||||
^- [(map ,@ud tako) @ud (set yaki) (set blob)]
|
||||
~& [%gack a b]
|
||||
~& [%gack-hit hit]
|
||||
:_ :- b
|
||||
%- hack
|
||||
%+ pack
|
||||
(~(get by hit) a) :: if a not found, a=0
|
||||
%- need (~(get by hit) b)
|
||||
^- (map ,@ud tako)
|
||||
%- mo %+ skim (~(tap by hit) ~)
|
||||
|= [p=@ud *]
|
||||
&((gth a p) (lte p b))
|
||||
&((gth p a) (lte p b))
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
++ amor :: amor:ze
|
||||
|= ren=?(%s %v %x %y %z) :: endpoint query
|
||||
|= ren=?(%u %v %x %y %z) :: endpoint query
|
||||
^- (unit ,*)
|
||||
?- ren
|
||||
%s !! :: invalid
|
||||
%u [~ `rang`+<+>.amor]
|
||||
%v [~ `dome`+<+<.amor]
|
||||
%x ?~(q.ank ~ [~ q.u.q.ank])
|
||||
%y [~ ache]
|
||||
@ -1191,6 +1204,8 @@
|
||||
|= lar=(list ,[p=path q=miso]) :: store changes
|
||||
^- (map path blob)
|
||||
=+ ^= hat :: current state
|
||||
?: =(let 0) :: initial commit
|
||||
~ :: has nothing
|
||||
=< q
|
||||
%- need %- ~(get by hut)
|
||||
%- need %- ~(get by hit)
|
||||
@ -1238,10 +1253,13 @@
|
||||
==
|
||||
::
|
||||
++ azol :: azol:ze
|
||||
|= [wen=@da par=tako lem=soba] :: forge yaki
|
||||
|= [wen=@da par=(unit tako) lem=soba] :: forge yaki
|
||||
=+ ^= per
|
||||
?~ par ~
|
||||
~[u.par]
|
||||
^- [yaki (map lobe blob)] :: to create new commit
|
||||
=+ gar=(aqel (azal q.lem))
|
||||
:- %^ zoal ~[par] +.gar wen :: from existing diff
|
||||
:- %^ zoal per +.gar wen :: from existing diff
|
||||
-.gar :: fix lat
|
||||
::
|
||||
++ azul :: azul:ze
|
||||
@ -1252,8 +1270,11 @@
|
||||
::
|
||||
++ auld :: auld:ze
|
||||
|= [gem=germ who=ship des=desk sab=saba] :: construct merge
|
||||
^- (unit (unit nori)) ::::::
|
||||
^- (unit (unit mizu)) ::::::
|
||||
=+ for=s.sab :: foreign dome
|
||||
~& [%sab hit.s.sab]
|
||||
?- gem
|
||||
%init [~ [~ [let.for hit.for hut lat]]] :: trivial
|
||||
%fine !!
|
||||
%mate !!
|
||||
%that !!
|
||||
@ -1290,16 +1311,41 @@
|
||||
?^(r.mun ~ [~ oan])
|
||||
(auto:(argo oan) mun)
|
||||
::
|
||||
++ equi :: test paths
|
||||
|= [p=(map path lobe) q=(map path lobe)]
|
||||
^- ?
|
||||
%- |= qat=?
|
||||
?. qat %.n
|
||||
%+ roll (~(tap by q) ~)
|
||||
|= [[pat=path lob=lobe] eq=?]
|
||||
^- ?
|
||||
?. eq %.n
|
||||
(~(has by p) pat)
|
||||
%+ roll (~(tap by p) ~)
|
||||
|= [[pat=path lob=lobe] eq=?]
|
||||
^- ?
|
||||
?. eq %.n
|
||||
=+ zat=(~(get by q) pat)
|
||||
?~ zat %.n
|
||||
=((zaul u.zat) (zaul lob))
|
||||
::
|
||||
++ axel :: axel:ze
|
||||
|= [wen=@da lem=nori] :: edit
|
||||
^+ +>
|
||||
?- -.lem
|
||||
& =+ yet=(azol wen r:(need (~(get by hut) (need (~(get by hit) let)))) q.lem)
|
||||
& =+ ^= yet
|
||||
%+ azol wen
|
||||
?: =(let 0) :: initial import
|
||||
[~ q.lem]
|
||||
[(some r:(need (~(get by hut) (need (~(get by hit) let))))) q.lem]
|
||||
=+ yak=-.yet
|
||||
=. lat +.yet :: merge objects
|
||||
?. |(=(0 let) !=((lent p.yak) 1) !(equi q.yak q:(need (~(get by hut) (need (~(get by hit) let))))))
|
||||
+>.$ :: silently ignore
|
||||
~& [%commit +(let)]
|
||||
=: let +(let)
|
||||
hit (~(put by hit) let r.yak)
|
||||
hit (~(put by hit) +(let) r.yak)
|
||||
hut (~(put by hut) r.yak yak)
|
||||
lat +.yet :: azel should succeed
|
||||
==
|
||||
+>.$(ank (azel q.yak))
|
||||
| +>.$(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let)))
|
||||
@ -1311,7 +1357,7 @@
|
||||
+>(ank ank:(durn:(zu ank) nyp))
|
||||
--
|
||||
::
|
||||
++ zu :: filesystem
|
||||
++ zu !: :: filesystem
|
||||
|= ank=ankh :: filesystem state
|
||||
=| myz=(list ,[p=path q=miso]) :: changes in reverse
|
||||
=| ram=path :: reverse path into
|
||||
@ -2061,7 +2107,7 @@
|
||||
%dead :: rejected
|
||||
== ::
|
||||
++ cart ,[p=cash q=cash] :: hash change
|
||||
++ care ?(%s %v %w %x %y %z) :: clay submode
|
||||
++ care ?(%u %v %w %x %y %z) :: clay submode
|
||||
++ case :: ship desk case spur
|
||||
$% [%da p=@da] :: date
|
||||
[%tas p=@tas] :: label
|
||||
@ -2153,6 +2199,7 @@
|
||||
[%mu p=type q=(list)] :: batch emit
|
||||
[%mx p=(list gift)] :: batch gift
|
||||
[%ok p=@ta q=nori] :: save changes
|
||||
[%og p=@ta q=mizu] :: save direct
|
||||
[%sc p=(unit skit)] :: stack library
|
||||
[%sp p=(list lark)] :: spawn task(s)
|
||||
[%sq p=ship q=@tas r=path s=*] :: send request
|
||||
@ -2177,7 +2224,7 @@
|
||||
== == == ::
|
||||
++ gilt ,[@tas *] :: presumed gift
|
||||
++ gens ,[p=lang q=gcos] :: general identity
|
||||
++ germ ?(%fine %that %this %mate %conf) :: merge style
|
||||
++ germ ?(%init %fine %that %this %mate %conf) :: merge style
|
||||
++ gcos :: id description
|
||||
$% [%czar ~] :: 8-bit ship
|
||||
[%duke p=what] :: 32-bit ship
|
||||
@ -2309,6 +2356,7 @@
|
||||
[%ins p=*] :: insert
|
||||
[%mut p=udon] :: mutate
|
||||
== ::
|
||||
++ mizu ,[p=@u q=(map ,@ud tako) r=rang] :: new state
|
||||
++ moar ,[p=@ud q=@ud] :: normal change range
|
||||
++ moat ,[p=case q=case] :: change range
|
||||
++ mood ,[p=care q=case r=path] :: request in desk
|
||||
@ -2390,7 +2438,7 @@
|
||||
++ rock ,@uvO :: packet
|
||||
++ rout ,[p=(list host) q=path r=oryx s=path] :: http route (new)
|
||||
++ rump ,[p=care q=case r=@tas s=path] :: relative path
|
||||
++ saba ,[p=ship q=@tas r=moar s=(list nori) t=agon] :: patch/merge
|
||||
++ saba ,[p=ship q=@tas r=moar s=dome] :: patch/merge
|
||||
++ sack ,[p=ship q=ship] :: incoming [our his]
|
||||
++ sufi :: domestic host
|
||||
$: hoy=(list ship) :: hierarchy
|
||||
|
@ -25,7 +25,7 @@
|
||||
[%b %batz]
|
||||
[%c %clay]
|
||||
[%d %dill]
|
||||
[%e %eyre]
|
||||
:: [%e %eyre]
|
||||
[%g %gall]
|
||||
==
|
||||
|- ^+ all
|
||||
|
@ -8,17 +8,18 @@
|
||||
|%
|
||||
++ merge
|
||||
|= [gem=germ who=@p bos=@p est=time]
|
||||
|= [der=dome owr=dome des=desk]
|
||||
|= [der=dome owr=dome ran=rang des=desk]
|
||||
^- gift
|
||||
=+ sab=`saba`[bos des [0 let.der] (flop (turn hit.der |=(a=frog q.a))) ang.der]
|
||||
=+ lum=(~(auld ze est owr) gem who des sab)
|
||||
~& der
|
||||
=+ sab=`saba`[bos des [0 let.der] der]
|
||||
=+ lum=`(unit (unit mizu))`(~(auld ze est owr ran) gem who des sab)
|
||||
?~ lum
|
||||
^- gift
|
||||
:+ %la %leaf
|
||||
"{(trip des)} failed to apply, please rerun with a merge option"
|
||||
?~ u.lum
|
||||
`gift`[%la %leaf "{(trip des)} is up to date"]
|
||||
`gift`[%ok des u.u.lum]
|
||||
`gift`[%og des u.u.lum]
|
||||
--
|
||||
==
|
||||
|= [est=time eny=@uw]
|
||||
@ -26,12 +27,13 @@
|
||||
=+ wen=(scot %da (need (slaw %da +>-:/===))) :: heinous
|
||||
?: =(~zod who) [~ ~]
|
||||
=+ bos==+(bos=(sein who) ?:(=(bos who) ~zod bos))
|
||||
=+ syn=`(list ,@tas)`~[%main %arvo %try]
|
||||
=+ syn=`(list ,@tas)`~[%main %try %arvo]
|
||||
=+ ^= desks
|
||||
%+ turn syn
|
||||
|= des=desk
|
||||
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
|
||||
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
|
||||
[der owr des]
|
||||
|= des=desk
|
||||
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
|
||||
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
|
||||
=+ ran=((hard rang) .^(%cu /(scot %p bos)/[des]/[wen])) :: global store
|
||||
[der owr ran des]
|
||||
=+ gifts=`(list gift)`(turn desks (merge ?~(gem %fine -.gem) who bos est))
|
||||
`bowl`[[[%la %leaf "updating..."] gifts] ~]
|
||||
|
Loading…
Reference in New Issue
Block a user