duct system now type-consistent but not verified.

This commit is contained in:
C. Guy Yarvin 2014-05-26 15:59:16 -07:00
parent 3581f69eec
commit a51f595c4c
9 changed files with 87 additions and 66 deletions

View File

@ -1433,7 +1433,7 @@
^? :: opaque core
=<
|% :: vane interface
++ beat
++ take
|= [tea=wire hen=duct typ=type fav=card]
=+ wru=*(unit writ)
^- [p=(list move) q=vane]
@ -1444,7 +1444,7 @@
++ call
|= [hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]
@ -1562,7 +1562,7 @@
=. ton.fox (~(su go ton.fox) gus)
:_ fox
:~ :- hen
[%call %a ~ %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
[%toss %a ~ %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
==
%re :: %re
:_ fox
@ -1579,7 +1579,7 @@
%+ turn paz
|= him=ship
:- hen
[%call %a ~ %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
[%toss %a ~ %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
==
::
%ouzo
@ -1608,7 +1608,10 @@
^- [(list move) _+>]
?: ?=([%crud *] fav)
[[[hen [%slip %d %flog fav]] ~] +>]
=+ ^= fuy ^- [p=(list boon) q=furt]
?: ?=([%soft *] fav)
$(fav ((hard card) p.fav))
=+ ^= fuy
^- [p=(list boon) q=furt]
?+ -.fav
[~ fox]
::

View File

@ -175,7 +175,7 @@
=> .(fog (weld t.fog `(list ,@ud)`[i.fog ~]))
[[[hen [%give %helo prot]] ~] +<.^^$]
%noop [~ +<.^^$]
:: %thee abet:lash:(lean tea hen fav)
%soft $(fav ((hard card) p.fav))
%thou ?. (fear tea) :: legit
[~ +<.^^$]
abet:lash:(lean tea hen fav)
@ -1151,13 +1151,15 @@
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: current invocation
^? :: opaque core
|% :: poke/peek pattern
++ beat :: process move
++ take :: process move
|= [tea=wire hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
:: ~& [%batz-beat -.fav [%tea tea] [%hen hen]]
:: ~& [%batz-take -.fav [%tea tea] [%hen hen]]
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
?: ?=([%crud *] fav)
[[[hen [%slip %d %flog fav]] ~] ..^$]
?: ?=([%soft *] fav)
$(fav ((hard card) p.fav))
?: ?=(%wake -.fav)
=+ ^= fiy
=| fiy=(list ,[p=duct q=ship r=[p=@ud q=@ud r=wire]])
@ -1197,18 +1199,18 @@
=+ dus=(~(get by dez) hen)
?~ dus
?+ -.fav
~& [%beat-none -.fav tea hen]
~|([%beat-none -.fav] !!)
~& [%take-none -.fav tea hen]
~|([%take-none -.fav] !!)
::
%hail
?~ big
~& [%beat-hail-soon hen]
~& [%take-hail-soon hen]
[~ ..^^$]
~& [%batz-hack-console hen]
$(dez (~(put by dez) hen [[u.big (bard u.big)] ~]))
::
%init
:: ~& [%beat-init p.fav hen]
:: ~& [%take-init p.fav hen]
=. big ?~ big
`p.fav
`(min p.fav u.big)
@ -1221,7 +1223,7 @@
..^^$(dez (~(put by dez) hen [[p.fav (bard p.fav)] ~]))
::
?(%loin %make %sith)
[[[hen [%call %a tea fav]] ~] ..^^$]
[[[hen [%toss %a tea fav]] ~] ..^^$]
==
?> ?=(^ u.dus)
?+ -.fav
@ -1247,7 +1249,7 @@
::
++ call :: process move
|= [hen=duct typ=type fav=card]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]

View File

@ -35,7 +35,7 @@
%+ turn (flop say)
|= [a=duct b=path c=ship d=[p=@ud q=riff]]
:- a
[%call %a b %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
[%toss %a b %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
==
::
++ doze
@ -365,12 +365,15 @@
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
^? :: opaque core
|% ::
++ beat :: update
++ take :: update
|= [tea=wire hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
?+ -.fav [[[hen %give fav] ~] ..^$]
%crud
[[[hen %slip %d %flog fav] ~] ..^$]
::
%soft
$(fav ((hard card) p.fav))
::
%init
[~ ..^$(fat.ruf (~(put by fat.ruf) p.fav [hen ~ ~ ~]))]
@ -413,7 +416,7 @@
=+ ryf=((hard riff) s.fav)
:_ ..^$
:~ :- hen
:^ %call %c
:^ %toss %c
[(scot %p p.p.fav) (scot %p q.p.fav) r.fav]
[%warp [p.p.fav p.p.fav] ryf]
==
@ -424,7 +427,7 @@
=+ him=(need (slaw %p i.t.tea))
:_ ..^$
:~ :- hen
[%call %a ~ [%want [our him] [%r %re %c t.t.tea] p.fav]]
[%toss %a ~ [%want [our him] [%r %re %c t.t.tea] p.fav]]
==
::
%went :: XX should actually propagate
@ -443,7 +446,7 @@
::
++ call :: process move
|= [hen=duct typ=type fav=card]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]

View File

@ -8,13 +8,15 @@
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: current invocation
^? :: opaque core
|% :: poke/peek pattern
++ beat :: process move
++ take :: process move
|= [tea=wire hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
?: ?=(%flog -.fav)
:_ ..^$
%+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
|=([a=duct b=yard] [a %slip %d p.fav])
?: ?=(%soft -.fav)
$(fav ((hard card) p.fav))
=+ ^= yar ^- yard
=+ yar=(~(get by dug) hen)
?^ yar u.yar
@ -229,7 +231,7 @@
%d ?: ?& =(0 bul.u.q.q.yar)
=(0 bus.u.q.q.yar)
==
+.$(mos :_(mos [hen %call %b ~ [%kill ~]]))
+.$(mos :_(mos [hen %toss %b ~ [%kill ~]]))
$(fav [%belt %del ~])
%e (edit u.q.q.yar(bus bul.u.q.q.yar))
%f $(fav [%belt %aro %r])
@ -277,8 +279,8 @@
==
%r (edit u.q.q.yar(hyr [~ ~]))
:: TODO
:: %w +.$(mos :_(mos [hen %call %b ~ [%limn ~]]))
%x +.$(mos :_(mos [hen %call %b ~ [%ling ~]]))
:: %w +.$(mos :_(mos [hen %toss %b ~ [%limn ~]]))
%x +.$(mos :_(mos [hen %toss %b ~ [%ling ~]]))
%y ?: =(0 p.r.q.yar)
beep
$(fav [%belt %txt (snag q.r.q.yar r.r.q.yar)])
@ -347,9 +349,9 @@
[p.hyt.u.q.q.yar [jab ?~(q.hyt.u.q.q.yar ~ +.q.hyt.u.q.q.yar)]]
::
mos
:* [hen %call %b ~ [%hail ~]]
:* [hen %toss %b ~ [%hail ~]]
[hen %give [%bbye ~]]
[hen %call %b ~ [%line jab]]
[hen %toss %b ~ [%line jab]]
[hen %give [%blit [[%mor ~] ~]]]
mos
==
@ -375,7 +377,7 @@
%boot
%= +.$
mos
:_(mos [hen %call %b tea p.fav])
:_(mos [hen %toss %b tea p.fav])
==
::
%crud :: error trace
@ -412,7 +414,7 @@
==
::
?(%hail %make %loin %sith)
+.$(mos :_(mos [hen %call %b ~ fav]))
+.$(mos :_(mos [hen %toss %b ~ fav]))
::
%note ?.(p.yar +.$ (fume p.fav q.fav)) :: debug message
%save :: write a file
@ -435,7 +437,7 @@
::
++ call :: process move
|= [hen=duct typ=type fav=card]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]

View File

@ -352,12 +352,12 @@
++ haji :: send %pc login
|= [our=ship him=ship ses=hole]
^+ +>
+>.$(mow :_(mow [hen %call %a ~ [%want [our him] [%r %pc ~] ses]]))
+>.$(mow :_(mow [hen %toss %a ~ [%want [our him] [%r %pc ~] ses]]))
::
++ hajj :: send %pr response
|= [our=ship him=ship tus=path har=httr]
^+ +>
+>.$(mow :_(mow [hen %call %a ~ [%want [our him] [%r %pr tus] har]]))
+>.$(mow :_(mow [hen %toss %a ~ [%want [our him] [%r %pr tus] har]]))
::
++ hare :: receive request
|= [our=ship tus=path him=ship hor=*]
@ -366,7 +366,7 @@
%_ +>.$
mow
:_ mow
[hen %call %e [(scot %p our) (scot %p him) tus] ?~(hux [%thud ~] [%this u.hux])]
[hen %toss %e [(scot %p our) (scot %p him) tus] ?~(hux [%thud ~] [%this u.hux])]
==
::
++ here :: receive auth
@ -403,7 +403,7 @@
%_ +>
mow
:_ mow
[hen %call %c [%hoot (scot %p our) ses (scot %ud num) ~] [%warp [our our] rif]]
[hen %toss %c [%hoot (scot %p our) ses (scot %ud num) ~] [%warp [our our] rif]]
==
::
++ hone :: kill ford
@ -411,7 +411,7 @@
%_ +>
mow
:_ mow
[hen %call %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our ~]]
[hen %toss %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our ~]]
==
::
++ honk :: ford request
@ -420,7 +420,7 @@
%_ +>
mow
:_ mow
[hen %call %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our `kas]]
[hen %toss %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our `kas]]
==
::
++ hops :: cancel remote
@ -432,7 +432,7 @@
mow
:_ mow
:- hen
:^ %call %a
:^ %toss %a
[%hork (scot %p sor.rot) mun ~]
[%want [sor.rot him] [%q %pr %e %hork mun ~] ~]
==
@ -458,7 +458,7 @@
mow
:_ mow
:- hen
:^ %call %a
:^ %toss %a
[%hork (scot %p sor.rot) mun ~]
[%want [sor.rot him] [%q %pr %e %hork mun ~] [~ hyx]]
::
@ -1685,7 +1685,7 @@
?~ fuv mow
:_ mow
:- hen
:^ %call %b
:^ %toss %b
[%cons (scot %p our) ses (scot %ud p.som.pip) ~]
u.fuv
==
@ -1813,13 +1813,15 @@
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
^? :: opaque core
|% ::
++ beat :: process move
++ take :: process move
|= [tea=wire hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
?: ?=(%crud -.fav)
[[[hen %slip %d %flog fav] ~] ..^$]
?: ?=(%soft -.fav)
$(fav ((hard card) p.fav))
^- [p=(list move) q=vane]
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
=^ mos bol
@ -1828,7 +1830,7 @@
::
++ call :: process move
|= [hen=duct typ=type fav=card]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]

View File

@ -161,7 +161,7 @@
kiz t.kiz
mow :_ mow
:- hen
:^ %call %c
:^ %toss %c
[(scot %ud num) (scot %ud p.i.kiz) ~]
[%warp [our p.q.i.kiz] q.q.i.kiz ~]
==
@ -176,7 +176,7 @@
%= $
mow :_ mow
:- hen
:^ %call %c
:^ %toss %c
[(scot %ud num) (scot %ud tik) ~]
[%warp [our p.bem] q.bem [~ %& %x r.bem s.bem]]
==
@ -571,9 +571,11 @@
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
^? :: opaque core
|% ::
++ beat :: process move
++ take :: process move
|= [tea=wire hen=duct typ=type fav=card]
^- [p=(list move) q=vane]
?: ?=(%soft -.fav)
$(fav ((hard card) p.fav))
=+ ^= our ^- @p
?+ -.fav !!
%exec p.fav
@ -587,7 +589,7 @@
::
++ call :: process move
|= [hen=duct typ=type fav=card]
(beat ~ hen typ fav)
(take ~ hen typ fav)
::
++ come
|= [sam=? old=vase]

View File

@ -17,24 +17,26 @@
law=(unit chop) :: authority
val=curd :: data
== ::
++ view ,[p=cork q=@da r=(unit ,@dr)] :: timeline
++ icon :: output type
$:
++ wind ,[p=cork q=@da r=(unit ,@dr)] :: timeline
++ gift :: outbound result
%$ [%back ~] :: acknowledgment
[%crud p=(list tank)] :: error notification
[%seen p=@da q=*] :: view update
[%seen p=@da q=*] :: wind update
== ::
++ kiss :: inbound request
$% [%send p=sock q=term r=curd] :: urbit message
[%turd p=(list tank) q=kiss] :: error rebound
[%user p=(unit chop) q=kiss] :: restriction
[%view p=ship q=view r=path] :: subscription
[%wind p=ship q=wind r=path] :: subscription
== ::
++ sign curd :: inbound result V-<
++ note curd :: outbound request V->
++ hypo |*(a=$+(* *) (pair type a))
++ debt :: pending operation
$% [%pear p=ship q=(unit chop) r=curd] :: message
[%peer p=(unit chop) q=view r=path] :: subscription
[%peer p=(unit chop) q=wind r=path] :: subscription
[%peak p=(hypo card)] :: result
==
++ seat :: living app
@ -62,7 +64,7 @@
== ::
-- ::
|% :: implicit clams
++ cork ?(%u %v %w %x %y %z) :: view angle
++ cork ?(%u %v %w %x %y %z) :: wind angle
++ gift ::
++ hawk (gaff card) ::
@ -299,11 +301,15 @@
. ==
=| axle
=* lex -
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
|= $: now=@da
eny=@
$= ski
$+ (unit (set monk))
(unit (unit (hypo icon)))
^? :: opaque core
|% ::
++ call :: inbound card
|= [hen=duct typ=type sin
++ toss :: inbound card
|= [
!!
++ dive
|= [hen=duct loc=path

View File

@ -8803,7 +8803,7 @@
++ monk (each ship khan) :: general identity
++ mold :: general action
|* [a=$+(* *) b=$+(* *)] :: new move
$% [%call p=term q=path r=a] :: advance
$% [%toss p=term q=path r=a] :: advance
[%slip p=term q=a] :: send across
[%sick p=b] :: lame refactoring
[%give p=b] :: retreat
@ -8895,8 +8895,8 @@
=+ caq=(spec (slot 3 wec))
?+ q.caq ~&(%sump-bad !!)
::
[%call p=@tas q=* r=[p=@tas q=*]]
:^ %call (need ((sand %tas) ((hard ,@) p.q.caq)))
[%toss p=@tas q=* r=[p=@tas q=*]]
:^ %toss (need ((sand %tas) ((hard ,@) p.q.caq)))
((hard path) q.q.caq)
(song (spec (slot 15 caq)))
::
@ -8947,7 +8947,7 @@
=+ ^= pro
?~ pux
(slym (slap rig [%cnzy %call]) [hen +.hil])
(slym (slap rig [%cnzy %beat]) [u.pux hen +.hil])
(slym (slap rig [%cnzy %take]) [u.pux hen +.hil])
:- (said (slap pro [%cnzy %p]))
(soar (slap pro [%cnzy %q]))
--
@ -9009,9 +9009,9 @@
|= ovo=ovum
^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
?> ?=(^ p.ovo)
(kick [i.p.ovo ~ [%call (dint p.ovo) t.p.ovo [%& %noun q.ovo]]]~)
(kick [i.p.ovo ~ [%toss (dint p.ovo) t.p.ovo [%& %noun [%soft q.ovo]]]~)
::
++ race :: beat
++ race :: take
|= [pux=(unit wire) hen=duct hil=mill ves=vase]
^- [p=(list move) q=vase]
=+ ven=(vent bud ves)
@ -9036,7 +9036,7 @@
^- [[p=(list ovum) q=(list muse)] _fan]
%- fire
?- -.r.gum
%call
%toss
[p.r.gum ~ [[p.gum q.r.gum] q.gum] r.r.gum]
::
%give

View File

@ -1900,6 +1900,7 @@
++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
++ beak ,[p=ship q=desk r=case] :: garnish with beak
++ beam ,[p=ship q=desk r=case s=spur] :: spur is flopped
++ been ,[[p=ship q=desk r=case] s=spur] :: new style beam
++ bear ,[p=(map path goal) q=boar] :: thread with slips
++ beef :: raw product
$: p=(list gilt) :: actions
@ -2526,14 +2527,6 @@
ska=$+(* (unit (unit))) :: activate
== ::
^? |% ::
++ beat :: update
|= $: pax=wire :: pretext
hen=duct :: cause
typ=type :: event type
fav=card :: event
== ::
:- p=*(list move) :: actions
q=*vane :: consequence
++ call :: update
|= $: hen=duct :: channel
typ=type :: event type
@ -2561,6 +2554,14 @@
== ::
*(unit (unit)) :: record
++ stay *vase :: save state, new
++ take :: update
|= $: pax=wire :: pretext
hen=duct :: cause
typ=type :: event type
fav=card :: event
== ::
:- p=*(list move) :: actions
q=*vane :: consequence
++ vern [_@ud _@ud] :: hoon/vane version
-- ::
++ wund (list ,[p=life q=ring r=acru]) :: mace in action