Remove exceptional case in ++busk.

This commit is contained in:
C. Guy Yarvin 2016-10-29 19:02:08 -07:00
parent a6bf96e44f
commit d6097e7232
4 changed files with 247 additions and 235 deletions

View File

@ -11,8 +11,6 @@
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|= pit/vase
=, ^clay
=, clay
=, differ:^clay
=, differ:clay
=, lines:clay

View File

@ -6500,8 +6500,6 @@
~/ %busk
|= gen/twig
^- span
?: ?=({$face ^ *} sut)
[%face [p.p.sut [gen q.p.sut]] q.sut]
[%face [~ [gen ~]] sut]
::
++ buss

View File

@ -17,7 +17,9 @@
::
|= pit/vase
=, crypto
=, ^jael
=, pki:^jael
=, rights:^jael
=, moves:^jael
=, jael
:: ::::
:::: # models :: data structures
@ -77,7 +79,7 @@
:: ::
++ move :: output
{p/duct q/card} ::
--
-- ::
:: ::::
:::: # data :: static data
:: ::::
@ -354,13 +356,13 @@
0w0 :: 254, ~nev, Tlon
0w0 :: 255, ~fes, John Burnham
==
--
-- ::
:: ::::
:::: # light :: light cores
:: ::::
=> |%
:: :: ++py
:::: ## sparse^light :: sparse range
:::: ## sparse/light :: sparse range
:: ::::
++ py
:: because when you're a star with 2^16 unissued
@ -487,9 +489,9 @@
?: (gth q.n.a q.n.b)
$(a l.a, b $(a r.a, b $(a r.b, r.b ~, q.n.b q.n.a)))
$(a l.a, b $(a r.a))
--
-- ::py
:: :: ++ry
:::: ## rights^light :: rights algebra
:::: ## rights/light :: rights algebra
:: ::::
++ ry
::
@ -607,7 +609,7 @@
=/ ped (~(dep by old) new)
:- ?~(p.ped ~ `[nut p.ped])
?~(q.ped ~ `[nut q.ped])
--
-- ::dif
:: :: ++sub:ry
++ sub :: l - r
^- (unit rite)
@ -665,8 +667,8 @@
%- (~(uno by old) new)
|= (trel _p.-<.new _q.->.new _q.->.new)
?>(=(q r) r)
--
--
-- ::uni
-- ::ry
:: :: ++up
:::: ## wallet^light :: wallet algebra
:: ::::

View File

@ -1,6 +1,6 @@
!: :: /van/zuse
:: :: !%reference
:: %zuse: standard library.
:: %zuse: arvo library.
::
:: %zuse contains models (data structures) and engines
:: (functions/classes) shared across arvo's eight major
@ -8,7 +8,7 @@
::
:: - %ames: networking
:: - %behn: scheduling
:: - %clay: storage
:: - %clay: revision control
:: - %dill: console
:: - %eyre: web
:: - %ford: build
@ -26,26 +26,26 @@
:: ::::
|%
:: ::
:::: ## ames^models :: networking
:::: ## ames/models :: networking
:: ::::
++ ames
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## behn^models :: scheduling
:::: ## behn/models :: scheduling
:: ::::
++ behn
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## clay^models :: storage
:::: ## clay/models :: storage
:: ::::
++ clay
|%
:: ::
:::: ### differ^clay^models :: hunt-mcilroy diff
:::: ### differ/clay/models :: hunt-mcilroy diff
:: ::::
++ differ ^?
|%
@ -80,234 +80,248 @@
{$2 p/axis q/udon} :: mutate!
== ::
++ urge |*(a/mold (list (unce a))) :: list change
--
-- ::differ
--
:: ::
:::: ## dill^models :: console
:::: ## dill/models :: console
:: ::::
++ dill
|%
++ foo %bar
++ $ %$ :: placeholder
--
:: ::
:::: ## eyre^models :: web
:::: ## eyre/models :: web
:: ::::
++ eyre
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## ford^models :: build
:::: ## ford/models :: build
:: ::::
++ ford
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## gall^models :: application
:::: ## gall/models :: application
:: ::::
++ gall
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## jael^models :: security
:::: ## jael/models :: security
:: ::::
++ jael ^?
|%
:: ::
:::: ### public^jael^models :: certificates
:::: ### pki/jael/models :: certificates
:: ::::
:: the urbit meta-certificate (++wyll) is a sequence
:: of certificates (++cert). each cert in a wyll
:: revokes and replaces the previous cert. the
:: version number of a ship is a ++life.
::
:: the deed contains an ++arms, a definition
:: of cosmetic identity; a semi-trusted parent,
:: which signs the initial certificate and provides
:: routing services; and a dirty bit. if the dirty
:: bit is set, the new life of this ship may have
:: lost information that the old life had.
::
++ ares (unit {p/term q/(list tank)}) :: possible error
++ arms (map chip (pair @ta @t)) :: stated identity
++ bull :: cert metadata
$: dad/ship :: parent
dob/? :: & clean, | dirty
nym/arms :: identity strings
== ::
++ cert (tale deed) :: signed deed
++ chip :: standard identity
$? $giv :: given name
$sur :: surname
$had :: fictitious name
$mid :: middle name
== ::
++ coop (unit ares) :: e2e ack
++ deed :: certificate deed
$: doc/bull :: metadata
pub/pass :: public key
== ::
++ farm (map ship will) :: pki dump set
++ hand @uvH :: 128-bit hash
++ life @ud :: ship version
++ mind {who/ship lyf/life} :: key identifier
++ name (pair @ta @t) :: ascii / unicode
++ oath @ :: signature
++ tale :: urbit-signed *
|* typ/mold :: payload mold
$: dat/typ :: data
syg/(map ship (pair life oath)) :: signatures
== ::
++ will (map life cert) :: meta-certificate
++ pki ^?
|%
:: the urbit meta-certificate (++will) is a sequence
:: of certificates (++cert). each cert in a will
:: revokes and replaces the previous cert. the
:: version number of a ship is a ++life.
::
:: the deed contains an ++arms, a definition
:: of cosmetic identity; a semi-trusted parent,
:: which signs the initial certificate and provides
:: routing services; and a dirty bit. if the dirty
:: bit is set, the new life of this ship may have
:: lost information that the old life had.
::
++ ares (unit {p/term q/(list tank)}) :: possible error
++ arms (map chip (pair @ta @t)) :: stated identity
++ bull :: cert metadata
$: dad/ship :: parent
dob/? :: & clean, | dirty
nym/arms :: identity strings
== ::
++ cert (tale deed) :: signed deed
++ chip :: standard identity
$? $giv :: given name
$sur :: surname
$had :: fictitious name
$mid :: middle name
== ::
++ coop (unit ares) :: e2e ack
++ deed :: certificate deed
$: doc/bull :: metadata
pub/pass :: public key
== ::
++ farm (map ship will) :: pki dump set
++ hand @uvH :: 128-bit hash
++ life @ud :: ship version
++ mind {who/ship lyf/life} :: key identifier
++ name (pair @ta @t) :: ascii / unicode
++ oath @ :: signature
++ tale :: urbit-signed *
|* typ/mold :: payload mold
$: dat/typ :: data
syg/(map ship (pair life oath)) :: signatures
== ::
++ will (map life cert) :: meta-certificate
-- ::pki
:: ::
:::: ### promise^jael^models :: rights and promises
:: ::::
:: %jael tracks promises (++rite) from ship to ship.
:: a rite may be any right, badge, asset, secret, etc.
:: un-shared secret or private asset is stored as a
:: rite from self to self.
::
:: each rite is really a class of rights, and often
:: has its own internal set or map structure.
::
:: present kinds of rite:
::
:: %apple: application secret for a web api.
:: %block: the promisee is banned.
:: %email: email tied to promissee's ship.
:: %final: ship/ticket pair, ready to launch.
:: %fungi: fungible, countable asset.
:: %guest: permission to adopt foreign child.
:: %hotel: block of unissued children.
:: %jewel: urbit private keys.
:: %login: user's login passcode.
:: %pword: password for a website/api.
:: %token: user access token for a web api.
:: %urban: symmetric key for urbit networking.
::
:: %fungi keys can be anything, but don't reuse
:: currency codes. codes for urbit invitations:
:: %ugl == galaxy, %usr == star, %upl == planet
::
++ bill (pair @da @) :: expiring value
++ bump :: rights change
$: mor/safe :: add rights
les/safe :: lose rights
== ::
++ dorm (pair ship bloq) :: issuing group
++ pile (tree (pair @ @)) :: efficient ship set
++ rite :: urbit commitment
$% {$apple p/(map site @)} :: web api key
{$block $~} :: banned
{$email p/(set @ta)} :: email addresses
{$final p/(map ship @pG)} :: ticketed ships
{$fungi p/(map term @ud)} :: fungibles
{$guest $~} :: refugee visa
{$hotel p/(map dorm pile)} :: reserved block
{$jewel p/(map life ring)} :: private keyring
{$login p/(set @pG)} :: login secret
{$pword p/(map site (map @t @t))} :: web passwd by user
{$token p/(map site (map @t @t))} :: app tokens by user
{$urban p/(map hand bill)} :: urbit symmetric keys
== ::
++ site (list @ta) :: [%com %yahoo %www ~]
++ safe (tree rite) :: rights set
:::: ### rights/jael/models :: rights or promises
:: ::
++ rights ^?
=, pki
|%
:: %jael tracks promises (++rite) from ship to ship.
:: a rite may be any right, badge, asset, secret, etc.
:: un-shared secret or private asset is stored as a
:: rite from self to self.
::
:: each rite is really a class of rights, and often
:: has its own internal set or map structure.
::
:: present kinds of rite:
::
:: %apple: application secret for a web api.
:: %block: the promisee is banned.
:: %email: email tied to promissee's ship.
:: %final: ship/ticket pair, ready to launch.
:: %fungi: fungible, countable asset.
:: %guest: permission to adopt foreign child.
:: %hotel: block of unissued children.
:: %jewel: urbit private keys.
:: %login: user's login passcode.
:: %pword: password for a website/api.
:: %token: user access token for a web api.
:: %urban: symmetric key for urbit networking.
::
:: %fungi keys can be anything, but don't reuse
:: currency codes. codes for urbit invitations:
:: %ugl == galaxy, %usr == star, %upl == planet
::
:: you can think of [our her rite] as an rdf triple.
::
++ bill (pair @da @) :: expiring value
++ bump :: rights change
$: mor/safe :: add rights
les/safe :: lose rights
== ::
++ dorm (pair ship bloq) :: issuing group
++ pile (tree (pair @ @)) :: efficient ship set
++ rite :: urbit commitment
$% {$apple p/(map site @)} :: web api key
{$block $~} :: banned
{$email p/(set @ta)} :: email addresses
{$final p/(map ship @pG)} :: ticketed ships
{$fungi p/(map term @ud)} :: fungibles
{$guest $~} :: refugee visa
{$hotel p/(map dorm pile)} :: reserved block
{$jewel p/(map life ring)} :: private keyring
{$login p/(set @pG)} :: login secret
{$pword p/(map site (map @t @t))} :: web passwd by user
{$token p/(map site (map @t @t))} :: app tokens by user
{$urban p/(map hand bill)} :: urbit symmetric keys
== ::
++ site (list @ta) :: [%com %yahoo %www ~]
++ safe (tree rite) :: rights set
-- ::rights
:: ::
:::: ### move^jael^models :: i/o
:::: ### moves/jael/models :: i/o
:: ::::
:: %jael has two general kinds of task: changes
:: and change subscriptions.
::
:: change tasks are designed to match high-level
:: operations - for instance, we have %burn, %mint,
:: and %move, not just a single delta operation.
:: more of these operations wyll probably be added,
:: and invariants enforced at transaction end.
::
:: subscriptions are also user-focused - for instance,
:: %vein sends all the information needed to maintain
:: the secure channel, both rights and certificates.
:: the security-critical tasks (%veil, %vein, %vine)
:: should probably be bound to a whitelisted duct set.
:: (all secrets are redacted from %vest gifts.)
::
:: %jael only talks to %ames and %behn. we send messages
:: through %ames and use %behn timers.
::
++ action :: balance change
%+ pair ship :: partner
%+ each bump :: &/liability change
bump :: |/asset change
:: ::
++ balance :: balance sheet
%+ pair ::
(map ship safe) :: liabilities
(map ship safe) :: assets
:: ::
++ change :: urbit change
$% $: $fact :: certificate change
rex/ship :: owner
vie/(unit (unit ship)) :: made/heard from
lyf/life :: deed added/modified
gan/growth :: info gained
== ::
$: $rite :: rights change
rex/ship :: issuer
pal/ship :: issued to
del/bump :: change
== == ::
:: ::
++ channel :: secure channel
$: out/(unit (pair hand bill)) :: outbound key
inn/(map hand bill) :: inbound keys
cur/(unit life) :: their version
sax/(list ship) :: their ancestry
pub/will :: their public keys
== ::
++ gift :: out result <-$
$? {$veil p/channel} :: secure channel
{$vest p/tally} :: balance update
{$vein p/life q/(map life ring)} :: private keys
{$vine p/(list change)} :: all raw changes
== ::
++ growth :: unit of learning
$% {$sign p/mind q/@} :: add/update signature
{$step p/cert} :: add whole deed
== ::
++ note :: out request $->
$% {$b $wait p/@da} :: wait until
{$x $mess p/ship q/path r/*} :: send message
== ::
++ remote :: remote notification
%+ each safe :: &/addition
safe :: |/replacement
:: ::
++ sign :: in result $<-
$% {$b $wake $~} :: wakeup
{$x $rest p/coop} :: message result
== ::
++ tally :: balance update
%+ each balance :: complete
action :: change
::
++ task :: in request ->$
$% {$burn p/ship q/safe} :: destroy rights
{$hail p/ship q/remote} :: remote update
{$init p/@pG q/arms} :: initialize urbit
{$meet p/(unit (unit ship)) q/farm} :: integrate pki from
{$mint p/ship q/safe} :: create rights
{$move p/ship q/ship r/safe} :: transfer from/to
{$next p/bull} :: update private key
{$nuke $~} :: cancel tracker from
{$veil p/ship} :: view secret channel
{$vein $~} :: view signing keys
{$vest $~} :: view public balance
{$vine $~} :: view secret history
{$west p/ship q/path r/*} :: remote request
== ::
--
++ moves ^?
=, pki
=, rights
|%
:: %jael has two general kinds of task: changes
:: and change subscriptions.
::
:: change tasks are designed to match high-level
:: operations - for instance, we have %burn, %mint,
:: and %move, not just a single delta operation.
:: more of these operations will probably be added,
:: and invariants enforced at transaction end.
::
:: subscriptions are also user-focused - for instance,
:: %vein sends all the information needed to maintain
:: the secure channel, both rights and certificates.
:: the security-critical tasks (%veil, %vein, %vine)
:: should probably be bound to a whitelisted duct set.
:: (all secrets are redacted from %vest gifts.)
::
:: %jael only talks to %ames and %behn. we send messages
:: through %ames and use %behn timers.
::
++ action :: balance change
%+ pair ship :: partner
%+ each bump :: &/liability change
bump :: |/asset change
:: ::
++ balance :: balance sheet
%+ pair ::
(map ship safe) :: liabilities
(map ship safe) :: assets
:: ::
++ change :: urbit change
$% $: $fact :: certificate change
rex/ship :: owner
vie/(unit (unit ship)) :: made/heard from
lyf/life :: deed added/modified
gan/growth :: info gained
== ::
$: $rite :: rights change
rex/ship :: issuer
pal/ship :: issued to
del/bump :: change
== == ::
:: ::
++ channel :: secure channel
$: out/(unit (pair hand bill)) :: outbound key
inn/(map hand bill) :: inbound keys
cur/(unit life) :: their version
sax/(list ship) :: their ancestry
pub/will :: their public keys
== ::
++ gift :: out result <-$
$? {$veil p/channel} :: secure channel
{$vest p/tally} :: balance update
{$vein p/life q/(map life ring)} :: private keys
{$vine p/(list change)} :: all raw changes
== ::
++ growth :: unit of learning
$% {$sign p/mind q/@} :: add/update signature
{$step p/cert} :: add whole deed
== ::
++ note :: out request $->
$% {$b $wait p/@da} :: wait until
{$x $mess p/ship q/path r/*} :: send message
== ::
++ remote :: remote notification
%+ each safe :: &/addition
safe :: |/replacement
:: ::
++ sign :: in result $<-
$% {$b $wake $~} :: wakeup
{$x $rest p/coop} :: message result
== ::
++ tally :: balance update
%+ each balance :: complete
action :: change
::
++ task :: in request ->$
$% {$burn p/ship q/safe} :: destroy rights
{$hail p/ship q/remote} :: remote update
{$init p/@pG q/arms} :: initialize urbit
{$meet p/(unit (unit ship)) q/farm} :: integrate pki from
{$mint p/ship q/safe} :: create rights
{$move p/ship q/ship r/safe} :: transfer from/to
{$next p/bull} :: update private key
{$nuke $~} :: cancel tracker from
{$veil p/ship} :: view secret channel
{$vein $~} :: view signing keys
{$vest $~} :: view public balance
{$vine $~} :: view secret history
{$west p/ship q/path r/*} :: remote request
== ::
-- ::moves
-- ::jael
--
:: ::::
:::: # engines :: engines
@ -318,14 +332,14 @@
:: ::::
++ ames
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # behn^engines :: scheduling
:: ::::
++ behn
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # clay^engines :: storage
@ -592,8 +606,8 @@
* e
==
[%0 u.c]
--
--
-- ::nude
-- ::differ
:: ::
:::: ### lines^clay^engines :: unix line files
:: ::::
@ -669,35 +683,35 @@
:: ::::
++ dill
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # eyre^engines :: web
:: ::::
++ eyre
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # ford^engines :: build
:: ::::
++ ford
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # gall^engines :: application
:: ::::
++ gall
|%
++ foo %bar
++ $ %$
--
:: ::
:::: # jael^engines :: security
:: ::::
++ jael
|%
++ foo %bar
++ $ %$
--
:: ::
:::: ## number^engines :: misc number theory
@ -3928,11 +3942,11 @@
++ page (cask *) :: untyped cage
++ pail ?($none $warm $cold) :: connection status
++ pipe :: secure channel
$: out/(unit (pair hand bill:^jael)) :: outbound key
inn/(map hand bill:^jael) :: inbound keys
$: out/(unit (pair hand bill:rights:^jael)) :: outbound key
inn/(map hand bill:rights:^jael) :: inbound keys
cur/(unit life) :: their version
sax/(list ship) :: their ancestry
pub/will:^jael :: their public keys
pub/will:pki:^jael :: their public keys
== ::
++ plan (trel view (pair @da (unit @dr)) path) :: subscription
++ plea {p/@ud q/{p/? q/@t}} :: live prompt
@ -4064,7 +4078,7 @@
++ wyll (list deyd) :: certificate
++ zuse %310 :: hoon+zuse kelvin
:: ::
:::: :::: this wyll become `%york`, vane structures.
:::: :::: this will become `%york`, vane structures.
:: ::
++ gift-ames :: out result <-$
$% {$drop $~} :: drop packet
@ -4113,7 +4127,7 @@
++ kiss-xmas :: in request ->$
$% {$hear p/lane q/@} ::
{$mess p/ship q/path r/*} :: send message
{$gear p/farm:^jael q/(map life ring)} :: general update
{$gear p/farm:pki:^jael q/(map life ring)}:: general update
{$wake $~} ::
== ::
++ card-xmas :: out cards
@ -4126,7 +4140,7 @@
$: $j :: to %jael
$% {$line p/ship q/@da r/code} ::
{$link p/ship q/@da r/code} ::
{$meet p/farm:^jael} ::
{$meet p/farm:pki:^jael} ::
{$view p/ship} ::
{$west p/ship q/path r/*} :: to %gall
== == == ::
@ -4491,6 +4505,6 @@
{$e gift-eyre}
{$f gift-ford}
{$g gift:gall}
{$j gift:^jael}
{$j gift:moves:^jael}
==
--