Various fixes and improvements.

This commit is contained in:
C. Guy Yarvin 2014-05-27 22:44:18 -07:00
parent 26c6c5868b
commit 3d5d6d4b0b
4 changed files with 179 additions and 41 deletions

View File

@ -528,6 +528,8 @@
|= [cof=cafe vax=vase]
(fine cof [p.kas vax])
::
%done !!
%pass !!
%reef (fine cof %noun pit)
==
::

View File

@ -9,20 +9,36 @@
pol=(map ship mast) :: apps by ship
== ::
++ bone ,@ud :: opaque duct
++ cork ?(%u %v %w %x %y %z) :: view angle
++ cork ?(%u %v %w %x %y %z) :: viewport
++ gift :: out result <-$
$% [%back ~] :: acknowledgment
$% [%back p=?] :: ack good/bad
[%barn p=(rapt (disk))] :: %v report
[%crud p=(list tank)] :: error notification
[%seen p=@da q=*] :: wind update
[%dash p=(rapt null)] :: %u report
[%dish p=(rapt (disk))] :: %z report
[%diff p=(rapt (unit (disk)))] :: %w report
[%file p=(rapt (disk))] :: %x report
[%fold p=(rapt arch)] :: %y report
[%ruse p=gift] :: user-wrapped
== ::
++ hasp ,[p=ship q=term] :: app identity
++ kiss :: in request ->$
$% [%mess p=hasp q=(disk)] :: urbit message
[%puke p=(list tank) q=kiss] :: rising error
[%user p=chop q=kiss] :: restriction
$% [%nuke ~] ::
[%mess p=hasp q=(disk)] :: urbit message
[%puke p=(list tank) q=kiss] :: inbound error
[%user p=(unit chop) q=kiss] :: restriction
[%show p=hasp q=pipe] :: subscription
[%soft p=*] :: soft kiss
== ::
++ knob :: pending action
$% [%boot ~] :: boot/reboot
[%mess p=(disk)] :: message
[%puke p=(each (disk) pipe) q=(list tank)] :: error
[%show p=(unit pipe)] :: subscription
[%take p=path q=vase] :: user result
[%boot ~] :: reboot
== ::
:: ::
++ mast :: apps by ship
$: bum=(map ,@ta seat) :: apps by name
== ::
@ -30,17 +46,26 @@
++ note curd :: out request $->
++ pipe (pair (pair cork wind) path) :: simple query
++ seat :: the living app
$: $= zam :: opaque duct system
$: huv=(unit vase) :: application vase
qic=(unit toil) :: project
vey=(qeu toil) :: pending calls
tik=@ud :: state tick
$= zam :: opaque duct system
$: p=@ud :: sequence
q=(map duct ,[p=bone q=(unit chop)]) :: by duct
r=(map bone duct) :: by bone
== == ::
++ sign curd :: in result $-<
++ sign :: in result $-<
$% [%made p=(each beet (list tank))] :: computed result
[%ruse p=curd] ::
== ::
++ toil (pair duct knob) :: work in progress
++ wind :: request/subscribe
$% [%da p=@da q=(unit ,@dr)] :: timeline
[%ud p=@ud q=(unit ,@ud)] :: sequence
[%tas p=@tas] :: label
== ::
++ rapt |*(a=$+(* *) (pair ,@da a)) :: versioned result
-- ::
|% :: functions
++ byby :: double bind
@ -58,6 +83,11 @@
^- (unit (set monk))
?~(law [~ ~] p.u.law)
::
++ ride :: all permission
|= [use=(unit (set monk)) say=(unit (set monk))]
^- (unit chop)
?~(say ~ `[use u.say])
::
++ rite :: write permission
|= law=(unit chop)
^- (unit (set monk))
@ -73,7 +103,7 @@
^+ one
(~(gas by one) (~(tap by two) ~)) :: XX ugh
::
++ limp :: merge authorities
++ limp :: merge chops
|= [a=(unit chop) b=(unit chop)]
^- (unit chop)
?~ a b
@ -119,11 +149,11 @@
?- -.q.hil
%mess [way p.q.hil %& q.q.hil]
%puke $(puc.way `p.q.hil)
%user $(law.way (limp `p.q.hil law.way))
%user $(law.way (limp p.q.hil law.way))
%show [way p.q.hil %| q.q.hil]
==
=+ bor=(boar:(goat hap.way) hen law.way)
=< abet
=< abet =< work
?^ puc.way (puke:bor u.puc.way act.way)
?- -.act.way
& (mess:bor p.act.way)
@ -131,10 +161,11 @@
==
::
++ take :: accept response
|= [pax=path hen=duct hil=(hypo card)] ::
|= [pax=path hen=duct hil=(hypo sign)] ::
^- [(list move) _..^$]
=+ lum=(lump pax)
abet:(more:(bear:(gaur p.lum) hen) q.lum hil)
=< abet =< work
(more:(bear:(gaur p.lum) hen) q.lum hil)
::
++ scry
|= $: use=(unit (set monk))
@ -145,7 +176,7 @@
tyl=path
==
^- (unit (unit))
=+ ^= vew
=+ ^= vew :: XX future scry
%. :- use
:- [who syd ((hard case) p.lot)]
(flop tyl)
@ -162,7 +193,7 @@
%z z.vew
==
::
:: XXX old junk - fix and/or destroy
:: XXX old vane junk - fix and/or destroy
::
++ come
|= [sam=? old=vase]
@ -226,11 +257,14 @@
mat(bum (~(put by bum.mat) app sat))
==
==
++ away :: application path
|= pax=path ^- path
[(scot %p our) app pax]
::
++ bear :: write backward
|= hen=duct
=+ orf=(need (~(get by q.zam.sat) hen))
~(. bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
~(apex bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
::
++ beef :: read in
|= [use=(unit (set monk)) lok=case pax=path]
@ -249,7 +283,7 @@
:^ [p=p.zam.sat q=law] +(p.zam.sat)
(~(put by q.zam.sat) hen [p.zam.sat law])
(~(put by r.zam.sat) p.zam.sat hen)
~(. bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
~(apex bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
::
++ au :: read
|_ use=(unit (set monk)) :: read permission
@ -262,33 +296,142 @@
++ bo
|_ $: hen=duct :: system cause
ost=bone :: opaque cause
seg=(unit (set monk)) :: write permission
say=(unit (set monk)) :: write permission
mow=(list move) :: actions
==
++ abet [(flop mow) ^abet] :: resolve
++ mess :: general message
++ apex
^+ .
?. &(=(~ huv.sat) =(~ qic.sat) =(~ vey.sat)) .
%_(. vey.sat (~(put to vey.sat) hen [%boot ~]))
::
++ bing :: reset to duct
|= neh=duct
=+ orf=(need (~(get by q.zam.sat) hen))
%_ +>.$
hen neh
ost p.orf
use (read q.orf)
say (rite q.orf)
==
::
++ core |=(vax=vase (cove %core vax)) :: core as silk
++ cove :: cage as silk
|= cay=cage
^- silk
[%done ~ cay]
::
++ ford :: exec to ford
|= [pan=term kas=silk]
%_ +>.$
mow
:_(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])
::
++ gone %_(+> qic.sat ~) :: done work
++ home :: load application
^- silk
:+ %boil %core
[(scot %p our) %main (scot %da now) %app ~]
::
++ mess :: accept message
|= dur=(disk) :: content
^+ +>
+>
%_(+> vey.sat (~(put to vey.sat) hen %mess dur))
::
++ more :: process result
++ more :: accept result
|= $: pax=path :: internal position
hil=(hypo curd) :: urbit event
hil=(hypo sign) :: urbit event
==
^+ +>
+>
^+ +>
?: ?=([%u *] pax)
?. ?=(%ruse -.q.hil)
~& [%more-card -.q.hil pax]
!!
%_ +>.$
vey.sat
%- ~(put to vey.sat)
`toil`[hen `knob`[%take t.pax (spec (slot 3 hil))]]
==
?> ?=([%s @ ~] pax)
?> !=(~ qic.sat)
?+ i.t.pax !!
%boot
?> ?=([~ * %boot ~] qic.sat)
?> ?=(%made -.q.hil)
?- -.p.q.hil
& (morn p.p.q.hil)
| (mort p.p.q.hil)
==
==
::
++ morn :: successful boot
|= [dep=(set beam) cay=cage]
~& [%boot-good our app]
%_(+> qic.sat ~, huv.sat `q.cay)
::
++ mort :: failed boot
|= tan=(list tank)
~& [%boot-lost our app]
%_(+> mow :_(mow [hen [%give %crud tan]]))
::
++ nile [%done ~ [%$ [%atom %n] ~]] :: null silk
++ puke :: propagate error
|= $: tan=(list tank)
act=(each (disk) pipe)
==
^+ +>
+>
%_(+> vey.sat (~(put to vey.sat) hen %puke act tan))
::
++ show :: subscribe
|= pyp=pipe :: subscription
^+ +>
+>
%_(+> vey.sat (~(put to vey.sat) hen %show pyp))
::
++ work :: eat queue
^+ .
~& %gall-work
?: |(?=(^ qic.sat) =(~ vey.sat)) . :: nothing to do
=^ yev vey.sat [p q]:~(get to vey.sat)
work:(yawn:(bing p.yev) q.yev)
::
++ yawn :: start event
|= kon=knob
^+ +>
=. qic.sat `[hen kon]
?- -.kon
%boot
~& %yawn-boot
%+ ford %boot
^- silk
:+ %call
(gate %prep home)
?~(huv.sat nile [nile (gate %save u.huv.sat)])
::
%mess
~& %yawn-mess
%+ ford %mess
^- silk
?~ huv.sat
~& [%mess-none our app]
gone:(give %back |)
:+ %call
(gate %poke u.huv.sat)
%+ cove %$
:(slop [[%atom %ud] ost] !>((ride use say)) q.p.kon)
!!
::
%show !!
%take !!
==
--
--
--

View File

@ -99,6 +99,7 @@
++ mart (list ,[n=mane v=tape]) :: XML attributes
++ marx $|(@tas [n=mane a=mart]) :: XML tag
++ metl ?(%gold %iron %zinc %lead) :: core variance
++ null ,~ :: null, nil, etc
++ odor ,@ta :: atom format
++ tarp ,[d=@ud h=@ud m=@ud s=@ud f=(list ,@ux)] :: parsed time
++ time ,@da :: galactic time
@ -8838,9 +8839,9 @@
++ ship ,@p :: network identity
++ view :: observation core
$_ ^? ::
|% ++ u *(unit (unit (unit ,@ud))) :: last change
++ v *(unit (unit (disk))) :: historic subtree
++ w *(unit (unit (unit ,[p=@ud q=(disk)]))) :: change and diff
|% ++ u *(unit (unit ,~)) :: existence
++ v *(unit (unit (disk))) :: full history
++ w *(unit (unit (unit (disk)))) :: latest diff
++ x *(unit (unit (disk))) :: data at path
++ y *(unit (unit arch)) :: directory
++ z *(unit (unit (disk))) :: current subtree

View File

@ -2462,19 +2462,11 @@
[%boil p=logo q=beam] :: general synthesis
[%call p=silk q=silk] :: slam
[%cast p=logo q=beak r=silk] :: translate
:: [%done p=(set beam) q=cage] :: literal
:: [%feed p=silk q=@] :: specific text
:: [%grow p=silk q=beam] :: specific path
:: [%pass p=silk q=silo] :: twig construction
[%done p=(set beam) q=cage] :: literal
[%pass p=silk q=sill] :: twig construction
[%reef ~] :: kernel reef
== ::
++ sill :: assembly state
|* a=_,* :: assembly goal
$% [%0 p=beam] :: not yet loaded
[%1 p=*] :: file not compiled
[%2 p=a] :: file compiled
== ::
++ silo :: code pointer
++ sill :: code pointer
$% [%0 p=@] :: direct text
[%1 p=twig] :: direct twig
[%2 p=beam] :: beam over %hoon