1
0
mirror of https://github.com/ilyakooo0/urbit.git synced 2024-12-21 13:51:50 +03:00

gall: only %x, %t and %z reserve [%$ *], for backwards compatibility

This commit is contained in:
~wicrum-wicrun 2023-04-05 20:51:04 +02:00
parent db2ac2fa65
commit 645f5e473a
4 changed files with 64 additions and 64 deletions

View File

@ -129,7 +129,7 @@
=/ =desk =/ =desk
::TODO maybe should recognize if the user specified a desk explicitly. ::TODO maybe should recognize if the user specified a desk explicitly.
:: currently eats the :app|desk#gen case. :: currently eats the :app|desk#gen case.
=+ gop=(en-beam dir(q q.gol, s /$)) =+ gop=(en-beam dir(q q.gol, s /))
?. .^(? %gu gop) ?. .^(? %gu gop)
q.dir q.dir
.^(desk %gd gop) .^(desk %gd gop)

View File

@ -6,5 +6,5 @@
^- (list [dude:gall @ud]) ^- (list [dude:gall @ud])
%+ sort %+ sort
%~ tap by %~ tap by
.^((map dude:gall @ud) %gf /(scot %p p.bec)//(scot %da now)/$) .^((map dude:gall @ud) %gf /(scot %p p.bec)//(scot %da now))
|=([[* a=@ud] [* b=@ud]] (lth a b)) |=([[* a=@ud] [* b=@ud]] (lth a b))

View File

@ -182,7 +182,7 @@
=< q =< q
%- need %- need %- need %- need
%- scry:(gall-gate now eny roof) %- scry:(gall-gate now eny roof)
[~ %n [[our dude da+now] $/[(scot %p ship.sub) [term wire]:sub]]] [~ %n [[our dude da+now] [(scot %p ship.sub) [term wire]:sub]]]
:: ::
++ load-agent ++ load-agent
|= [=ship =gall-gate =dude:gall =agent:gall] |= [=ship =gall-gate =dude:gall =agent:gall]

View File

@ -2057,67 +2057,6 @@
== ==
~ ~
:: ::
?. ?=([%$ *] path) :: [%$ *] is for the vane, all else is for the agent
?. ?& =(our ship)
=([%$ %da now] coin)
== ~
?. (~(has by yokes.state) dap) [~ ~]
?. ?=(^ path) ~
=/ =routes [~ ship]
(mo-peek:mo & dap routes care path)
::
=> .(path t.path)
?: ?=(%x care)
?. =(p.bem our) ~
?~ yok=(~(get by yokes.state) q.bem) ~
?: ?=(%nuke -.u.yok) ~
=/ ski (~(get by sky.u.yok) path)
?~ ski ~
=/ res=(unit (each page @uvI))
?+ -.r.bem ~
%ud (bind (get:on-path fan.u.ski p.r.bem) tail)
%da
%- head
%^ (dip:on-path (unit (each page @uvI)))
fan.u.ski
~
|= [res=(unit (each page @uvI)) @ud =@da val=(each page @uvI)]
^- [new=(unit [@da _val]) stop=? res=(unit _val)]
:- `[da val]
?:((lte da p.r.bem) |/`val &/res)
==
?. ?=([~ %& *] res) ~
``p.u.res(q !>(q.p.u.res))
::
?: ?& =(%t care)
=([%$ %da now] coin)
=(our ship)
==
=/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~
:^ ~ ~ %file-list !> ^- (list ^path)
%+ skim ~(tap in ~(key by sky.u.yok))
|= =spur
?& =(path (scag (lent path) spur))
!=(path spur)
==
::
?: ?& =(%z care)
=(our ship)
==
=/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~
?~ ski=(~(get by sky.u.yok) path) ~
=/ res=(unit (pair @da (each noun @uvI)))
?+ -.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))
==
?+ res ~
[~ @ %| *] ``noun/!>(p.q.u.res)
[~ @ %& *] ``noun/!>(`@uvI`(shax (jam p.q.u.res)))
==
::
?: &(=(care %$) =(path /whey)) ?: &(=(care %$) =(path /whey))
=/ blocked =/ blocked
=/ queued (~(run by blocked.state) |=((qeu blocked-move) [%.y +<])) =/ queued (~(run by blocked.state) |=((qeu blocked-move) [%.y +<]))
@ -2212,6 +2151,67 @@
?~ ski=(~(get by sky.u.yok) path) [~ ~] ?~ ski=(~(get by sky.u.yok) path) [~ ~]
?~ las=(ram:on-path fan.u.ski) [~ ~] ?~ las=(ram:on-path fan.u.ski) [~ ~]
``case/!>(ud/key.u.las) ``case/!>(ud/key.u.las)
::
?. ?=([%$ *] path) :: [%$ *] is for the vane, all else is for the agent
?. ?& =(our ship)
=([%$ %da now] coin)
== ~
?. (~(has by yokes.state) dap) [~ ~]
?. ?=(^ path) ~
=/ =routes [~ ship]
(mo-peek:mo & dap routes care path)
::
=> .(path t.path)
?: ?=(%x care)
?. =(p.bem our) ~
?~ yok=(~(get by yokes.state) q.bem) ~
?: ?=(%nuke -.u.yok) ~
=/ ski (~(get by sky.u.yok) path)
?~ ski ~
=/ res=(unit (each page @uvI))
?+ -.r.bem ~
%ud (bind (get:on-path fan.u.ski p.r.bem) tail)
%da
%- head
%^ (dip:on-path (unit (each page @uvI)))
fan.u.ski
~
|= [res=(unit (each page @uvI)) @ud =@da val=(each page @uvI)]
^- [new=(unit [@da _val]) stop=? res=(unit _val)]
:- `[da val]
?:((lte da p.r.bem) |/`val &/res)
==
?. ?=([~ %& *] res) ~
``p.u.res(q !>(q.p.u.res))
::
?: ?& =(%t care)
=([%$ %da now] coin)
=(our ship)
==
=/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~
:^ ~ ~ %file-list !> ^- (list ^path)
%+ skim ~(tap in ~(key by sky.u.yok))
|= =spur
?& =(path (scag (lent path) spur))
!=(path spur)
==
::
?: ?& =(%z care)
=(our ship)
==
=/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~
?~ ski=(~(get by sky.u.yok) path) ~
=/ res=(unit (pair @da (each noun @uvI)))
?+ -.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))
==
?+ res ~
[~ @ %| *] ``noun/!>(p.q.u.res)
[~ @ %& *] ``noun/!>(`@uvI`(shax (jam p.q.u.res)))
==
~ ~
:: +stay: save without cache; suspend non-%base agents :: +stay: save without cache; suspend non-%base agents
:: ::