shrub/arvo/clay.hoon

609 lines
22 KiB
Plaintext
Raw Normal View History

2014-06-08 06:45:00 +04:00
::
2013-09-29 00:21:18 +04:00
:: clay (4c), revision control
::
!:
2013-12-15 09:42:27 +04:00
|= pit=vase
2014-06-03 09:07:32 +04:00
=> |%
2014-06-11 18:06:36 +04:00
++ cult (map duct rave) :: subscriptions
++ dojo ,[p=cult q=dome] :: domestic desk state
2014-06-03 09:07:32 +04:00
++ gift :: out result <-$
2014-06-04 14:40:09 +04:00
$% [%ergo p=@p q=@tas r=@ud] :: version update
[%note p=@tD q=tank] :: debug message
[%writ p=riot] :: response
== ::
2014-06-03 09:07:32 +04:00
++ kiss :: in request ->$
2014-06-04 14:40:09 +04:00
$% [%info p=@p q=@tas r=nori] :: internal edit
[%ingo p=@p q=@tas r=nori] :: internal noun edit
[%init p=@p] :: report install
[%into p=@p q=@tas r=nori] :: external edit
[%invo p=@p q=@tas r=nori] :: external noun edit
2014-07-24 19:11:40 +04:00
[%merg p=@p q=@tas r=mizu] :: internal change
2014-06-04 14:40:09 +04:00
[%wake ~] :: timer activate
[%wart p=sock q=@tas r=path s=*] :: network request
[%warp p=sock q=riff] :: file request
== ::
2014-06-22 09:49:10 +04:00
++ move ,[p=duct q=(mold note gift)] :: local move
2014-07-22 22:56:04 +04:00
++ nako $: gar=(map ,@ud tako) :: new ids
2014-07-24 19:11:40 +04:00
let=@ud :: next id
2014-07-22 22:56:04 +04:00
lar=(set yaki) :: new commits
2014-07-24 19:11:40 +04:00
bar=(set blob) :: new content
2014-07-22 22:56:04 +04:00
== ::
2014-06-03 09:07:32 +04:00
++ note :: out request $->
2014-06-22 02:06:42 +04:00
$% $: %a :: to %ames
$% [%want p=sock q=path r=*] ::
== == ::
$: %c :: to %clay
$% [%warp p=sock q=riff] ::
== == ::
$: %d ::
2014-06-04 14:40:09 +04:00
$% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
2014-06-22 02:06:42 +04:00
== == == ::
2014-07-02 02:51:42 +04:00
++ sign :: in result $<-
2014-06-22 02:06:42 +04:00
$? $: %a :: by %ames
$% [%waft p=sock q=*] ::
2014-06-22 02:06:42 +04:00
[%went p=ship q=cape] ::
== == ::
$: %c :: by %clay
$% [%writ p=riot] ::
== == ::
$: @tas :: by any
$% [%crud p=@tas q=(list tank)] ::
== == == ::
2014-06-11 18:06:36 +04:00
++ raft :: filesystem
$: fat=(map ship room) :: domestic
hoy=(map ship rung) :: foreign
2014-07-22 22:56:04 +04:00
ran=rang :: hashes
2014-06-11 18:06:36 +04:00
== ::
++ rave :: general request
$% [& p=mood] :: single request
[| p=moat] :: change range
== ::
++ rede :: universal project
$: lim=@da :: complete to
qyx=cult :: subscribers
ref=(unit rind) :: outgoing requests
dom=dome :: revision state
== ::
++ riff ,[p=desk q=(unit rave)] :: request/desist
++ rind :: request manager
$: nix=@ud :: request index
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
fod=(map duct ,@ud) :: current requests
haw=(map mood (unit)) :: simple cache
== ::
++ room :: fs per ship
$: hun=duct :: terminal duct
2014-07-22 22:56:04 +04:00
hez=(unit duct) :: sync duch
2014-06-11 18:06:36 +04:00
dos=(map desk dojo) :: native desk
== ::
++ rung $: rus=(map desk rede) :: neighbor desks
== ::
2014-06-03 09:07:32 +04:00
-- =>
2013-09-29 00:21:18 +04:00
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4cA, filesystem logic ::
::
::
2014-05-30 06:12:02 +04:00
::
|%
++ de :: per desk
|= [now=@da hun=duct hez=(unit duct)]
2014-07-22 22:56:04 +04:00
|= [[who=@p for=@p] syd=@ta rede ran=rang]
=* red +<+>-
2014-06-04 14:40:09 +04:00
=| yel=(list ,[p=duct q=gift])
=| byn=(list ,[p=duct q=riot])
2014-06-04 14:40:09 +04:00
=| vag=(list ,[p=duct q=gift])
2014-05-24 00:46:43 +04:00
=| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]])
2013-09-29 00:21:18 +04:00
|%
++ abet
2014-05-30 06:12:02 +04:00
^- [(list move) rede]
:_ red
2013-09-29 00:21:18 +04:00
;: weld
%+ turn (flop yel)
2014-06-04 14:40:09 +04:00
|=([a=duct b=gift] [hun %give b])
2013-09-29 00:21:18 +04:00
::
%+ turn (flop byn)
2014-05-24 00:46:43 +04:00
|=([a=duct b=riot] [a %give [%writ b]])
2013-09-29 00:21:18 +04:00
::
%+ turn (flop vag)
2014-06-04 14:40:09 +04:00
|=([a=duct b=gift] [a %give b])
2013-09-29 00:21:18 +04:00
::
%+ turn (flop say)
2014-05-24 00:46:43 +04:00
|= [a=duct b=path c=ship d=[p=@ud q=riff]]
:- a
2014-06-24 21:32:59 +04:00
[%pass b %a %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
2013-09-29 00:21:18 +04:00
==
::
2014-05-30 06:12:02 +04:00
++ aver :: read
|= mun=mood
^- (unit (unit ,*))
=+ ezy=?~(ref ~ (~(get by haw.u.ref) mun))
?^ ezy ezy
2014-07-22 22:56:04 +04:00
=+ nao=(~(aeon ze lim dom ran) q.mun)
2014-05-30 06:12:02 +04:00
:: ~& [%aver-mun nao [%from syd lim q.mun]]
2014-07-22 22:56:04 +04:00
?~(nao ~ [~ (~(avid ze lim dom ran) u.nao mun)])
2013-09-29 00:21:18 +04:00
::
2014-05-30 06:12:02 +04:00
++ balk :: read and send
|= [hen=duct oan=@ud mun=mood]
^+ +>
2014-07-22 22:56:04 +04:00
=+ vid=(~(avid ze lim dom ran) oan mun)
2014-07-24 19:11:40 +04:00
?~ vid (blub hen) (blab hen mun u.vid)
2013-09-29 00:21:18 +04:00
::
2014-05-30 06:12:02 +04:00
++ blab :: ship result
|= [hen=duct mun=mood dat=*]
^+ +>
+>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn])
::
++ bleb :: ship sequence
2014-07-24 19:11:40 +04:00
|= [hen=duct ins=@ud hip=nako]
2014-05-30 06:12:02 +04:00
^+ +>
2014-07-24 19:11:40 +04:00
(blab hen [%w [%ud ins] ~] hip)
2014-05-30 06:12:02 +04:00
::
2014-07-24 19:11:40 +04:00
++ blub :: ship stop
2014-05-30 06:12:02 +04:00
|= hen=duct
%_(+> byn [[hen ~] byn])
::
++ doze :: sleep until
=+ xiq=(~(tap by qyx) ~)
^- (unit ,@da)
%+ roll xiq
|= [xaq=[p=duct q=rave] nex=(unit ,@da)]
%+ hunt nex
?- -.q.xaq
& ?.(?=(%da -.q.p.q.xaq) ~ [~ p.q.p.q.xaq])
2014-05-30 06:12:02 +04:00
::
|
=+ mot=`moat`p.q.xaq
%+ hunt
?. ?=(%da -.p.mot) ~
?.((lth now p.p.mot) ~ [~ p.p.mot])
?. ?=(%da -.q.mot) ~
?.((lth now p.q.mot) [~ now] [~ p.q.mot])
==
2014-05-30 06:12:02 +04:00
::
++ duce :: produce request
|= [hen=duct rav=rave]
^+ +>
=. qyx (~(put by qyx) hen rav)
?~ ref +>
|- ^+ +>+.$
=+ ^= vaw ^- rave
?. ?=([%& %v *] rav) rav
[%| [%ud let.dom] `case`q.p.rav]
=+ inx=nix.u.ref
%= +>+.$
say [[hen [(scot %ud inx) ~] for [inx syd ~ vaw]] say]
nix.u.ref +(nix.u.ref)
bom.u.ref (~(put by bom.u.ref) inx [hen vaw])
fod.u.ref (~(put by fod.u.ref) hen inx)
2013-10-08 05:58:06 +04:00
==
2013-10-08 04:40:45 +04:00
::
2014-05-30 06:12:02 +04:00
++ ease :: release request
|= hen=duct
^+ +>
=. qyx (~(del by qyx) hen)
?~ ref +>
|- ^+ +>+.$
=+ nux=(~(get by fod.u.ref) hen)
?~ nux +>+.$
%= +>+.$
say [[hen [(scot %ud u.nux) ~] for [u.nux syd ~]] say]
fod.u.ref (~(del by fod.u.ref) hen)
bom.u.ref (~(del by bom.u.ref) u.nux)
2013-10-08 04:40:45 +04:00
==
::
2014-05-30 06:12:02 +04:00
++ eave :: subscribe
|= [hen=duct rav=rave]
^+ +>
?- -.rav
&
=+ ver=(aver p.rav)
?~ ver
(duce hen rav)
?~ u.ver
2014-07-24 19:11:40 +04:00
(blub hen)
2014-05-30 06:12:02 +04:00
(blab hen p.rav u.u.ver)
2013-09-29 00:21:18 +04:00
::
2014-05-30 06:12:02 +04:00
|
2014-07-22 22:56:04 +04:00
=+ nab=(~(aeon ze lim dom ran) p.p.rav)
2014-05-30 06:12:02 +04:00
?~ nab
2014-07-22 22:56:04 +04:00
?> =(~ (~(aeon ze lim dom ran) q.p.rav))
2014-05-30 06:12:02 +04:00
(duce hen rav)
2014-07-22 22:56:04 +04:00
=+ huy=(~(aeon ze lim dom ran) q.p.rav)
2014-05-30 06:12:02 +04:00
?: &(?=(^ huy) |((lth u.huy u.nab) &(=(0 u.huy) =(0 u.nab))))
2014-07-24 19:11:40 +04:00
(blub hen)
2014-05-30 06:12:02 +04:00
=+ top=?~(huy let.dom u.huy)
2014-07-24 19:11:40 +04:00
=+ fud=(~(gack ze lim dom ran) u.nab let.dom)
2014-05-30 06:12:02 +04:00
=. +>.$ (bleb hen u.nab fud)
?^ huy
2014-07-24 19:11:40 +04:00
(blub hen)
2014-05-30 06:12:02 +04:00
=+ ^= ptr ^- case
2014-07-24 19:11:40 +04:00
[%ud +(let.dom)]
2014-05-30 06:12:02 +04:00
(duce hen `rave`[%| ptr q.p.rav])
==
::
++ echo :: announce changes
|= [hen=duct wen=@da lem=nori]
^+ +>
%= +>
vag ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]]))
yel
=+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)]
?- -.lem
| :_ yel
[hen %note '=' %leaf :(weld (trip p.lem) " " (spud pre))]
& |- ^+ yel
?~ q.q.lem yel
:_ $(q.q.lem t.q.q.lem)
:- hen
:+ %note
?-(-.q.i.q.q.lem %del '-', %ins '+', %mut ':')
2014-05-30 06:12:02 +04:00
[%leaf (spud (weld pre p.i.q.q.lem))]
2013-09-29 00:21:18 +04:00
==
2014-05-30 06:12:02 +04:00
==
::
++ edit :: apply changes
|= [wen=@da lem=nori]
^+ +>
2014-07-22 22:56:04 +04:00
=+ axe=(~(axel ze lim dom ran) wen lem)
=+ `[l=@da d=dome r=rang]`+<.axe
+>.$(dom d, ran r)
::
++ edis :: apply subscription
|= nak=nako
2014-07-24 19:11:40 +04:00
~& [%apply-nako let.nak]
~& [%apply-nako-ids gar.nak]
~& [%apply-nako-yaki lar.nak]
~& [%nako-old-hut hut.ran]
2014-07-22 22:56:04 +04:00
^+ +>
%= +>
hit.dom (~(uni by hit.dom) gar.nak)
2014-07-24 19:11:40 +04:00
let.dom let.nak
2014-07-22 22:56:04 +04:00
lat.ran %+ roll (~(tap in bar.nak) ~)
2014-07-24 19:11:40 +04:00
=< .(yeb lat.ran)
|= [sar=blob yeb=(map lobe blob)]
2014-07-22 22:56:04 +04:00
=+ zax=(zaax sar)
%+ ~(put by yeb) zax sar
hut.ran %+ roll (~(tap in lar.nak) ~)
2014-07-24 19:11:40 +04:00
=< .(yeb hut.ran)
|= [sar=yaki yeb=(map tako yaki)]
2014-07-22 22:56:04 +04:00
%+ ~(put by yeb) r.sar sar
==
2014-05-30 06:12:02 +04:00
::
++ exec :: change and update
|= [hen=duct wen=@da lem=nori]
^+ +>
(echo:wake:(edit wen lem) hen wen lem)
::
2014-07-24 19:11:40 +04:00
++ 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
::
2014-05-30 06:12:02 +04:00
++ knit :: external change
|= [inx=@ud rot=riot]
^+ +>
?> ?=(^ ref)
|- ^+ +>+.$
=+ ruv=(~(get by bom.u.ref) inx)
?~ ruv +>+.$
=> ?. |(?=(~ rot) ?=(& -.q.u.ruv)) .
%_ .
bom.u.ref (~(del by bom.u.ref) inx)
fod.u.ref (~(del by fod.u.ref) p.u.ruv)
2013-09-29 00:21:18 +04:00
==
2014-05-30 06:12:02 +04:00
?~ rot
=+ rav=`rave`q.u.ruv
%= +>+.$
lim
?.(&(?=(| -.rav) ?=(%da -.q.p.rav)) lim `@da`p.q.p.rav)
::
haw.u.ref
?. ?=(& -.rav) haw.u.ref
(~(put by haw.u.ref) p.rav ~)
2013-09-29 00:21:18 +04:00
==
2014-05-30 06:12:02 +04:00
?< ?=(%v p.p.u.rot)
=. haw.u.ref
(~(put by haw.u.ref) [p.p.u.rot q.p.u.rot q.u.rot] ~ r.u.rot)
?. ?=(%w p.p.u.rot) +>+.$
|- ^+ +>+.^$
=+ nez=[%w [%ud let.dom] ~]
=+ nex=(~(get by haw.u.ref) nez)
?~ nex +>+.^$
?~ u.nex +>+.^$ :: should never happen
2014-07-24 19:11:40 +04:00
=. +>+.^$ =+ roo=(edis ((hard nako) u.u.nex))
?>(?=(^ ref.roo) roo)
~& [%nako-new-hut hut.ran]
2014-05-30 06:12:02 +04:00
%= $
haw.u.ref (~(del by haw.u.ref) nez)
==
::
++ wake :: update subscribers
^+ .
=+ xiq=(~(tap by qyx) ~)
=| xaq=(list ,[p=duct q=rave])
|- ^+ ..wake
?~ xiq
..wake(qyx (~(gas by *cult) xaq))
?- -.q.i.xiq
&
=+ cas=?~(ref ~ (~(get by haw.u.ref) `mood`p.q.i.xiq))
?^ cas
%= $
2014-07-24 19:11:40 +04:00
xiq t.xiq
..wake ?~ u.cas (blub p.i.xiq)
2014-05-30 06:12:02 +04:00
(blab p.i.xiq p.q.i.xiq u.u.cas)
==
2014-07-22 22:56:04 +04:00
=+ nao=(~(aeon ze lim dom ran) q.p.q.i.xiq)
2014-05-30 06:12:02 +04:00
?~ nao $(xiq t.xiq, xaq [i.xiq xaq])
$(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq))
2013-09-29 00:21:18 +04:00
::
2014-05-30 06:12:02 +04:00
|
=+ mot=`moat`p.q.i.xiq
2014-07-22 22:56:04 +04:00
=+ nab=(~(aeon ze lim dom ran) p.mot)
2014-05-30 06:12:02 +04:00
?~ nab
$(xiq t.xiq, xaq [i.xiq xaq])
2014-07-22 22:56:04 +04:00
=+ huy=(~(aeon ze lim dom ran) q.mot)
2014-05-30 06:12:02 +04:00
?~ huy
?: =(let.dom u.nab)
2013-09-29 00:21:18 +04:00
$(xiq t.xiq, xaq [i.xiq xaq])
2014-05-30 06:12:02 +04:00
?> ?=(^ hit.dom)
2014-07-24 19:11:40 +04:00
=+ ptr=[%ud +(let.dom)]
2014-07-22 22:56:04 +04:00
::=+ fud=(flop (scag (sub let.dom u.nab) `(list frog)`hit.dom))
2014-07-24 19:11:40 +04:00
=+ fud=`nako`(~(gack ze lim dom ran) u.nab let.dom)
2013-09-29 00:21:18 +04:00
%= $
xiq t.xiq
2014-05-30 06:12:02 +04:00
xaq [[p.i.xiq [%| ptr q.mot]] xaq]
..wake (bleb p.i.xiq let.dom fud)
2013-09-29 00:21:18 +04:00
==
2014-07-22 22:56:04 +04:00
::=+ fud=(flop (scag (sub u.huy u.nab) yad))
2014-07-24 19:11:40 +04:00
=+ fud=(~(gack ze lim dom ran) u.nab u.huy)
2014-05-30 06:12:02 +04:00
%= $
xiq t.xiq
2014-07-24 19:11:40 +04:00
..wake (blub:(bleb p.i.xiq +(u.nab) fud) p.i.xiq)
2013-09-29 00:21:18 +04:00
==
2014-05-30 06:12:02 +04:00
==
--
2014-05-30 06:26:35 +04:00
::
++ do
|= [now=@da [who=ship him=ship] syd=@tas ruf=raft]
=+ ^= rug ^- rung
=+ rug=(~(get by hoy.ruf) him)
?^(rug u.rug *rung)
=+ ^= red ^- rede
=+ yit=(~(get by rus.rug) syd)
?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome])
2014-07-24 19:11:40 +04:00
((de now ~ ~) [who him] syd red ran.ruf)
2014-05-30 06:26:35 +04:00
::
++ posh
|= [him=ship syd=desk red=rede ruf=raft]
^- raft
=+ ^= rug ^- rung
=+ rug=(~(get by hoy.ruf) him)
?^(rug u.rug *rung)
ruf(hoy (~(put by hoy.ruf) him rug(rus (~(put by rus.rug) syd red))))
::
2014-05-30 06:12:02 +04:00
++ un :: domestic ship
|= [who=@p now=@da ruf=raft]
=+ ^= yar ^- room
=+ yar=(~(get by fat.ruf) who)
?~(yar *room u.yar)
|%
++ abet ruf(fat (~(put by fat.ruf) who yar))
++ doze
^- (unit ,@da)
%+ roll (~(tap by dos.yar) ~)
|= [[saz=@tas *] nex=(unit ,@da)]
%+ hunt nex
doze:(di saz)
2014-05-30 06:12:02 +04:00
::
++ pish
2014-07-24 19:11:40 +04:00
|= [syd=@ta red=rede run=rang]
%_(+> dos.yar (~(put by dos.yar) syd [qyx.red dom.red]), ran.ruf run)
2014-05-30 06:12:02 +04:00
::
++ wake
=+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a))
=| moz=(list move)
=< [moz ..wake]
|- ^+ +
?~ saz +
=+ sog=abet:wake:(di i.saz)
2014-07-24 19:11:40 +04:00
$(saz t.saz, moz (weld moz -.sog), ..wake (pish i.saz +.sog ran.ruf))
2013-09-29 00:21:18 +04:00
::
++ di
2013-12-15 09:42:27 +04:00
|= syd=@ta
2014-05-02 03:33:15 +04:00
=+ ^= saq ^- dojo
2013-09-29 00:21:18 +04:00
=+ saq=(~(get by dos.yar) syd)
2014-05-02 03:33:15 +04:00
?~(saq *dojo u.saq)
2014-07-24 19:11:40 +04:00
((de now hun.yar hez.yar) [who who] syd [now p.saq ~ q.saq] ran.ruf)
2013-09-29 00:21:18 +04:00
--
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4cA, filesystem vane ::
:: ::
=| :: instrument state
2014-05-31 02:10:39 +04:00
$: %0 :: vane version
ruf=raft :: revision tree
2013-09-29 00:21:18 +04:00
== ::
2014-05-31 23:40:02 +04:00
|= [now=@da eny=@ ski=sled] :: activate
2013-09-29 00:21:18 +04:00
^? :: opaque core
|% ::
2014-06-04 14:40:09 +04:00
++ call :: handle request
|= $: hen=duct
2014-06-04 21:56:30 +04:00
hic=(hypo (hobo kiss))
2014-06-04 14:40:09 +04:00
==
2014-06-06 03:00:19 +04:00
=> %= . :: XX temporary
q.hic
^- kiss
?: ?=(%soft -.q.hic)
((hard kiss) p.q.hic)
?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
~& [%clay-call-flub (,@tas `*`-.q.hic)]
((hard kiss) q.hic)
==
2014-05-31 03:51:35 +04:00
^- [p=(list move) q=_..^$]
2014-06-04 14:40:09 +04:00
?- -.q.hic
2013-09-29 00:21:18 +04:00
%init
2014-06-04 14:40:09 +04:00
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))]
2013-09-29 00:21:18 +04:00
::
2014-07-24 19:11:40 +04:00
%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)
2014-06-04 14:40:09 +04:00
?: =(%$ q.q.hic)
?. ?=(%into -.q.hic) [~ ..^$]
=+ yar=(need (~(get by fat.ruf) p.q.hic))
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
=^ mos ruf
2014-06-04 14:40:09 +04:00
=+ une=(un p.q.hic now ruf)
2014-07-24 19:11:40 +04:00
=+ ^= zat
(exec:(di:wake:une q.q.hic) hen now r.q.hic)
=+ zot=abet.zat
2014-05-30 06:12:02 +04:00
:- -.zot
2014-07-24 19:11:40 +04:00
=. une (pish:une q.q.hic +.zot ran.zat)
2014-06-04 14:40:09 +04:00
abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
2013-09-29 00:21:18 +04:00
[mos ..^$]
::
?(%ingo %invo) :: not yet used
2014-06-04 14:40:09 +04:00
?: =(%$ q.q.hic)
?. ?=(%invo -.q.hic) [~ ..^$]
=+ yar=(need (~(get by fat.ruf) p.q.hic))
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
=^ mos ruf
2014-06-04 14:40:09 +04:00
=+ une=(un p.q.hic now ruf)
2014-07-24 19:11:40 +04:00
=+ ^= zat
(exec:(di:wake:une q.q.hic) hen now r.q.hic)
=+ zot=abet:zat
:- -.zot
2014-07-24 19:11:40 +04:00
=. une (pish:une q.q.hic +.zot ran.zat)
2014-06-04 14:40:09 +04:00
abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen]))
2013-09-29 00:21:18 +04:00
[mos ..^$]
::
%warp
=^ mos ruf
2014-06-04 14:40:09 +04:00
?: =(p.p.q.hic q.p.q.hic)
=+ une=(un p.p.q.hic now ruf)
=+ wex=(di:une p.q.q.hic)
2014-07-24 19:11:40 +04:00
=+ ^= wao
2014-06-04 14:40:09 +04:00
?~ q.q.q.hic
2014-07-24 19:11:40 +04:00
(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)]
2014-06-04 14:40:09 +04:00
=+ wex=(do now p.q.hic p.q.q.hic ruf)
2014-05-30 06:12:02 +04:00
=+ ^= woo
2014-06-04 14:40:09 +04:00
?~ q.q.q.hic
2014-05-30 06:12:02 +04:00
abet:(ease:wex hen)
2014-06-04 14:40:09 +04:00
abet:(eave:wex hen u.q.q.q.hic)
[-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)]
2013-09-29 00:21:18 +04:00
[mos ..^$]
::
%wart
2014-06-04 14:40:09 +04:00
?> ?=(%re q.q.hic)
=+ ryf=((hard riff) s.q.hic)
:_ ..^$
2014-05-24 00:46:43 +04:00
:~ :- hen
2014-06-24 21:32:59 +04:00
:^ %pass [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic]
2014-06-21 22:42:34 +04:00
%c
2014-06-04 14:40:09 +04:00
[%warp [p.p.q.hic p.p.q.hic] ryf]
==
2013-09-29 00:21:18 +04:00
::
%wake
2013-12-15 09:42:27 +04:00
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
2013-09-29 00:21:18 +04:00
=| mos=(list move)
2014-05-31 03:51:35 +04:00
|- ^- [p=(list move) q=_..^^$]
2014-05-29 23:01:50 +04:00
?~ dal [mos ..^^$]
2014-05-30 06:12:02 +04:00
=+ une=(un i.dal now ruf)
=^ som une wake:une
$(dal t.dal, ruf abet:une, mos (weld som mos))
2013-09-29 00:21:18 +04:00
==
::
++ doze
2013-12-15 09:42:27 +04:00
|= [now=@da hen=duct]
^- (unit ,@da)
%+ roll (~(tap by fat.ruf) ~)
|= [[dal=@p *] nex=(unit ,@da)]
%+ hunt nex
doze:(un dal now ruf)
2013-09-29 00:21:18 +04:00
::
++ load
2014-05-31 23:40:02 +04:00
|= old=[%0 ruf=raft]
2014-05-31 03:51:35 +04:00
^+ ..^$
2014-05-31 23:40:02 +04:00
..^$(ruf ruf.old)
2013-09-29 00:21:18 +04:00
::
++ scry :: inspect
2014-05-27 00:43:40 +04:00
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
2014-07-24 19:11:40 +04:00
~& [%scry [his syd] tyl]
^- (unit (unit (pair mark ,*)))
2014-05-30 06:26:35 +04:00
=+ got=(~(has by fat.ruf) his)
2013-09-29 00:21:18 +04:00
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))
2014-05-02 03:33:15 +04:00
?~ luk [~ ~]
2014-05-30 06:26:35 +04:00
=+ une=(un his now ruf)
2013-10-08 04:40:45 +04:00
?: =(%$ ren)
2014-05-30 06:12:02 +04:00
[~ ~]
2013-10-08 04:40:45 +04:00
=+ run=((soft care) ren)
2014-05-02 03:33:15 +04:00
?~ run [~ ~]
2014-06-01 00:22:49 +04:00
%+ bind
%. [u.run u.luk tyl]
aver:?.(got (do now [his his] syd ruf) (di:une syd))
|=(a=(unit) (bind a |=(b=* [%noun b])))
2013-09-29 00:21:18 +04:00
::
2014-05-31 23:40:02 +04:00
++ stay [%0 ruf]
2014-06-04 14:40:09 +04:00
++ take :: accept response
2014-06-22 09:49:10 +04:00
|= [tea=wire hen=duct hin=(hypo sign)]
2014-06-04 14:40:09 +04:00
^- [p=(list move) q=_..^$]
2014-06-22 02:06:42 +04:00
?- -.+.q.hin
2014-06-04 14:40:09 +04:00
%crud
2014-06-22 02:06:42 +04:00
[[[hen %slip %d %flog +.q.hin] ~] ..^$]
2014-06-04 14:40:09 +04:00
::
%waft
?> ?=([@ @ ~] tea)
=+ syd=(need (slaw %tas i.tea))
=+ inx=(need (slaw %ud i.t.tea))
2014-07-24 19:11:40 +04:00
=+ ^= zat
=< wake
(knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
2014-06-04 14:40:09 +04:00
=^ mos ruf
2014-07-24 19:11:40 +04:00
=+ zot=abet.zat
2014-06-22 02:06:42 +04:00
[-.zot (posh q.p.+.q.hin syd +.zot ruf)]
2014-07-22 22:56:04 +04:00
[mos ..^$(ran.ruf ran.zat)] :: merge in new obj
2014-06-04 14:40:09 +04:00
::
%writ
?> ?=([@ @ *] tea)
=+ our=(need (slaw %p i.tea))
=+ him=(need (slaw %p i.t.tea))
:_ ..^$
:~ :- hen
2014-06-24 21:32:59 +04:00
[%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]]
2014-06-04 14:40:09 +04:00
==
::
%went
2014-06-22 02:06:42 +04:00
?: =(%good q.+.q.hin) [~ ..^$]
~& [%clay-lost p.+.q.hin tea]
2014-06-04 14:40:09 +04:00
[~ ..^$]
==
2013-09-29 00:21:18 +04:00
--