mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
Tighten types on some vanes.
This commit is contained in:
parent
01465717d3
commit
6e00dd5ee3
188
arvo/clay.hoon
188
arvo/clay.hoon
@ -1,21 +1,35 @@
|
||||
::
|
||||
!:
|
||||
:: clay (4c), revision control
|
||||
::
|
||||
|= pit=vase
|
||||
=> |%
|
||||
++ gift :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%ergo p=@p q=@tas r=@ud] :: version update
|
||||
[%note p=@tD q=tank] :: debug message
|
||||
[%writ p=riot] :: response
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%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
|
||||
[%wake ~] :: timer activate
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
[%warp p=sock q=riff] :: file request
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
::
|
||||
++ note :: out request $->
|
||||
card
|
||||
::
|
||||
$% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
|
||||
[%want p=sock q=path r=*] :: to %ames
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%waft p=sock q=*] :: by %ames
|
||||
[%went p=ship q=cape] :: by %ames
|
||||
[%writ p=riot] :: by %clay
|
||||
== ::
|
||||
-- =>
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 4cA, filesystem logic ::
|
||||
@ -27,9 +41,9 @@
|
||||
|= [now=@da hun=duct hez=(unit duct)]
|
||||
|= [[who=@p for=@p] syd=@ta rede]
|
||||
=* red +<+>
|
||||
=| yel=(list ,[p=duct q=card])
|
||||
=| yel=(list ,[p=duct q=gift])
|
||||
=| byn=(list ,[p=duct q=riot])
|
||||
=| vag=(list ,[p=duct q=card])
|
||||
=| vag=(list ,[p=duct q=gift])
|
||||
=| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]])
|
||||
|%
|
||||
++ abet
|
||||
@ -37,13 +51,13 @@
|
||||
:_ red
|
||||
;: weld
|
||||
%+ turn (flop yel)
|
||||
|=([a=duct b=card] [hun %give b])
|
||||
|=([a=duct b=gift] [hun %give b])
|
||||
::
|
||||
%+ turn (flop byn)
|
||||
|=([a=duct b=riot] [a %give [%writ b]])
|
||||
::
|
||||
%+ turn (flop vag)
|
||||
|=([a=duct b=card] [a %give b])
|
||||
|=([a=duct b=gift] [a %give b])
|
||||
::
|
||||
%+ turn (flop say)
|
||||
|= [a=duct b=path c=ship d=[p=@ud q=riff]]
|
||||
@ -344,96 +358,76 @@
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: update
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
::
|
||||
++ call :: handle request
|
||||
|= $: hen=duct
|
||||
hic=(hypo ?([%soft p=*] kiss))
|
||||
==
|
||||
=. hic =+ kyt=-:!>(q.hic) :: XX temporary
|
||||
?: (~(nest ut kyt) | p.hic)
|
||||
hic
|
||||
~& [%clay-call-flub -.q.hic]
|
||||
[kyt ((hard ?([%soft p=*] kiss)) q.hic)]
|
||||
?: ?=(%soft -.q.hic)
|
||||
$(q.hic ((hard ?([%soft p=*] kiss)) p.q.hic))
|
||||
^- [p=(list move) q=_..^$]
|
||||
?+ -.q.hin [[[hen %give q.hin] ~] ..^$]
|
||||
%crud
|
||||
[[[hen %slip %d %flog q.hin] ~] ..^$]
|
||||
::
|
||||
%soft
|
||||
$(q.hin ((hard card) p.q.hin))
|
||||
::
|
||||
?- -.q.hic
|
||||
%init
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin [hen ~ ~]))]
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))]
|
||||
::
|
||||
?(%info %into)
|
||||
?: =(%$ q.q.hin)
|
||||
?. ?=(%into -.q.hin) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hin))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
|
||||
?: =(%$ 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
|
||||
=+ une=(un p.q.hin now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hin +.zot)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hin) hez.yar.une [~ hen]))
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
?(%ingo %invo)
|
||||
?: =(%$ q.q.hin)
|
||||
?. ?=(%invo -.q.hin) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hin))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
|
||||
?: =(%$ 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
|
||||
=+ une=(un p.q.hin now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hin +.zot)
|
||||
abet:une(hez.yar ?.(=(%invo -.q.hin) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
%waft
|
||||
?> ?=([@ @ ~] tea)
|
||||
=+ syd=(need (slaw %tas i.tea))
|
||||
=+ inx=(need (slaw %ud i.t.tea))
|
||||
=^ mos ruf
|
||||
=+ ^= zot
|
||||
abet:wake:(knit:(do now p.q.hin syd ruf) [inx ((hard riot) q.q.hin)])
|
||||
[-.zot (posh q.p.q.hin syd +.zot ruf)]
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
%warp
|
||||
=^ mos ruf
|
||||
?: =(p.p.q.hin q.p.q.hin)
|
||||
=+ une=(un p.p.q.hin now ruf)
|
||||
=+ wex=(di:une p.q.q.hin)
|
||||
?: =(p.p.q.hic q.p.q.hic)
|
||||
=+ une=(un p.p.q.hic now ruf)
|
||||
=+ wex=(di:une p.q.q.hic)
|
||||
=+ ^= woo
|
||||
?~ q.q.q.hin
|
||||
?~ q.q.q.hic
|
||||
abet:(ease:wex hen)
|
||||
abet:(eave:wex hen u.q.q.q.hin)
|
||||
[-.woo abet:(pish:une p.q.q.hin +.woo)]
|
||||
=+ wex=(do now p.q.hin p.q.q.hin ruf)
|
||||
abet:(eave:wex hen u.q.q.q.hic)
|
||||
[-.woo abet:(pish:une p.q.q.hic +.woo)]
|
||||
=+ wex=(do now p.q.hic p.q.q.hic ruf)
|
||||
=+ ^= woo
|
||||
?~ q.q.q.hin
|
||||
?~ q.q.q.hic
|
||||
abet:(ease:wex hen)
|
||||
abet:(eave:wex hen u.q.q.q.hin)
|
||||
[-.woo (posh q.p.q.hin p.q.q.hin +.woo ruf)]
|
||||
abet:(eave:wex hen u.q.q.q.hic)
|
||||
[-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)]
|
||||
[mos ..^$]
|
||||
::
|
||||
%wart
|
||||
?> ?=(%re q.q.hin)
|
||||
=+ ryf=((hard riff) s.q.hin)
|
||||
?> ?=(%re q.q.hic)
|
||||
=+ ryf=((hard riff) s.q.hic)
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
:^ %toss %c
|
||||
[(scot %p p.p.q.hin) (scot %p q.p.q.hin) r.q.hin]
|
||||
[%warp [p.p.q.hin p.p.q.hin] ryf]
|
||||
[(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic]
|
||||
[%warp [p.p.q.hic p.p.q.hic] ryf]
|
||||
==
|
||||
::
|
||||
%writ
|
||||
?> ?=([@ @ *] tea)
|
||||
=+ our=(need (slaw %p i.tea))
|
||||
=+ him=(need (slaw %p i.t.tea))
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
[%toss %a ~ [%want [our him] [%r %re %c t.t.tea] p.q.hin]]
|
||||
==
|
||||
::
|
||||
%went :: XX should actually propagate
|
||||
?: =(%good q.q.hin) [~ ..^$]
|
||||
~& [%clay-lost p.q.hin tea]
|
||||
[~ ..^$]
|
||||
::
|
||||
%wake
|
||||
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
|
||||
@ -445,10 +439,6 @@
|
||||
$(dal t.dal, ruf abet:une, mos (weld som mos))
|
||||
==
|
||||
::
|
||||
++ call :: process move
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
(take ~ hen hic)
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
=| nex=(unit ,@da)
|
||||
@ -479,4 +469,40 @@
|
||||
|=(a=(unit) (bind a |=(b=* [%noun b])))
|
||||
::
|
||||
++ stay [%0 ruf]
|
||||
++ take :: accept response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
=. hin =+ kyn=-:!>(q.hin) :: XX temporary
|
||||
?: (~(nest ut kyn) | p.hin)
|
||||
hin
|
||||
~& [%eyre-take-flub -.q.hin]
|
||||
[kyn ((hard sign) q.hin)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
?- -.q.hin
|
||||
%crud
|
||||
[[[hen %slip %d %flog q.hin] ~] ..^$]
|
||||
::
|
||||
%waft
|
||||
?> ?=([@ @ ~] tea)
|
||||
=+ syd=(need (slaw %tas i.tea))
|
||||
=+ inx=(need (slaw %ud i.t.tea))
|
||||
=^ mos ruf
|
||||
=+ ^= zot
|
||||
abet:wake:(knit:(do now p.q.hin syd ruf) [inx ((hard riot) q.q.hin)])
|
||||
[-.zot (posh q.p.q.hin syd +.zot ruf)]
|
||||
[mos ..^$]
|
||||
::
|
||||
%writ
|
||||
?> ?=([@ @ *] tea)
|
||||
=+ our=(need (slaw %p i.tea))
|
||||
=+ him=(need (slaw %p i.t.tea))
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
[%toss %a ~ [%want [our him] [%r %re %c t.t.tea] p.q.hin]]
|
||||
==
|
||||
::
|
||||
%went
|
||||
?: =(%good q.q.hin) [~ ..^$]
|
||||
~& [%clay-lost p.q.hin tea]
|
||||
[~ ..^$]
|
||||
==
|
||||
--
|
||||
|
537
arvo/eyre.hoon
537
arvo/eyre.hoon
@ -5,38 +5,46 @@
|
||||
=> =~
|
||||
|% :: metastructures
|
||||
++ gift :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%thou p=httr] :: raw http response
|
||||
[%thus p=@ud q=(unit hiss)] :: http request/cancel
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%born ~] :: new unix process
|
||||
[%init p=@p] :: report install
|
||||
[%them p=(unit hiss)] :: outbound request
|
||||
[%they p=@ud q=httr] :: inbound response
|
||||
[%this p=? q=clip r=httq] :: inbound request
|
||||
[%thud ~] :: inbound cancel
|
||||
[%wart p=sock q=@tas r=path s=*] :: urbit message
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
::
|
||||
++ note :: out request $->
|
||||
card
|
||||
::
|
||||
$% [%exec p=@p q=(unit silk)] :: to %ford
|
||||
[%hail ~] :: to %batz
|
||||
[%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
|
||||
[%line p=@t] :: to %batz
|
||||
[%ling ~] :: to %batz
|
||||
[%show p=hasp q=(unit hope)] :: to %gall
|
||||
[%this p=? q=clip r=httq] :: to %eyre
|
||||
[%thud ~] :: to %eyre
|
||||
[%want p=sock q=path r=*] :: to %ames
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%helo p=path q=prod] :: by %batz
|
||||
[%made p=(each beet (list tank))] :: by %ford
|
||||
[%talk p=tank] :: by %batz
|
||||
[%tell p=(list ,@t)] :: by %batz
|
||||
[%text p=tape] :: by %batz
|
||||
[%thou p=httr] :: by %eyre
|
||||
[%waft p=sock q=*] :: by %ames
|
||||
[%warn p=tape] :: by %batz
|
||||
[%went p=ship q=cape] :: by %ames
|
||||
[%writ p=riot] :: by %clay
|
||||
==
|
||||
--
|
||||
|% :: structures
|
||||
++ ju :: jug engine
|
||||
|/ a=(jug)
|
||||
+- get
|
||||
|* b=*
|
||||
=+ c=(~(get by a) b)
|
||||
?~(c ~ u.c)
|
||||
::
|
||||
+- has
|
||||
|* [b=* c=*]
|
||||
^- ?
|
||||
(~(has in (get(+< a) b)) c)
|
||||
::
|
||||
+- put
|
||||
|* [b=* c=*]
|
||||
^+ a
|
||||
=+ d=(get(+< a) b)
|
||||
(~(put by a) b (~(put in d) c))
|
||||
--
|
||||
++ bolo :: eyre state
|
||||
$: %0 :: version
|
||||
gub=@t :: random identity
|
||||
@ -92,14 +100,9 @@
|
||||
$: pef=@t :: server prefix
|
||||
wup=(map hole cyst) :: secure sessions
|
||||
cah=(map cash vase) :: compilation cache
|
||||
:: wez=(map duct root) :: all routes
|
||||
== ::
|
||||
-- ::
|
||||
|%
|
||||
++ colt :: prune to save
|
||||
|= bol=bolo
|
||||
%_(bol own (~(run by own.bol) |=(a=serf a(cah ~))))
|
||||
::
|
||||
++ coss :: cookie search
|
||||
|= [nam=@t mah=math]
|
||||
^- (unit hole)
|
||||
@ -183,10 +186,7 @@
|
||||
--
|
||||
|% :: functions
|
||||
++ ye :: per event
|
||||
=| $: $: $: tea=wire :: event place
|
||||
hen=duct :: event floor
|
||||
fav=card :: event data
|
||||
== ::
|
||||
=| $: $: hen=duct :: event floor
|
||||
$: now=@da :: event date
|
||||
eny=@ :: unique entropy
|
||||
sky=$+(* (unit)) :: system namespace
|
||||
@ -204,56 +204,87 @@
|
||||
++ adit
|
||||
.(ney (mix eny ney))
|
||||
::
|
||||
++ apex
|
||||
|- ^+ +
|
||||
?+ -.fav
|
||||
+.$(mow [[hen %give fav] mow])
|
||||
++ axon
|
||||
|= [tea=wire sin=sign]
|
||||
^+ +>
|
||||
?- -.sin
|
||||
%crud
|
||||
+>.$(mow [[hen %slip %d %flog sin] mow])
|
||||
::
|
||||
%born +(ged hen) :: register external
|
||||
%made
|
||||
?. ?=([%honk @ @ @ ~] tea)
|
||||
+>.$
|
||||
%- galt
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.sin]
|
||||
::
|
||||
%thou :: remote return
|
||||
?> ?=([@ @ *] tea)
|
||||
(hajj (need (slaw %p i.tea)) (need (slaw %p i.t.tea)) t.t.tea p.sin)
|
||||
::
|
||||
%waft
|
||||
?. ?=([%hork @ ~] tea)
|
||||
+>.$
|
||||
(gosh q.p.sin (need (slaw %ud i.t.tea)) ((hard httr) q.sin))
|
||||
::
|
||||
%went
|
||||
+>.$
|
||||
::
|
||||
%writ
|
||||
?. ?=([%hoot @ @ @ ~] tea)
|
||||
+>.$
|
||||
%- gout
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.sin]
|
||||
::
|
||||
?(%helo %tell %text %talk %warn)
|
||||
?. ?=([%cons @ @ @ ~] tea)
|
||||
+>.$
|
||||
%- goat
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) sin]
|
||||
==
|
||||
::
|
||||
++ apex
|
||||
|= kyz=kiss
|
||||
^+ +>
|
||||
?- -.kyz
|
||||
%born +>.$(ged hen) :: register external
|
||||
%init :: register ownership
|
||||
%_ +.$
|
||||
hov ?~(hov [~ p.fav] [~ (min u.hov p.fav)])
|
||||
%_ +>.$
|
||||
hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)])
|
||||
own
|
||||
%+ ~(put by own)
|
||||
p.fav
|
||||
p.kyz
|
||||
^- serf
|
||||
:* (cat 3 gub (rsh 3 1 (scot %p p.fav)))
|
||||
:* (cat 3 gub (rsh 3 1 (scot %p p.kyz)))
|
||||
~
|
||||
~
|
||||
==
|
||||
==
|
||||
::
|
||||
%made
|
||||
?. ?=([%honk @ @ @ ~] tea)
|
||||
+.$
|
||||
%- galt
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.fav]
|
||||
::
|
||||
%them :: outbound request
|
||||
?~ p.fav
|
||||
?~ p.kyz
|
||||
=+ sud=(need (~(get by kes) hen))
|
||||
%= +.$
|
||||
%= +>.$
|
||||
mow :_(mow [ged [%give %thus sud ~]])
|
||||
q.ask (~(del by q.ask) sud)
|
||||
kes (~(del by kes) hen)
|
||||
==
|
||||
%= +.$
|
||||
mow :_(mow [ged [%give %thus p.ask p.fav]])
|
||||
%= +>.$
|
||||
mow :_(mow [ged [%give %thus p.ask p.kyz]])
|
||||
p.ask +(p.ask)
|
||||
q.ask (~(put by q.ask) p.ask hen u.p.fav)
|
||||
q.ask (~(put by q.ask) p.ask hen u.p.kyz)
|
||||
kes (~(put by kes) hen p.ask)
|
||||
==
|
||||
::
|
||||
%they :: inbound response
|
||||
=+ kas=(need (~(get by q.ask) p.fav))
|
||||
%= +.$
|
||||
mow :_(mow [p.kas [%give %thou q.fav]])
|
||||
=+ kas=(need (~(get by q.ask) p.kyz))
|
||||
%= +>.$
|
||||
mow :_(mow [p.kas [%give %thou q.kyz]])
|
||||
q.ask (~(del by q.ask) p.kas)
|
||||
==
|
||||
::
|
||||
%this :: inbound request
|
||||
=* sec p.fav :: ? :: https bit
|
||||
=* heq r.fav :: httq :: request content
|
||||
=* sec p.kyz :: ? :: https bit
|
||||
=* heq r.kyz :: httq :: request content
|
||||
=+ ryp=`quri`(rash q.heq zest:epur)
|
||||
=+ mah=(ecco r.heq)
|
||||
=+ ^= pul ^- purl
|
||||
@ -264,50 +295,26 @@
|
||||
[[sec (rash i.u.hot thor:epur)] p.ryp q.ryp]
|
||||
==
|
||||
=. p.p.pul |(p.p.pul =([& /localhost] r.p.pul))
|
||||
(hell pul +.fav [p.heq mah s.heq])
|
||||
(hell pul +.kyz [p.heq mah s.heq])
|
||||
::
|
||||
%thud :: cancel request
|
||||
=+ dul=(~(get by lor) hen)
|
||||
?~ dul +.$
|
||||
?~ dul +>.$
|
||||
=. lor (~(del by lor) hen)
|
||||
?- -.q.u.dul
|
||||
& =+ boy=(myth p.p.q.u.dul q.p.q.u.dul)
|
||||
?~(boy +.$ abet:(idle:u.boy p.u.dul))
|
||||
?~(boy +>.$ abet:(idle:u.boy p.u.dul))
|
||||
| (hops p.q.u.dul p.u.dul)
|
||||
==
|
||||
::
|
||||
%thou :: remote return
|
||||
?> ?=([@ @ *] tea)
|
||||
(hajj (need (slaw %p i.tea)) (need (slaw %p i.t.tea)) t.t.tea p.fav)
|
||||
::
|
||||
%wart :: remote request
|
||||
?+ q.fav
|
||||
~& [%strange-wart p.fav q.fav]
|
||||
+.$
|
||||
?+ q.kyz
|
||||
~& [%strange-wart p.kyz q.kyz]
|
||||
+>.$
|
||||
::
|
||||
%pr (hare p.p.fav r.fav q.p.fav s.fav)
|
||||
%pc (here p.p.fav q.p.fav s.fav)
|
||||
%pr (hare p.p.kyz r.kyz q.p.kyz s.kyz)
|
||||
%pc (here p.p.kyz q.p.kyz s.kyz)
|
||||
==
|
||||
::
|
||||
%waft
|
||||
?. ?=([%hork @ ~] tea)
|
||||
+.$
|
||||
(gosh q.p.fav (need (slaw %ud i.t.tea)) ((hard httr) q.fav))
|
||||
::
|
||||
%went
|
||||
+.$
|
||||
::
|
||||
%writ
|
||||
?. ?=([%hoot @ @ @ ~] tea)
|
||||
+.$
|
||||
%- gout
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.fav]
|
||||
::
|
||||
?(%helo %tell %text %talk %warn)
|
||||
?. ?=([%cons @ @ @ ~] tea)
|
||||
+.$
|
||||
%- goat
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) fav]
|
||||
==
|
||||
::
|
||||
++ doss :: host to ship
|
||||
@ -336,12 +343,12 @@
|
||||
abet:work:(~(inch ya [our ses] u.suf u.cuz) num mez)
|
||||
::
|
||||
++ goat
|
||||
|= [our=ship ses=hole num=@ud fav=card]
|
||||
|= [our=ship ses=hole num=@ud sin=sign]
|
||||
=+ suf=(~(get by own) our)
|
||||
?~ suf +>.$
|
||||
=+ cuz=(~(get by wup.u.suf) ses)
|
||||
?~ cuz +>.$
|
||||
abet:work:(~(dodo ya [our ses] u.suf u.cuz) num fav)
|
||||
abet:work:(~(dodo ya [our ses] u.suf u.cuz) num sin)
|
||||
::
|
||||
++ gosh :: receive %pr response
|
||||
|= [him=ship num=@ud har=httr]
|
||||
@ -629,8 +636,8 @@
|
||||
abet:work:(~(into ya [our p.saw] sef q.saw) pul moh)
|
||||
::
|
||||
++ muff :: return card
|
||||
|= fav=card
|
||||
+>(mow :_(mow [hen %give fav]))
|
||||
|= gef=gift
|
||||
+>(mow :_(mow [hen %give gef]))
|
||||
::
|
||||
++ myth :: load session
|
||||
|= [our=ship ses=hole]
|
||||
@ -825,23 +832,23 @@
|
||||
%_(+> aut.ced (~(put ju aut.ced) %$ (scot %p him)))
|
||||
::
|
||||
++ dodo :: console s->c
|
||||
|= [con=@ud fav=card]
|
||||
|= [con=@ud sin=sign]
|
||||
^+ +>
|
||||
=+ cal=(need (~(get by cow) con))
|
||||
=+ ^= jon ^- json
|
||||
?: ?=(%helo -.fav)
|
||||
?: ?=(%helo -.sin)
|
||||
%+ joba %helo
|
||||
%- jobe
|
||||
:~ [%path [%a `(list jval)`(turn p.fav |=(a=@ta [%s a]))]]
|
||||
[%prod ~[%a [%s p.q.fav] (jape q.q.fav) (jape r.q.fav)]]
|
||||
:~ [%path [%a `(list jval)`(turn p.sin |=(a=@ta [%s a]))]]
|
||||
[%prod ~[%a [%s p.q.sin] (jape q.q.sin) (jape r.q.sin)]]
|
||||
==
|
||||
%+ joba %text
|
||||
:- %a ^- (list jval)
|
||||
?+ -.fav ~|(-.fav !!)
|
||||
%tell (turn p.fav |=(a=@t [%s a]))
|
||||
%text [%s (crip p.fav)]~
|
||||
%talk (turn (~(win re p.fav) [0 80]) |=(a=tape [%s (crip a)]))
|
||||
%warn [%s (crip '!' p.fav)]~
|
||||
?+ -.sin ~|(-.sin !!)
|
||||
%tell (turn p.sin |=(a=@t [%s a]))
|
||||
%text [%s (crip p.sin)]~
|
||||
%talk (turn (~(win re p.sin) [0 80]) |=(a=tape [%s (crip a)]))
|
||||
%warn [%s (crip '!' p.sin)]~
|
||||
==
|
||||
=+ ^= yov ^- (list ,@ud)
|
||||
=+ yov=(~(get by voy.cal) ono.cal)
|
||||
@ -1165,296 +1172,22 @@
|
||||
?> ?=(%way pez.u.pup)
|
||||
+>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot])))
|
||||
::
|
||||
++ lace :: load and execute
|
||||
|= [pax=path sam=vase]
|
||||
^- [gank _+>]
|
||||
=^ hum +>.$ (lack pax)
|
||||
:_ +>.$
|
||||
=+ mud=(need hum)
|
||||
?: ?=(| -.mud) mud
|
||||
=+ typ=(~(play ut [%cell p.p.mud p.sam]) [%cncl [~ 2] [~ 3]])
|
||||
=+ ton=(mong [q.p.mud q.sam] sky)
|
||||
?- -.ton
|
||||
%0 [%& typ p.ton]
|
||||
%1 [%| (turn p.ton |=(a=* (smyt (path a))))]
|
||||
%2 [%| p.ton]
|
||||
==
|
||||
::
|
||||
++ lack :: probe/load
|
||||
|= pax=path
|
||||
^- [(unit gank) _+>]
|
||||
=+ ans=(sky %cz pax)
|
||||
?~ ans [~ +>.$]
|
||||
=+ ank=((hard ankh) u.ans)
|
||||
?~ q.ank [~ +>.$]
|
||||
=+ huc=(~(get by cah.sef) p.u.q.ank)
|
||||
?^ huc
|
||||
[[~ %& u.huc] +>.$]
|
||||
=+ mud=(much pax q.u.q.ank)
|
||||
:- [~ mud]
|
||||
?: ?=(| -.mud) +>.$
|
||||
+>.$(cah.sef (~(put by cah.sef) p.u.q.ank p.mud))
|
||||
::
|
||||
++ lass :: load secret
|
||||
^- @ta
|
||||
%^ rsh 3 1
|
||||
(scot %p (,@ (need (sky %a (scot %p our) %code (scot %da now) ~))))
|
||||
::
|
||||
++ lend :: load directory node
|
||||
|= pax=path
|
||||
^- arch
|
||||
((hard arch) (need (sky %cy pax)))
|
||||
::
|
||||
++ liar :: load file as vase
|
||||
|= pax=path
|
||||
^- vase
|
||||
=+ fil=(lick pax)
|
||||
:_(fil ?^(fil [%cell %noun %noun] [%atom %$]))
|
||||
::
|
||||
++ lich :: simple directory
|
||||
|= pax=path
|
||||
^- (list ,@tas)
|
||||
(turn (~(tap by r:(lend pax)) ~) |=([a=@tas b=~] a))
|
||||
::
|
||||
++ lick :: load file
|
||||
|= pax=path
|
||||
(need (sky %cx pax))
|
||||
::
|
||||
++ lily :: translation targets
|
||||
|= [pre=path for=@tas]
|
||||
^- (list ,@tas)
|
||||
(lich :(weld pre `path`/tan `path`/[for]))
|
||||
::
|
||||
++ lion :: translation graph
|
||||
|= [too=@tas pre=path fro=(list ,@tas)]
|
||||
^- (unit (list ,@tas))
|
||||
=| war=(set ,@tas)
|
||||
=< -:(apex fro)
|
||||
|%
|
||||
++ apex
|
||||
|= rof=(list ,@tas)
|
||||
^- [(unit (list ,@tas)) _+>]
|
||||
?~ rof
|
||||
[~ +>]
|
||||
=^ orf +> (apse i.rof)
|
||||
?^(orf [orf +>.$] $(rof t.rof))
|
||||
::
|
||||
++ apse
|
||||
|= for=@tas
|
||||
^- [(unit (list ,@tas)) _+>]
|
||||
?: =(for too) [[~ [too ~]] +>]
|
||||
?: (~(has in war) for) [~ +>]
|
||||
=. war (~(put in war) for)
|
||||
=^ orf +>.$ (apex (lily pre for))
|
||||
:_ +>.$
|
||||
?~(orf ~ [~ [for u.orf]])
|
||||
--
|
||||
::
|
||||
++ link :: translate
|
||||
|= [too=@tas pre=path for=@tas vax=vase]
|
||||
^- [(unit gank) _+>]
|
||||
?: =(for too) [[~ %& vax] +>.$]
|
||||
=+ wuy=(lion too pre [for ~])
|
||||
?~ wuy [~ +>.$]
|
||||
?> ?=(^ u.wuy)
|
||||
?> =(for i.u.wuy)
|
||||
|- ^- [(unit gank) _+>.^$]
|
||||
?~ t.u.wuy [[~ %& vax] +>.^$]
|
||||
=^ mud +>.^$ (lite i.t.u.wuy pre for vax)
|
||||
?: ?=(| -.mud) [[~ mud] +>.^$]
|
||||
$(t.u.wuy t.t.u.wuy, for i.t.u.wuy, vax p.mud)
|
||||
::
|
||||
++ lino :: translate
|
||||
|= [too=@tas pre=path for=@tas vax=vase]
|
||||
^- [gank _+>]
|
||||
=^ gun +>.$ (link too pre for vax)
|
||||
:_ +>.$
|
||||
?^ gun u.gun
|
||||
[%| [[%leaf "can't make {<too>} from {<for>}"] ~]]
|
||||
::
|
||||
++ lite :: step translate
|
||||
|= [too=@tas pre=path for=@tas vax=vase]
|
||||
^- [gank _+>]
|
||||
(lace :(weld pre `path`/tan `path`/[for] `path`/[too] `path`/hoon) vax)
|
||||
::
|
||||
++ loan :: normalize vase
|
||||
|= [for=@tas pre=path vax=vase]
|
||||
^- [gank _+>]
|
||||
=^ mof +>.$ (lack :(weld pre `path`/nor `path`/[for] `path`/hoon))
|
||||
:_ +>.$
|
||||
?~ mof [%& vax]
|
||||
?: ?=(| -.u.mof) u.mof
|
||||
=+ pud=(mule |.((~(play ut `type`p.p.u.mof) [%cnzy %$])))
|
||||
?: ?=(| -.pud) pud
|
||||
?: (~(nest ut `type`p.pud) | p.vax)
|
||||
[%& vax]
|
||||
(mule |.((slam `vase`p.u.mof vax)))
|
||||
::
|
||||
++ lobo :: vase to love
|
||||
|= [for=logo pre=path vax=vase]
|
||||
^- [(each love (list tank)) _+>]
|
||||
=^ mud +>.$ (lino %mime pre for vax)
|
||||
:_ +>.$
|
||||
?: ?=(| -.mud) mud
|
||||
[%& %mid (mite -.q.p.mud) (octs +.q.p.mud)]
|
||||
::
|
||||
++ loch :: validate vase
|
||||
|= [for=@tas pre=path vax=vase]
|
||||
^- [gank _+>]
|
||||
=^ wav +>.$ (lack :(weld pre `path`/val `path`/[for] `path`/hoon))
|
||||
:_ +>.$
|
||||
?~ wav [%& vax]
|
||||
?: ?=(| -.u.wav) u.wav
|
||||
(mule |.((slam `vase`p.u.wav vax)))
|
||||
::
|
||||
++ loot :: load extension tree
|
||||
|= [pax=path one=(unit logo)]
|
||||
^- (list path)
|
||||
=| [tex=path all=(list path)]
|
||||
|- ^- (list path)
|
||||
?^ one
|
||||
=+ don=`path`[u.one ~]
|
||||
=+ arc=(lend (weld pax don))
|
||||
?~(q.arc ~ [[u.one tex] ~])
|
||||
=+ arc=(lend pax)
|
||||
=+ ryx=(~(tap by r.arc) ~)
|
||||
=- ?~(q.arc orz [tex orz])
|
||||
^= orz
|
||||
|- ^- (list path)
|
||||
?~ ryx all
|
||||
%= ^$
|
||||
one [~ %hoon]
|
||||
pax (weld pax `path`[p.i.ryx ~])
|
||||
tex [p.i.ryx tex]
|
||||
all $(ryx t.ryx)
|
||||
==
|
||||
::
|
||||
++ lope :: normalize/validate
|
||||
|= [for=@tas pre=path vax=vase]
|
||||
^- [gank _+>]
|
||||
=^ mud +>.$ (loan for pre vax)
|
||||
?: ?=(| -.mud) [mud +>.$]
|
||||
(loch for pre p.mud)
|
||||
::
|
||||
++ loth :: direct hard
|
||||
|= [for=logo pre=path pax=path]
|
||||
^- [gank _+>]
|
||||
(lope for pre (liar pax))
|
||||
::
|
||||
++ loti :: translated soft
|
||||
|= [too=logo for=logo pre=path pax=path sam=vase]
|
||||
^- [gank _+>]
|
||||
=^ mud +>.$ (loto for pre pax sam)
|
||||
?: ?=(| -.mud) [mud +>.$]
|
||||
(lino too pre for p.mud)
|
||||
::
|
||||
++ loto :: direct soft
|
||||
|= [for=logo pre=path pax=path sam=vase]
|
||||
^- [gank _+>]
|
||||
=^ mud +>.$ (lace pax sam)
|
||||
?: ?=(| -.mud) [mud +>.$]
|
||||
(lope for pre p.mud)
|
||||
::
|
||||
++ lots :: translated hard
|
||||
|= [too=logo for=logo pre=path pax=path]
|
||||
^- [gank _+>]
|
||||
=^ mud +>.$ (lope for pre (liar pax))
|
||||
?: ?=(| -.mud) [mud +>.$]
|
||||
(lino too pre for p.mud)
|
||||
::
|
||||
++ loud :: synthesis search
|
||||
|= [syn=? for=logo pre=path mid=path]
|
||||
^- (list ,[p=path q=path r=loco])
|
||||
=| suf=path
|
||||
|- ^- (list ,[p=path q=path r=loco])
|
||||
=+ pax=(weld pre (flop mid))
|
||||
=+ lot=(loot pax ?:(syn ~ [~ for]))
|
||||
=- ?^ tol tol
|
||||
?~ mid ~
|
||||
$(mid t.mid, suf [i.mid suf])
|
||||
^= tol
|
||||
|- ^- (list ,[p=path q=path r=loco])
|
||||
?~ lot ~
|
||||
=+ mor=$(lot t.lot)
|
||||
?~ i.lot mor
|
||||
=+ axp=(weld pax `path`(flop i.lot))
|
||||
?: &(syn ?=([%hoon @ ~] i.lot))
|
||||
:_(mor [mid suf | ?:(=(for i.t.i.lot) ~ [~ i.t.i.lot]) axp])
|
||||
?: ?=([@ ~] i.lot)
|
||||
:_(mor [mid suf & ?:(=(for i.i.lot) ~ [~ i.i.lot]) axp])
|
||||
mor
|
||||
::
|
||||
++ loup :: weak synthesis
|
||||
|= [for=logo pre=path mid=path]
|
||||
^- [(unit gank) _+>]
|
||||
=+ syt=(weld pre `path`[%syn ~])
|
||||
=+ ^= luc ^- (list ,[p=path q=path r=loco])
|
||||
=+ luc=(loud | for pre mid)
|
||||
?. ?=(~ luc) luc
|
||||
(loud & for syt mid)
|
||||
?: =(~ luc) [~ +>.$]
|
||||
=+ ^= waz
|
||||
|- ^- $: p=(list ,[p=path q=path r=path])
|
||||
q=(list ,[p=path q=path r=path])
|
||||
r=(list ,[p=path q=path r=[p=@tas q=path]])
|
||||
s=(list ,[p=path q=path r=[p=@tas q=path]])
|
||||
==
|
||||
?~ luc [~ ~ ~ ~]
|
||||
=+ mor=$(luc t.luc)
|
||||
?- -.r.i.luc
|
||||
& ?~ q.r.i.luc
|
||||
[[[p.i.luc q.i.luc r.r.i.luc] p.mor] q.mor r.mor s.mor]
|
||||
:+ p.mor q.mor
|
||||
[[[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] r.mor] s.mor]
|
||||
| ?~ q.r.i.luc
|
||||
[p.mor [[p.i.luc q.i.luc r.r.i.luc] q.mor] r.mor s.mor]
|
||||
:+ p.mor q.mor
|
||||
[r.mor [[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] s.mor]]
|
||||
==
|
||||
=^ mud +>.$
|
||||
?^ p.waz :: direct hard
|
||||
(loth for pre r.i.p.waz)
|
||||
?^ q.waz :: direct soft
|
||||
%- loto
|
||||
:* for
|
||||
pre
|
||||
r.i.q.waz
|
||||
!>([for pre p.i.q.waz q.i.q.waz])
|
||||
==
|
||||
?^ r.waz :: translated hard
|
||||
(lots for p.r.i.r.waz pre q.r.i.r.waz)
|
||||
?^ s.waz :: translated soft
|
||||
%- loti
|
||||
:* for
|
||||
p.r.i.s.waz
|
||||
pre
|
||||
q.r.i.s.waz
|
||||
!>([for pre p.i.s.waz q.i.s.waz])
|
||||
==
|
||||
!!
|
||||
[[~ mud] +>.$]
|
||||
::
|
||||
++ lude :: functional synth
|
||||
|= [for=logo toe=tube]
|
||||
^- [(unit (each love (list tank))) _+>]
|
||||
=+ [pre mid]=[`path`[p.toe q.toe r.toe ~] `path`(flop s.toe)]
|
||||
=^ gun +>.$ (loup for pre mid)
|
||||
?~ gun [~ +>.$]
|
||||
?: ?=(| -.u.gun) :_(+>.$ [~ %| p.u.gun])
|
||||
=^ mun +>.$ (lobo for pre p.u.gun)
|
||||
[[~ mun] +>.$]
|
||||
::
|
||||
++ step :: step in work
|
||||
|- ^+ +
|
||||
=^ zib +.$
|
||||
=+ yub=q.rey
|
||||
|- ^- [(list ,[p=@ud q=pimp]) _+.^$]
|
||||
?~ yub [~ +.^$]
|
||||
=^ sin +.^$ $(yub l.yub)
|
||||
=^ sid +.^$ $(yub l.yub)
|
||||
=^ dex +.^$ $(yub r.yub)
|
||||
=^ top +.^$ (wink n.yub)
|
||||
=+ pot=`(list ,[p=@ud q=pimp])`?~(top ~ [[p.n.yub u.top] ~])
|
||||
[:(weld pot dex sin) +.^$]
|
||||
[:(weld pot dex sid) +.^$]
|
||||
+.$(q.rey (~(gas by `_q.rey`~) zib))
|
||||
::
|
||||
++ wink :: advance request
|
||||
@ -1464,6 +1197,7 @@
|
||||
%way [[~ pip] +>.$]
|
||||
%new
|
||||
?- -.som.pip
|
||||
%ape !!
|
||||
%apg :: XX a mere stub
|
||||
~& [%wink-apg p.som.pip r.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
@ -1715,7 +1449,7 @@
|
||||
=. cow (~(put by cow) p.som.pip cal)
|
||||
:_ +>.$
|
||||
[~ pip(pez [%err 500 [%leaf "cop: {<q.som.pip>}, {<ino.cal>}."]~])]
|
||||
=+ ^= fuv ^- (unit card)
|
||||
=+ ^= fuv ^- (unit note)
|
||||
?. ?=(%o -.r.som.pip) ~
|
||||
=+ lin=(~(get by p.r.som.pip) %line)
|
||||
?^ lin ?.(?=(%s -.u.lin) ~ [~ %line p.u.lin])
|
||||
@ -1858,26 +1592,27 @@
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
++ call :: handle request
|
||||
|= $: hen=duct
|
||||
hic=(hypo ?([%soft p=*] kiss))
|
||||
==
|
||||
=. hic =+ kyt=-:!>(q.hic) :: XX temporary
|
||||
?: (~(nest ut kyt) | p.hic)
|
||||
hic
|
||||
~& [%eyre-call-flub -.q.hic]
|
||||
[kyt ((hard ?([%soft p=*] kiss)) q.hic)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
|
||||
?: ?=(%crud -.q.hin)
|
||||
[[[hen %slip %d %flog q.hin] ~] ..^$]
|
||||
?: ?=(%soft -.q.hin)
|
||||
$(q.hin ((hard card) p.q.hin))
|
||||
?: ?=(%soft -.q.hic)
|
||||
$(q.hic ((hard ?([%soft p=*] kiss)) p.q.hic))
|
||||
^- [p=(list move) q=_..^$]
|
||||
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
|
||||
=^ mos bol
|
||||
abet:apex:~(adit ye [[tea hen q.hin] [now eny sky] ~] bol)
|
||||
abet:(apex:~(adit ye [hen [now eny sky] ~] bol) q.hic)
|
||||
[mos ..^$]
|
||||
::
|
||||
++ call :: process move
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
(take ~ hen hic)
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
@ -1894,4 +1629,20 @@
|
||||
~
|
||||
::
|
||||
++ stay `bolo`+>-.$
|
||||
++ take :: accept response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
=. hin =+ kyn=-:!>(q.hin) :: XX temporary
|
||||
?: (~(nest ut kyn) | p.hin)
|
||||
hin
|
||||
~& [%eyre-take-flub -.q.hin]
|
||||
[kyn ((hard sign) q.hin)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
|
||||
^- [p=(list move) q=_..^$]
|
||||
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
|
||||
=^ mos bol
|
||||
abet:(axon:~(adit ye [hen [now eny sky] ~] bol) tea q.hin)
|
||||
[mos ..^$]
|
||||
--
|
||||
|
@ -14,10 +14,10 @@
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
++ note :: out request $->
|
||||
$% [%warp p=sock q=riff] :: see %clay
|
||||
$% [%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
$% [%writ p=riot] :: see %clay
|
||||
$% [%writ p=riot] :: by %clay
|
||||
== ::
|
||||
-- ::
|
||||
|% :: structures
|
||||
@ -161,7 +161,11 @@
|
||||
++ zo
|
||||
|_ [num=@ud task]
|
||||
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
|
||||
++ amok %_(..zo q.tad.bay (~(del by q.tad.bay) num))
|
||||
++ amok
|
||||
%_ ..zo
|
||||
q.tad.bay (~(del by q.tad.bay) num)
|
||||
dym.bay (~(del by dym.bay) nah)
|
||||
==
|
||||
++ camo :: stop requests
|
||||
^+ .
|
||||
=+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=bead]))
|
||||
@ -533,7 +537,7 @@
|
||||
++ make :: reduce silk
|
||||
|= [cof=cafe kas=silk]
|
||||
^- (bolt cage)
|
||||
~& [%ford-make kas]
|
||||
~& [%ford-make -.kas]
|
||||
?- -.kas
|
||||
^
|
||||
%. [cof p.kas q.kas]
|
||||
@ -638,9 +642,12 @@
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
|
||||
~& [%ford-call-flub -.q.hic]
|
||||
!!
|
||||
=. hic =+ kyt=-:!>(q.hic) :: XX temporary
|
||||
?: (~(nest ut kyt) | p.hic)
|
||||
hic
|
||||
~& [%ford-call-flub -.q.hic]
|
||||
[kyt ((hard kiss) q.hic)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
?: ?=(%soft -.q.hic)
|
||||
$(q.hic ((hard kiss) p.q.hic))
|
||||
@ -673,9 +680,11 @@
|
||||
++ stay `axle`+>-.$
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
|
||||
~& [%ford-take-flub -.q.hin]
|
||||
!!
|
||||
=. hin =+ kyn=-:!>(q.hin) :: XX temporary
|
||||
?: (~(nest ut kyn) | p.hin)
|
||||
hin
|
||||
~& [%ford-take-flub -.q.hin]
|
||||
[kyn ((hard sign) q.hin)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
?> ?=([@ @ @ ~] tea)
|
||||
|
101
arvo/gall.hoon
101
arvo/gall.hoon
@ -11,7 +11,7 @@
|
||||
++ bone ,@ud :: opaque duct
|
||||
++ gift :: out result <-$
|
||||
$% [%back p=?] :: %mess ack good/bad
|
||||
[%bust ~] :: reset duct
|
||||
[%boot ~] :: app boot/reboot
|
||||
[%crud p=@tas q=(list tank)] :: error
|
||||
[%rash p=json] :: web reaction
|
||||
[%rasp p=cage] :: urbit reaction
|
||||
@ -42,7 +42,11 @@
|
||||
$: bum=(map ,@ta seat) :: apps by name
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: typed move
|
||||
++ note curd :: out request $->
|
||||
++ note :: out request $->
|
||||
$% [%exec p=@p q=(unit silk)] :: to %ford
|
||||
[%meta p=vase] :: meta-note
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result
|
||||
++ scar :: opaque duct system
|
||||
$: p=@ud :: bone sequence
|
||||
@ -58,9 +62,9 @@
|
||||
zam=scar :: opaque ducts
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
$% [%made p=(each beet (list tank))] :: computed result
|
||||
$% [%made p=(each beet (list tank))] :: by %ford
|
||||
[%ruse p=curd] :: user wrapper
|
||||
[%writ p=riot] :: version result
|
||||
[%writ p=riot] :: by %clay
|
||||
== ::
|
||||
++ toil (pair duct knob) :: work in progress
|
||||
-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -127,9 +131,11 @@
|
||||
|% :: vane interface
|
||||
++ call :: handle request
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
|
||||
~& [%gall-call-flub -.q.hic]
|
||||
$(q.hic ((hard kiss) q.hic))
|
||||
=. hic =+ kyt=-:!>(q.hic) :: XX temporary
|
||||
?: (~(nest ut kyt) | p.hic)
|
||||
hic
|
||||
~& [%gall-call-flub -.q.hic]
|
||||
[kyt ((hard kiss) q.hic)]
|
||||
|- ^- [p=(list move) q=_..^^$]
|
||||
=+ =| law=(unit cuff)
|
||||
|- ^- $: law=(unit cuff)
|
||||
@ -150,9 +156,11 @@
|
||||
::
|
||||
++ take :: accept response
|
||||
|= [pax=path hen=duct hin=(hypo sign)] ::
|
||||
?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
|
||||
~& [%gall-take-flub -.q.hin]
|
||||
$(q.hin ((hard sign) q.hin))
|
||||
=. hin =+ kyn=-:!>(q.hin) :: XX temporary
|
||||
?: (~(nest ut kyn) | p.hin)
|
||||
hin
|
||||
~& [%gall-call-flub -.q.hin]
|
||||
[kyn ((hard sign) q.hin)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ lum=(lump pax)
|
||||
=< abet =< work
|
||||
@ -331,8 +339,9 @@
|
||||
++ conf :: configured core
|
||||
|= vax=vase
|
||||
^- silk
|
||||
:: (core vax)
|
||||
:+ %mute (core vax)
|
||||
:~ [[%$ 6]~ (cave !>([[our app] now eny]))]
|
||||
:~ [[%$ 12]~ (cave !>([[our app] 0 0 eny now]))]
|
||||
==
|
||||
++ core |=(vax=vase (cove %core vax)) :: core as silk
|
||||
++ cove :: cage as silk
|
||||
@ -342,23 +351,26 @@
|
||||
::
|
||||
++ drug :: set dependencies
|
||||
|= pen=(set (pair ship desk))
|
||||
~& [%drug-want ped.sat]
|
||||
^+ +>
|
||||
=+ ^= new ^- (list move)
|
||||
%+ turn
|
||||
%+ skip (~(tap in pen) ~)
|
||||
|=(a=(pair ship desk) (~(has in ped.sat) a))
|
||||
|= a=(pair ship desk)
|
||||
~& [%drug-gain a]
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
`card`[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
|
||||
:^ %toss %c (away %s %drug ~)
|
||||
[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
|
||||
=+ ^= old ^- (list move)
|
||||
%+ turn
|
||||
%+ skip (~(tap in ped.sat) ~)
|
||||
|=(a=(pair ship desk) (~(has in pen) a))
|
||||
|= a=(pair ship desk)
|
||||
~& [%drug-stop a]
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
`card`[%warp [our p.a] q.a ~]
|
||||
:^ %toss %c (away %s %drug ~)
|
||||
[%warp [our p.a] q.a ~]
|
||||
%_(+>.$ ped.sat pen, mow :(weld new old mow))
|
||||
::
|
||||
++ drum :: raw dependencies
|
||||
@ -381,11 +393,6 @@
|
||||
:_(mow [hen [%toss %f (away [%s pan ~]) [%exec our `kas]]])
|
||||
==
|
||||
::
|
||||
++ gate :: gate as silk
|
||||
|= [arm=term kas=silk]
|
||||
^- silk
|
||||
[%pass kas [%1 [%cnzy arm]]]
|
||||
::
|
||||
++ give :: return card
|
||||
|= gip=gift
|
||||
%_(+> mow [[hen %give gip] mow])
|
||||
@ -394,12 +401,17 @@
|
||||
++ game :: invoke core
|
||||
|= [[pan=term arm=term] vax=vase sam=vase]
|
||||
%+ ford pan
|
||||
[%call (gate arm (conf vax)) (cove %$ sam)]
|
||||
[%call (harm arm (conf vax)) (cove %$ sam)]
|
||||
::
|
||||
++ harm :: arm as silk
|
||||
|= [arm=term kas=silk]
|
||||
^- silk
|
||||
[%pass kas [%1 [%cnzy arm]]]
|
||||
::
|
||||
++ home :: load application
|
||||
^- silk
|
||||
:+ %boil %core
|
||||
[[our %main [%da now]] %app ~]
|
||||
[[our %main [%da now]] app %app ~]
|
||||
::
|
||||
++ more :: accept result
|
||||
|= $: pax=path :: internal position
|
||||
@ -415,16 +427,19 @@
|
||||
%- ~(put to vey.sat)
|
||||
[hen [%take t.pax (spec (slot 3 hin))]]
|
||||
==
|
||||
?. ?=([%s @ ~] pax)
|
||||
~& [%more-pax pax]
|
||||
!!
|
||||
?> ?=([%s @ ~] pax)
|
||||
?> !=(~ qic.sat)
|
||||
?+ i.t.pax !!
|
||||
%boot
|
||||
~& %more-boot
|
||||
?> ?=([~ * %boot ~] qic.sat)
|
||||
?> ?=(%made -.q.hin)
|
||||
?- -.p.q.hin
|
||||
& (drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin)
|
||||
| (mort p.p.q.hin)
|
||||
& ~& %boot-good
|
||||
(drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin)
|
||||
| ~& %boot-lost
|
||||
(mort p.p.q.hin)
|
||||
==
|
||||
::
|
||||
%drug
|
||||
@ -434,12 +449,13 @@
|
||||
+>.$(vey.sat (~(put to vey.sat) hen %boot ~))
|
||||
::
|
||||
%step
|
||||
~& %more-step
|
||||
?> ?=(%made -.q.hin)
|
||||
?- -.p.q.hin
|
||||
& %- obey:(morn:gone (slot 3 q.q.p.p.q.hin))
|
||||
& ~& %step-good
|
||||
%- obey:(morn:gone (slot 3 q.q.p.p.q.hin))
|
||||
(slot 2 q.q.p.p.q.hin)
|
||||
| (give %crud %made p.p.q.hin)
|
||||
| ~& %step-fail
|
||||
(give %crud %made p.p.q.hin)
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -471,10 +487,26 @@
|
||||
^+ +>
|
||||
%_(+> vey.sat (~(put to vey.sat) hen %show hup))
|
||||
::
|
||||
++ sumo :: standard gift
|
||||
|= vig=vase
|
||||
^- gift
|
||||
?+ q.vig [%meta vig]
|
||||
[%rasp *]
|
||||
:+ %rasp
|
||||
((hard lode) +<.q.vig)
|
||||
(slot 7 vig)
|
||||
::
|
||||
[%rust *]
|
||||
:^ %rust
|
||||
((hard ,@da) +<.q.vig)
|
||||
((hard lode) +>-.q.vig)
|
||||
(slot 15 vig)
|
||||
==
|
||||
::
|
||||
++ sump
|
||||
|= wec=vase
|
||||
^- move
|
||||
:- ((hard duct) -.q.wec)
|
||||
:- (need (~(get by r.zam.sat) ((hard bone) -.q.wec)))
|
||||
=+ caq=(spec (slot 3 wec))
|
||||
?+ q.caq ~&(%sump-bad !!)
|
||||
::
|
||||
@ -484,7 +516,7 @@
|
||||
[%meta (spec (slot 15 caq))]
|
||||
::
|
||||
[%give p=[p=@tas q=*]]
|
||||
[%give [%meta (spec (slot 3 caq))]]
|
||||
[%give (sumo (spec (slot 3 caq)))]
|
||||
::
|
||||
[%slip p=@tas q=[p=@tas q=*]]
|
||||
:+ %slip
|
||||
@ -502,6 +534,7 @@
|
||||
++ yawn :: start event
|
||||
|= kon=knob
|
||||
^+ +>
|
||||
~& [%gall-yawn -.kon]
|
||||
=. qic.sat `[hen kon]
|
||||
?- -.kon
|
||||
%boot
|
||||
@ -510,9 +543,9 @@
|
||||
%+ ford %boot
|
||||
^- silk
|
||||
:+ %call
|
||||
(gate %prep home)
|
||||
(harm %prep home)
|
||||
?~ huv.sat nile
|
||||
[nile (gate %save (conf u.huv.sat))]
|
||||
[nile (harm %save (conf u.huv.sat))]
|
||||
::
|
||||
%crud
|
||||
~& %yawn-crud
|
||||
@ -541,7 +574,7 @@
|
||||
~& %yawn-show
|
||||
?~ huv.sat
|
||||
~& [%show-none our app]
|
||||
gone:(give %bust ~)
|
||||
gone:(give %boot ~)
|
||||
%^ game [%step %peer] u.huv.sat
|
||||
!>([ost use p.kon])
|
||||
::
|
||||
|
@ -5700,19 +5700,18 @@
|
||||
~(duck ut typ)
|
||||
::
|
||||
++ spat |=(pax=path (rap 3 (spud pax)))
|
||||
++ spuc
|
||||
++ spec :: reconstruct type
|
||||
|= vax=vase
|
||||
^- vase
|
||||
:_ q.vax
|
||||
~& %spec-in
|
||||
=- ~& %spec-out
|
||||
foo
|
||||
^= foo ^- type
|
||||
?@ q.vax (~(fuse ut p.vax) [%atom %$])
|
||||
?@ -.q.vax (~(fuse ut p.vax) [%cell [%cube -.q.vax [%atom %$]] %noun])
|
||||
?@ -.q.vax
|
||||
^= typ
|
||||
%- ~(play ut p.vax)
|
||||
[%wtgr [%wtts [%leaf %tas -.q.vax] [%$ 2]~] [%$ 1]]
|
||||
(~(fuse ut p.vax) [%cell %noun %noun])
|
||||
::
|
||||
++ spec
|
||||
++ spuc
|
||||
|= vax=vase
|
||||
vax
|
||||
::
|
||||
@ -9043,6 +9042,7 @@
|
||||
|%
|
||||
++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
|
||||
++ bead ,[[p=ship q=desk r=case] s=path] :: global name
|
||||
++ bone ,@ud :: opaque
|
||||
++ care ?(%$ %u %v %w %x %y %z) :: namespace mode
|
||||
++ case :: version
|
||||
$% [%da p=@da] :: date
|
||||
@ -9073,8 +9073,22 @@
|
||||
== ::
|
||||
++ glob ,[p=logo q=ship r=mark] :: global brand
|
||||
++ herd (hypo curd) :: typed card
|
||||
++ hide :: computation state
|
||||
$: own=[p=ship q=@tas] :: static identity
|
||||
$= seq :: dynamic sequence
|
||||
$: but=@ud :: boot number
|
||||
num=@ud :: action number
|
||||
eny=@ :: entropy
|
||||
lat=@da :: date of last tick
|
||||
== == ::
|
||||
++ hilt ?(0 1 2) :: lead iron gold
|
||||
++ hypo |*(a=$+(* *) (pair type a)) :: type associated
|
||||
++ hobo |* a=$+(* *) :: kiss wrapper
|
||||
$? $% [%soft p=*] ::
|
||||
== ::
|
||||
a ::
|
||||
== ::
|
||||
++ kirk (unit (set monk)) :: audience
|
||||
++ khan ,[p=@tas q=path] :: foreign identity
|
||||
++ lens :: observation core
|
||||
$_ ^? ::
|
||||
|
@ -2192,7 +2192,7 @@
|
||||
[%want p=sock q=path r=*] :: send message
|
||||
[%warn p=tape] :: syslog
|
||||
[%warp p=sock q=riff] :: file request
|
||||
[%wart p=sock q=@tas r=path s=*] :: service request
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
[%went p=ship q=cape] :: reaction message
|
||||
[%wipe ~] :: clean to sequence
|
||||
[%word p=chum] :: set password
|
||||
@ -2565,7 +2565,8 @@
|
||||
pus=(unit ,@ta) :: password
|
||||
== ::
|
||||
++ seam :: logical request
|
||||
$% [%apg p=term q=logo r=path] :: app get
|
||||
$% [%ape p=term q=@ud] :: await update
|
||||
[%apg p=term q=logo r=path] :: app get
|
||||
[%apl p=term q=@ud r=term] :: app poll
|
||||
[%apm p=term q=json] :: app message
|
||||
[%aps p=term q=term r=(unit path)] :: app subscribe
|
||||
|
Loading…
Reference in New Issue
Block a user