Merge branch 'next/kelvin/412' into m/eyre-mirage

This commit is contained in:
fang 2023-06-16 22:52:29 +02:00
commit c33ddfa101
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
32 changed files with 1060 additions and 498 deletions

View File

@ -31,15 +31,6 @@ them. "It would be cool if.." probably does not, in itself, constitute a good
feature request; instead, try to be specific about what you're requesting, and
what your desired feature would accomplish.
### Feature Branch Names
Every branch that you intend to put up for review must adhere to the form
`i/<N>/<...>`, where `<N>` is the number of the issue that the branch
corresponds to and `<...>` is an optional short description of the branch to aid
in readability. If `<...>` is omitted, the `/` should be omitted as well, which
makes `i/<N>` a well-formed branch name. These feature branches should be based
off of `develop`.
### Commits
Commits should generally be relevant, atomic, and have descriptions formatted in

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c0fb3cb223a884bb10dc2877c2dcbc597d7ba54392c8cdc73ac152626888cc9
size 6379473
oid sha256:5a949bbbc37d05cf63714719cda7b736bbc23537e1d6da49d83bc73cc0b524ef
size 7268424

View File

@ -300,7 +300,7 @@
~/ %handle-http-request
|= [eyre-id=@ta =inbound-request:eyre]
^- (quip card _state)
::?> authenticated.inbound-request
?> authenticated.inbound-request
=/ url
(parse-request-line:server url.request.inbound-request)
?> ?=([%spider @t @t @t @t ~] site.url)

View File

@ -0,0 +1,11 @@
:: Print keys for a ship, as stored in %ames
::
:- %say
|= [[now=time @ our=ship ^] [=ship ~] ~]
=+ .^ =ship-state:ames
%ax /(scot %p our)//(scot %da now)/peers/(scot %p ship)
==
:- %noun
?. ?=(%known -.ship-state)
%ship-still-alien
[life=life rift=rift]:+.ship-state

View File

@ -10,14 +10,11 @@
=/ our p.bec
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
~& >> "Error: desk {<desk>} does not exist."
helm-pass+[%d %noop ~]
helm-pass+[%d %flog %text "Error: desk {<desk>} does not exist."]
=/ existing-story .^(? %cu /(scot %p our)/[desk]/(scot %da now)/story)
?: ?&(existing-story !overwrite)
~& >> "Error: /{(trip (slav %tas desk))}/story already exists."
~& >> "To forcibly overwrite, use `=overwrite %.y`"
:: XX could use a better way to noop
helm-pass+[%d %noop ~]
:- %helm-pass
[%d %flog %text "Error: /{(trip (slav %tas desk))}/story already exists. To forcibly overwrite, use `=overwrite %.y`"]
=| tale=story
:- %helm-pass
[%c [%info desk %& [/story %ins story+!>(tale)]~]]

View File

@ -13,8 +13,7 @@
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
=? cas =(*case cas) r.bec :: use case from beak if cas not provided
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
~& >> "Error: desk {<desk>} does not exist."
helm-pass+[%d %noop ~]
helm-pass+[%d %flog %text "Error: desk {<desk>} does not exist."]
=/ tak=tako:clay
?: ?=([%tako tako:clay] cas)
p.cas
@ -25,8 +24,7 @@
::
=/ pax /(scot %p our)/[desk]/(scot %da now)/story
?: !.^(? %cu pax)
~& >> "Error: No story file found. Please use |story-init to create one."
helm-pass+[%d %noop ~]
helm-pass+[%d %flog %text "Error: No story file found. Please use |story-init to create one."]
=/ tale=story .^(story %cx pax)
=. tale
?: =(*prose prz)

View File

@ -13,8 +13,7 @@
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
=? cas =(*case cas) r.bec :: use case from beak if cas not provided
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
~& >> "Error: desk {<desk>} does not exist."
helm-pass+[%d %noop ~]
helm-pass+[%d %flog %text "Error: desk {<desk>} does not exist."]
=/ tak=tako:clay
?: ?=([%tako tako:clay] cas)
p.cas
@ -25,8 +24,7 @@
::
=/ pax /(scot %p our)/[desk]/(scot %da now)/story
?: !.^(? %cu pax)
~& >> "Error: No story file found. Please use |story-init to create one."
helm-pass+[%d %noop ~]
helm-pass+[%d %flog %text "Error: No story file found. Please use |story-init to create one."]
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
=/ =prose [title ?~(body '' p.body)]
=. tale (~(put ju tale) tak prose)

View File

@ -2,6 +2,6 @@
:- %say
|= [[now=@da eny=@uvJ bec=beak] [syd=desk ~] verb=_&]
:* %tang
leaf+"Notice: +vat is deprecated as +vats now takes lists of one or more desks"
leaf+"Notice: +vat is deprecated. use +vats which now takes one or more desks as arguments. e.g. '+vats %base %garden'"
(report-vat (report-prep p.bec now) p.bec now syd verb)
==

View File

@ -186,9 +186,9 @@
!< (list @ux)
=< q
%- need %- need
(scry:(ames-gate now eny roof) ~ %x beam)
(scry:(ames-gate now eny roof) ~ / %x beam)
::
=/ paz=(list have:ames)
=/ paz=(list have:ames)
%+ spun meows
|= [blob=@ux num=_1]
^- [have:ames _num]
@ -196,9 +196,10 @@
[num (sift-meow:ames blob)]
::
:- sig:(sift-roar:ames-raw (lent paz) (flop paz))
%+ turn meows
|= meow=@ux
(can 3 4^lop 2^wid wid^`@`pat (met 3 meow)^meow ~)
%+ spun meows
|= [meow=@ux num=_1]
:_ +(num)
(can 3 4^num 2^wid wid^`@`pat (met 3 meow)^meow ~)
:: ::
++ ames-scry-peer
|= $: =ames-gate
@ -212,7 +213,7 @@
=< q
%- need %- need
%- scry:(ames-gate now eny roof)
[~ %x [[our %$ da+now] /peers/(scot %p her)]]
[~ / %x [[our %$ da+now] /peers/(scot %p her)]]
::
++ gall-scry-nonce
|= $: =gall-gate
@ -226,7 +227,7 @@
=< q
%- need %- need
%- scry:(gall-gate now eny roof)
[~ %n [[our dude da+now] [%$ (scot %p ship.sub) [term wire]:sub]]]
[~ / %n [[our dude da+now] [%$ (scot %p ship.sub) [term wire]:sub]]]
::
++ load-agent
|= [=ship =gall-gate =dude:gall =agent:gall]

View File

@ -0,0 +1,24 @@
|_ [cur=vere next=(unit vere)]
++ en-vere
|= v=vere
%- pairs:enjs:format
:- [%non s+non.v]
:- [%rev (path:enjs:format rev.v)]
%+ turn kel.v
|= w=weft
[lal.w (numb:enjs:format num.w)]
::
++ grab
|%
++ noun ,[cur=vere next=(unit vere)]
--
++ grow
|%
++ json
%- pairs:enjs:format
:- [%cur (en-vere cur)]
?~ next ~
:- [%next (en-vere u.next)] ~
--
++ grad %noun
--

1
pkg/arvo/mar/vere.hoon Symbolic link
View File

@ -0,0 +1 @@
../../base-dev/mar/vere.hoon

View File

@ -3,7 +3,7 @@
|%
+| %global
::
++ arvo %238
++ arvo %237
::
:: $arch: node identity
:: $axal: fundamental node, recursive (trie)
@ -111,6 +111,7 @@
|$ [a]
$~ =>(~ |~(* ~))
$- $: lyc=gang :: leakset
pov=path :: provenance
omen :: perspective, path
== ::
%- unit :: ~: unknown
@ -118,7 +119,7 @@
(cask a) ::
+$ roon :: partial namespace
$~ =>(~ |~(* ~))
$- [lyc=gang car=term bem=beam]
$- [lyc=gang pov=path car=term bem=beam]
(unit (unit cage))
+$ root $-(^ (unit (unit)))
+$ view $@(term [way=term car=term]) :: perspective
@ -207,9 +208,9 @@
==
+$ heir
$% $: %grub
$% [?(%240 %239 %238) =grub]
$% [?(%240 %239 %238 %237) =grub]
== ==
[?(%240 %239 %238) =debt =soul]
[?(%240 %239 %238 %237) =debt =soul]
==
+$ plan (pair germ (list move))
+$ soul
@ -342,13 +343,13 @@
::
++ look
~/ %look
|= [rof=roof lyc=gang]
|= [rof=roof lyc=gang pov=path]
^- root
~/ %in
|= [ref=* raw=*]
?~ pax=((soft path) raw) ~
?~ mon=(de-omen u.pax) ~
?~ dat=(rof lyc u.mon) ~
?~ dat=(rof lyc pov u.mon) ~
?~ u.dat [~ ~]
=* vax q.u.u.dat
?. ?& ?=(^ ref)
@ -1101,7 +1102,7 @@
++ peek
~/ %peek
^- rook
|= [lyc=gang omen]
|= [lyc=gang pov=path omen]
^- (unit (unit (cask meta)))
:: namespace reads receive no entropy
::
@ -1113,7 +1114,7 @@
~> %mean.'peek: pull failed'
(~(slap wa sac) rig [%limb %scry])
::
=/ mas=[gang view beam] [lyc vis bem]
=/ mas=[gang path view beam] [lyc pov vis bem]
::
=^ pro sac
~> %mean.'peek: call failed'
@ -1373,7 +1374,7 @@
|= [nam=term =vane]
=; mas=(list mass)
nam^|+(welp mas [dot+&+q.vase typ+&+p.vase sac+&+worm ~]:vane)
?~ met=(peek [~ ~] [nam %x] bem) ~
?~ met=(peek [~ ~] / [nam %x] bem) ~
?~ u.met ~
~| mass+nam
;;((list mass) q.q.u.u.met)
@ -1381,7 +1382,7 @@
::
++ peek
^- rook
|= [lyc=gang omen]
|= [lyc=gang pov=path omen]
^- (unit (unit (cask meta)))
:: vane and care may be concatenated
::
@ -1392,12 +1393,12 @@
[(end 3 vis) (rsh 3 vis)]
::
?: ?=(%$ way)
(peek:pith lyc car bem)
(peek:pith lyc pov car bem)
::
=. way (grow way)
?~ van=(~(get by van.mod) way)
~
%. [lyc car bem]
%. [lyc pov car bem]
peek:spin:(~(plow va [vil u.van]) now peek)
:: +call: advance to target
::
@ -1552,7 +1553,7 @@
::
++ peek
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
?. ?| =(our p.bem)
?=(%$ q.bem)
@ -1764,7 +1765,7 @@
::
=. sol
?- -.hir
?(%240 %239 %238) soul.hir
?(%240 %239 %238 %237) soul.hir
==
:: clear compiler caches
::
@ -1805,7 +1806,7 @@
==
::
?~ hap ~
=/ pro (~(peek le:part [pit vil] sol) lyc [vis bem]:u.hap)
=/ pro (~(peek le:part [pit vil] sol) lyc / [vis bem]:u.hap)
?: |(?=(~ pro) ?=(~ u.pro)) ~
=/ dat=(cask) [p q.q]:u.u.pro
?. pat.u.hap `dat

View File

@ -4,7 +4,7 @@
=> ..part
~% %lull ..part ~
|%
++ lull %324
++ lull %323
:: :: ::
:::: :: :: (1) models
:: :: ::
@ -462,7 +462,8 @@
+$ rift @ud :: ship continuity
+$ mime (pair mite octs) :: mimetyped data
+$ octs (pair @ud @) :: octet-stream
+$ sock (pair ship ship) :: outgoing [our his]
+$ sock (pair ship ship) :: outgoing [src dest]
+$ sack (trel ship ship path) :: $sock /w provenance
+$ stub (list (pair stye (list @c))) :: styled unicode
+$ stye (pair (set deco) (pair tint tint)) :: decos/bg/fg
+$ styl %+ pair (unit deco) :: cascading style
@ -767,6 +768,7 @@
:: %cork: request to delete message flow
:: %kroc: request to delete stale message flows
:: %plea: request to send message
:: %deep: deferred calls to %ames, from itself
::
:: Remote Scry Tasks
::
@ -794,6 +796,7 @@
[%cork =ship]
[%kroc dry=?]
$>(%plea vane-task)
[%deep =deep]
::
[%keen spar]
[%yawn spar]
@ -901,7 +904,15 @@
:: life based on the ship.
::
+$ spar [=ship =path]
:: $deep: deferred %ames call, from self, to keep +abet cores pure
::
+$ deep
$% [%nack =ship =nack=bone =message-blob]
[%sink =ship =target=bone naxplanation=[=message-num =error]]
[%drop =ship =nack=bone =message-num]
[%cork =ship =bone]
[%kill =ship =bone]
==
:: +| %atomics
::
+$ bone @udbone
@ -1190,7 +1201,6 @@
:: rto: retransmission timeout
:: rtt: roundtrip time estimate, low-passed using EWMA
:: rttvar: mean deviation of .rtt, also low-passed with EWMA
:: num-live: how many packets sent, awaiting ack
:: ssthresh: slow-start threshold
:: cwnd: congestion window; max unacked packets
::
@ -1200,7 +1210,6 @@
rttvar=_~s1
ssthresh=_10.000
cwnd=_1
num-live=@ud
counter=@ud
==
+$ live-packet
@ -2675,7 +2684,7 @@
== ::
+$ task :: incoming request
$~ [%vega ~] ::
$% [%deal p=sock q=term r=deal] :: full transmission
$% [%deal p=sack q=term r=deal] :: full transmission
[%sear =ship] :: clear pending queues
[%jolt =desk =dude] :: (re)start agent
[%idle =dude] :: suspend agent
@ -2697,6 +2706,7 @@
$: $: our=ship :: host
src=ship :: guest
dap=term :: agent
sap=path :: provenance
== ::
$: wex=boat :: outgoing subs
sup=bitt :: incoming subs

File diff suppressed because it is too large Load Diff

View File

@ -235,7 +235,7 @@
::
++ scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* ren car
=* why=shop &/p.bem

View File

@ -714,7 +714,14 @@
=. stack.nub [~ stack.nub]
?: (~(has in cycle.nub) cast+[a b])
~|(cycle+cast+[a b]^cycle.nub !!)
?: =(a b)
%+ gain-leak cast+a^b
|= nob=state
%- (trace 4 |.("identity shortcircuit"))
=. nub nob
:_(nub vase+same.bud)
?: =([%mime %hoon] [a b])
%- (trace 4 |.("%mime -> %hoon shortcircuit"))
:_(nub [%vase =>(..zuse !>(|=(m=mime q.q.m)))])
:: try +grow; is there a +grow core with a .b arm?
::
@ -729,6 +736,7 @@
::
%+ gain-leak cast+a^b
|= nob=state
%- (trace 4 |.("{<a>} -> {<b>}: +{(trip b)}:grow:{(trip a)}"))
=. nub nob
:_ nub :- %vase
%+ slap (with-faces cor+old ~)
@ -743,18 +751,24 @@
?: &(?=(%& -.rab) ?=(^ q.p.rab))
%+ gain-leak cast+a^b
|= nob=state
%- (trace 4 |.("{<a>} -> {<b>}: +{(trip a)}:grab:{(trip b)}"))
=. nub nob
:_(nub vase+p.rab)
:: try +jump
::
=/ jum (mule |.((slap old tsgl/[limb/b limb/%jump])))
?: ?=(%& -.jum)
(compose-casts a !<(mark p.jum) b)
=/ via !<(mark p.jum)
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +jump:{(trip a)}"))
(compose-casts a via b)
?: ?=(%& -.rab)
(compose-casts a !<(mark p.rab) b)
=/ via !<(mark p.rab)
%- (trace 4 |.("{<a>} -> {<b>}: via {<via>} per +grab:{(trip b)}"))
(compose-casts a via b)
?: ?=(%noun b)
%+ gain-leak cast+a^b
|= nob=state
%- (trace 4 |.("{<a>} -> {<b>} default"))
=. nub nob
:_(nub vase+same.bud)
~|(no-cast-from+[a b] !!)
@ -4492,13 +4506,14 @@
++ read-at-tako :: read-at-tako:ze
|= [for=(unit ship) tak=tako mun=mood] :: seek and read
^- [(unit (unit cage)) _..park]
?. |(?=(~ for) (may-read u.for care.mun tak path.mun))
[~ ..park]
:: the commit must be known, and reachable from within this desk
:: non-zero commits must be known, and reachable from within this desk
::
?. ?| =(0v0 tak)
?& (~(has by hut.ran) tak)
(~(has in (reachable-takos (aeon-to-tako:ze let.dom))) tak)
?| (~(any by hit.dom) |=(=tako =(tak tako))) :: fast-path
(~(has in (reachable-takos (aeon-to-tako:ze let.dom))) tak)
==
|(?=(~ for) (may-read u.for care.mun tak path.mun))
== ==
[~ ..park]
:: virtualize to catch and produce deterministic failures
@ -5854,7 +5869,7 @@
++ scry :: inspect
~/ %clay-scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* scry-loop $
|^

View File

@ -104,7 +104,7 @@
::
%seat
%^ pass /seat %g
:+ %deal [our our]
:+ %deal [our our /dill]
[%hood %poke %kiln-install !>([desk.kyz our desk.kyz])]
==
::
@ -129,7 +129,7 @@
::
++ deal :: pass to %gall
|= [=wire =deal:gall]
(pass wire [%g %deal [our our] ram deal])
(pass wire [%g %deal [our our /dill] ram deal])
::
++ pass :: pass note
|= [=wire =note]
@ -146,7 +146,7 @@
++ sponsor
^- ship
=/ dat=(unit (unit cage))
(rof `[our ~ ~] j/[[our sein/da/now] /(scot %p our)])
(rof `[our ~ ~] /dill j/[[our sein/da/now] /(scot %p our)])
;;(ship q.q:(need (need dat)))
::
++ init :: initialize
@ -479,7 +479,7 @@
::
++ scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* ren car
=* why=shop &/p.bem
@ -525,9 +525,10 @@
:: only the new-style subscription.
::
=/ hey (need hey.all.lax)
:* [hey %pass / %g %deal [our our] %hood %leave ~]
[hey %pass [%peer %$ ~] %g %deal [our our] %hood %leave ~]
[hey %pass [%peer %$ ~] %g %deal [our our] %hood %watch [%dill %$ ~]]
=/ =sack [our our /dill]
:* [hey %pass / %g %deal sack %hood %leave ~]
[hey %pass [%peer %$ ~] %g %deal sack %hood %leave ~]
[hey %pass [%peer %$ ~] %g %deal sack %hood %watch [%dill %$ ~]]
moz
==
=. egg.all.lax |

View File

@ -937,12 +937,12 @@
%gen
=/ bek=beak [our desk.generator.action da+now]
=/ sup=spur path.generator.action
=/ ski (rof ~ %ca bek sup)
=/ ski (rof ~ /eyre %ca bek sup)
=/ cag=cage (need (need ski))
?> =(%vase p.cag)
=/ gat=vase !<(vase q.cag)
=/ res=toon
%- mock :_ (look rof ~)
%- mock :_ (look rof ~ /eyre)
:_ [%9 2 %0 1] |.
%+ slam
%+ slam gat
@ -1112,7 +1112,7 @@
++ do-scry
|= [care=term =desk =path]
^- (unit (unit cage))
(rof ~ care [our desk da+now] path)
(rof ~ /eyre care [our desk da+now] path)
::
++ error-response
|= [status=@ud =tape]
@ -1521,7 +1521,7 @@
++ code
^- @ta
=/ res=(unit (unit cage))
(rof ~ %j [our %code da+now] /(scot %p our))
(rof ~ /eyre %j [our %code da+now] /(scot %p our))
(rsh 3 (scot %p ;;(@ q.q:(need (need res)))))
:: +session-cookie-string: compose session cookie
::
@ -2374,6 +2374,7 @@
$(errors (~(put by errors) -), requests t.requests)
::
=. gall-moves
=/ =wire /channel/poke/[channel-id]/(scot %ud request-id.i.requests)
:_ gall-moves
^- move
%+ deal-as
@ -2645,7 +2646,7 @@
?~ sub
((trace 0 |.("no subscription for request-id {(scow %ud request-id)}")) ~)
=/ des=(unit (unit cage))
(rof ~ %gd [our app.u.sub da+now] /$)
(rof ~ /eyre %gd [our app.u.sub da+now] /$)
?. ?=([~ ~ *] des)
((trace 0 |.("no desk for app {<app.u.sub>}")) ~)
`!<(=desk q.u.u.des)
@ -2681,7 +2682,7 @@
=* have=mark mark.event
=/ convert=(unit vase)
=/ cag=(unit (unit cage))
(rof ~ %cf [our desk.event da+now] /[have]/json)
(rof ~ /eyre %cf [our desk.event da+now] /[have]/json)
?. ?=([~ ~ *] cag) ~
`q.u.u.cag
?~ convert
@ -3092,7 +3093,7 @@
=/ from=@p
?@ identity identity
?+(-.identity who.identity %ours our)
[duct %pass wire %g %deal [from ship] dude task]
[duct %pass wire %g %deal [from ship /eyre] dude task]
::
++ trace
|= [pri=@ print=(trap tape)]
@ -3192,12 +3193,24 @@
::
=/ task=task ((harden task) wrapped-task)
::
:: XX handle error notifications
:: XX handle more error notifications
::
?^ dud
=/ moves=(list move)
[[duct %slip %d %flog %crud [-.task tang.u.dud]] ~]
[moves http-server-gate]
:_ http-server-gate
:: always print the error trace
::
:- [duct %slip %d %flog %crud [-.task tang.u.dud]]
^- (list move)
:: if a request caused the crash, respond with a 500
::
?. ?=(?(%request %request-local) -.task) ~
^~
=/ data (as-octs:mimes:html 'crud!')
=/ head
:~ ['content-type' 'text/html']
['content-length' (crip (a-co:co p.data))]
==
[duct %give %response %start 500^head `data &]~
:: %init: tells us what our ship name is
::
?: ?=(%init -.task)
@ -3368,7 +3381,7 @@
:_ http-server-gate
=/ cmd
[%acme %poke `cage`[%acme-order !>(mod)]]
[duct %pass /acme/order %g %deal [our our] cmd]~
[duct %pass /acme/order %g %deal [our our /eyre] cmd]~
==
::
%plea
@ -3953,7 +3966,7 @@
++ scry
~/ %eyre-scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* ren car
=* why=shop &/p.bem

View File

@ -44,7 +44,7 @@
+$ move [=duct move=(wind note-arvo gift-arvo)]
:: $state-13: overall gall state, versioned
::
+$ state-13 [%13 state]
+$ state-14 [%14 state]
:: $state: overall gall state
::
:: system-duct: TODO document
@ -66,7 +66,7 @@
::
+$ routes
$: disclosing=(unit (set ship))
attributing=ship
attributing=[=ship =path]
==
:: $yoke: agent runner state
::
@ -162,7 +162,7 @@
:: $spore: structures for update, produced by +stay
::
+$ spore
$: %13
$: %14
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship)
@ -192,7 +192,7 @@
--
:: adult gall vane interface, for type compatibility with pupa
::
=| state=state-13
=| state=state-14
|= [now=@da eny=@uvJ rof=roof]
=* gall-payload .
~% %gall-top ..part ~
@ -249,7 +249,7 @@
:: +mo-doff: kill all outgoing subscriptions
::
++ mo-doff
|= [dude=(unit dude) ship=(unit ship)]
|= [prov=path dude=(unit dude) ship=(unit ship)]
^+ mo-core
=/ apps=(list (pair term yoke))
?~ dude ~(tap by yokes.state)
@ -257,12 +257,12 @@
|- ^+ mo-core
?~ apps mo-core
?: ?=(%nuke -.q.i.apps) $(apps t.apps)
=/ ap-core (ap-yoke:ap p.i.apps [~ our] q.i.apps)
=/ ap-core (ap-yoke:ap p.i.apps [~ our prov] q.i.apps)
$(apps t.apps, mo-core ap-abet:(ap-doff:ap-core ship))
:: +mo-rake: send %cork's for old subscriptions if needed
::
++ mo-rake
|= [dude=(unit dude) all=?]
|= [prov=path dude=(unit dude) all=?]
^+ mo-core
=/ apps=(list (pair term yoke))
?~ dude ~(tap by yokes.state)
@ -270,7 +270,7 @@
|- ^+ mo-core
?~ apps mo-core
?: ?=(%nuke -.q.i.apps) $(apps t.apps)
=/ ap-core (ap-yoke:ap p.i.apps [~ our] q.i.apps)
=/ ap-core (ap-yoke:ap p.i.apps [~ our prov] q.i.apps)
$(apps t.apps, mo-core ap-abet:(ap-rake:ap-core all))
:: +mo-receive-core: receives an app core built by %ford.
::
@ -286,7 +286,7 @@
::
++ mo-receive-core
~/ %mo-receive-core
|= [dap=term bek=beak =agent]
|= [prov=path dap=term bek=beak =agent]
^+ mo-core
::
=/ yak (~(get by yokes.state) dap)
@ -309,7 +309,7 @@
::
=. yokes.state
(~(put by yokes.state) dap u.yak(beak bek, code agent))
=/ ap-core (ap-abed:ap dap `our)
=/ ap-core (ap-abed:ap dap [~ our prov])
=. ap-core (ap-reinstall:ap-core agent)
=. mo-core ap-abet:ap-core
(mo-clear-queue dap)
@ -329,7 +329,7 @@
::
=/ old mo-core
=/ wag
=/ ap-core (ap-abed:ap dap `our)
=/ ap-core (ap-abed:ap dap [~ our prov])
(ap-upgrade-state:ap-core ~)
::
=/ maybe-tang -.wag
@ -419,7 +419,7 @@
:: +mo-breach: ship breached, so forget about them
::
++ mo-breach
|= =ship
|= [prov=path =ship]
^+ mo-core
=. mo-core (mo-untrack-ship ship)
=. mo-core (mo-filter-queue ship)
@ -433,8 +433,8 @@
|- ^+ mo-core
?~ agents
mo-core
=. mo-core
=/ =routes [disclosing=~ attributing=ship]
=? mo-core ?=(%live -.yoke.i.agents)
=/ =routes [disclosing=~ attributing=[ship prov]]
=/ app (ap-abed:ap name.i.agents routes)
ap-abet:(ap-breach:app ship)
$(agents t.agents)
@ -464,7 +464,7 @@
?> ?=([%era ~] wire)
?. ?=(%breach -.public-keys-result.sign-arvo)
mo-core
(mo-breach who.public-keys-result.sign-arvo)
(mo-breach /jael who.public-keys-result.sign-arvo)
:: +mo-handle-sys-lag: handle an ames %clog notification
::
++ mo-handle-sys-lag
@ -474,12 +474,12 @@
?> ?=([%lag ~] wire)
?> ?=([%ames %clog *] sign-arvo)
::
=/ agents=(list term) ~(tap in ~(key by yokes.state))
=/ agents=(list [=dude =yoke]) ~(tap by yokes.state)
|- ^+ mo-core
?~ agents mo-core
::
=. mo-core
=/ app (ap-abed:ap i.agents `our)
=? mo-core ?=(%live -.yoke.i.agents)
=/ app (ap-abed:ap dude.i.agents [~ our /ames])
ap-abet:(ap-clog:app ship.sign-arvo)
::
$(agents t.agents)
@ -630,14 +630,16 @@
mo-core
=/ app
=/ =ship (slav %p i.t.t.wire)
=/ =routes [disclosing=~ attributing=ship]
=/ =routes [disclosing=~ attributing=[ship /[-.sign-arvo]]]
(ap-abed:ap dap routes)
::
=. app (ap-generic-take:app t.t.t.wire sign-arvo)
ap-abet:app
?> ?=([%out @ @ *] t.t.wire)
=/ =ship (slav %p i.t.t.t.wire)
=/ =routes [disclosing=~ attributing=ship]
=/ other-agent i.t.t.t.t.wire
=/ prov=path ?.(=(ship our) *path /gall/[other-agent])
=/ =routes [disclosing=~ attributing=[ship prov]]
=/ =unto +>.sign-arvo
?: ?=(%| -.agent.u.yoke)
=/ blocked=(qeu blocked-move)
@ -672,8 +674,8 @@
~(get to blocked)
?: ?=(%| -.blocker) $
=/ =move
=/ =sock [attributing.routes our]
=/ card [%slip %g %deal sock dap p.blocker]
=/ =sack [ship.attributing.routes our path.attributing.routes]
=/ card [%slip %g %deal sack dap p.blocker]
[duct card]
$(moves [move moves])
:: +mo-filter-queue: remove all blocked tasks from ship.
@ -696,31 +698,33 @@
new-agents (~(put by new-agents) name.i.agents new-blocked)
==
=^ mov=blocked-move blocked.i.agents ~(get to blocked.i.agents)
=? new-blocked !=(ship attributing.routes.mov)
=? new-blocked !=(ship ship.attributing.routes.mov)
(~(put to new-blocked) mov)
$
:: +mo-idle: put agent to sleep
::
++ mo-idle
|= dap=dude
|= [prov=path dap=dude]
^+ mo-core
?. (~(has by yokes.state) dap)
=/ yoke=(unit yoke) (~(get by yokes.state) dap)
?: |(?=(~ yoke) ?=(%nuke -.u.yoke))
~> %slog.0^leaf/"gall: ignoring %idle for {<dap>}, not running"
mo-core
ap-abet:ap-idle:(ap-abed:ap dap `our)
ap-abet:ap-idle:(ap-abed:ap dap [~ our prov])
:: +mo-nuke: delete agent completely
::
++ mo-nuke
|= dap=dude
|= [prov=path dap=dude]
^+ mo-core
?. (~(has by yokes.state) dap)
=/ yoke=(unit yoke) (~(get by yokes.state) dap)
?: |(?=(~ yoke) ?=(%nuke -.u.yoke))
~> %slog.0^leaf/"gall: ignoring %nuke for {<dap>}, not running"
mo-core
~> %slog.0^leaf/"gall: nuking {<dap>}"
=. mo-core ap-abet:ap-nuke:(ap-abed:ap dap `our)
=. mo-core ap-abet:ap-nuke:(ap-abed:ap dap [~ our prov])
=- mo-core(yokes.state -)
%+ ~(jab by yokes.state) dap
|= =yoke
|= =^yoke
?: ?=(%nuke -.yoke) yoke
:- %nuke
%- ~(run by sky.yoke)
@ -729,13 +733,13 @@
:: +mo-load: install agents
::
++ mo-load
|= agents=(list [=dude =beak =agent])
|= [prov=path agents=(list [=dude =beak =agent])]
=. mo-core
|- ^+ mo-core
?~ agents mo-core
=/ [=dude =desk] [dude q.beak]:i.agents
:: ~> %slog.0^leaf/"gall: starting {<dude>} on {<desk>}"
$(agents t.agents, mo-core (mo-receive-core i.agents))
$(agents t.agents, mo-core (mo-receive-core prov i.agents))
::
=/ kil
=/ lol
@ -747,7 +751,7 @@
|- ^+ mo-core
?~ kil mo-core
~> %slog.0^leaf/"gall: stopping {<i.kil>}"
$(kil t.kil, mo-core (mo-idle i.kil))
$(kil t.kil, mo-core (mo-idle prov i.kil))
:: +mo-peek: call to +ap-peek (which is not accessible outside of +mo).
::
++ mo-peek
@ -755,6 +759,7 @@
|= [veb=? dap=term =routes care=term =path]
^- (unit (unit cage))
::
?. ?=([~ %live *] (~(get by yokes.state) dap)) [~ ~]
=/ app (ap-abed:ap dap routes)
(ap-peek:app veb care path)
::
@ -766,10 +771,14 @@
(mo-apply-sure dap routes deal)
::
%raw-poke
:: don't validate %noun pokes, for performance
::
?: =(%noun mark.deal)
(mo-apply-sure dap routes [%poke %noun %noun noun.deal])
=/ =case da+now
=/ yok (~(got by yokes.state) dap)
=/ =desk q.beak:?>(?=(%live -.yok) yok) ::TODO acceptable assertion?
=/ sky (rof ~ %cb [our desk case] /[mark.deal])
=/ sky (rof ~ /gall %cb [our desk case] /[mark.deal])
?- sky
?(~ [~ ~])
=/ ror "gall: raw-poke fail :{(trip dap)} {<mark.deal>}"
@ -793,7 +802,7 @@
=/ mars-path /[a.mars]/[b.mars]
=/ yok (~(got by yokes.state) dap)
=/ =desk q.beak:?>(?=(%live -.yok) yok) ::TODO acceptable assertion?
=/ sky (rof ~ %cc [our desk case] mars-path)
=/ sky (rof ~ /gall %cc [our desk case] mars-path)
?- sky
?(~ [~ ~])
=/ ror "gall: poke cast fail :{(trip dap)} {<mars>}"
@ -824,10 +833,10 @@
:: +deal. Otherwise simply apply the action to the agent.
::
++ mo-handle-local
|= [=ship agent=term =deal]
|= [prov=path =ship agent=term =deal]
^+ mo-core
::
=/ =routes [disclosing=~ attributing=ship]
=/ =routes [disclosing=~ attributing=[ship prov]]
=/ running (~(get by yokes.state) agent)
=/ is-running &(?=([~ %live *] running) ?=(%& -.agent.u.running))
=/ is-blocked (~(has by blocked.state) agent)
@ -865,7 +874,7 @@
%s [%watch path.ames-request]
%u [%leave ~]
==
(mo-pass wire %g %deal [ship our] agent-name deal)
(mo-pass wire %g %deal [ship our /] agent-name deal)
:: +mo-spew: handle request to set verbosity toggles on debug output
::
++ mo-spew
@ -970,7 +979,7 @@
++ ap-idle
^+ ap-core
?: ?=(%| -.agent.yoke) ap-core
=> [ken=ken.yoke (ap-ingest ~ |.([ap-yawn-all *agent]))]
=> [ken=ken.yoke (ap-ingest ~ |.([ap-yawn-all p.agent.yoke]))]
ap-core(ken.yoke ken, agent.yoke |+on-save:ap-agent-core)
::
++ ap-nuke
@ -1104,7 +1113,7 @@
=/ =case da+now
=/ bek=beak [our q.beak.yoke case]
=/ mars-path /[a.mars]/[b.mars]
=/ sky (rof ~ %cc bek mars-path)
=/ sky (rof ~ /gall %cc bek mars-path)
?- sky
?(~ [~ ~])
%- (slog leaf+"watch-as fact conversion find-fail" >sky< ~)
@ -1138,14 +1147,15 @@
?- -.neet
%agent [%out (scot %p ship.neet) name.neet wire]
%huck [%out (scot %p ship.neet) name.neet wire]
%arvo [(scot %p attributing.agent-routes) wire]
%arvo [(scot %p ship.attributing.agent-routes) wire]
==
::
=/ =note-arvo
=/ prov=path /gall/[agent-name]
?- -.neet
%arvo +.neet
%huck note-arvo.neet
%agent [%g %deal [our ship.neet] [name task]:neet]
%agent [%g %deal [our ship.neet prov] [name task]:neet]
==
[duct %pass wire note-arvo]~
==
@ -1277,7 +1287,7 @@
=/ tub=(unit tube:clay)
?: =(have want) `(bake same ^vase)
=/ tuc=(unit (unit cage))
(rof ~ %cc [our q.beak.yoke da+now] /[have]/[want])
(rof ~ /gall %cc [our q.beak.yoke da+now] /[have]/[want])
?. ?=([~ ~ *] tuc) ~
`!<(tube:clay q.u.u.tuc)
?~ tub
@ -1306,8 +1316,9 @@
++ ap-construct-bowl
^- bowl
:* :* our :: host
attributing.agent-routes :: guest
ship.attributing.agent-routes :: guest
agent-name :: agent
path.attributing.agent-routes :: provenance
== ::
:* wex=boat.yoke :: outgoing
sup=bitt.yoke :: incoming
@ -1352,7 +1363,7 @@
~/ %ap-subscribe
|= pax=path
^+ ap-core
=/ incoming [attributing.agent-routes pax]
=/ incoming [ship.attributing.agent-routes pax]
=. bitt.yoke (~(put by bitt.yoke) agent-duct incoming)
=^ maybe-tang ap-core
%+ ap-ingest %watch-ack |.
@ -1414,7 +1425,7 @@
?: ?=(%spider agent-name)
:- [%fact mark.unto !>(noun.unto)]
ap-core
=/ sky (rof ~ %cb [our q.beak.yoke case] /[mark.unto])
=/ sky (rof ~ /gall %cb [our q.beak.yoke case] /[mark.unto])
?. ?=([~ ~ *] sky)
(mean leaf+"gall: ames mark fail {<mark.unto>}" ~)
::
@ -1596,7 +1607,8 @@
|= =duct
^- (list move)
::
:~ [duct %slip %g %deal [our our] agent-name %leave ~]
=/ =sack [our our /gall/[agent-name]]
:~ [duct %slip %g %deal sack agent-name %leave ~]
[duct %give %unto %kick ~]
==
:: +ap-kill-down: 2-sided kill from subscriber side
@ -1668,7 +1680,7 @@
++ scry-peer-state
|= her=ship
~+ ^- (unit peer-state:ames)
=/ sky (rof [~ ~] %ax [our %$ da+now] /peers/(scot %p her))
=/ sky (rof [~ ~] /gall %ax [our %$ da+now] /peers/(scot %p her))
?: |(?=(~ sky) ?=(~ u.sky))
~
=/ sat !<(ship-state:ames q.u.u.sky)
@ -1685,7 +1697,7 @@
++ ap-mule
|= run=_^?(|.(*step:agent))
^- (each step:agent tang)
=/ res (mock [run %9 2 %0 1] (look rof ~))
=/ res (mock [run %9 2 %0 1] (look rof ~ /gall/[agent-name]))
?- -.res
%0 [%& !<(step:agent [-:!>(*step:agent) p.res])]
%1 [%| (smyt ;;(path p.res)) ~]
@ -1696,7 +1708,7 @@
++ ap-mule-peek
|= run=_^?(|.(*(unit (unit cage))))
^- (each (unit (unit cage)) tang)
=/ res (mock [run %9 2 %0 1] (look rof ~))
=/ res (mock [run %9 2 %0 1] (look rof ~ /gall/[agent-name]))
?- -.res
%0 [%& !<((unit (unit cage)) [-:!>(*(unit (unit cage))) p.res])]
%1 [%| (smyt ;;(path p.res)) ~]
@ -1867,15 +1879,27 @@
::
~| [%gall-call-failed duct hic]
=/ =task ((harden task) hic)
=/ prov=path
?: ?=(%deal -.task)
?.(=(p.p.task our) *path r.p.task)
?. ?& ?=([^ *] duct)
?= $? %ames %behn %clay
%dill %eyre %gall
%iris %jael %khan
==
i.i.duct
==
*path
/[i.i.duct]
::
=/ mo-core (mo-abed:mo duct)
?- -.task
%deal
=/ [=sock =term =deal] [p q r]:task
?. =(q.sock our)
?> =(p.sock our)
mo-abet:(mo-send-foreign-request:mo-core q.sock term deal)
mo-abet:(mo-handle-local:mo-core p.sock term deal)
=/ [=sack =term =deal] [p q r]:task
?. =(q.sack our)
?> =(p.sack our)
mo-abet:(mo-send-foreign-request:mo-core q.sack term deal)
mo-abet:(mo-handle-local:mo-core prov p.sack term deal)
::
%init [~ gall-payload(system-duct.state duct)]
%plea
@ -1894,11 +1918,11 @@
::
%sear mo-abet:(mo-filter-queue:mo-core ship.task)
%jolt mo-abet:(mo-jolt:mo-core dude.task our desk.task)
%idle mo-abet:(mo-idle:mo-core dude.task)
%load mo-abet:(mo-load:mo-core +.task)
%nuke mo-abet:(mo-nuke:mo-core dude.task)
%doff mo-abet:(mo-doff:mo-core +.task)
%rake mo-abet:(mo-rake:mo-core +.task)
%idle mo-abet:(mo-idle:mo-core prov dude.task)
%load mo-abet:(mo-load:mo-core prov +.task)
%nuke mo-abet:(mo-nuke:mo-core prov dude.task)
%doff mo-abet:(mo-doff:mo-core prov +.task)
%rake mo-abet:(mo-rake:mo-core prov +.task)
%spew mo-abet:(mo-spew:mo-core veb.task)
%sift mo-abet:(mo-sift:mo-core dudes.task)
%trim [~ gall-payload]
@ -1914,17 +1938,33 @@
=? old ?=(%10 -.old) (spore-10-to-11 old)
=? old ?=(%11 -.old) (spore-11-to-12 old)
=? old ?=(%12 -.old) (spore-12-to-13 old)
?> ?=(%13 -.old)
=? old ?=(%13 -.old) (spore-13-to-14 old)
?> ?=(%14 -.old)
gall-payload(state old)
::
+$ spore-any $%(spore spore-7 spore-8 spore-9 spore-10 spore-11 spore-12)
+$ spore-any
$%(spore spore-7 spore-8 spore-9 spore-10 spore-11 spore-12 spore-13)
+$ spore-13
$: %13
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship)
eggs=(map term egg)
blocked=(map term (qeu blocked-move-13))
=bug
==
+$ blocked-move-13 [=duct routes=routes-13 move=(each deal unto)]
+$ routes-13
$: disclosing=(unit (set ship))
attributing=ship
==
+$ spore-12
$: %12
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship)
eggs=(map term egg-12)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
=bug
==
+$ egg-12
@ -1949,7 +1989,7 @@
outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship)
eggs=(map term egg-11)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
=bug
==
+$ egg-11
@ -1971,7 +2011,7 @@
outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship)
eggs=(map term egg-10)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
=bug
==
+$ egg-10
@ -1993,7 +2033,7 @@
outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship)
eggs=(map term egg-10)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
=bug
==
::
@ -2005,7 +2045,7 @@
outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship)
eggs=(map term egg-8)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
==
+$ egg-8
$: control-duct=duct
@ -2026,7 +2066,7 @@
outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship)
eggs=(map term egg-8)
blocked=(map term (qeu blocked-move))
blocked=(map term (qeu blocked-move-13))
==
::
++ spore-7-to-8
@ -2108,7 +2148,7 @@
::
++ spore-12-to-13
|= old=spore-12
^- spore
^- spore-13
%= old
- %13
eggs
@ -2118,13 +2158,32 @@
?: ?=(%nuke -.e) e
e(sky [sky.e ken:*$>(%live egg)])
==
:: added provenance path to routes
::
++ spore-13-to-14
|= old=spore-13
^- spore
%= old
- %14
blocked
^- (map term (qeu blocked-move))
%- ~(run by blocked.old)
|= q=(qeu blocked-move-13)
%- ~(gas to *(qeu blocked-move))
%+ turn ~(tap to q)
|= blocked=blocked-move-13
^- blocked-move
%= blocked
attributing.routes [ship=attributing.routes.blocked path=/]
==
==
--
:: +scry: standard scry
::
++ scry
~/ %gall-scry
^- roon
|= [lyc=gang care=term bem=beam]
|= [lyc=gang pov=path care=term bem=beam]
^- (unit (unit cage))
=* ship p.bem
=* dap q.bem
@ -2142,7 +2201,7 @@
== ~
?. (~(has by yokes.state) dap) [~ ~]
?. ?=(^ path) ~
=/ =routes [~ ship]
=/ =routes [~ ship pov]
(mo-peek:mo & dap routes care path)
::
=> .(path t.path)
@ -2233,7 +2292,7 @@
|= [dap=term =yoke]
^- mass
=/ met=(list mass)
=/ dat (mo-peek:mo | dap [~ ship] %x /whey/mass)
=/ dat (mo-peek:mo | dap [~ ship pov] %x /whey/mass)
?: ?=(?(~ [~ ~]) dat) ~
(fall ((soft (list mass)) q.q.u.u.dat) ~)
?~ met

View File

@ -385,7 +385,7 @@
::
++ scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* ren car
=* why=shop &/p.bem

View File

@ -199,7 +199,7 @@
/[app]/poke
%g
%deal
[our our]
[our our /jael]
app
%poke
%azimuth-poke
@ -635,7 +635,7 @@
[app path]
%g
%deal
[our our]
[our our /jael]
app
%watch
path
@ -1055,7 +1055,7 @@
:: :: ++scry
++ scry :: inspect
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
=* ren car
=* why=shop &/p.bem

View File

@ -43,7 +43,7 @@
=> |% :: %khan types
+$ move [p=duct q=(wite note gift)] ::
+$ note :: out request $->
$~ [%g %deal *sock *term *deal:gall] ::
$~ [%g %deal *sack *term *deal:gall] ::
$% $: %g :: to %gall
$>(%deal task:gall) :: full transmission
== ::
@ -72,7 +72,7 @@
++ get-dais
|= [=beak =mark rof=roof]
^- dais:clay
?~ ret=(rof ~ %cb beak /[mark])
?~ ret=(rof ~ /khan %cb beak /[mark])
~|(mark-unknown+mark !!)
?~ u.ret
~|(mark-invalid+mark !!)
@ -82,7 +82,7 @@
++ get-tube
|= [=beak =mark =out=mark rof=roof]
^- tube:clay
?~ ret=(rof ~ %cc beak /[mark]/[out-mark])
?~ ret=(rof ~ /khan %cc beak /[mark]/[out-mark])
~|(tube-unknown+[mark out-mark] !!)
?~ u.ret
~|(tube-invalid+[mark out-mark] !!)
@ -105,12 +105,12 @@
++ poke-spider
|= [hen=duct =cage]
^- move
[hen %pass //g %g %deal [our our] %spider %poke cage]
[hen %pass //g %g %deal [our our /khan] %spider %poke cage]
::
++ watch-spider
|= [hen=duct =path]
^- move
[hen %pass //g %g %deal [our our] %spider %watch path]
[hen %pass //g %g %deal [our our /khan] %spider %watch path]
--
=| khan-state
=* state -
@ -173,7 +173,7 @@
::
++ scry
^- roon
|= [lyc=gang car=term bem=beam]
|= [lyc=gang pov=path car=term bem=beam]
^- (unit (unit cage))
~
++ stay state

View File

@ -5265,10 +5265,10 @@
::
=> |%
++ sein
|= [rof=roof our=ship now=@da who=ship]
|= [rof=roof pov=path our=ship now=@da who=ship]
;; ship
=< q.q %- need %- need
(rof ~ %j `beam`[[our %sein %da now] /(scot %p who)])
(rof ~ pov %j `beam`[[our %sein %da now] /(scot %p who)])
--
:: middle core: stateless queries for default numeric sponsorship
::

View File

@ -0,0 +1,38 @@
/- spider
/+ strandio
=>
|%
+$ vere-update [cur=vere next=(unit vere)]
::
:: parse out the commit suffix for people on pre-release vere
:: these revisions look like /vere/~.2.7-de2d39b
:: we will have better pre-release (pace) handling later
++ parse-current-version
|= current=vere
^- @t
=/ v
%+ rush
(slav %ta (rear rev.current))
;~((glue hep) (star ;~(pose nud dot)) (star aln))
?~ v (slav %ta (rear rev.current))
(crip -.u.v)
::
++ is-equal-version
|= [latest=@t current=vere]
=(latest (parse-current-version current))
--
=, strand=strand:spider
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
;< latest=cord bind:m
(fetch-cord:strandio "https://bootstrap.urbit.org/vere/live/last")
;< =bowl:spider bind:m get-bowl:strandio
=/ cur=vere .^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
=/ =vere-update
?: (is-equal-version latest cur)
[cur ~]
=| next=vere
[cur `next(rev /vere/(scot %ta latest))]
%- pure:m
!>(vere-update)

View File

@ -206,19 +206,24 @@
|= [ovo=ovum ken=*]
[~ (slum ken [now ovo])]
::
:: boot-two: startup formula
:: kernel-formula
::
:: We evaluate :arvo-formula (for jet registration),
:: then ignore the result and produce .installed
::
=/ kernel-formula
[%7 arvo-formula %1 installed]
::
:: boot-two: startup formula
::
=/ boot-two
=> *[arvo-formula=^ installed=^ tale=*]
!= =+(.*(0 arvo-formula) [installed tale])
=> *[kernel-formula=^ tale=*]
!= [.*(0 kernel-formula) tale]
::
:: boot-ova
::
=/ boot-ova=(list)
[aeon:eden:part boot-two arvo-formula installed ~]
[aeon:eden:part boot-two kernel-formula ~]
::
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
::

View File

@ -8,6 +8,9 @@
++ grab |%
++ noun *
--
++ grow |%
++ mime [/application/x-urb-jam (as-octs:mimes:html (jam non))]
--
++ grad
|%
++ form %noun

View File

@ -0,0 +1,17 @@
|_ v=vere
++ grab
|%
++ noun vere
--
++ grow
|%
++ json
%- pairs:enjs:format
:- [%non s+non.v]
:- [%rev (path:enjs:format rev.v)]
%+ turn kel.v
|= w=weft
[lal.w (numb:enjs:format num.w)]
--
++ grad %noun
--

View File

@ -3,44 +3,30 @@
/+ *test, v=test-ames-gall
/* kelvin %hoon /sys/kelvin
=> |%
++ crypto-core
|% ++ nec (pit:nu:crub:crypto 512 (shaz 'nec'))
++ bud (pit:nu:crub:crypto 512 (shaz 'bud'))
++ sign
|= [=ship data=@ux]
%. data
?:(=(ship ~nec) sigh:as:nec sigh:as:bud)
--
::
++ n-frags
|= n=@
^- @ux
:: 6 chosen randomly to get some trailing zeros
::
%+ rsh 10
%+ rep 13
%+ turn (gulf 1 n)
|=(x=@ (fil 3 1.024 (dis 0xff x)))
::
++ custom-roof
++ kelvin-roof
^- roof
::
|= [lyc=gang vis=view bem=beam]
|= [lyc=gang pov=path vis=view bem=beam]
^- (unit (unit cage))
?> =(s.bem /sys/kelvin)
?+ vis ~
%cp
=/ black=dict:clay
%*(. *dict:clay mod.rul %black)
``noun+!>([black black])
::
%cz
?+ -.r.bem !!
%ud ``noun+!>((n-frags p.r.bem))
==
::
%cx ``hoon+!>(kelvin)
==
::
++ bex-roof
^- roof
|= [lyc=gang pov=path vis=view bem=beam]
^- (unit (unit cage))
?> =(s.bem //some/data/atom)
?+ vis ~
%gx ``atom+!>((bex (bex 14)))
==
::
++ etch-request-content
|= [our=@p =path num=@ud]
^- @
@ -77,7 +63,7 @@
sndr-tick=0b1
rcvr-tick=0b1
origin=~
content=(etch-request-content ~nec /~bud/1/1/c/x/1/kids/sys/kelvin 1)
content=(etch-request-content ~nec (weld /~bud/1/1 scry-path) 1)
==
~& > 'poke requester %ames with a %keen task'
=^ t1 ames.nec
@ -116,9 +102,9 @@
~& > 'gives a remote scry response to listeners'
=/ [sig=@ux meows=(list @ux)]
%: ames-scry-hunk:v ames.bud
[~1111.1.2 0xbeef.dead custom-roof]
[~1111.1.2 0xbeef.dead kelvin-roof]
~bud
[1 16.384 /~bud/1/1/c/x/1/kids/sys/kelvin]
[1 16.384 (weld /~bud/1/1 scry-path)]
==
=/ response=shot:ames
:* [sndr=~bud rcvr=~nec]
@ -132,7 +118,7 @@
==
::
=/ roar=(unit roar:ames)
:+ ~ [/~bud/1/1/c/x/1/kids/sys/kelvin `hoon+kelvin]
:+ ~ [(weld /~bud/1/1 scry-path) `hoon+kelvin]
[[~bud [1 sig]] ~ ~]
=^ t4 ames.nec
%: ames-check-call:v ames.nec
@ -155,7 +141,7 @@
sndr-tick=0b1
rcvr-tick=0b1
origin=~
content=(etch-request-content ~nec /~bud/1/1/c/x/5/kids/sys/kelvin 1)
content=(etch-request-content ~nec (weld /~bud/1/1 future-path) 1)
==
~& > 'poke requester %ames with a %keen task for a future case'
=^ t5 ames.nec
@ -201,8 +187,8 @@
%: ames-check-call:v ames.nec
[~1111.1.1 0xdead.beef *roof]
[~[/wham-duct] %wham ~bud future-path]
:~ [~[/keen-duct-4] [%give %tune [~bud /c/x/5/kids/sys/kelvin] ~]]
[~[/keen-duct-5] [%give %tune [~bud /c/x/5/kids/sys/kelvin] ~]]
:~ [~[/keen-duct-4] [%give %tune [~bud future-path] ~]]
[~[/keen-duct-5] [%give %tune [~bud future-path] ~]]
[~[//unix] %pass future-behn %b %rest ~1111.1.1..00.00.01]
==
==
@ -215,4 +201,111 @@
listeners:u.keen
~& > 'checks no more listeners'
(expect-eq !>(~) !>(listeners))
::
++ test-fine-misordered
%- run-chain
|. :- %|
=+ (nec-bud:v life=[nec=1 bud=1] rift=[nec=1 bud=1])
:: uncomment to turn on verbose debug output
::=^ * ames.nec
:: (ames-call:v ames.nec ~[/none] [%spew ~[%msg %snd %rcv %odd]] *roof)
::=^ * ames.bud
:: (ames-call:v ames.bud ~[/none] [%spew ~[%msg %snd %rcv %odd]] *roof)
=/ scry-path=path /g/x/0/dap//some/data/atom
=/ fine-behn-wire=wire (weld /fine/behn/wake/~bud scry-path)
=/ =task:ames [%keen ~bud scry-path]
::
=/ requests=(list shot:ames)
%+ turn (gulf 1 3)
|= frag=@ud
^- shot:ames
:* [sndr=~nec rcvr=~bud]
req=& sam=|
sndr-tick=0b1
rcvr-tick=0b1
origin=~
content=(etch-request-content ~nec (weld /~bud/1/1 scry-path) frag)
==
=+ ^= [req1 req2 req3]
?> ?=([^ ^ ^ *] requests)
[i i.t i.t.t]:requests
~& > 'poke requester %ames with a %keen task'
=^ t1 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.1 0xdead.beef *roof]
[~[/keen-duct-1] task]
:~ [~[//unix] [%give %send [%& ~bud] (etch-shot:ames req1)]]
[~[//unix] %pass fine-behn-wire %b %wait ~1111.1.1..00.00.01]
==
==
::
=/ [sig=@ux meows=(list @ux)]
%: ames-scry-hunk:v ames.bud
[~1111.1.1 0xbeef.dead bex-roof]
~bud
[1 16.384 (weld /~bud/1/1 scry-path)]
==
=/ responses=(list shot:ames)
%+ turn meows
|= m=@ux
^- shot:ames
:* [sndr=~bud rcvr=~nec]
req=| sam=|
sndr-tick=0b1
rcvr-tick=0b1
origin=~
content=m
==
=+ ^= [resp1 resp2 resp3]
?> ?=([^ ^ ^ *] responses)
[i i.t i.t.t]:responses
::
=/ roar=(unit roar:ames)
:+ ~ [(weld /~bud/1/1 scry-path) `atom+(bex (bex 14))]
[[~bud [1 sig]] ~ ~]
::
:- t1 |. :- %|
~& > 'hear first response fragment'
=^ t2 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.2 0xbeef.dead *roof]
:- ~[//fine]
:* %hear [%& ~bud]
(etch-shot:ames resp1)
==
:~ [~[//fine] %pass /qos %d %flog %text "; ~bud is your neighbor"]
[~[//unix] [%give %send [%& ~bud] (etch-shot:ames req2)]]
[~[//unix] [%give %send [%& ~bud] (etch-shot:ames req3)]]
[~[//unix] %pass fine-behn-wire %b %rest ~1111.1.1..00.00.01]
[~[//unix] %pass fine-behn-wire %b %wait ~1111.1.2..00.02.00]
==
==
::
:- t2 |. :- %|
~& > 'hear third response fragment'
=^ t3 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.2 0xbeef.dead *roof]
:- ~[//fine]
:* %hear [%& ~bud]
(etch-shot:ames resp3)
==
::
~
==
:- t3 |. :- %&
~& > 'hear second response fragment'
=^ t4 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.3 0xbeef.dead *roof]
:- ~[//fine]
:* %hear [%& ~bud]
(etch-shot:ames resp2)
==
:~ [~[/keen-duct-1] %give %tune [~bud scry-path] roar]
[~[//unix] %pass fine-behn-wire %b %rest ~1111.1.2..00.02.00]
==
==
::
t4
--

View File

@ -13,7 +13,7 @@
:: (ames-call:v ames.bud ~[/none] [%spew ~[%msg %snd %rcv %odd]] *roof)
:: poke %sub to tell it to subscribe
~& > 'poke %sub to tell it to subscribe'
=/ =task:gall [%deal [~nec ~nec] %sub %poke watch+!>(~bud)]
=/ =task:gall [%deal [~nec ~nec /] %sub %poke watch+!>(~bud)]
=^ t1 gall.nec
%: gall-check-call:v gall.nec
[~1111.1.1 0xdead.beef *roof]
@ -21,7 +21,7 @@
:~ :- ~[/foo] [%give %unto %poke-ack ~]
:- ~[/init]
:* %pass /use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud
[%g %deal [~nec ~bud] %pub %watch /foo]
[%g %deal [~nec ~bud /gall/sub] %pub %watch /foo]
== ==
==
:- t1 |. :- %|
@ -31,7 +31,7 @@
%: gall-check-call:v gall.nec
[~1111.1.1 0xdead.beef *roof]
:- ~[/use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud /init]
[%deal [~nec ~bud] %pub %watch /foo]
[%deal [~nec ~bud /] %pub %watch /foo]
:~ :- ~[/init] [%pass /sys/lag %a %heed ~bud]
:- ~[/init] [%pass /sys/era %j %public-keys (sy ~bud ~)]
:- ~[/use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud /init]
@ -86,7 +86,7 @@
:~ :- ~[/init] [%pass /sys/lag %a %heed ~nec]
:- ~[/init] [%pass /sys/era %j %public-keys (sy ~nec ~)]
:- ~[/bone/~nec/0/1 //unix]
[%pass /sys/req/~nec/pub %g %deal [~nec ~bud] %pub %watch /foo]
[%pass /sys/req/~nec/pub %g %deal [~nec ~bud /] %pub %watch /foo]
==
==
:- t5 |. :- %|
@ -96,7 +96,7 @@
%: gall-check-call:v gall.bud
[~1111.1.2 0xbeef.dead *roof]
:- ~[/sys/req/~nec/pub /bone/~nec/0/1 //unix]
[%deal [~nec ~bud] %pub %watch /foo]
[%deal [~nec ~bud /] %pub %watch /foo]
:~ :- ~[/sys/req/~nec/pub /bone/~nec/0/1 //unix]
[%give %unto %watch-ack ~]
==
@ -256,7 +256,7 @@
[%gall %unto %kick ~]
:~ :- ~[/init]
:* %pass /use/sub/0w1.d6Isf/out/~bud/pub/2/sub-foo/~bud
[%g %deal [~nec ~bud] %pub %watch /foo]
[%g %deal [~nec ~bud /gall/sub] %pub %watch /foo]
== ==
==
:- t17 |. :- %|
@ -266,7 +266,7 @@
%: gall-check-call:v gall.nec
[~1111.1.5 0xdead.beef *roof]
:- ~[/use/sub/0w1.d6Isf/out/~bud/pub/2/sub-foo/~bud /init]
[%deal [~nec ~bud] %pub %watch /foo]
[%deal [~nec ~bud /] %pub %watch /foo]
:~ :- ~[/use/sub/0w1.d6Isf/out/~bud/pub/2/sub-foo/~bud /init]
[%pass /sys/way/~bud/pub %a %plea ~bud %g /ge/pub [%0 %s /foo]]
==
@ -347,7 +347,7 @@
:- ~[/bone/~nec/0/5 //unix]
[%plea ~nec %g /ge/pub [%0 %s /foo]]
:~ :- ~[/bone/~nec/0/5 //unix]
[%pass /sys/req/~nec/pub %g %deal [~nec ~bud] %pub %watch /foo]
[%pass /sys/req/~nec/pub %g %deal [~nec ~bud /] %pub %watch /foo]
==
==
:: publisher gall runs :pub's +on-watch, gives ack to self
@ -357,7 +357,7 @@
%: gall-check-call:v gall.bud
[~1111.1.7 0xbeef.dead *roof]
:- ~[/sys/req/~nec/pub /bone/~nec/0/5 //unix]
[%deal [~nec ~bud] %pub %watch /foo]
[%deal [~nec ~bud /] %pub %watch /foo]
:~ :- ~[/sys/req/~nec/pub /bone/~nec/0/5 //unix]
[%give %unto %watch-ack ~]
==
@ -398,7 +398,7 @@
0xb.130c.ab37.ca24.49cd.aecb.23ba.70f1.6f1c.4d00.124e.c9a5.
3413.3843.d81c.47c4.7040.6e62.3700.0200.0132.e1ab.9004
==
:~ :- ~[//unix] [%pass /bone/~nec/0/1 %a %plea ~nec [%a /close ~]]
:~ :- ~[//unix] [%pass /bone/~nec/0/1 %a %deep %cork ~nec 1]
==
==
:- t27 |. :- %|
@ -408,12 +408,12 @@
%: ames-check-call:v ames.bud
[~1111.1.8 0xbeef.dead *roof]
:- ~[/bone/~nec/0/1 //unix]
[%plea ~nec [%a /close ~]]
[%deep %cork ~nec 1]
:~ :- ~[/bone/~nec/0/1 //unix] [%give %done ~]
==
==
:: publisher ames hears cork done from self, sends ack packet
~& > 'publisher ames hears cork done from self, sends ack packet'
:: publisher ames hears cork done from self, sends ack and $cork to self
~& > 'publisher ames hears cork done from self, sends ack and $cork to self'
:- t28 |. :- %|
=^ t29 ames.bud
%: ames-check-take:v ames.bud
@ -474,8 +474,8 @@
[%gall %unto %watch-ack ~]
~
==
:: subscriber ames hears %cork ack
~& > 'subscriber ames hears %cork ack'
:: subscriber ames hears %cork ack, sends $kill to self
~& > 'subscriber ames hears %cork ack, sends $kill to self'
:- t32 |. :- %|
=^ t33 ames.nec
%: ames-check-call:v ames.nec
@ -485,9 +485,24 @@
0x5f.f966.8e00.0449.bdec.9006.c7e5.1237.
1d87.53fe.d7bb.ad00.0100.0223.c6a8.5804
==
[~[/ames] [%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00]]~
:~ :- ~[//unix]
[%pass /bone/~bud/0/0 %a %deep %kill ~bud 0]
::
:- ~[/ames]
[%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00]
==
==
:- t33 |. :- %&
:: subscriber ames hears $kill from self, deletes the flow
~& > 'subscriber ames hears $kill from self, deletes the flow'
:- t33 |. :- %|
=^ t34 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.10 0xdead.beef *roof]
:- ~[/bone/~bud/0/0 //unix]
[%deep %kill ~bud 0]
~
==
:- t34 |. :- %&
;: weld
%+ expect-eq
!> (sy 0 ~)

View File

@ -205,7 +205,7 @@
:: custom scry handler for +test-fine-response.
:: could be refined further...
::
|= [lyc=gang vis=view bem=beam]
|= [lyc=gang pov=path vis=view bem=beam]
^- (unit (unit cage))
?+ vis ~
%cp
@ -222,7 +222,7 @@
``hoon+!>(dojo)
==
=/ vane-core (vane(rof roof))
(scry:vane-core ~ car bem)
(scry:vane-core ~ / car bem)
::
++ call
|= [vane=_nec =duct =task:ames]
@ -288,10 +288,10 @@
=/ =shot:ames
(etch-shut-packet:ames shut-packet nec-sym ~marnec ~marbud-marbud 3 17)
::
=/ decoded (sift-shut-packet:ames shot nec-sym 3 17)
=/ decoded=(unit shut-packet:ames) (sift-shut-packet:ames shot nec-sym 3 17)
::
%+ expect-eq
!> shut-packet
!> `shut-packet
!> decoded
::
:: Crypto failures are now non-deterministic
@ -424,31 +424,33 @@
:: established a channel, and can proceed as usual
::
=/ post [%post 'first1!!']
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
%+ weld
%- expect-fail |.
(call nec ~[//unix] %hear (snag-packet 1 moves2))
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
=^ moves4 nec (call nec ~[//unix] %hear (snag-packet 1 moves2))
::
=^ moves4 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
=^ moves5 comet (take comet /bone/~nec/1/1 ~[//unix] %g %done ~)
=^ moves6 nec (call nec ~[//unix] %hear (snag-packet 0 moves5))
=^ moves7 comet (take comet /bone/~nec/1/1 ~[//unix] %g %boon post)
=^ moves8 nec (call nec ~[//unix] %hear (snag-packet 0 moves7))
=^ moves5 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
=^ moves6 comet (take comet /bone/~nec/1/1 ~[//unix] %g %done ~)
=^ moves7 nec (call nec ~[//unix] %hear (snag-packet 0 moves6))
=^ moves8 comet (take comet /bone/~nec/1/1 ~[//unix] %g %boon post)
=^ moves9 nec (call nec ~[//unix] %hear (snag-packet 0 moves8))
::
;: weld
%+ expect-eq
!> =- [~[//unix] %pass /qos %d %flog %text -]
"; ~nec is your neighbor"
!> (snag 0 `(list move:ames)`moves4)
!> (snag 0 `(list move:ames)`moves5)
::
%+ expect-eq
!> =- [~[//unix] %pass /qos %d %flog %text -]
"; {<our-comet>} is your neighbor"
!> (snag 0 `(list move:ames)`moves6)
!> (snag 0 `(list move:ames)`moves7)
::
%+ expect-eq
!> [~[/g/talk] %give %boon post]
!> (snag 0 `(list move:ames)`moves8)
!> (snag 0 `(list move:ames)`moves9)
::
%+ expect-eq
!> ~
!> moves4
==
::
++ test-comet-comet-message-flow ^- tang
@ -495,13 +497,44 @@
:: ~bud -> nack-trace -> ~nec
::
=^ moves5 nec (call nec ~[//unix] %hear (snag-packet 1 moves3))
:: ~nec -> naxplanation -> ~nec
::
=/ sink-naxplanation-plea
[%deep %sink ~bud bone=0 message-num=1 error]
=^ moves6 nec (call nec ~[//unix] sink-naxplanation-plea)
:: ~nec -> ack nack-trace -> ~bud
::
=^ moves6 bud (call bud ~[//unix] %hear (snag-packet 0 moves5))
=^ moves7 bud (call bud ~[//unix] %hear (snag-packet 0 moves5))
::
;: welp
%+ expect-eq
!> [~[/g/talk] %give %done `error]
!> (snag 0 `(list move:ames)`moves6)
::
%+ expect-eq
!> [~[//unix] %pass /bone/~bud/0/0 %a sink-naxplanation-plea]
!> (snag 0 `(list move:ames)`moves5)
::
==
::
++ test-boon-lost ^- tang
:: ~nec -> %plea -> ~bud
::
=^ moves1 nec (call nec ~[/g/talk] %plea ~bud %g /talk [%get %post])
=^ moves2 bud (call bud ~[//unix] %hear (snag-packet 0 moves1))
:: ~bud -> %done -> ~nec
::
=^ moves3 bud (take bud /bone/~nec/0/1 ~[//unix] %g %done ~)
=^ moves4 nec (call nec ~[//unix] %hear (snag-packet 0 moves3))
:: ~bud -> %boon -> ~nec, but we tell ~nec it crashed during the handling
::
=^ moves5 bud (take bud /bone/~nec/0/1 ~[//unix] %g %boon [%post 'first1'])
=^ moves6 nec
=/ vane-core (nec(now `@da`(add ~s1 now.nec)))
(call:vane-core ~[//unix] `[%test-error ~] %hear (snag-packet 0 moves5))
%+ expect-eq
!> [~[/g/talk] %give %done `error]
!> (snag 0 `(list move:ames)`moves5)
!> [~[/g/talk] %give %lost ~]
!> (snag 0 `(list move:ames)`moves6)
::
++ test-fine-request
^- tang

View File

@ -285,10 +285,10 @@
|= mov=move
^- tang
%+ weld (expect-eq !>(~[/http-blah]) !>(duct.mov))
(expect-gall-deal [wire [our ~nul] app deal] card.mov)
(expect-gall-deal [wire [our ~nul /eyre] app deal] card.mov)
::
++ expect-gall-deal
|= $: expected=[wire=path id=sock app=term =deal:gall]
|= $: expected=[wire=path id=sack app=term =deal:gall]
actual=(wind note:eyre-gate gift:eyre-gate)
==
^- tang
@ -372,7 +372,7 @@
==
::
++ scry-provides-code ^- roof
|= [gang =view =beam]
|= [gang pov=path =view =beam]
^- (unit (unit cage))
?: =(%gd view) ``noun+!>(%base)
?: &(=(%ca view) =(/gen/handler/hoon s.beam))

View File

@ -76,7 +76,7 @@
%+ expect-eq
!> :* ~[//khan/1/0vthat.ductt]
%pass //g %g %deal
[~nul ~nul] %spider %watch
[~nul ~nul /khan] %spider %watch
/thread-result/[expected-tid]
==
!> (head start-moves)
@ -87,7 +87,7 @@
=* not note.q.mev
=/ results-4 (expect-eq !>(%g) !>(-.not))
?> ?=(%deal +<.not)
=/ results-5 (expect-eq !>([~nul ~nul]) !>(p.not))
=/ results-5 (expect-eq !>([~nul ~nul /khan]) !>(p.not))
=/ results-6 (expect-eq !>(%spider) !>(q.not))
?> ?=(%poke -.r.not)
=* cag cage.r.not
@ -462,7 +462,7 @@
|= =vase
!>(!<(noun vase))
++ scry-provides-mark ^- roof
|= [gang =view =beam]
|= [gang pov=path =view =beam]
^- (unit (unit cage))
?: &(=(%cb view) =(/noun s.beam))
:^ ~ ~ %dais