urbit/arvo/clay.hoon

1175 lines
41 KiB
Plaintext
Raw Normal View History

2014-11-01 01:36:01 +03:00
!:
2013-09-29 00:21:18 +04:00
:: clay (4c), revision control
2014-10-28 04:50:07 +03:00
!:
2013-12-15 09:42:27 +04:00
|= pit=vase
2014-06-03 09:07:32 +04:00
=> |%
2015-01-10 01:11:43 +03:00
++ bead ,[p=(set beam) q=cage] :: ford result
++ cult (map duct rove) :: subscriptions
2015-01-28 03:57:24 +03:00
++ dojo :: domestic desk state
$: qyx=cult :: subscribers
dom=dome :: desk data
dok=(unit dork) :: outstanding diffs
pok=(unit pork) :: outstanding patches
wok=(unit work) :: outstanding ergos
== ::
2014-06-03 09:07:32 +04:00
++ gift :: out result <-$
2015-01-30 04:06:02 +03:00
$% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])]
:: version update
2014-06-04 14:40:09 +04:00
[%note p=@tD q=tank] :: debug message
[%writ p=riot] :: response
== ::
2015-01-30 04:06:02 +03:00
++ khan ::
$: fil=(unit cage) ::
dir=(map ,@ta khan) ::
== ::
2014-06-03 09:07:32 +04:00
++ kiss :: in request ->$
2014-10-28 22:59:26 +03:00
$% [%font p=@p q=@tas r=@p s=@tas] :: set upstream
[%info p=@p q=@tas r=nori] :: internal edit
2014-06-04 14:40:09 +04:00
[%ingo p=@p q=@tas r=nori] :: internal noun edit
[%init p=@p] :: report install
2015-01-22 04:47:49 +03:00
[%into p=@p q=@tas r=ankh] :: external edit
2014-06-04 14:40:09 +04:00
[%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-10-28 22:59:26 +03:00
[%plug p=@p q=@tas r=@p s=@tas] :: unset upstream
2014-06-04 14:40:09 +04:00
[%wart p=sock q=@tas r=path s=*] :: network request
[%warp p=sock q=riff] :: file request
== ::
2014-09-09 04:21:40 +04:00
++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range
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
2014-10-28 22:59:26 +03:00
$% [%font p=@p q=@tas r=@p s=@tas] ::
2015-01-22 04:47:49 +03:00
[%info p=@p q=@tas r=nori] :: internal edit
2014-10-28 22:59:26 +03:00
[%merg p=@p q=@tas r=mizu] ::
2014-10-28 04:50:07 +03:00
[%warp p=sock q=riff] ::
2014-06-22 02:06:42 +04:00
== == ::
$: %d ::
2014-06-04 14:40:09 +04:00
$% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
2015-01-10 01:11:43 +03:00
== == ::
$: %f ::
$% [%exec p=@p q=(unit silk)] ::
2014-10-17 00:42:45 +04:00
== == ::
$: %t ::
$% [%wait p=@da] ::
[%rest p=@da] ::
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] ::
2015-01-10 01:11:43 +03:00
== == ::
$: %f ::
$% [%made p=(each bead (list tank))] ::
2014-10-17 00:42:45 +04:00
== == ::
$: %t ::
$% [%wake ~] :: timer activate
2014-06-22 02:06:42 +04:00
== == ::
$: @tas :: by any
$% [%crud p=@tas q=(list tank)] ::
== == == ::
2015-01-10 01:11:43 +03:00
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
[%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate
[%diff p=silk q=silk] :: diff
[%done p=(set beam) q=cage] :: literal
[%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit cage)] :: unit literal
[%mute p=silk q=(list (pair wing silk))] :: mutant
[%pact p=silk q=silk] :: patch
[%reef ~] :: kernel reef
[%ride p=twig q=silk] :: silk thru twig
[%vale p=mark q=ship r=*] :: validate [our his]
== ::
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-10-28 22:59:26 +03:00
sor=(map ,[p=@p q=@tas r=@p s=@tas] duct) :: upstreams
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
2015-01-28 03:57:24 +03:00
dom=dome :: revision state
2015-01-14 01:56:48 +03:00
dok=(unit dork) :: outstanding diffs
pok=(unit pork) :: outstanding patches
2015-01-28 03:57:24 +03:00
wok=(unit work) :: outstanding ergos
2014-06-11 18:06:36 +04:00
== ::
++ 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
2015-01-15 03:01:59 +03:00
haw=(map mood (unit cage)) :: simple cache
2014-06-11 18:06:36 +04:00
== ::
++ room :: fs per ship
$: hun=duct :: terminal duct
2014-09-16 18:19:15 +04:00
hez=(unit duct) :: sync duct
2014-06-11 18:06:36 +04:00
dos=(map desk dojo) :: native desk
== ::
2014-09-09 04:21:40 +04:00
++ rove (each mood moot) :: stored request
2014-06-11 18:06:36 +04:00
++ rung $: rus=(map desk rede) :: neighbor desks
== ::
2015-01-14 01:56:48 +03:00
++ dork :: diff work
2015-01-10 01:11:43 +03:00
$: sot=(list ,[p=path q=misu]) ::
lon=(list path) ::
2015-01-29 04:28:10 +03:00
mim=(map path mime) ::
2015-01-10 01:11:43 +03:00
== ::
2015-01-14 01:56:48 +03:00
++ pork :: patch work
$: sot=(map path bulb) ::
lon=(list path) ::
== ::
2015-01-28 03:57:24 +03:00
++ work ::
2015-01-30 04:06:02 +03:00
$: sot=(list ,[p=path q=(unit mime)]) ::
2015-01-28 03:57:24 +03:00
lon=(list path) ::
== ::
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
::
|%
2014-10-17 00:42:45 +04:00
++ de :: per desk
2015-01-14 01:56:48 +03:00
|= [now=@da hen=duct 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])
2015-01-29 22:47:51 +03:00
=| reg=(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]])
2015-01-10 01:11:43 +03:00
=| tag=(list ,[p=duct q=path r=note])
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
::
2015-01-29 22:47:51 +03:00
%+ turn (flop reg)
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]
2014-10-17 00:42:45 +04:00
::
%+ turn (flop tag)
2014-10-22 06:59:05 +04:00
|=([a=duct b=path c=note] [a %pass b c])
2013-09-29 00:21:18 +04:00
==
::
2014-10-17 00:42:45 +04:00
++ aver :: read
2014-05-30 06:12:02 +04:00
|= mun=mood
2015-01-15 03:01:59 +03:00
^- (unit (unit cage))
2014-10-17 00:42:45 +04:00
?: &(=(p.mun %u) !=(p.q.mun now)) :: prevent bad things
2014-07-25 21:44:06 +04:00
~& [%clay-fail p.q.mun %now now]
!!
2014-05-30 06:12:02 +04:00
=+ ezy=?~(ref ~ (~(get by haw.u.ref) mun))
?^ ezy ezy
2014-09-09 04:21:40 +04:00
=+ nao=(~(case-to-aeon ze lim dom ran) q.mun)
2014-05-30 06:12:02 +04:00
:: ~& [%aver-mun nao [%from syd lim q.mun]]
2014-09-09 04:21:40 +04:00
?~(nao ~ [~ (~(read-at-aeon 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
2014-09-17 04:29:12 +04:00
|= [hen=duct yon=@ud mun=mood]
2014-05-30 06:12:02 +04:00
^+ +>
2014-09-17 04:29:12 +04:00
=+ vid=(~(read-at-aeon ze lim dom ran) yon 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-10-17 00:42:45 +04:00
++ bait
|= [hen=duct tym=@da]
%_(+> tag :_(tag [hen /tyme %t %wait tym]))
::
++ best
|= [hen=duct tym=@da]
%_(+> tag :_(tag [hen /tyme %t %rest tym]))
::
++ blab :: ship result
2015-01-15 03:01:59 +03:00
|= [hen=duct mun=mood dat=cage]
2014-05-30 06:12:02 +04:00
^+ +>
+>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn])
::
2014-10-17 00:42:45 +04:00
++ bleb :: ship sequence
2014-09-09 04:21:40 +04:00
|= [hen=duct ins=@ud hip=nako]
2014-05-30 06:12:02 +04:00
^+ +>
2015-01-15 03:01:59 +03:00
(blab hen [%w [%ud ins] ~] %nako !>(hip))
2014-05-30 06:12:02 +04:00
::
2014-10-17 00:42:45 +04:00
++ blub :: ship stop
2014-05-30 06:12:02 +04:00
|= hen=duct
%_(+> byn [[hen ~] byn])
::
2014-10-17 00:42:45 +04:00
++ duce :: produce request
2015-01-14 01:56:48 +03:00
|= rov=rove
2014-05-30 06:12:02 +04:00
^+ +>
=. qyx (~(put by qyx) hen rov)
2014-10-17 00:42:45 +04:00
?~ ref
(mabe rov (cury bait hen))
|- ^+ +>+.$ :: XX why?
=+ rav=(reve rov)
2014-05-30 06:12:02 +04:00
=+ ^= vaw ^- rave
?. ?=([%& %v *] rav) rav
[%| [%ud let.dom] `case`q.p.rav r.p.rav]
2014-05-30 06:12:02 +04:00
=+ 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-10-17 00:42:45 +04:00
++ ease :: release request
2015-01-14 01:56:48 +03:00
^+ .
2014-10-17 00:42:45 +04:00
?~ ref
=+ rov=(~(got by qyx) hen)
=. qyx (~(del by qyx) hen)
(mabe rov (cury best hen))
2014-05-30 06:12:02 +04:00
=. qyx (~(del by qyx) hen)
2015-01-14 01:56:48 +03:00
|- ^+ +.$
2014-05-30 06:12:02 +04:00
=+ nux=(~(get by fod.u.ref) hen)
2015-01-14 01:56:48 +03:00
?~ nux +.$
%= +.$
2014-05-30 06:12:02 +04:00
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-10-17 00:42:45 +04:00
++ eave :: subscribe
2015-01-14 01:56:48 +03:00
|= rav=rave
2014-05-30 06:12:02 +04:00
^+ +>
?- -.rav
&
2014-07-25 21:44:06 +04:00
?: &(=(p.p.rav %u) !=(p.q.p.rav now))
~& [%clay-fail p.q.p.rav %now now]
!!
2014-05-30 06:12:02 +04:00
=+ ver=(aver p.rav)
?~ ver
2015-01-14 01:56:48 +03:00
(duce rav)
2014-05-30 06:12:02 +04:00
?~ 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-09-09 04:21:40 +04:00
=+ nab=(~(case-to-aeon ze lim dom ran) p.p.rav)
2014-05-30 06:12:02 +04:00
?~ nab
2014-09-09 04:21:40 +04:00
?> =(~ (~(case-to-aeon ze lim dom ran) q.p.rav))
2015-01-14 01:56:48 +03:00
(duce (rive rav))
2014-09-09 04:21:40 +04:00
=+ huy=(~(case-to-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-09-09 04:21:40 +04:00
=+ sar=(~(lobes-at-path ze lim dom ran) u.nab r.p.rav)
=+ ear=(~(lobes-at-path ze lim dom ran) top r.p.rav)
=. +>.$
?: =(sar ear) +>.$
=+ fud=(~(make-nako ze lim dom ran) u.nab top)
2014-09-06 02:59:56 +04:00
(bleb hen u.nab fud)
2014-05-30 06:12:02 +04:00
?^ 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)]
2015-01-14 01:56:48 +03:00
(duce `rove`[%| ptr q.p.rav r.p.rav ear])
2014-05-30 06:12:02 +04:00
==
::
2014-10-17 00:42:45 +04:00
++ echa :: announce raw
2015-01-14 01:56:48 +03:00
|= [wen=@da mer=mizu]
2014-07-24 19:47:11 +04:00
^+ +>
%= +>
2015-01-29 22:47:51 +03:00
reg ~& %merge-announce reg
:: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]]))
2015-01-28 03:57:24 +03:00
:: yel [[hen %note '=' %leaf ~] yel] :: XX do better
2014-07-24 19:47:11 +04:00
==
::
2014-10-17 00:42:45 +04:00
++ echo :: announce changes
2015-01-29 04:28:10 +03:00
|= [wen=@da mim=(map path mime) lem=nori]
2014-05-30 06:12:02 +04:00
^+ +>
2015-01-28 03:57:24 +03:00
=. yel
2014-05-30 06:12:02 +04:00
=+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)]
?- -.lem
| :_ yel
[hen %note '=' %leaf :(weld (trip p.lem) " " (spud pre))]
& |- ^+ yel
2015-01-13 04:50:41 +03:00
?~ q.p.lem yel
:_ $(q.p.lem t.q.p.lem)
2014-05-30 06:12:02 +04:00
:- hen
:+ %note
2015-01-13 04:50:41 +03:00
?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';')
[%leaf (spud (weld pre p.i.q.p.lem))]
2013-09-29 00:21:18 +04:00
==
2015-01-28 03:57:24 +03:00
?~ hez +>.$
?. ?=(%& -.lem) +>.$
2015-01-29 04:28:10 +03:00
=+ ^= ceq
|= a=miso
2015-01-30 04:06:02 +03:00
?| ?=(%del -.a)
&(?=(%ins -.a) ?=(%mime -.+.a))
&(?=(%mut -.a) ?=(%mime -.+>.a))
==
2015-01-29 04:28:10 +03:00
=. wok
:+ ~
2015-01-29 22:47:51 +03:00
%+ murn `(list ,[path miso])`q.p.lem
2015-01-30 04:06:02 +03:00
|= [a=path b=miso]
?: ?=(%del -.b) (some a ~)
(bind (~(get by mim) a) |=(c=mime [a (some c)]))
2015-01-29 04:28:10 +03:00
%+ murn `(list ,[path miso])`q.p.lem
|=([a=path b=miso] ?:((ceq b) ~ (some a)))
?> ?=(^ wok)
?~ lon.u.wok
apply-ergo
2015-01-28 03:57:24 +03:00
%_ +>.$
2015-01-29 22:47:51 +03:00
tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]]))
2015-01-28 03:57:24 +03:00
%- welp :_ tag
2015-01-29 04:28:10 +03:00
^- (list ,[duct path note])
%+ murn `(list ,[path miso])`q.p.lem
|= [a=path b=miso]
?: (ceq b)
~
%- some
2015-01-28 03:57:24 +03:00
:+ u.hez
[%ergoing (scot %p who) syd a]
:* %f %exec who ~ %cast %mime %done ~
~|(%bad-echo (need (~(read ze lim dom ran) %x [%ud let.dom] a)))
==
2014-05-30 06:12:02 +04:00
==
::
2014-10-17 00:42:45 +04:00
++ edit :: apply changes
2014-05-30 06:12:02 +04:00
|= [wen=@da lem=nori]
^+ +>
2015-01-13 04:50:41 +03:00
?: ?=(%| -.lem)
2015-01-14 01:56:48 +03:00
=+ [hat axe]=(~(edit ze lim dom ran) wen lem)
2015-01-10 01:11:43 +03:00
=+ `[l=@da d=dome r=rang]`+<.axe
2015-01-14 01:56:48 +03:00
?~ hat
+>.$(dom d, ran r)
2015-01-29 04:28:10 +03:00
(echo:(checkout-ankh(dom d, ran r) u.hat) wen ~ lem)
2015-01-14 01:56:48 +03:00
?. =(~ dok)
2015-01-10 01:11:43 +03:00
~& %already-applying-changes !!
2015-01-22 04:47:49 +03:00
=+ ^= sop
|= [a=path b=miso]
^- ?
?| ?=(%del -.b)
?& ?=(%ins -.b)
?=(%mime p.p.b)
=+ (slag (dec (lent a)) a)
?| =([%hook ~] -)
=([%hoon ~] -)
== == ==
2015-01-10 01:11:43 +03:00
=+ ^- lon=(list path)
2015-01-22 04:47:49 +03:00
(murn q.p.lem |=([a=path b=miso] ?:((sop a b) ~ (some a))))
2015-01-10 01:11:43 +03:00
=+ ^- sot=(list ,[p=path q=misu])
2015-01-13 04:50:41 +03:00
%+ murn q.p.lem
2015-01-22 04:47:49 +03:00
|=([a=path b=miso] ?.((sop a b) ~ (some [a ((hard misu) b)])))
2015-01-29 04:28:10 +03:00
=+ ^- mim=(map path mime)
%- mo
^- (list ,[path mime])
%+ murn q.p.lem
|= [a=path b=miso]
?- -.b
%del ~
%ins ?.(?=(%mime p.p.b) ~ (some a ((hard mime) q.q.p.b)))
%dif ~
%mut ?.(?=(%mime p.q.b) ~ (some a ((hard mime) q.q.q.b)))
==
=. dok `[sot lon mim]
2015-01-10 01:11:43 +03:00
?~ lon
2015-01-13 04:50:41 +03:00
(apply-edit wen)
2015-01-10 01:11:43 +03:00
=+ ^- los=(list ,[duct path note])
2015-01-13 04:50:41 +03:00
%+ murn q.p.lem
2015-01-22 04:47:49 +03:00
|=([a=path b=miso] ?:((sop a b) ~ (some (silkify wen a b))))
2015-01-10 01:11:43 +03:00
%_(+>.$ tag (welp los tag))
::
++ silkify
2015-01-22 04:47:49 +03:00
|= [wen=@da pax=path mis=miso]
2015-01-10 01:11:43 +03:00
^- [duct path note]
2015-01-22 04:47:49 +03:00
:- hen
?+ -.mis !!
2015-01-30 04:06:02 +03:00
%mut
2015-01-22 04:47:49 +03:00
:- [%diffing (scot %p who) syd (scot %da wen) pax]
:^ %f %exec who :- ~
^- silk
=+ =+ (slag (dec (lent pax)) pax)
=+ ?~(- %$ i.-)
[%cast - [%done ~ q.mis]]
[%diff [%done ~ p.mis] -]
::
%ins
:- [%casting (scot %p who) syd (scot %da wen) pax]
:^ %f %exec who :- ~
^- silk
=+ (slag (dec (lent pax)) pax)
=+ ?~(- %$ i.-)
[%cast - [%done ~ p.mis]]
==
2015-01-14 01:56:48 +03:00
::
++ patch
|= [pax=path bar=lobe]
^- [duct path note]
:^ hen
[%patching (scot %p who) syd pax]
%f
:^ %exec who ~
|- ^- silk
=+ bob=(~(got by lat.ran) bar)
?- -.bob
%direct [%done ~ q.bob]
%indirect [%done ~ q.bob]
%delta [%pact $(bar q.bob) [%done ~ r.bob]]
==
2015-01-10 01:11:43 +03:00
::
++ apply-edit
2015-01-13 04:50:41 +03:00
|= wen=@da
^+ +>
2015-01-14 01:56:48 +03:00
?~ dok ~& %no-changes !!
?^ lon.u.dok ~& %not-done-diffing !!
=+ [hat axe]=(~(edit ze lim dom ran) wen %& *cart sot.u.dok)
2014-07-22 22:56:04 +04:00
=+ `[l=@da d=dome r=rang]`+<.axe
2015-01-14 01:56:48 +03:00
?~ hat
2015-01-29 04:28:10 +03:00
(echo(dom d, ran r, dok ~) wen mim.u.dok %& *cart sot.u.dok)
%^ echo:(checkout-ankh(dom d, ran r, dok ~) u.hat)
wen
mim.u.dok
[%& *cart sot.u.dok]
2015-01-14 01:56:48 +03:00
::
2015-01-28 03:57:24 +03:00
++ apply-ergo
2015-01-29 04:28:10 +03:00
~& %apply-ergoing
2015-01-28 03:57:24 +03:00
^+ .
?~ wok ~& %no-ergos !!
?^ lon.u.wok ~& %not-done-ergoing !!
?~ hez ~& %no-sync-duct !!
2015-01-29 22:47:51 +03:00
.(wok ~, reg :_(reg [u.hez %ergo who syd let.dom sot.u.wok]))
2015-01-28 03:57:24 +03:00
::
2015-01-14 01:56:48 +03:00
++ apply-patches
^+ .
?~ pok ~& %no-patches !!
?^ lon.u.pok ~& %not-done-patching !!
=+ ank=(~(checkout-ankh ze lim dom ran) sot.u.pok)
2015-01-15 23:57:13 +03:00
+(ank.dom ank, pok ~)
2015-01-10 01:11:43 +03:00
::
2015-01-22 04:47:49 +03:00
++ take-cast
|= [wen=@da pax=path res=(each bead (list tank))]
^+ +>
?~ dok
~& %clay-unexpected-made +>.$
?. (lien lon.u.dok |=(path =(+< pax)))
~& %clay-strange-made +>.$
?: ?=(%| -.res)
%_ +>.$
dok ~
:: XX should be here
:: tag
:: %- welp :_ tag
:: ^- (list ,[duct path note])
:: %+ murn lon.u.dok
:: |= a=path
:: ^- (unit ,[duct path note])
:: ?: =(pax a) ~
:: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~]
::
yel
[[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel]
==
=: lon.u.dok (skip lon.u.dok |=(path =(+< pax)))
sot.u.dok [[pax %ins q.p.res] sot.u.dok]
==
?~ lon.u.dok
(apply-edit wen)
+>.$
::
2015-01-10 01:11:43 +03:00
++ take-diff
2015-01-13 04:50:41 +03:00
|= [wen=@da pax=path res=(each bead (list tank))]
2015-01-10 01:11:43 +03:00
^+ +>
2015-01-14 01:56:48 +03:00
?~ dok
2015-01-15 23:57:13 +03:00
~& %clay-unexpected-made +>.$
2015-01-14 01:56:48 +03:00
?. (lien lon.u.dok |=(path =(+< pax)))
2015-01-15 23:57:13 +03:00
~& %clay-strange-made +>.$
2015-01-13 04:50:41 +03:00
?: ?=(%| -.res)
2015-01-10 01:11:43 +03:00
%_ +>.$
2015-01-14 01:56:48 +03:00
dok ~
2015-01-23 03:28:32 +03:00
:: tag
:: %- welp :_ tag
:: ^- (list ,[duct path note])
:: %+ murn lon.u.dok
:: |= a=path
:: ^- (unit ,[duct path note])
:: ?: =(pax a) ~
:: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~]
2015-01-10 01:11:43 +03:00
::
yel
[[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel]
==
2015-01-14 01:56:48 +03:00
=: lon.u.dok (skip lon.u.dok |=(path =(+< pax)))
2015-01-23 22:36:36 +03:00
sot.u.dok ?: =(%null p.q.p.res)
sot.u.dok
[[pax %dif q.p.res] sot.u.dok]
2015-01-10 01:11:43 +03:00
==
2015-01-14 01:56:48 +03:00
?~ lon.u.dok
2015-01-13 04:50:41 +03:00
(apply-edit wen)
2015-01-10 01:11:43 +03:00
+>.$
2014-07-22 22:56:04 +04:00
::
2015-01-14 01:56:48 +03:00
++ take-patch
|= [pax=path res=(each bead (list tank))]
^+ +>
?~ pok
2015-01-23 03:28:32 +03:00
~& %clay-patch-unexpected-made +>
2015-01-14 01:56:48 +03:00
?. (lien lon.u.pok |=(path =(+< pax)))
2015-01-23 03:28:32 +03:00
~& %clay-patch-strange-made +>
2015-01-14 01:56:48 +03:00
?: ?=(%| -.res)
%_ +>.$
pok ~
2015-01-23 03:28:32 +03:00
:: tag
:: %- welp :_ tag
:: ^- (list ,[duct path note])
:: %+ murn lon.u.pok
:: |= a=path
:: ^- (unit ,[duct path note])
:: ?: =(pax a) ~
:: `[hen [%patching (scot %p who) syd a] %f %exec who ~]
2015-01-14 01:56:48 +03:00
::
yel
[[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel]
==
=: lon.u.pok (skip lon.u.pok |=(path =(+< pax)))
sot.u.pok (~(put by sot.u.pok) pax %direct (mug q.p.res) q.p.res)
==
?~ lon.u.pok
apply-patches
+>.$
::
2015-01-28 03:57:24 +03:00
++ take-ergo
|= [pax=path res=(each bead (list tank))]
^+ +>
?~ wok
~& %clay-ergo-unexpected-made +>
?. (lien lon.u.wok |=(path =(+< pax)))
~& %clay-ergo-strange-made +>
?: ?=(%| -.res)
%_ +>.$
wok ~
:: tag
:: %- welp :_ tag
:: ^- (list ,[duct path note])
:: %+ murn lon.u.wok
:: |= a=path
:: ^- (unit ,[duct path note])
:: ?: =(pax a) ~
:: `[hen [%ergoing (scot %p who) syd a] %f %exec who ~]
::
yel
[[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel]
==
=: lon.u.wok (skip lon.u.wok |=(path =(+< pax)))
2015-01-30 04:06:02 +03:00
sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok]
2015-01-28 03:57:24 +03:00
==
?~ lon.u.wok
apply-ergo
+>.$
::
2015-01-14 01:56:48 +03:00
++ checkout-ankh
|= hat=(map path lobe)
2015-01-15 23:57:13 +03:00
^+ +>
::?. =(~ pok)
:: ~& %already-applying-patches +>.$
2015-01-14 01:56:48 +03:00
=+ ^- lon=(list path)
%+ murn (~(tap by hat))
|= [a=path b=lobe]
=+ bob=(~(got by lat.ran) b)
?.(?=(%delta -.bob) ~ (some a))
=+ ^- sot=(map path bulb)
%- mo
^- (list ,[path bulb])
%+ murn (~(tap by hat))
|= [a=path b=lobe]
^- (unit ,[path bulb])
=+ bob=(~(got by lat.ran) b)
?:(?=(%delta -.bob) ~ `[a `bulb`bob])
=. pok `[sot lon]
?~ lon
apply-patches
=+ ^- los=(list ,[duct path note])
%+ murn (~(tap by hat))
|= [pax=path bar=lobe]
^- (unit ,[duct path note])
=+ bob=(~(got by lat.ran) bar)
?. ?=(%delta -.bob)
~
`(patch pax bar)
%_(+>.$ tag (welp los tag))
::
2014-10-17 00:42:45 +04:00
++ edis :: apply subscription
2014-07-22 22:56:04 +04:00
|= nak=nako
^+ +>
%= +>
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-09-09 04:21:40 +04:00
=+ zax=(blob-to-lobe sar)
2014-07-22 22:56:04 +04:00
%+ ~(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
::
2014-10-17 00:42:45 +04:00
++ exec :: change and update
2015-01-14 01:56:48 +03:00
|= [wen=@da lem=nori]
2014-05-30 06:12:02 +04:00
^+ +>
2015-01-23 22:36:36 +03:00
wake:(edit wen lem)
2014-05-30 06:12:02 +04:00
::
2014-10-17 00:42:45 +04:00
++ exem :: execute merge
2015-01-14 01:56:48 +03:00
|= [wen=@da mer=mizu] :: aka direct change
2014-10-17 00:42:45 +04:00
?. (gte p.mer let.dom) !! :: no
2014-07-24 19:11:40 +04:00
=. +>.$ %= +>.$
2014-07-29 21:43:20 +04:00
hut.ran (~(uni by hut.r.mer) hut.ran)
lat.ran (~(uni by lat.r.mer) lat.ran)
2014-07-24 19:11:40 +04:00
let.dom p.mer
2014-07-29 21:43:20 +04:00
hit.dom (~(uni by q.mer) hit.dom)
2014-07-24 19:11:40 +04:00
==
2014-10-17 00:42:45 +04:00
=+ ^= hed :: head commit
2014-07-24 19:11:40 +04:00
=< q
2014-07-25 16:53:39 +04:00
%- ~(got by hut.ran)
%- ~(got by hit.dom)
2014-07-24 19:11:40 +04:00
let.dom
2015-01-14 01:56:48 +03:00
(echa:wake:(checkout-ankh hed))
2014-07-24 19:11:40 +04:00
::
2014-10-17 00:42:45 +04:00
++ knit :: external change
2014-05-30 06:12:02 +04:00
|= [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-09-10 23:52:06 +04:00
=. +>+.^$
2015-01-15 03:01:59 +03:00
=+ roo=(edis ((hard nako) q.q.u.u.nex))
2014-09-10 23:52:06 +04:00
?>(?=(^ ref.roo) roo)
2014-05-30 06:12:02 +04:00
%= $
haw.u.ref (~(del by haw.u.ref) nez)
==
::
2014-10-17 00:42:45 +04:00
++ mabe :: maybe fire function
|* [rov=rove fun=$+(@da _+>.^$)]
^+ +>.$
%- fall :_ +>.$
%- bind :_ fun
^- (unit ,@da)
?- -.rov
%&
?. ?=(%da -.q.p.rov) ~
`p.q.p.rov
%|
=* mot p.rov
%+ hunt
?. ?=(%da -.p.mot) ~
?.((lth now p.p.mot) ~ [~ p.p.mot])
?. ?=(%da -.q.mot) ~
?.((lth now p.q.mot) [~ now] [~ p.q.mot])
==
::
++ reve
|= rov=rove
^- rave
?: ?=(%& -.rov) rov
[%| p.p.rov q.p.rov r.p.rov]
::
++ rive
|= rav=[%| p=moat]
^- rove
[%| p.p.rav q.p.rav r.p.rav ~]
::
2014-10-28 04:50:07 +03:00
++ sync
2015-01-14 01:56:48 +03:00
|= [her=@p sud=@tas rot=riot]
2014-10-28 04:50:07 +03:00
^+ +>.$
?~ rot
2014-10-28 22:59:26 +03:00
~& "autosync from {<sud>} on {<her>} to {<syd>} on {<who>} stopped"
2014-10-28 04:50:07 +03:00
+>.$
?: ?=(%y p.p.u.rot)
%= +>.$
yel
[[hen %note ';' %leaf "starting to sync desk {(trip syd)}..."] yel]
2014-10-28 04:50:07 +03:00
tag
:_ tag
2014-10-28 22:59:26 +03:00
:* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/v
%c %warp [who her] sud
2014-10-28 04:50:07 +03:00
`[%& %v q.p.u.rot /]
==
==
?> ?=(%v p.p.u.rot)
=+ der=((hard dome) r.u.rot)
=+ ^= lum
^- (unit (unit mizu))
2015-01-14 01:56:48 +03:00
~
::%^ ~(construct-merge ze now dom ran)
:: ?:(=(0 let.dom) %init %meld)
:: who
:::+ syd
:: `saba`[her sud [0 let.der] der]
::now
2014-10-28 22:59:26 +03:00
=. tag
:_ tag
:* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/y
%c %warp [who her] sud
`[%& %y [%ud +(let.der)] /]
==
2014-10-28 04:50:07 +03:00
?~ lum
2014-10-28 22:59:26 +03:00
~& "autosync from {<sud>} on {<her>} to {<syd>} on {<who>} failed"
~& "please merge manually"
2014-10-28 04:50:07 +03:00
+>.$
?~ u.lum
2014-10-28 22:59:26 +03:00
~& "autosync from {<sud>} on {<her>} to {<syd>} on {<who>} up to date"
2014-10-28 04:50:07 +03:00
+>.$
%= +>.$
yel
[[hen %note ';' %leaf "successfully synced desk {(trip syd)}..."] yel]
2014-10-28 04:50:07 +03:00
tag
2014-10-28 22:59:26 +03:00
:_ tag
:* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/merg
2014-10-28 04:50:07 +03:00
%c %merg who syd u.u.lum
==
==
::
2014-10-17 00:42:45 +04:00
++ wake :: update subscribers
2014-05-30 06:12:02 +04:00
^+ .
=+ xiq=(~(tap by qyx) ~)
=| xaq=(list ,[p=duct q=rove])
2014-05-30 06:12:02 +04:00
|- ^+ ..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-09-09 04:21:40 +04:00
=+ nao=(~(case-to-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=`moot`p.q.i.xiq
2014-09-09 04:21:40 +04:00
=+ nab=(~(case-to-aeon ze lim dom ran) p.mot)
2014-05-30 06:12:02 +04:00
?~ nab
$(xiq t.xiq, xaq [i.xiq xaq])
2014-09-09 04:21:40 +04:00
=+ huy=(~(case-to-aeon ze lim dom ran) q.mot)
2014-05-30 06:12:02 +04:00
?~ huy
2014-07-24 19:11:40 +04:00
=+ ptr=[%ud +(let.dom)]
2013-09-29 00:21:18 +04:00
%= $
xiq t.xiq
xaq [[p.i.xiq [%| ptr q.mot r.mot s.mot]] xaq]
2014-09-09 04:21:40 +04:00
..wake =+ ^= ear
(~(lobes-at-path ze lim dom ran) let.dom r.p.q.i.xiq)
?: =(s.p.q.i.xiq ear) ..wake
2014-09-09 04:21:40 +04:00
=+ fud=(~(make-nako ze lim dom ran) u.nab let.dom)
(bleb p.i.xiq let.dom fud)
2013-09-29 00:21:18 +04:00
==
2014-05-30 06:12:02 +04:00
%= $
xiq t.xiq
..wake =- (blub:- p.i.xiq)
2014-09-09 04:21:40 +04:00
=+ ^= ear
(~(lobes-at-path ze lim dom ran) u.huy r.p.q.i.xiq)
2014-09-10 23:52:06 +04:00
?: =(s.p.q.i.xiq ear) (blub p.i.xiq)
2014-09-09 04:21:40 +04:00
=+ fud=(~(make-nako ze lim dom ran) u.nab u.huy)
(bleb p.i.xiq +(u.nab) fud)
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
2015-01-14 01:56:48 +03:00
|= [now=@da hen=duct [who=ship him=ship] syd=@tas ruf=raft]
2014-05-30 06:26:35 +04:00
=+ ^= rug ^- rung
=+ rug=(~(get by hoy.ruf) him)
?^(rug u.rug *rung)
=+ ^= red ^- rede
=+ yit=(~(get by rus.rug) syd)
2015-01-28 03:57:24 +03:00
?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome ~ ~ ~])
2015-01-14 01:56:48 +03:00
((de now hen ~ ~) [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
2015-01-14 01:56:48 +03:00
|= [who=@p now=@da hen=duct ruf=raft]
2014-05-30 06:12:02 +04:00
=+ ^= yar ^- room
=+ yar=(~(get by fat.ruf) who)
?~(yar *room u.yar)
|%
++ abet ruf(fat (~(put by fat.ruf) who yar))
++ pish
2014-07-24 19:11:40 +04:00
|= [syd=@ta red=rede run=rang]
2015-01-10 01:11:43 +03:00
%_ +>
2015-01-28 03:57:24 +03:00
ran.ruf run
dos.yar
(~(put by dos.yar) syd [qyx.red dom.red dok.red pok.red wok.red])
2015-01-10 01:11:43 +03:00
==
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)
2015-01-14 01:56:48 +03:00
%^ (de now hen hun.yar hez.yar)
[who who]
syd
2015-01-28 03:57:24 +03:00
[[now qyx.saq ~ dom.saq dok.saq pok.saq wok.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)
2015-01-24 03:13:29 +03:00
=+
~|([%bad-soft (,@t -.p.q.hic)] ((soft kiss) p.q.hic))
?~ -
~& [%bad-softing (,@t -.p.q.hic)] !!
u.-
2014-06-06 03:00:19 +04:00
?: (~(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
2014-10-28 22:59:26 +03:00
%font
?: (~(has by sor.ruf) +.q.hic) `..^$
:_ ..^$(sor.ruf (~(put by sor.ruf) +.q.hic hen))
:~ :* hen %pass
/auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y
%c %warp [p.q.hic r.q.hic] s.q.hic
2014-10-28 04:50:07 +03:00
`[%& %y [%da now] /]
==
==
2013-09-29 00:21:18 +04:00
::
2015-01-22 04:47:49 +03:00
%init
:_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))
=+ bos=(sein p.q.hic)
~& [%bos bos p.q.hic]
?: =(bos p.q.hic) ~
^- (list move)
%+ turn (limo ~[%main %arvo %try])
|= syd=@tas
[hen %pass / %c %font p.q.hic syd bos syd]
::
%info
2014-06-04 14:40:09 +04:00
?: =(%$ q.q.hic)
2015-01-22 04:47:49 +03:00
[~ ..^$]
=^ mos ruf
2015-01-14 01:56:48 +03:00
=+ une=(un p.q.hic now hen ruf)
2014-07-24 19:11:40 +04:00
=+ ^= zat
2015-01-14 01:56:48 +03:00
(exec:(di:wake:une q.q.hic) now r.q.hic)
2014-07-24 19:11:40 +04:00
=+ 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)
2015-01-22 04:47:49 +03:00
abet:une
2013-09-29 00:21:18 +04:00
[mos ..^$]
2015-01-22 04:47:49 +03:00
::
%into
=+ yar=(~(got by fat.ruf) p.q.hic)
:_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))
^- (list move)
?: =(%$ q.q.hic)
~
=+ dos=(~(get by dos.yar) q.q.hic)
2015-01-29 04:28:10 +03:00
?: &(?=(^ dos) !=(0 +>-.+<.+.dos)) :: ank.s.u.dos
2015-01-28 03:57:24 +03:00
?: =(ank.dom.u.dos q.q.hic)
2015-01-22 04:47:49 +03:00
~
2015-01-28 03:57:24 +03:00
[hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.dom.u.dos)]~
2015-01-22 04:47:49 +03:00
=+ cos=(cost r.q.hic *ankh)
=+ ^- [one=(list ,[path miso]) two=(list ,[path miso])]
%+ skid q.cos
|= [a=path b=miso]
?& ?=(%ins -.b)
?=(%mime p.p.b)
=+ (slag (dec (lent a)) a)
?| =([%hook ~] -)
=([%hoon ~] -)
== ==
:~ [hen %slip %c %info p.q.hic q.q.hic %& p.cos one]
[hen %slip %c %info p.q.hic q.q.hic %& p.cos two]
==
::
?(%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
2015-01-14 01:56:48 +03:00
=+ une=(un p.q.hic now hen ruf)
2014-07-24 19:11:40 +04:00
=+ ^= zat
2015-01-14 01:56:48 +03:00
(exec:(di:wake:une q.q.hic) now r.q.hic)
2014-07-24 19:11:40 +04:00
=+ 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 ..^$]
2014-10-28 22:59:26 +03:00
::
%merg :: direct state up
=^ mos ruf
2015-01-14 01:56:48 +03:00
=+ une=(un p.q.hic now hen ruf)
2014-10-28 22:59:26 +03:00
=+ ^= zat
2015-01-14 01:56:48 +03:00
(exem:(di:wake:une q.q.hic) now r.q.hic)
2014-10-28 22:59:26 +03:00
=+ 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 ..^$]
::
%plug
?. (~(has by sor.ruf) +.q.hic) `..^$
:_ ..^$(sor.ruf (~(del by sor.ruf) +.q.hic))
=+ hyn=(~(got by sor.ruf) +.q.hic)
:~ :* hyn %pass
/auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y
%c %warp [p.q.hic r.q.hic] s.q.hic ~
==
:* hyn %pass
/auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/v
%c %warp [p.q.hic r.q.hic] s.q.hic ~
==
==
2013-09-29 00:21:18 +04:00
::
%warp
=^ mos ruf
2014-06-04 14:40:09 +04:00
?: =(p.p.q.hic q.p.q.hic)
2015-01-14 01:56:48 +03:00
=+ une=(un p.p.q.hic now hen ruf)
2014-06-04 14:40:09 +04:00
=+ 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
2015-01-14 01:56:48 +03:00
ease:wex
(eave:wex u.q.q.q.hic)
2014-07-24 19:11:40 +04:00
=+ ^= woo
abet:wao
[-.woo abet:(pish:une p.q.q.hic +.woo ran.wao)]
2015-01-14 01:56:48 +03:00
=+ wex=(do now hen 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
2015-01-14 01:56:48 +03:00
abet:ease:wex
abet:(eave:wex u.q.q.q.hic)
2014-06-04 14:40:09 +04:00
[-.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
==
::
++ doze
2013-12-15 09:42:27 +04:00
|= [now=@da hen=duct]
^- (unit ,@da)
2014-10-17 00:42:45 +04:00
~
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]
2015-01-15 03:01:59 +03:00
^- (unit (unit cage))
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 [~ ~]
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 [~ ~]
2015-01-15 03:01:59 +03:00
%. [u.run u.luk tyl]
=< aver
?: got
(di:(un his now ~ ruf) syd)
(do now ~ [his his] syd ruf)
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-10-28 22:59:26 +03:00
?: ?=([%auto @ @ @ @ ?(%y %v) ~] tea)
2014-10-28 04:50:07 +03:00
?> ?=(%writ -.+.q.hin)
=+ our=(slav %p i.t.tea)
2014-10-28 22:59:26 +03:00
=* sud i.t.t.tea
=+ her=(slav %p i.t.t.t.tea)
=* syd i.t.t.t.t.tea
2015-01-14 01:56:48 +03:00
=+ une=(un our now hen ruf)
2014-10-28 04:50:07 +03:00
=+ wex=(di:une syd)
2015-01-14 01:56:48 +03:00
=+ wao=(sync:wex her sud p.q.hin)
2014-10-28 04:50:07 +03:00
=+ woo=abet:wao
[-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))]
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] ~] ..^$]
2015-01-10 01:11:43 +03:00
::
%made
2015-01-14 01:56:48 +03:00
?~ tea !!
?+ -.tea !!
2015-01-22 04:47:49 +03:00
%casting
?> ?=([@ @ @ *] t.tea)
=+ who=(slav %p i.t.tea)
=+ syd=(slav %tas i.t.t.tea)
=+ wen=(slav %da i.t.t.t.tea)
=^ mos ruf
=+ une=(un who now hen ruf)
=+ ^= zat
(take-cast:(di:wake:une syd) wen t.t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot abet:(pish:une syd +.zot ran.zat)]
[mos ..^$]
::
2015-01-14 01:56:48 +03:00
%diffing
?> ?=([@ @ @ *] t.tea)
=+ who=(slav %p i.t.tea)
=+ syd=(slav %tas i.t.t.tea)
=+ wen=(slav %da i.t.t.t.tea)
=^ mos ruf
=+ une=(un who now hen ruf)
=+ ^= zat
(take-diff:(di:wake:une syd) wen t.t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot abet:(pish:une syd +.zot ran.zat)]
[mos ..^$]
::
%patching
?> ?=([@ @ *] t.tea)
=+ who=(slav %p i.t.tea)
=+ syd=(slav %tas i.t.t.tea)
=^ mos ruf
?: (~(has by fat.ruf) who)
=+ une=(un who now hen ruf)
=+ ^= zat
(take-patch:(di:wake:une syd) t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot abet:(pish:une syd +.zot ran.zat)]
=+ zax=(do now hen [who who] syd ruf)
=+ ^= zat
(take-patch:zax t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot (posh who syd +.zot ruf)]
[mos ..^$]
2015-01-28 03:57:24 +03:00
::
%ergoing
?> ?=([@ @ *] t.tea)
=+ who=(slav %p i.t.tea)
=+ syd=(slav %tas i.t.t.tea)
=^ mos ruf
=+ une=(un who now hen ruf)
=+ ^= zat
(take-ergo:(di:wake:une syd) t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot abet:(pish:une syd +.zot ran.zat)]
[mos ..^$]
2015-01-14 01:56:48 +03:00
==
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
2015-01-14 01:56:48 +03:00
(knit:(do now hen 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-10-17 00:42:45 +04:00
::
%wake
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
=| mos=(list move)
|- ^- [p=(list move) q=_..^^$]
?~ dal [mos ..^^$]
2015-01-14 01:56:48 +03:00
=+ une=(un i.dal now hen ruf)
2014-10-17 00:42:45 +04:00
=^ som une wake:une
$(dal t.dal, ruf abet:une, mos (weld som mos))
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
--