Fully 143-ize %ames.

This commit is contained in:
C. Guy Yarvin 2017-10-23 22:17:38 -07:00
parent bf818adf09
commit 808911d948

View File

@ -1,11 +1,11 @@
!: :: ames (4a), networking
::
|= pit/vase
|= pit=vase
=> =~
:: structures
=, ames
|%
++ move {p/duct q/(wind note:able gift:able)} :: local move
+= move [p=duct q=(wind note:able gift:able)] :: local move
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4aA, identity logic ::
@ -13,7 +13,7 @@
|%
::
++ grip :: extend wyll
|= {wet/wyll law/wyll}
|= [wet=wyll law=wyll]
^- wyll
?~ wet law
?: =(wet law) law
@ -32,14 +32,14 @@
?>(?=(^ t.law) $(law t.law))
::
++ meld :: verify connect
|= {new/deyd old/deyd}
|= [new=deyd old=deyd]
^- $&
?> (melt new old)
?> =((shaf %meld (sham q.new)) (need (sure:as:(com:nu:crub:crypto r.q.old) *code p.new)))
%&
::
++ melt :: proper connect
|= {new/deyd old/deyd}
|= [new=deyd old=deyd]
^- ?
=+ rac=(clan:title r.p.q.new)
?& =(r.new r.old) :: match fake
@ -55,7 +55,7 @@
==
::
++ pare :: shorten against
|= {fou/wyll law/wyll}
|= [fou=wyll law=wyll]
:: ~& [%pare-fou fou]
:: ~& [%pare-law law]
^- wyll
@ -68,7 +68,7 @@
$(wal t.wal, ouf t.ouf)
::
++ pier !: :: initial deyd
|= wed/deyd
|= wed=deyd
^- $&
?> =+ rac=(clan:title r.p.q.wed)
=+ loy=(com:nu:crub:crypto r.q.wed)
@ -80,7 +80,7 @@
%&
::
++ real :: validate
|= {mac/mace law/wyll}
|= [mac=mace law=wyll]
?> ?& |- ^- ?
?~ mac &
?> ?& ?=(^ law)
@ -93,7 +93,7 @@
%&
::
++ rice :: mace at life
|= {mar/life mac/mace}
|= [mar=life mac=mace]
^- (unit mace)
?~ mac ~
?: =(mar p.i.mac) [~ mac]
@ -101,7 +101,7 @@
$(mac t.mac)
::
++ rick :: wyll at life
|= {mar/life lag/ship law/wyll}
|= [mar=life lag=ship law=wyll]
^- (unit wyll)
?~ law ~
?: =(mar p.p.q.i.law) [~ law]
@ -110,7 +110,7 @@
$(law t.law)
::
++ zeno :: imperial keyprint
|= zar/@pD
|= zar=@pD
^- @uvH ^- @
%+ snag zar
^- (list @uw)
@ -377,7 +377,7 @@
::
|%
++ bite :: packet to cake
|= pac/rock ^- cake
|= pac=rock ^- cake
=+ [mag=(end 5 1 pac) bod=(rsh 5 1 pac)]
=+ :* vez=(end 0 3 mag) :: protocol version
chk=(cut 0 [3 20] mag) :: checksum
@ -391,10 +391,10 @@
(kins tay)
(rsh 3 (add wix vix) bod)
::
++ kins |=(tay/@ (snag tay `(list skin)`[%none %open %fast %full ~]))
++ ksin |=(sin/skin `@`?-(sin %none 0, %open 1, %fast 2, %full 3))
++ kins |=(tay=@ (snag tay `(list skin)`[%none %open %fast %full ~]))
++ ksin |=(sin=skin `@`?-(sin %none 0, %open 1, %fast 2, %full 3))
++ spit :: cake to packet
|= kec/cake ^- @
|= kec=cake ^- @
=+ wim=(met 3 p.p.kec)
=+ dum=(met 3 q.p.kec)
=+ yax=?:((lte wim 2) 0 ?:((lte wim 4) 1 ?:((lte wim 8) 2 3)))
@ -418,12 +418,12 @@
::
|%
++ go :: go
|_ ton/town :: ames state
|_ ton=town :: ames state
++ as :: as:go
|_ {our/ship saf/sufi} :: per server
|_ [our=ship saf=sufi] :: per server
++ born :: born:as:go
|= {now/@da her/@p tic/@pG ges/gens pub/pass} :: register user
^- {(unit wyll) _+>}
|= [now=@da her=@p tic=@pG ges=gens pub=pass] :: register user
^- [(unit wyll) _+>]
?. =(our (sein:title her)) [~ +>.$]
=+ nes=sen
=+ ryt=(end 6 1 (shaf %tick (mix her (shax sec:ex:q.nes))))
@ -444,9 +444,9 @@
+>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *clot]))
::
++ lax :: lax:as:go
|_ {her/ship dur/dore} :: per client
|_ [her=ship dur=dore] :: per client
++ cluy :: cluy:lax:as:go
^- {p/life q/gens r/acru} :: client crypto
^- [p=life q=gens r=acru] :: client crypto
?~ lew.wod.dur !!
?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
:+ p.p.q.i.lew.wod.dur
@ -458,12 +458,12 @@
?~(lew.wod.dur 0 p.p.q.i.lew.wod.dur)
::
++ deng
|= law/wyll
|= law=wyll
%_(+> lew.wod.dur (grip law lew.wod.dur))
::
++ griz :: griz:lax:as:go
|= now/@da :: generate key for
^- {p/code q/_+>}
|= now=@da :: generate key for
^- [p=code q=_+>]
=+ key=(shas %enty (mix now any.ton))
:- key
%= +>.$
@ -472,14 +472,14 @@
==
::
++ pode :: pode:lax:as:go
|= now/@da :: timeout route
|= now=@da :: timeout route
^+ +>
?: (lth her 256) +>(lun.wod.dur [~ %if ~2000.1.1 0 (mix her .0.0.1.0)])
+>(lun.wod.dur ~)
::
++ kuch :: kuch:lax:as:go
|= had/hand :: hear key tag
^- (unit {code _+>})
|= had=hand :: hear key tag
^- (unit [code _+>])
=+ wey=(~(get by heg.caq.dur) had)
?^ wey
=+ key=u.wey
@ -494,7 +494,7 @@
[~ u.dyv ..kuch]
::
++ wasc :: wasc:lax:as:go
|= key/code :: hear foreign code
|= key=code :: hear foreign code
^+ +>
=+ had=(shaf %hand key)
%_ ..wasc
@ -503,14 +503,14 @@
==
::
++ wast :: wast:lax:as:go
|= ryn/lane :: set route
|= ryn=lane :: set route
^+ +>
%= +>
lun.wod.dur
?: ?=({%ix *} ryn)
?: ?=([%ix *] ryn)
?: ?| ?=(~ lun.wod.dur)
?=({%ix *} u.lun.wod.dur)
?& ?=({%if *} u.lun.wod.dur)
?=([%ix *] u.lun.wod.dur)
?& ?=([%if *] u.lun.wod.dur)
(gth p.ryn (add ~s10 p.u.lun.wod.dur))
==
==
@ -520,10 +520,10 @@
==
::
++ wist :: wist:lax:as:go
|= $: now/@da :: route via
waz/(list @p)
ryn/(unit lane)
pac/rock
|= $: now=@da :: route via
waz=(list @p)
ryn=(unit lane)
pac=rock
==
^- (list boon)
?: =(our her) [[%ouzo *lane pac] ~]
@ -557,24 +557,24 @@
^- (list ship) :: route unto
=+ [fro=xen too=xeno]
=+ ^= oot ^- (list ship)
=| oot/(list ship)
=| oot=(list ship)
|- ^+ oot
?~ too ~
?: (lien fro |=(a/ship =(a i.too))) ~
?: (lien fro |=(a=ship =(a i.too))) ~
[i.too $(too t.too)]
:: ~& [%xong-to [our her] (weld oot ?>(?=(^ fro) t.fro))]
(weld oot ?>(?=(^ fro) t.fro))
::
++ zuul :: zuul:lax:as:go
|= {now/@da ham/meal} :: encode message
^- {p/(list rock) q/_+>}
|= [now=@da ham=meal] :: encode message
^- [p=(list rock) q=_+>]
=< weft
|%
++ wasp :: null security
^-({p/skin q/@} [%none (jam ham)])
^-([p=skin q=@] [%none (jam ham)])
::
++ weft :: fragment message
^- {p/(list rock) q/_+>.$}
^- [p=(list rock) q=_+>.$]
=^ gim ..weft wisp
:_ +>.$
^- (list rock)
@ -596,7 +596,7 @@
$(ruv t.ruv, inx +(inx))
::
++ wisp :: generate message
^- {{p/skin q/@} q/_..wisp}
^- [[p=skin q=@] q=_..wisp]
?: =(%carp -.ham)
[wasp ..wisp]
?: !=(~ yed.caq.dur)
@ -631,29 +631,29 @@
-- :: --lax:as:go
::
++ gur :: default dore
|= her/ship
|= her=ship
^- dore
=+ def=?.((lth her 256) ~ [~ %if ~2000.1.1 0 (mix her .0.0.1.0)])
[[~2100.1.1 def ~] ~ *clot]
::
++ myx :: dore by ship
|= her/ship
|= her=ship
^+ lax
=+ fod=(~(get by hoc.saf) her)
~(. lax [her ?~(fod (gur her) u.fod)])
::
++ nux :: install dore
|= new/_lax
|= new=_lax
^+ +>
+>(hoc.saf (~(put by hoc.saf) her.new dur.new))
::
++ sen :: current crypto
^- {p/life q/acru}
^- [p=life q=acru]
?~(val.saf !! [p.i.val.saf r.i.val.saf])
::
++ sev :: crypto by life
|= mar/life
^- {p/? q/acru}
|= mar=life
^- [p=? q=acru]
?~ val.saf !!
?: =(mar p.i.val.saf)
[& r.i.val.saf]
@ -676,7 +676,7 @@
(saxo:title our)
::
++ yew :: best wyll for
|= her/ship
|= her=ship
^- wyll
=+ gel=(~(get by hoc.saf) her)
?^ gel
@ -685,7 +685,7 @@
-- :: --as:go
::
++ ha !: :: adopt new license
|= {our/ship mac/mace wil/wyll}
|= [our=ship mac=mace wil=wyll]
^- town
?> !=(~ mac)
?> ?=(^ wil)
@ -701,7 +701,7 @@
|- ^- (list ship)
?:((lth our 256) ~ =+(seg=(sein:title our) [seg $(our seg)]))
::
(turn mac |=({p/life q/ring} [p q (nol:nu:crub:crypto q)]))
(turn mac |=([p=life q=ring] [p q (nol:nu:crub:crypto q)]))
wil
~
~
@ -709,17 +709,17 @@
==
::
++ su :: install safe
|= new/_as
|= new=_as
^- town
ton(urb (~(put by urb.ton) our.new saf.new))
::
++ ti :: expire by time
|= now/@da
|= now=@da
^- town
!!
::
++ us :: produce safe
|= our/ship
|= our=ship
^- (unit _as)
=+ goh=(~(get by urb.ton) our)
?~ goh ~
@ -750,8 +750,8 @@
==
::
++ bick :: bick:pu
|= {now/@da fap/flap} :: ack by hash
^- {{p/(unit soup) q/(list rock)} _+>}
|= [now=@da fap=flap] :: ack by hash
^- [[p=(unit soup) q=(list rock)] _+>]
=+ sun=(~(get by diq) fap)
?~ sun
:: ~& [%bick-none `@p`(mug fap)] :: not a real error
@ -763,7 +763,7 @@
[[gub yop] +>.$]
::
++ bilk :: bilk:pu
|= now/@da :: inbound packet
|= now=@da :: inbound packet
^+ +>
=+ trt=(mul 2 rtt)
%= +>.$
@ -773,7 +773,7 @@
==
::
++ boom :: boom:pu
|= now/@da ^- ? :: address timeout
|= now=@da ^- ? :: address timeout
|(?=(~ rue) (gte (sub now u.rue) ~m1))
::
++ bust :: bust:pu
@ -799,8 +799,8 @@
?^(rig rig [~ p.n.puq])
::
++ bine :: bine:pu
|= {now/@da num/@ud} :: apply ack
^- {(unit soup) _+>}
|= [now=@da num=@ud] :: apply ack
^- [(unit soup) _+>]
?~ puq !!
?. =(num p.n.puq)
?: (gth num p.n.puq)
@ -823,8 +823,8 @@
+>.$(puq ~(nap to puq))
::
++ bock :: bock:pu
|= {now/@da num/@ud} :: ack by sequence
^- {(unit soup) _+>}
|= [now=@da num=@ud] :: ack by sequence
^- [(unit soup) _+>]
=^ gym +> (bine now num)
:- gym
?: (gth num nep)
@ -840,12 +840,12 @@
+>.$
::
++ harv :: harv:pu
|= now/@da :: harvest queue
^- {(list rock) _+>}
|= now=@da :: harvest queue
^- [(list rock) _+>]
?: =(~ puq) [~ +>(rtn ~)]
?. (gth caw nif) [~ +>]
=+ wid=(sub caw nif)
=| rub/(list rock)
=| rub=(list rock)
=< abet =< apse
|%
++ abet
@ -879,8 +879,8 @@
--
::
++ wack :: wack:pu
|= now/@da :: wakeup (timeout)
^- {(list rock) _+>}
|= now=@da :: wakeup (timeout)
^- [(list rock) _+>]
?. &(!=(~ rtn) ?>(?=(^ rtn) (gte now u.rtn))) [~ +>]
:: ~& [%slow (div rto (div ~s1 1.000))]
=. +> (wept 0 nus)
@ -896,7 +896,7 @@
(harv now)
::
++ wept :: wept:pu
|= {fip/@ud lap/@ud} :: fip thru lap-1
|= [fip=@ud lap=@ud] :: fip thru lap-1
=< abet =< apse
|%
++ abet +>.$
@ -918,8 +918,8 @@
--
::
++ whap :: whap:pu
|= {now/@da gom/soup wyv/(list rock)} :: send a message
^- {(list rock) _+>}
|= [now=@da gom=soup wyv=(list rock)] :: send a message
^- [(list rock) _+>]
=. pyz (~(put by pyz) gom (lent wyv))
=. +>
|- ^+ +>.^$
@ -938,7 +938,7 @@
::
|%
++ am :: am
|_ {now/@da fox/fort} :: protocol engine
|_ [now=@da fox=fort] :: protocol engine
++ boot :: boot:am
^- fort :: restore from noun
%= fox
@ -946,16 +946,16 @@
%- ~(gas by *(map ship sufi))
%+ turn
~(tap by urb.ton.fox)
|= {p/ship q/sufi} ^- {p/ship q/sufi}
|= [p=ship q=sufi] ^- [p=ship q=sufi]
:- p
%= q
val
(turn val.q |=({p/life q/ring r/acru} [p q (nol:nu:crub:crypto q)]))
(turn val.q |=([p=life q=ring r=acru] [p q (nol:nu:crub:crypto q)]))
==
==
++ come :: come:am
|= {ges/(unit @t) wid/@ bur/@ fak/?} :: instantiate pawn
^- {p/{p/ship q/@uvG} q/fort}
|= [ges=(unit @t) wid=@ bur=@ fak=?] :: instantiate pawn
^- [p=[p=ship q=@uvG] q=fort]
=+ loy=(pit:nu:crub:crypto wid bur)
=+ rig=sec:ex:loy
=+ our=`@p`fig:ex:loy
@ -972,8 +972,8 @@
==
::
++ czar !: :: czar:am
|= {our/ship ger/@uw fak/?} :: instantiate emperor
^- {p/(list boon) q/fort}
|= [our=ship ger=@uw fak=?] :: instantiate emperor
^- [p=(list boon) q=fort]
=+ ^= loy
?: fak
:: fake uses carrier number as seed
@ -993,8 +993,8 @@
[[[%beer our pac:ex:loy] ~] fox]
::
++ gnaw :: gnaw:am
|= {kay/cape ryn/lane pac/rock} :: process packet
^- {p/(list boon) q/fort}
|= [kay=cape ryn=lane pac=rock] :: process packet
^- [p=(list boon) q=fort]
?. =(6 (end 0 3 pac)) [~ fox]
=+ kec=(bite pac)
?: (goop p.p.kec) [~ fox]
@ -1007,12 +1007,12 @@
[q.kec r.kec]
::
++ goop :: blacklist
|= him/ship
|= him=ship
|
::
++ hall :: hall:am
^- (list sock) :: all sockets
=| sox/(list sock) :: XX hideous
=| sox=(list sock) :: XX hideous
|- ^+ sox
?~ zac.fox sox
=. sox $(zac.fox l.zac.fox)
@ -1024,35 +1024,35 @@
[[p.n.zac.fox p.n.wab.q.n.zac.fox] sox]
::
++ have :: have:am
|= {our/ship buq/buck} :: acquire license
^- {p/(list boon) q/fort}
|= [our=ship buq=buck] :: acquire license
^- [p=(list boon) q=fort]
=: ton.fox (~(ha go ton.fox) our buq)
zac.fox (~(put by zac.fox) our *corn)
==
[[[%beer our pac:ex:q:sen:(need (~(us go ton.fox) our))] ~] fox]
::
++ kick :: kick:am
|= hen/duct :: refresh net
=+ aks=(turn ~(tap by urb.ton.fox) |=({p/ship q/sufi} p))
|- ^- {p/(list boon) q/fort}
|= hen=duct :: refresh net
=+ aks=(turn ~(tap by urb.ton.fox) |=([p=ship q=sufi] p))
|- ^- [p=(list boon) q=fort]
?~ aks [~ fox]
=^ buz fox zork:(kick:(um i.aks) hen)
=^ biz fox $(aks t.aks)
[(weld p.buz p.biz) fox]
::
++ rack :: rack:am
|= {soq/sock cha/path cop/coop} :: e2e ack
|= [soq=sock cha=path cop=coop] :: e2e ack
=+ oh=(ho:(um p.soq) q.soq)
=^ gud oh (cook:oh cop cha ~)
?. gud oh
(cans:oh cha)
::
++ wake :: wake:am
|= hen/duct :: harvest packets
^- {p/(list boon) q/fort}
|= hen=duct :: harvest packets
^- [p=(list boon) q=fort]
=+ sox=hall
=| bin/(list boon)
|- ^- {p/(list boon) q/fort}
=| bin=(list boon)
|- ^- [p=(list boon) q=fort]
?~ sox
=^ ban fox (kick hen)
[(weld bin p.ban) fox]
@ -1060,27 +1060,27 @@
$(sox t.sox, bin (weld p.bun bin))
::
++ wise :: wise:am
|= {soq/sock hen/duct cha/path val/*} :: send a statement
^- {p/(list boon) q/fort}
|= [soq=sock hen=duct cha=path val=*] :: send a statement
^- [p=(list boon) q=fort]
zork:zank:(wool:(ho:(um p.soq) q.soq) hen cha val)
::
++ um :: per server
|= our/ship
|= our=ship
=+ gus=(need (~(us go ton.fox) our))
=+ ^= weg ^- corn
=+ weg=(~(get by zac.fox) our)
?^(weg u.weg *corn)
=| bin/(list boon)
=| bin=(list boon)
|%
++ ho :: ho:um:am
|= her/ship :: per friend
|= her=ship :: per friend
=+ diz=(myx:gus her)
=+ bah=(~(get by wab.weg) her)
=+ puz=?~(bah ahoy:pu %*(. pu +< sop.u.bah))
=> .(bah `bath`?~(bah [abet:puz ~ ~] u.bah))
|%
++ busk :: busk:ho:um:am
|= {waz/(list ship) pax/(list rock)} :: send packets
|= [waz=(list ship) pax=(list rock)] :: send packets
%_ +>
bin
|- ^+ bin
@ -1089,7 +1089,7 @@
==
::
++ cans :: cans:ho:um:am
|= cha/path
|= cha=path
=+ rum=(need (~(get by raz.bah) cha))
=. rum
%= rum
@ -1099,7 +1099,7 @@
(coat cha rum)
::
++ coat :: coat:ho:um:am
|= {cha/path rum/race} :: update input race
|= [cha=path rum=race] :: update input race
^+ +>
=+ cun=(~(get by mis.rum) did.rum)
?: |(!dod.rum ?=(~ cun))
@ -1140,8 +1140,8 @@
==
::
++ cook :: cook:ho:um:am
|= {cop/coop cha/path ram/(unit {ryn/lane dam/flap})}
^- {gud/? con/_+>} :: acknowledgment
|= [cop=coop cha=path ram=(unit [ryn=lane dam=flap])]
^- [gud=? con=_+>] :: acknowledgment
:: ~& [%ames-cook cop cha ram]
=+ rum=(need (~(get by raz.bah) cha))
=+ lat=(~(get by mis.rum) did.rum)
@ -1149,7 +1149,7 @@
~& %ack-late-or-redundant
[%| +>.$]
:- %&
=+ ^- {ryn/lane dam/flap}
=+ ^- [ryn=lane dam=flap]
?^ ram [ryn.u.ram dam.u.ram]
?< ?=(~ lat)
[q r]:u.lat
@ -1161,8 +1161,8 @@
(busk(diz (wast:diz ryn)) xong:diz roc)
::
++ done :: done:ho:um:am
|= {cha/path num/@ud} :: complete outgoing
^- {(unit duct) _+>}
|= [cha=path num=@ud] :: complete outgoing
^- [(unit duct) _+>]
:: ~& [%ames-done cha num]
=+ rol=(need (~(get by ryl.bah) cha))
=+ rix=(~(get by san.rol) num)
@ -1174,10 +1174,10 @@
==
::
++ la :: la:ho:um:am
|_ {kay/cape ryn/lane aut/skin dam/flap} :: per packet
|_ [kay=cape ryn=lane aut=skin dam=flap] :: per packet
::
++ chew :: chew:la:ho:um:am
|= {sin/skin msg/@} :: receive
|= [sin=skin msg=@] :: receive
^+ +>
=< apse
|%
@ -1217,7 +1217,7 @@
::
%full
:: ~& %chew-full
=+ mex=((hard {p/{p/life q/life} q/wyll r/@}) (cue msg))
=+ mex=((hard ,[p=[p=life q=life] q=wyll r=@]) (cue msg))
=. diz (deng:diz q.mex)
=+ wug=cluy:diz
?> =(q.p.mex p.wug)
@ -1229,7 +1229,7 @@
::
%open
:: ~& %chew-open
=+ mex=((hard {p/{~ q/life} q/wyll r/@}) (cue msg))
=+ mex=((hard ,[p=[~ q=life] q=wyll r=@]) (cue msg))
=. diz (deng:diz q.mex)
=+ wug=cluy:diz
?> =(q.p.mex p.wug)
@ -1248,7 +1248,7 @@
--
::
++ chow :: chow:la:ho:um:am
|= fud/meal :: interpret meal
|= fud=meal :: interpret meal
^+ +>
=. diz ?:(=(%none aut) diz (wast:diz ryn))
(dine fud)
@ -1261,7 +1261,7 @@
+(+> (busk(diz (wast:diz ryn)) xong:diz pax))
::
++ deer :: deer:la:ho:um:am
|= {cha/path num/@ud dut/(unit)} :: interpret message
|= [cha=path num=@ud dut=(unit)] :: interpret message
^+ +>
=+ rum=(fall (~(get by raz.bah) cha) *race)
:: ~& [%rx kay cha num [dod.rum did.rum] ?=(~ dut)]
@ -1294,7 +1294,7 @@
==
::
++ dine :: dine:la:ho:um:am
|= fud/meal :: interpret meal
|= fud=meal :: interpret meal
^+ +>
?- -.fud
%back
@ -1345,27 +1345,27 @@
==
::
++ emir :: emir:la:ho:um:am
|= ben/(list boon) :: emit boons
|= ben=(list boon) :: emit boons
^+ +>
?~(ben +> $(ben t.ben, bin [i.ben bin]))
::
++ emit :: emit:la:ho:um:am
|= bun/boon :: emit a boon
|= bun=boon :: emit a boon
+>(bin [bun bin])
::
++ golf :: golf:la:ho:um:am
|= {sin/skin duv/dove} :: assemble fragments
|= [sin=skin duv=dove] :: assemble fragments
^+ +>
%+ chew sin
=+ [nix=0 rax=*(list @)]
|- ^- @
?: =(p.duv nix)
(can ?:(fak.ton.fox 16 13) (turn (flop rax) |=(a/@ [1 a])))
(can ?:(fak.ton.fox 16 13) (turn (flop rax) |=(a=@ [1 a])))
$(nix +(nix), rax [(need (~(get by q.duv) nix)) rax])
-- :: --la:ho:um:am
::
++ pong :: pong:ho:um:am
|= hen/duct :: test connection
|= hen=duct :: test connection
^+ +>
?. ?& =(~ puq.puz)
?| bust:puz
@ -1389,7 +1389,7 @@
(busk xong:diz yem)
::
++ tock :: tock:ho:um:am
|= {cop/coop fap/flap cot/@dr} :: e2e ack by hash
|= [cop=coop fap=flap cot=@dr] :: e2e ack by hash
^+ +>
=^ yoh puz (bick:puz now fap)
=. +>.$
@ -1405,7 +1405,7 @@
(busk xong:diz q.yoh)
::
++ wind :: wind:ho:um:am
|= {gom/soup ham/meal}
|= [gom=soup ham=meal]
:: ~& [%wind her gom]
^+ +>
=^ wyv diz (zuul:diz now ham)
@ -1413,7 +1413,7 @@
(busk xong:diz feh)
::
++ wool :: wool:ho:um:am
|= {hen/duct cha/path val/*} :: send a statement
|= [hen=duct cha=path val=*] :: send a statement
^+ +>
=+ ^= rol ^- rill
=+ rol=(~(get by ryl.bah) cha)
@ -1442,7 +1442,7 @@
=+ qup=~(tap to puq.sop.bah)
:- %qup
%+ turn qup
|= {a/@ud b/soul}
|= [a=@ud b=soul]
:* a
nux.b
liv.b
@ -1455,12 +1455,12 @@
:- %raz
=+ zar=~(tap by raz.bah)
%+ turn zar
|= {a/path b/race}
|= [a=path b=race]
:+ a
did.b
=+ ciy=~(tap by mis.b)
%+ turn ciy
|= {c/@ud d/{p/cape q/lane r/flap s/(unit)}}
|= [c=@ud d=[p=cape q=lane r=flap s=(unit)]]
[c p.d r.d]
::
[%ryl ~(tap to ryl.bah)]
@ -1477,7 +1477,7 @@
-- :: --ho:um:am
::
++ kick :: kick:um:am
|= hen/duct :: test connection
|= hen=duct :: test connection
^+ +>
=+ hoy=hoy.saf.gus
|- ^+ +>.^$
@ -1489,17 +1489,17 @@
^- (list @p) :: active neighbors
%+ turn
%+ skim ~(tap by wab.weg)
|= {a/ship b/bath}
|= [a=ship b=bath]
!(~(boom pu sop.b) now)
|=({a/ship b/bath} a)
|=([a=ship b=bath] a)
::
++ pong :: pong:um:am
|= {her/ship hen/duct} :: test neighbor
|= [her=ship hen=duct] :: test neighbor
^+ +>
zank:(pong:(ho her) hen)
::
++ zork :: zork:um:am
^- {p/(list boon) q/fort} :: resolve
^- [p=(list boon) q=fort] :: resolve
:- (flop bin)
%_ fox
ton (~(su go ton.fox) gus)
@ -1512,15 +1512,15 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4aH, protocol vane ::
::
=| $: fox/fort :: kernel state
=| $: fox=fort :: kernel state
== ::
|= {now/@da eny/@ ski/sley} :: current invocation
|= [now=@da eny=@ ski=sley] :: current invocation
^? :: opaque core
=<
|% :: vane interface
++ call :: handle request
|= $: hen/duct
hic/(hypo (hobo task:able))
|= $: hen=duct
hic=(hypo (hobo task:able))
==
=> %= . :: XX temporary
q.hic
@ -1531,13 +1531,13 @@
~& [%ames-call-flub (@tas `*`-.q.hic)]
((hard task:able) q.hic)
==
^- {p/(list move) q/_..^$}
^- [p=(list move) q=_..^$]
=^ duy ..knob
(knob hen q.hic)
[duy ..^$]
::
++ doze
|= {now/@da hen/duct}
|= [now=@da hen=duct]
=+ doz=`(unit @da)`[~ (add now ~s32)]
|- ^+ doz
?~ zac.fox doz
@ -1552,12 +1552,12 @@
(hunt lth doz rtn.sop.bah)
::
++ load
|= old/fort
|= old=fort
~& %ames-reload
..^$(fox old)
::
++ scry
|= {fur/(unit (set monk)) ren/@tas why/shop syd/desk lot/coin tyl/path}
|= [fur=(unit (set monk)) ren=@tas why=shop syd=desk lot=coin tyl=path]
^- (unit (unit cage))
?. ?=($& -.why) [~ ~]
?~ tyl [~ ~]
@ -1565,27 +1565,27 @@
?~ hun [~ ~]
?. =(`@`0 ren) ~
?+ lot ~
{$$ %ud @}
[$$ %ud @]
(perm p.why u.hun q.p.lot [syd t.tyl])
::
{$$ %da @}
[$$ %da @]
?. =(now q.p.lot) ~
(temp p.why u.hun [syd t.tyl])
==
::
++ stay fox
++ take :: accept response
|= {tea/wire hen/duct hin/(hypo sign:able)}
^- {p/(list move) q/_..^$}
|= [tea=wire hen=duct hin=(hypo sign:able)]
^- [p=(list move) q=_..^$]
=^ duy ..knap
(knap tea hen q.hin)
[duy ..^$]
--
|%
++ claw |=(our/ship ^-(duct hen:(need (~(get by zac.fox) our))))
++ claw |=(our=ship ^-(duct hen:(need (~(get by zac.fox) our))))
++ clop
|= {now/@da hen/duct bon/boon}
^- {(list move) fort}
|= [now=@da hen=duct bon=boon]
^- [(list move) fort]
?- -.bon
%beer
:_ fox(zac (~(put by zac.fox) p.bon `corn`[hen ~ ~ ~]))
@ -1607,7 +1607,7 @@
%mead :_(fox [[hen [%give %hear p.bon q.bon]] ~])
%milk
:: ~& [%milk p.bon q.bon]
?> ?=({@ @ *} q.q.bon)
?> ?=([@ @ *] q.q.bon)
?> ?=(?(%a %c %e %g) i.q.q.bon)
=+ pax=[(scot %p p.p.bon) (scot %p q.p.bon) q.q.bon]
:_ fox [hen %pass pax i.q.q.bon %west p.bon t.q.q.bon r.bon]~
@ -1632,8 +1632,8 @@
==
::
++ knap
|= {tea/wire hen/duct sih/sign:able}
^- {(list move) _+>}
|= [tea=wire hen=duct sih=sign:able]
^- [(list move) _+>]
?- +<.sih
%crud [[[hen [%slip %d %flog +.sih]] ~] +>]
%mack ?~ +>.sih $(sih [%g %nice ~]) :: XX using old code
@ -1641,9 +1641,9 @@
%unto [~ +>]
%woot [~ +>]
?(%mean %nice) :: XX obsolete
?: ?=({%ye ~} tea)
?: ?=([%ye ~] tea)
[~ +>.$]
?> ?=({@ @ @ *} tea)
?> ?=([@ @ @ *] tea)
=+ soq=[(slav %p i.tea) (slav %p i.t.tea)]
=+ pax=t.t.tea
=+ ^= fuy
@ -1652,8 +1652,8 @@
:: ~& [%knap-ack ?-(+<.sih %mean `p.+.sih, %nice ~)]
?-(+<.sih %mean `p.+.sih, %nice ~)
=> %_(. fox q.fuy)
=| out/(list move)
|- ^- {p/(list move) q/_+>.^$}
=| out=(list move)
|- ^- [p=(list move) q=_+>.^$]
?~ p.fuy
[(flop out) +>.^$]
=^ toe fox (clop now hen i.p.fuy)
@ -1661,16 +1661,16 @@
==
::
++ knob
|= {hen/duct kyz/task:able}
^- {(list move) _+>}
|= [hen=duct kyz=task:able]
^- [(list move) _+>]
?: ?=(%crud -.kyz)
[[[hen [%slip %d %flog kyz]] ~] +>]
?: ?=(%west -.kyz)
?: ?=({%pi ~} q.kyz)
?: ?=([%pi ~] q.kyz)
:_ +>.$
[[hen %give %mack ~] ~]
?> ?=({%ta ~} q.kyz)
=+ gox=((hard {p/@p q/@pG r/gens s/pass}) r.kyz)
?> ?=([%ta ~] q.kyz)
=+ gox=((hard ,[p=@p q=@pG r=gens s=pass]) r.kyz)
=+ gus=(need (~(us go ton.fox) p.p.kyz))
=^ wyl gus (born:gus now gox)
=. ton.fox (~(su go ton.fox) gus)
@ -1684,7 +1684,7 @@
~& %ames-weighing
[[hen %give %mass wegh]~ +>]
=+ ^= fuy
^- {p/(list boon) q/fort}
^- [p=(list boon) q=fort]
?- -.kyz
%barn
[~ fox(gad hen)]
@ -1728,62 +1728,62 @@
(~(wise am [now fox]) p.kyz hen q.kyz r.kyz)
==
=> %_(. fox q.fuy)
=| out/(list move)
|- ^- {p/(list move) q/_+>.^$}
=| out=(list move)
|- ^- [p=(list move) q=_+>.^$]
?~ p.fuy
[(flop out) +>.^$]
=^ toe fox (clop now hen i.p.fuy)
$(p.fuy t.p.fuy, out (weld (flop toe) out))
::
++ perm
|= {our/ship his/ship mar/@ud tyl/path}
|= [our=ship his=ship mar=@ud tyl=path]
^- (unit (unit cage))
?~ tyl ~
?: ?=({%name ~} tyl)
?: ?=([%name ~] tyl)
=+ wul=$(tyl [%will ~])
:+ ~ ~
:- %noun
!>(?~(wul (scot %p his) (gnow:title his q.q.q:((hard deyd) -.u.wul))))
?: ?=({%gcos ~} tyl)
?: ?=([%gcos ~] tyl)
=+ wul=$(tyl [%will ~])
?~(wul ~ ``[%noun !>(`gcos`q.q.q:((hard deyd) -.u.wul))])
=+ gys=(~(us go ton.fox) our)
?~ gys ~
?. =(our his)
?: ?=({%will ~} tyl)
?: ?=([%will ~] tyl)
=+ fod=(~(get by hoc.saf.u.gys) his)
?~ fod ~
%+ bind (rick mar his lew.wod.u.fod)
|=(a/wyll `[%noun !>(a)])
?: ?=({%tick ~} tyl)
|=(a=wyll `[%noun !>(a)])
?: ?=([%tick ~] tyl)
?. =(our (sein:title his)) ~
``[%noun !>((end 6 1 (shaf %tick (mix his (shax sec:ex:q:sen:u.gys)))))]
~
?: ?=({%buck ~} tyl)
?: ?=([%buck ~] tyl)
=+ muc=(rice mar sex:u.gys)
=+ luw=(rick mar our law.saf.u.gys)
?. &(?=(^ muc) ?=(^ luw)) ~
``[%noun !>(`buck`[u.muc u.luw])]
?: ?=({%code ~} tyl)
?: ?=([%code ~] tyl)
``[%noun !>((end 6 1 (shaf %pass (shax sec:ex:q:sen:u.gys))))]
?: ?=({%will ~} tyl)
(bind (rick mar our law.saf.u.gys) |=(a/wyll `[%noun !>(a)]))
?: ?=([%will ~] tyl)
(bind (rick mar our law.saf.u.gys) |=(a=wyll `[%noun !>(a)]))
~
::
++ temp
|= {our/ship his/ship tyl/path}
|= [our=ship his=ship tyl=path]
^- (unit (unit cage))
?: ?=({?(%show %tell) *} tyl)
?: ?=([?(%show %tell) *] tyl)
?^ t.tyl [~ ~]
=+ gys=(~(us go ton.fox) our)
?~ gys [~ ~]
=+ zet=zest:(ho:(~(um am [now fox]) our) his)
``[%noun ?:(=(%show i.tyl) !>(>zet<) !>(zet))]
?: ?=({%pals ~} tyl)
?: ?=([%pals ~] tyl)
?. =(our his)
~
``[%noun !>(pals:(~(um am [now fox]) our))]
?. ?=({%life ~} tyl)
?. ?=([%life ~] tyl)
=+ muc=$(tyl [%life ~])
(perm our his ?~(muc 0 (@ud u.muc)) tyl)
=+ gys=(~(us go ton.fox) our)