gall: store date with each scry binding

This commit is contained in:
~wicrum-wicrun 2023-03-31 14:35:20 +02:00
parent 8553108c9e
commit 5d91b0bb0a

View File

@ -102,10 +102,10 @@
:: ::
+$ path-state +$ path-state
$: bob=(unit @ud) $: bob=(unit @ud)
fan=((mop @ud (each noun @uvI)) lte) fan=((mop @ud (pair @da (each noun @uvI))) lte)
== ==
:: ::
++ on-path ((on @ud (each noun @uvI)) lte) ++ on-path ((on @ud (pair @da (each noun @uvI))) lte)
:: $blocked-move: enqueued move to an agent :: $blocked-move: enqueued move to an agent
:: ::
+$ blocked-move [=duct =routes move=(each deal unto)] +$ blocked-move [=duct =routes move=(each deal unto)]
@ -984,11 +984,13 @@
=- ap-core(sky.yoke -) =- ap-core(sky.yoke -)
%+ ~(put by sky.yoke) spur %+ ~(put by sky.yoke) spur
?~ old=(~(get by sky.yoke) spur) :: insert binding at new path ?~ old=(~(get by sky.yoke) spur) :: insert binding at new path
`(put:on-path fan:*path-state 0 [%& noun]) `(put:on-path fan:*path-state 0 now^[%& noun])
=- u.old(fan (put:on-path fan.u.old - [%& noun])) =- u.old(fan (put:on-path fan.u.old - now^[%& noun]))
?~ lat=(clap bob.u.old (bind (ram:on-path fan.u.old) head) max) ?~ las=(ram:on-path fan.u.old)
0 ?~(bob.u.old 0 +(u.bob.u.old))
+(u.lat) ~| [%grow-many path=spur]
?< =(now p.val.u.las) ::TODO better to no-op?
?~(bob.u.old +(key.u.las) +((max key.u.las u.bob.u.old)))
:: +ap-tomb: tombstone -- replace bound value with hash :: +ap-tomb: tombstone -- replace bound value with hash
:: ::
++ ap-tomb ++ ap-tomb
@ -1006,7 +1008,7 @@
%. sky.yoke %. sky.yoke
%+ trace odd.veb.bug.state %+ trace odd.veb.bug.state
[leaf+"gall: {<agent-name>}: tomb {<[case spur]>} no val"]~ [leaf+"gall: {<agent-name>}: tomb {<[case spur]>} no val"]~
?- -.u.val ?- -.q.u.val
%| :: already tombstoned, no-op %| :: already tombstoned, no-op
%. sky.yoke %. sky.yoke
%+ trace odd.veb.bug.state %+ trace odd.veb.bug.state
@ -1014,7 +1016,7 @@
:: ::
%& :: replace with hash %& :: replace with hash
%+ ~(put by sky.yoke) spur %+ ~(put by sky.yoke) spur
u.old(fan (put:on-path fan.u.old yon [%| (shax (jam p.u.val))])) u.old(fan (put:on-path fan.u.old yon u.val(q |/(shax (jam p.q.u.val)))))
== ==
:: +ap-cull: delete all bindings up to and including .case :: +ap-cull: delete all bindings up to and including .case
:: ::
@ -2057,13 +2059,13 @@
?: ?=(%nuke -.u.yok) ~ ?: ?=(%nuke -.u.yok) ~
=/ ski (~(get by sky.u.yok) s.bem) =/ ski (~(get by sky.u.yok) s.bem)
?~ ski ~ ?~ ski ~
=/ res=(unit (each noun @uvI)) =/ res=(unit (pair @da (each noun @uvI)))
?+ -.r.bem ~ ?+ -.r.bem ~
%ud (get:on-path fan.u.ski p.r.bem) %ud (get:on-path fan.u.ski p.r.bem)
%da ?.(=(p.r.bem now) ~ (bind (ram:on-path fan.u.ski) tail)) %da ?.(=(p.r.bem now) ~ (bind (ram:on-path fan.u.ski) tail))
== ==
?. ?=([~ %& *] res) ~ ?. ?=([~ @ %& *] res) ~
``[%noun %noun p.u.res] ``[%noun %noun p.q.u.res]
:: ::
?. ?=(%.y -.shop) ?. ?=(%.y -.shop)
~ ~
@ -2087,14 +2089,14 @@
=/ yok (~(get by yokes.state) q.bem) =/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~ ?. ?=([~ %live *] yok) ~
?~ ski=(~(get by sky.u.yok) s.bem) ~ ?~ ski=(~(get by sky.u.yok) s.bem) ~
=/ res=(unit (each noun @uvI)) =/ res=(unit (pair @da (each noun @uvI)))
?+ -.r.bem ~ ?+ -.r.bem ~
%ud (get:on-path fan.u.ski p.r.bem) %ud (get:on-path fan.u.ski p.r.bem)
%da ?.(=(p.r.bem now) ~ (bind (ram:on-path fan.u.ski) tail)) %da ?.(=(p.r.bem now) ~ (bind (ram:on-path fan.u.ski) tail))
== ==
?+ res ~ ?+ res ~
[~ %| *] ``noun/!>(p.u.res) [~ @ %| *] ``noun/!>(p.q.u.res)
[~ %& *] ``noun/!>(`@uvI`(shax (jam p.u.res))) [~ @ %& *] ``noun/!>(`@uvI`(shax (jam p.q.u.res)))
== ==
:: ::
?: &(=(care %$) =(path /whey)) ?: &(=(care %$) =(path /whey))
@ -2189,8 +2191,8 @@
=/ yok (~(get by yokes.state) q.bem) =/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) [~ ~] ?. ?=([~ %live *] yok) [~ ~]
?~ ski=(~(get by sky.u.yok) s.bem) [~ ~] ?~ ski=(~(get by sky.u.yok) s.bem) [~ ~]
?~ lat=(ram:on-path fan.u.ski) [~ ~] ?~ las=(ram:on-path fan.u.ski) [~ ~]
``case/!>(ud/key.u.lat) ``case/!>(ud/key.u.las)
:: ::
?. =(our ship) ?. =(our ship)
~ ~