on main help sign in
support zuse 414
7aa7661John Hyde
base-desk/lib/agentio.hoon+4−6
@@ -66,7 +66,7 @@
66 ::
66 ::
67 ++ rest
67 ++ rest
68 |= p=@da
68 |= p=@da
69− (arvo %b %wait p)
69+ (arvo %b %rest p)
70 ::
70 ::
71 ++ warp
71 ++ warp
72 |= [wer=ship =riff:clay]
72 |= [wer=ship =riff:clay]
@@ -85,16 +85,14 @@
85 ?:(?=(%sing genre) [genre mood] [genre mood])
85 ?:(?=(%sing genre) [genre mood] [genre mood])
86 (warp-our q.byk.bowl `rave)
86 (warp-our q.byk.bowl `rave)
87 ::
87 ::
88+ ++ tire
89+ (arvo %c %tire `~)
90+ ::
88 ++ connect
91 ++ connect
89 |= [=binding:eyre app=term]
92 |= [=binding:eyre app=term]
90 (arvo %e %connect binding app)
93 (arvo %e %connect binding app)
91 --
94 --
92::
95::
93−++ fact-curry
94− |* [=mark =mold]
95− |= [paths=(list path) fac=mold]
96− (fact mark^!>(fac) paths)
97−::
98++ fact-kick
96++ fact-kick
99 |= [=path =cage]
97 |= [=path =cage]
100 ^- (list card)
98 ^- (list card)
base-desk/lib/azimuth.hoon+9−9
@@ -114,29 +114,29 @@
114 ::
114 ::
115 :: Testnet contract addresses
115 :: Testnet contract addresses
116 ::
116 ::
117− ++ ropsten-contracts
117+ ++ goerli-contracts
118 |%
118 |%
119 ++ azimuth
119 ++ azimuth
120− 0x308a.b6a6.024c.f198.b57e.008d.0ac9.ad02.1988.6579
120+ 0xbb61.fa68.3e4b.9104.18e2.7b00.a143.8a93.6234.df52
121 ::
121 ::
122 ++ ecliptic
122 ++ ecliptic
123− 0x8b9f.86a2.8921.d9c7.05b3.113a.755f.b979.e1bd.1bce
123+ 0xe129.0a32.9014.5e63.e6a8.ec1e.f661.6906.856d.0c8f
124 ::
124 ::
125 ++ linear-star-release
125 ++ linear-star-release
126− 0x1f8e.dd03.1ee4.1474.0aed.b39b.84fb.8f2f.66ca.422f
126+ 0x0
127 ::
127 ::
128 ++ conditional-star-release
128 ++ conditional-star-release
129 0x0
129 0x0
130 ::
130 ::
131 ++ delegated-sending
131 ++ delegated-sending
132− 0x3e8c.a510.354b.c2fd.bbd6.1502.52d9.3105.c9c2.7bbe
132+ 0x0
133 ::
133 ::
134 ++ naive
134 ++ naive
135− 0xe7cf.4b83.06d3.11ba.ca15.585f.e3f0.7cd0.441c.21d1
135+ 0x56e3.7137.cdaf.c026.a732.e8e8.40cd.621e.d50b.d210
136 ::
136 ::
137− ++ launch 4.601.630
137+ ++ launch 7.834.742
138− ++ public launch
138+ ++ public 7.834.800
139− ++ chain-id 3
139+ ++ chain-id 5
140 --
140 --
141 ::
141 ::
142 :: Local contract addresses
142 :: Local contract addresses
base-desk/lib/bitcoin-utils.hoon+2−1
@@ -143,6 +143,7 @@
143 |= a=@
143 |= a=@
144 ^- hexb
144 ^- hexb
145 =/ l=@ (met 3 a)
145 =/ l=@ (met 3 a)
146+ ?: =(l 0) 1^a
146 ?: =(l 1) 1^a
147 ?: =(l 1) 1^a
147 ?: =(l 2) (cat:byt ~[1^0xfd (flip:byt 2^a)])
148 ?: =(l 2) (cat:byt ~[1^0xfd (flip:byt 2^a)])
148 ?: (lte l 4) (cat:byt ~[1^0xfe (flip:byt 4^a)])
149 ?: (lte l 4) (cat:byt ~[1^0xfe (flip:byt 4^a)])
@@ -162,7 +163,7 @@
162 %0xfe 2
163 %0xfe 2
163 %0xff 3
164 %0xff 3
164 ==
165 ==
165− :_ (drop:byt (add 1 len) h)
166+ :_ (drop:byt (add 1 (bex len)) h)
166 %- flip:byt
167 %- flip:byt
167 (take:byt (bex len) (drop:byt 1 h))
168 (take:byt (bex len) (drop:byt 1 h))
168 :: +dea: atom instead of hexb for parsed CompactSize
169 :: +dea: atom instead of hexb for parsed CompactSize
base-desk/lib/dill.hoonnew file+94
@@ -0,0 +1,94 @@
1+:: dill: utilities for dill's data structures
2+::
3+=, dill
4+|%
5+++ enjs
6+ |%
7+ ++ blit
8+ |= =blit:dill
9+ ^- json
10+ =, enjs:format
11+ %+ frond -.blit
12+ ?- -.blit
13+ %bel b+&
14+ %clr b+&
15+ %hop ?@ p.blit (numb p.blit)
16+ (pairs 'x'^(numb x.p.blit) 'y'^(numb y.p.blit) ~)
17+ %put a+(turn p.blit |=(c=@c s+(tuft c)))
18+ %nel b+&
19+ %url s+p.blit
20+ %wyp b+&
21+ %mor a+(turn p.blit ^blit)
22+ ::
23+ %sag
24+ %- pairs
25+ :~ 'path'^(path p.blit)
26+ 'file'^s+(en:base64:mimes:html (as-octs:mimes:html (jam q.blit)))
27+ ==
28+ ::
29+ %sav
30+ %- pairs
31+ :~ 'path'^(path p.blit)
32+ 'file'^s+(en:base64:mimes:html (as-octs:mimes:html q.blit))
33+ ==
34+ ::
35+ %klr
36+ :- %a
37+ %+ turn p.blit
38+ |= [=stye text=(list @c)]
39+ %- pairs
40+ :~ 'text'^a+(turn text |=(c=@c s+(tuft c)))
41+ ::
42+ :- 'stye'
43+ %- pairs
44+ |^ :~ 'back'^(color p.q.stye)
45+ 'fore'^(color q.q.stye)
46+ 'deco'^a+(turn ~(tap in p.stye) |=(d=deco ?~(d ~ s+d)))
47+ ==
48+ ++ color
49+ |= =tint
50+ ?@ tint ?~(tint ~ s+tint)
51+ =, tint
52+ (pairs r+(numb r) g+(numb g) b+(numb b) ~)
53+ --
54+ ==
55+ ==
56+ --
57+::
58+++ dejs
59+ |%
60+ ++ belt
61+ |= jon=json
62+ ^- belt:dill
63+ ?: ?=([%s *] jon)
64+ (taft p.jon)
65+ =, dejs:format
66+ %. jon
67+ %- of
68+ |^ :* mod+(ot 'mod'^mod 'key'^bot ~)
69+ txt+(ar (cu taft so))
70+ bol
71+ ==
72+ ::
73+ ++ bol
74+ :~ aro+(su (perk %d %l %r %u ~))
75+ bac+ul
76+ del+ul
77+ hit+(ot 'x'^ni 'y'^ni ~)
78+ ret+ul
79+ ==
80+ ::
81+ ++ bot
82+ |= j=json
83+ ^- bolt:dill
84+ ?+ j !!
85+ [%s *] (taft p.j)
86+ [%o *] ((of bol) j)
87+ ==
88+ ::
89+ ++ mod
90+ |= j=json
91+ ((su (perk %ctl %met %hyp ~)) j)
92+ --
93+ --
94+--
base-desk/lib/language-server/complete.hoon+2−1
@@ -3,7 +3,8 @@
3::
3::
4=/ debug |
4=/ debug |
5|%
5|%
6−+* option [item]
6+++ option
7+ |$ [item]
7 [term=cord detail=item]
8 [term=cord detail=item]
8::
9::
9:: Like +rose except also produces line number
10:: Like +rose except also produces line number
base-desk/lib/pill.hoon+250−17
@@ -32,25 +32,23 @@
32 [/sys/hoon hoon/hoon]
32 [/sys/hoon hoon/hoon]
33 [/sys/arvo hoon/arvo]
33 [/sys/arvo hoon/arvo]
34 ==
34 ==
35+:: +dirs: filter for userspace directories to include
36+::
37+++ dirs
38+ |= [bas=path exc=(list spur)]
39+ ^- (list spur)
40+ ?~ exc ~(tap in dir:.^(arch %cy bas))
41+ %+ skim
42+ ~(tap in dir:.^(arch %cy bas))
43+ |=(=spur =(~ (find ~[spur] exc)))
35:: +file-ovum: userspace filesystem load
44:: +file-ovum: userspace filesystem load
36::
45::
37:: bas: full path to / directory
46:: bas: full path to / directory
38::
47::
39++ file-ovum
48++ file-ovum
40− =/ directories=(list path)
41− :~ /app :: %gall applications
42− /gen :: :dojo generators
43− /lib :: libraries
44− /mar :: mark definitions
45− /sur :: structures
46− /sys :: system files
47− /ted :: :spider strands
48− /web :: %eyre web content
49− /desk :: desk manifest
50− ==
51− |= [des=desk bas=path]
49+ |= [des=desk bas=path exc=(list spur)]
52 ^- unix-event
50 ^- unix-event
53− %. directories
51+ %. (dirs bas exc)
54 |= :: sal: all spurs to load from
52 |= :: sal: all spurs to load from
55 ::
53 ::
56 sal=(list spur)
54 sal=(list spur)
@@ -64,7 +62,11 @@
64 %- ~(gas by *(map path (each page lobe:clay)))
62 %- ~(gas by *(map path (each page lobe:clay)))
65 (turn hav |=([=path =page] [path &+page]))
63 (turn hav |=([=path =page] [path &+page]))
66 [/c/sync [%park des &+yuki *rang:clay]]
64 [/c/sync [%park des &+yuki *rang:clay]]
65+ (file-pages bas sal)
66+::
67+++ file-pages
68+ |= [bas=path sal=(list spur)]
67− =| hav=(list [path page])
69+ =| hav=(list [path page:clay])
68 |- ^+ hav
70 |- ^+ hav
69 ?~ sal ~
71 ?~ sal ~
70 =. hav $(sal t.sal)
72 =. hav $(sal t.sal)
@@ -95,13 +97,23 @@
95::
97::
96:: +file-ovum2: electric boogaloo
98:: +file-ovum2: electric boogaloo
97::
99::
98−++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
100+++ file-ovum2 |=(z=[path (list spur)] `unix-event`[//arvo what/(user-files z)])
101+::
102+++ prep-ovum
103+ |= dez=(list path)
104+ ^- unix-event
105+ =- ~& clay-blobs+~(wyt by -)
106+ [/c/inflate [%prep -]]
107+ %+ roll dez
108+ |= [bas=path out=(map lobe:clay page:clay)]
109+ %- ~(uni by out)
110+ .^(_out %cs (snoc bas %bloc))
99::
111::
100:: +user-files: all userspace hoon files
112:: +user-files: all userspace hoon files
101::
113::
102++ user-files
114++ user-files
103− |= bas=path
115+ |= [bas=path exc=(list spur)]
104− %. directories:file-ovum
116+ %. (dirs bas exc)
105 |= sal=(list spur)
117 |= sal=(list spur)
106 ^- (list (pair path (cask)))
118 ^- (list (pair path (cask)))
107 ::
119 ::
@@ -135,4 +147,225 @@
135 |- ^+ hav
147 |- ^+ hav
136 ?~ all hav
148 ?~ all hav
137 $(all t.all, hav ^$(tyl [p.i.all tyl]))
149 $(all t.all, hav ^$(tyl [p.i.all tyl]))
150+::
151+::TODO include %prep task in solid and brass?
152+++ solid
153+ :: sys: root path to boot system, `/~me/[desk]/now/sys`
154+ :: dez: secondary desks and their root paths
155+ :: exc: list of desk folders to exclude
156+ ::
157+ |= [sys=path dez=(list [desk path]) dub=? now=@da prime=? exc=(list spur)]
158+ ^- pill
159+ =/ bas=path (scag 3 sys)
160+ =/ compiler-path (weld sys /hoon)
161+ =/ arvo-path (weld sys /arvo)
162+ ~& %solid-start
163+ =/ compiler-src .^(@t %cx (weld compiler-path /hoon))
164+ =/ arvo-src .^(@t %cx (weld arvo-path /hoon))
165+ =/ arvo-formula
166+ ~& %solid-loaded
167+ =/ compiler-hoon (rain compiler-path compiler-src)
168+ ?. dub
169+ :: compile arvo against hoon, with our current compiler
170+ ::
171+ =/ whole-hoon=hoon
172+ [%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
173+ ~& %solid-parsed
174+ =/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
175+ ~& %solid-arvo
176+ whole-formula
177+ :: compile arvo against hoon, with a freshly compiled hoon (via +ride)
178+ ::
179+ ~& %solid-parsed
180+ =/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
181+ ~& %solid-compiled
182+ =/ whole-src
183+ (rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
184+ ~& %solid-double-loaded
185+ =/ whole-formula
186+ =< +
187+ .* [%noun whole-src]
188+ [%8 compiler-formula [%9 2 %10 [6 %0 3] [%0 2]]]
189+ ~& %solid-double-compiled
190+ whole-formula
191+ ::
192+ ~& [%solid-kernel `@ux`(mug arvo-formula)]
193+ ::
194+ :: installed: Arvo gate (formal interface) with %zuse and vanes installed
195+ ::
196+ =/ installed
197+ =< q
198+ %^ spin
199+ ^- (list ovum)
200+ :- (boot-ovum:pill compiler-src arvo-src)
201+ %+ turn
202+ (snoc (turn dez tail) bas)
203+ |= =path
204+ (file-ovum2 [path exc])
205+ .*(0 arvo-formula)
206+ |= [ovo=ovum ken=*]
207+ [~ (slum ken [now ovo])]
208+ ::
209+ :: boot-two: startup formula
210+ ::
211+ :: We evaluate :arvo-formula (for jet registration),
212+ :: then ignore the result and produce .installed
213+ ::
214+ =/ boot-two
215+ => *[arvo-formula=^ installed=^ tale=*]
216+ != =+(.*(0 arvo-formula) [installed tale])
217+ ::
218+ :: boot-ova
219+ ::
220+ =/ boot-ova=(list)
221+ [aeon:eden:part boot-two arvo-formula installed ~]
222+ ::
223+ :: a pill is a 3-tuple of event-lists: [boot kernel userspace]
224+ ::
225+ :: Our kernel event-list is ~, as we've already installed them.
226+ :: Our userspace event-list is a list containing a full %clay
227+ :: filesystem sync event.
228+ ::
229+ :+ %pill %solid
230+ :+ boot-ova ~
231+ =. dez (snoc dez [%base bas])
232+ %+ weld
233+ %+ turn dez
234+ |= [dek=desk bas=path]
235+ (file-ovum [dek bas exc])
236+ ?. prime ~
237+ [(prep-ovum (turn dez tail))]~
238+::
239+++ brass
240+ :: sys: root path to boot system, `/~me/[desk]/now/sys`
241+ :: dez: secondary desks and their root paths
242+ :: exc: list of desk folders to exclude
243+ ::
244+ |= [sys=path dez=(list [desk path]) prime=? exc=(list spur)]
245+ ^- pill
246+ =/ bas=path (scag 3 sys)
247+ :: compiler-source: hoon source file producing compiler, `sys/hoon`
248+ ::
249+ =+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
250+ ::
251+ :: compiler-twig: compiler as hoon expression
252+ ::
253+ ~& %brass-parsing
254+ =+ compiler-twig=(rain /sys/hoon/hoon compiler-source)
255+ ~& %brass-parsed
256+ ::
257+ :: compiler-formula: compiler as nock formula
258+ ::
259+ ~& %brass-compiling
260+ =+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
261+ ~& %brass-compiled
262+ ::
263+ :: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
264+ ::
265+ =+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
266+ ::
267+ :: boot-ova: startup events
268+ ::
269+ =/ boot-ova=(list)
270+ :~ aeon:eden:part
271+ boot:eden:part
272+ compiler-formula
273+ compiler-source
274+ arvo-source
275+ ==
276+ :: a pill is a 3-tuple of event-lists: [boot kernel userspace]
277+ ::
278+ :+ %pill %brass
279+ :+ boot-ova
280+ :~ (boot-ovum compiler-source arvo-source)
281+ (file-ovum2 [bas exc])
282+ ==
283+ =. dez (snoc dez [%base bas])
284+ %+ weld
285+ %+ turn dez
286+ |= [dek=desk bas=path]
287+ (file-ovum [dek bas exc])
288+ ?. prime ~
289+ [(prep-ovum (turn dez tail))]~
290+::
291+++ ivory
292+ |= sys=path
293+ ^- pill
294+ =/ lib (snoc (scag 3 sys) %lib)
295+ |^ =/ ver
296+ =/ sub *(trap vase)
297+ =. sub (build-sys sub %hoon)
298+ =. sub (build-sys sub %arvo)
299+ =. sub (build-sys sub %lull)
300+ =. sub (build-sys sub %zuse)
301+ =. sub (build-lib sub & %ethereum)
302+ =. sub (build-lib sub & %azimuth)
303+ (build-lib sub | %vere)
304+ =/ nok !.
305+ => *[ver=(trap vase) ~]
306+ != q:$:ver
307+ ivory/[nok ver ~]
308+ ::
309+ ++ build-sys
310+ |= [sub=(trap vase) nam=term] ^- (trap vase)
311+ ~> %slog.[0 leaf+"ivory: building /sys/{(trip nam)}"]
312+ (swat sub (rain /sys/[nam]/hoon .^(@t cx+(welp sys /[nam]/hoon))))
313+ ::
314+ ++ build-lib
315+ |= [sub=(trap vase) imp=? nam=term] ^- (trap vase)
316+ ~> %slog.[0 leaf+"ivory: building /lib/{(trip nam)}"]
317+ =/ hun=hoon
318+ %+ mist /lib/[nam]/hoon
319+ .^(@t cx+(welp lib /[nam]/hoon))
320+ ?. imp (swat sub hun)
321+ (swel sub [%ktts nam hun])
322+ :: +mist: +rain but skipping past ford runes
323+ ::
324+ ++ mist
325+ |= [bon=path txt=@]
326+ ^- hoon
327+ =+ vas=vast
328+ ~| bon
329+ %+ scan (trip txt)
330+ %- full
331+ =; fud
332+ (ifix [;~(plug gay fud) gay] tall:vas(wer bon))
333+ %- star
334+ ;~ pose vul
335+ %+ ifix [fas (just `@`10)]
336+ (star ;~(less (just `@`10) next))
337+ ==
338+ :: +swel: +swat but with +slop
339+ ::
340+ ++ swel
341+ |= [tap=(trap vase) gen=hoon]
342+ ^- (trap vase)
343+ =/ gun (~(mint ut p:$:tap) %noun gen)
344+ => [tap=tap gun=gun]
345+ |. ~+
346+ =/ pro q:$:tap
347+ [[%cell p.gun p:$:tap] [.*(pro q.gun) pro]]
348+ --
349+::
350+++ events
351+ |%
352+ +$ prop [%prop meta tier (list ovum)]
353+ +$ meta term
354+ +$ tier ?(%fore %hind) :: before or after userspace
355+ ::
356+ ++ install
357+ |= [as=desk =beak pri=?]
358+ ^- prop
359+ :^ %prop (rap 3 %install '-' as ~) %hind
360+ ::TODO will exclude non-:directories files, such as /changelog/txt
361+ =- (murn - same)
362+ ^- (list (unit ovum))
363+ :~ `(file-ovum as (en-beam beak /) ~)
364+ ::
365+ ?. pri ~
366+ `(prep-ovum (en-beam beak /) ~)
367+ ::
368+ `[/d/install/[as] [%seat as]]
369+ ==
370+ --
138--
371--
base-desk/lib/shoe.hoon+53−28
@@ -13,15 +13,15 @@
13/- *sole
13/- *sole
14/+ sole, auto=language-server-complete
14/+ sole, auto=language-server-complete
15|%
15|%
16−+$ state-0
16++$ state-1
17− $: %0
17+ $: %1
18− soles=(map @ta sole-share)
18+ soles=(map sole-id sole-share)
19 ==
19 ==
20:: $card: standard gall cards plus shoe effects
20:: $card: standard gall cards plus shoe effects
21::
21::
22+$ card
22+$ card
23 $% card:agent:gall
23 $% card:agent:gall
24− [%shoe sole-ids=(list @ta) effect=shoe-effect] :: ~ sends to all soles
24+ [%shoe sole-ids=(list sole-id) effect=shoe-effect] :: ~ sends to all
25 ==
25 ==
26:: $shoe-effect: easier sole-effects
26:: $shoe-effect: easier sole-effects
27::
27::
@@ -47,30 +47,30 @@
47 :: if the head of the result is true, instantly run the command
47 :: if the head of the result is true, instantly run the command
48 ::
48 ::
49 ++ command-parser
49 ++ command-parser
50− |~ sole-id=@ta
50+ |~ =sole-id
51 |~(nail *(like [? command-type]))
51 |~(nail *(like [? command-type]))
52 :: +tab-list: autocomplete options for the session (to match +command-parser)
52 :: +tab-list: autocomplete options for the session (to match +command-parser)
53 ::
53 ::
54 ++ tab-list
54 ++ tab-list
55− |~ sole-id=@ta
55+ |~ =sole-id
56 :: (list [@t tank])
56 :: (list [@t tank])
57 *(list (option:auto tank))
57 *(list (option:auto tank))
58 :: +on-command: called when a valid command is run
58 :: +on-command: called when a valid command is run
59 ::
59 ::
60 ++ on-command
60 ++ on-command
61− |~ [sole-id=@ta command=command-type]
61+ |~ [=sole-id command=command-type]
62 *(quip card _^|(..on-init))
62 *(quip card _^|(..on-init))
63 ::
63 ::
64 ++ can-connect
64 ++ can-connect
65− |~ sole-id=@ta
65+ |~ =sole-id
66 *?
66 *?
67 ::
67 ::
68 ++ on-connect
68 ++ on-connect
69− |~ sole-id=@ta
69+ |~ =sole-id
70 *(quip card _^|(..on-init))
70 *(quip card _^|(..on-init))
71 ::
71 ::
72 ++ on-disconnect
72 ++ on-disconnect
73− |~ sole-id=@ta
73+ |~ =sole-id
74 *(quip card _^|(..on-init))
74 *(quip card _^|(..on-init))
75 ::
75 ::
76 ::NOTE standard gall agent arms below, though they may produce %shoe cards
76 ::NOTE standard gall agent arms below, though they may produce %shoe cards
@@ -119,27 +119,27 @@
119 |* [shoe=* command-type=mold]
119 |* [shoe=* command-type=mold]
120 |_ =bowl:gall
120 |_ =bowl:gall
121 ++ command-parser
121 ++ command-parser
122− |= sole-id=@ta
122+ |= =sole-id
123 (easy *[? command-type])
123 (easy *[? command-type])
124 ::
124 ::
125 ++ tab-list
125 ++ tab-list
126− |= sole-id=@ta
126+ |= =sole-id
127 ~
127 ~
128 ::
128 ::
129 ++ on-command
129 ++ on-command
130− |= [sole-id=@ta command=command-type]
130+ |= [=sole-id command=command-type]
131 [~ shoe]
131 [~ shoe]
132 ::
132 ::
133 ++ can-connect
133 ++ can-connect
134− |= sole-id=@ta
134+ |= =sole-id
135 (team:title [our src]:bowl)
135 (team:title [our src]:bowl)
136 ::
136 ::
137 ++ on-connect
137 ++ on-connect
138− |= sole-id=@ta
138+ |= =sole-id
139 [~ shoe]
139 [~ shoe]
140 ::
140 ::
141 ++ on-disconnect
141 ++ on-disconnect
142− |= sole-id=@ta
142+ |= =sole-id
143 [~ shoe]
143 [~ shoe]
144 --
144 --
145:: +agent: creates wrapper core that handles sole events and calls shoe arms
145:: +agent: creates wrapper core that handles sole events and calls shoe arms
@@ -147,7 +147,7 @@
147++ agent
147++ agent
148 |* command-type=mold
148 |* command-type=mold
149 |= =(shoe command-type)
149 |= =(shoe command-type)
150− =| state-0
150+ =| state-1
151 =* state -
151 =* state -
152 ^- agent:gall
152 ^- agent:gall
153 =>
153 =>
@@ -164,8 +164,7 @@
164 %+ turn
164 %+ turn
165 ?^ sole-ids.card sole-ids.card
165 ?^ sole-ids.card sole-ids.card
166 ~(tap in ~(key by soles))
166 ~(tap in ~(key by soles))
167− |= sole-id=@ta
167+ id-to-path:sole
168− /sole/[sole-id]
169 ::
168 ::
170 %table
169 %table
171 =; fez=(list sole-effect)
170 =; fez=(list sole-effect)
@@ -202,9 +201,36 @@
202 ?. ?=([%shoe-app ^] q.old-state)
201 ?. ?=([%shoe-app ^] q.old-state)
203 =^ cards shoe (on-load:og old-state)
202 =^ cards shoe (on-load:og old-state)
204 [(deal cards) this]
203 [(deal cards) this]
204+ |^ =| old-outer=state-any
205+ =^ old-inner old-outer
206+ +:!<([%shoe-app vase state-any] old-state)
207+ :: ~! q.old-state
208+ :: ?+ +>.q.old-state !!
205− =^ old-inner state +:!<([%shoe-app vase state-0] old-state)
209+ :: [%0 *] +:!<([%shoe-app vase state-0] old-state)
210+ :: [%1 *] +:!<([%shoe-app vase state-1] old-state)
211+ :: ==
206− =^ cards shoe (on-load:og old-inner)
212+ =^ caz shoe (on-load:og old-inner)
207− [(deal cards) this]
213+ =^ cuz old-outer
214+ ?. ?=(%0 -.old-outer) [~ old-outer]
215+ (state-0-to-1 old-outer)
216+ ?> ?=(%1 -.old-outer)
217+ [(weld cuz (deal caz)) this(state old-outer)]
218+ ::
219+ +$ state-any $%(state-1 state-0)
220+ +$ state-0 [%0 soles=(map @ta sole-share)]
221+ ++ state-0-to-1
222+ |= old=state-0
223+ ^- (quip card:agent:gall state-1)
224+ :- %+ turn ~(tap in ~(key by soles.old))
225+ |= id=@ta
226+ ^- card:agent:gall
227+ [%give %kick ~[/sole/[id]] ~]
228+ :- %1
229+ %- ~(gas by *(map sole-id sole-share))
230+ %+ murn ~(tap by soles.old)
231+ |= [id=@ta s=sole-share]
232+ (bind (upgrade-id:sole id) (late s))
233+ --
208 ::
234 ::
209 ++ on-poke
235 ++ on-poke
210 |= [=mark =vase]
236 |= [=mark =vase]
@@ -326,19 +352,18 @@
326 ++ on-watch
352 ++ on-watch
327 |= =path
353 |= =path
328 ^- (quip card:agent:gall agent:gall)
354 ^- (quip card:agent:gall agent:gall)
329− ?. ?=([%sole @ ~] path)
355+ ?~ sole-id=(path-to-id:sole path)
330 =^ cards shoe
356 =^ cards shoe
331 (on-watch:og path)
357 (on-watch:og path)
332 [(deal cards) this]
358 [(deal cards) this]
333− =* sole-id i.t.path
334− ?> (can-connect:og sole-id)
359+ ?> (can-connect:og u.sole-id)
335− =. soles (~(put by soles) sole-id *sole-share)
360+ =. soles (~(put by soles) u.sole-id *sole-share)
336 =^ cards shoe
361 =^ cards shoe
337− (on-connect:og sole-id)
362+ (on-connect:og u.sole-id)
338 :_ this
363 :_ this
339 %- deal
364 %- deal
340 :_ cards
365 :_ cards
341− [%shoe [sole-id]~ %sole %pro & dap.bowl "> "]
366+ [%shoe [u.sole-id]~ %sole %pro & dap.bowl "> "]
342 ::
367 ::
343 ++ on-leave
368 ++ on-leave
344 |= =path
369 |= =path
base-desk/lib/sole.hoon+24
@@ -136,4 +136,28 @@
136 =+ dat=(transmute [%mor leg] [%ins pos `@c`0])
136 =+ dat=(transmute [%mor leg] [%ins pos `@c`0])
137 ?> ?=(%ins -.dat)
137 ?> ?=(%ins -.dat)
138 p.dat
138 p.dat
139+::
140+::
141+++ path-to-id
142+ |= =path
143+ ^- (unit sole-id)
144+ ?. ?=([%sole @ ?(~ [@ ~])] path) ~
145+ ?~ who=(slaw %p i.t.path) ~
146+ `[u.who ?~(t.t.path %$ i.t.t.path)]
147+::
148+++ id-to-path
149+ |= sole-id
150+ ^- path
151+ ::TODO this whole "no empty path ending" business feels icky.
152+ :: do we want default session to be ~.~ ?
153+ :: concern here is that outsiders cannot subscribe to the default
154+ :: session, because /sole/~zod/ isn't a valid path...
155+ [%sole (scot %p who) ?~(ses ~ /[ses])]
156+::
157+++ upgrade-id
158+ |= old=@ta
159+ ^- (unit sole-id)
160+ %+ rush old
161+ %+ cook (late %$)
162+ ;~(pfix (jest 'drum_~') fed:ag)
139--
163--
base-desk/lib/sss.hoonnew file+371
@@ -0,0 +1,371 @@
1+/- *sss
2+/+ *mip
3+::
4+|%
5+++ mk-subs :: Create sub-map.
6+ |* [=(lake) paths=mold]
7+ -:+6:(da lake paths)
8+::
9+++ mk-pubs :: Create pub-map.
10+ |* [=(lake) paths=mold]
11+ -:+6:(du lake paths)
12+::
13+++ mk-mar :: Create mar.
14+ |* =(lake)
15+ |_ =(response:poke lake *)
16+ ++ grow
17+ |%
18+ ++ noun response
19+ --
20+ ++ grab
21+ |%
22+ ++ noun (response:poke lake *)
23+ --
24+ ++ grad %noun
25+ --
26+++ fled :: Like +sped but head is a path.
27+ |= vax=vase
28+ ^- vase
29+ :_ q.vax
30+ %- ~(play ut p.vax)
31+ =- [%wtgr [%wtts - [%& 2]~] [%$ 1]]
32+ =/ pax ~| %path-none ;;(path -.q.vax)
33+ |- ^- spec
34+ ?~ pax [%base %null]
35+ [%bccl ~[[%leaf %ta -.pax] $(pax +.pax)]]
36+::
37+++ zoom |= =noun ~| %need-path $/sss/;;(path noun)
38+::
39+++ da :: Manage subscriptions.
40+ |* [=(lake) paths=mold]
41+ =>
42+ |%
43+ +$ from (on-rock:poke lake paths)
44+ +$ into (response:poke lake paths)
45+ +$ result (request:poke paths)
46+ +$ fail [paths ship dude]
47+ +$ flow [=aeon stale=_| fail=_| =rock:lake]
48+ +$ subs [%0 (map [ship dude paths] (unit flow))]
49+ --
50+ |= $: sub=subs
51+ =bowl:gall
52+ result-type=type
53+ on-rock-type=type
54+ fail-type=type
55+ ==
56+ => .(sub +.sub)
57+ |%
58+ ++ surf :: Subscribe to [ship dude path].
59+ |= which=[ship dude paths]
60+ ^- (quip card:agent:gall subs)
61+ ?+ flow=(~(get by sub) which) `0/sub
62+ ~ [~[(pine which)] 0/(~(put by sub) which ~)]
63+ [~ ~] [~[(pine which)] 0/sub]
64+ [~ ~ [* %& * *]] [~[(scry `+(aeon.u.u.flow) which)] 0/sub]
65+ ==
66+ ++ quit (corl (lead %0) ~(del by sub)) :: Unsub from [ship dude path].
67+ ++ read :: See current subscribed states.
68+ ^- (map [ship dude paths] [stale=? fail=? =rock:lake])
69+ %- malt %+ murn ~(tap by sub)
70+ |= [key=[ship dude paths] val=(unit flow)]
71+ ?~ val ~
72+ `[key +.u.val]
73+ :: :: Check poke-ack for errors.
74+ :: :: If an %sss-on-rock poke nacks,
75+ ++ chit :: that state is flagged as failed.
76+ |= [[aeon=term ship=term dude=term path=paths] =sign:agent:gall]
77+ ^- subs
78+ :- %0
79+ ?> ?=(%poke-ack -.sign)
80+ ?~ p.sign sub
81+ %+ ~(jab by sub) [(slav %p ship) dude path]
82+ |= (unit flow)
83+ =/ =flow (need +<)
84+ ?> =(aeon.flow (slav %ud aeon))
85+ `flow(fail &)
86+ :: :: Check poke-ack for errors.
87+ :: :: If a scry request nacks,
88+ ++ tell :: that state is flagged as stale.
89+ |= [[ship=term =dude aeon=term path=paths] =sign:agent:gall]
90+ ^- (quip card:agent:gall subs)
91+ ?> ?=(%poke-ack -.sign)
92+ ?~ p.sign `0/sub
93+ =/ current [ship=(slav %p ship) dude=dude path=path]
94+ ?+ flow=(~(get by sub) current) `0/sub
95+ [~ ~ *]
96+ =. stale.u.u.flow &
97+ :_ 0/(~(put by sub) current u.flow)
98+ ~[(on-rock-poke current u.u.flow ~)]
99+ ::
100+ [~ ~]
101+ :_ 0/(~(del by sub) current) :_ ~
102+ :* %pass (zoom surf-fail/aeon/ship/dude/path)
103+ %agent [our dap]:bowl
104+ %poke %sss-surf-fail fail-type ^- fail
105+ [path ship dude]:current
106+ ==
107+ ==
108+ :: :: Check if we're still interested
109+ :: :: in a wave. If no, no-op.
110+ :: :: If yes, scry.
111+ ++ behn :: (See https://gist.github.com/belisarius222/7f8452bfea9b199c0ed717ab1778f35b)
112+ |= [ship=term =dude aeon=term path=paths]
113+ ^- (list card:agent:gall)
114+ %- fall :_ ~ %- mole |.
115+ =/ ship (slav %p ship)
116+ =/ aeon (slav %ud aeon)
117+ ?: (lte aeon aeon:(fall (~(got by sub) ship dude path) *flow)) ~
118+ ~[(scry `aeon ship dude path)]
119+ ::
120+ ++ apply :: Handle response from publisher.
121+ |= res=(response:poke lake paths)
122+ ^- (quip card:agent:gall subs)
123+ %- fall :_ `0/sub %- mole |.
124+ =* current [src.bowl dude.res path.res]
125+ =/ old=flow (fall (~(got by sub) current) *flow)
126+ ?- type.res
127+ %tomb
128+ =/ =flow old(stale &)
129+ :_ 0/(~(put by sub) current `flow) :_ ~
130+ (on-rock-poke current flow ~)
131+ ::
132+ %yore
133+ :_ 0/sub :_ ~
134+ (pine src.bowl dude.res path.res)
135+ ::
136+ %nigh
137+ :_ 0/sub :_ ~
138+ (behn-s25 [dude aeon path]:res)
139+ ::
140+ %scry
141+ =/ [wave=(unit wave:lake) =flow]
142+ ?- what.res
143+ %rock ?> (gte aeon.res aeon.old)
144+ [~ [aeon.res | | rock.res]]
145+ %wave ?> =(aeon.res +(aeon.old))
146+ [`wave.res [aeon.res | | (wash:lake rock.old wave.res)]]
147+ ==
148+ :_ 0/(~(put by sub) current `flow)
149+ :~ (on-rock-poke current flow wave)
150+ (scry `+(aeon.res) src.bowl dude.res path.res)
151+ ==
152+ ==
153+ ::
154+ :: Non-public facing arms below
155+ ::
156+ ++ behn-s25
157+ |= [=dude =aeon path=noun]
158+ ^- card:agent:gall
159+ :* %pass (zoom behn/(scot %p src.bowl)^dude^(scot %ud aeon)^path)
160+ %arvo %b %wait (add ~s25 now.bowl)
161+ ==
162+ ++ pine |= [ship dude paths] (scry ~ +<)
163+ ++ scry
164+ |= [when=(unit aeon) who=ship which=dude where=paths]
165+ ^- card:agent:gall
166+ =/ when ?~ when ~ (scot %ud u.when)
167+ :* %pass (zoom scry-request/(scot %p who)^which^when^where)
168+ %agent [who which]
169+ %poke %sss-to-pub :- result-type ^- result
170+ [where dap.bowl ^when]
171+ ==
172+ ++ on-rock-poke
173+ |= [[=ship =dude path=paths] flow wave=(unit wave:lake)]
174+ ^- card:agent:gall
175+ :* %pass (zoom on-rock/(scot %ud aeon)^(scot %p ship)^dude^path)
176+ %agent [our dap]:bowl
177+ %poke %sss-on-rock on-rock-type ^- from
178+ [path ship dude stale fail rock wave]
179+ ==
180+ --
181+++ du :: Manage publications.
182+ |* [=(lake) paths=mold]
183+ =>
184+ |%
185+ +$ into (request:poke paths)
186+ +$ result (response:poke lake paths)
187+ +$ rule [rocks=_1 waves=_5] :: Retention policy
188+ +$ tide
189+ $: rok=((mop aeon rock:lake) gte)
190+ wav=((mop aeon wave:lake) lte)
191+ rul=rule
192+ mem=(mip ship dude @da)
193+ ==
194+ +$ buoy
195+ $: tid=$~(*tide $@(aeon tide))
196+ alo=(unit (set ship))
197+ ==
198+ +$ pubs [%0 (map paths buoy)]
199+ --
200+ |= [pub=pubs =bowl:gall result-type=type]
201+ => .(pub +.pub)
202+ =* rok ((on aeon rock:lake) gte)
203+ =* wav ((on aeon wave:lake) lte)
204+ |%
205+ ++ rule :: Set new retention policy.
206+ |= [path=paths =^rule]
207+ ^- pubs
208+ :- %0
209+ %+ ~(jab by pub) path
210+ |= =buoy
211+ ?@ tid.buoy buoy
212+ buoy(tid (form tid.buoy(rul rule)))
213+ ::
214+ ++ wipe :: Create new rock and wipe rest.
215+ |= path=paths
216+ ^- pubs
217+ :- %0
218+ %+ ~(jab by pub) path
219+ |= =buoy
220+ ?@ tid.buoy buoy
221+ %* . buoy(tid (form tid.buoy(rul [0 1])))
222+ rul.tid rul.tid.buoy
223+ wav.tid ~
224+ ==
225+ ++ give :: Give a wave on a path.
226+ |= [path=paths =wave:lake]
227+ ^- (quip card:agent:gall pubs)
228+ ?~ ((soft ^path) path) ~| %need-path !!
229+ =/ buoy (~(gut by pub) path *buoy)
230+ ?@ tide=tid.buoy ~| %dead-path !! ::TODO is this good behavior?
231+ =/ next=aeon +((latest tide))
232+ :- %+ murn ~(tap bi mem.tide)
233+ |= [=ship =dude =@da]
234+ ?: (lth da now.bowl) ~
235+ `(send scry/wave/wave ship dude next path)
236+ :- %0
237+ %+ ~(put by pub) path
238+ =/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
239+ =. wav.tide (put:wav wav.tide next wave)
240+ =. mem.tide (~(del by mem.tide) next)
241+ ?. =(next (add aeon.last waves.rul.tide)) buoy
242+ buoy(tid (form tide))
243+ ::
244+ ++ perm :: Change permissions with gate.
245+ |= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
246+ ^- pubs
247+ %+ edit where
248+ |= =buoy
249+ =/ new=_alo.buoy (diff alo.buoy)
250+ ?@ tid.buoy buoy(alo new)
251+ %= buoy
252+ alo new
253+ mem.tid ?~ new mem.tid.buoy
254+ %. mem.tid.buoy
255+ ~(int by (malt (turn ~(tap in u.new) (late *(map @ @)))))
256+ ==
257+ ++ public (curr perm _~) :: Make list of paths public.
258+ ++ secret (curr perm _`~) :: Make list of paths secret.
259+ :: :: Block ships from paths.
260+ ++ block :: No-ops on public paths.
261+ |= [who=(list ship) whence=(list paths)]
262+ ^- pubs
263+ %+ perm whence
264+ |= old=(unit (set ship))
265+ ?~ old ~ `(~(dif in u.old) (sy who))
266+ :: :: Allow ships to paths.
267+ ++ allow :: Any public paths will no-op.
268+ |= [who=(list ship) where=(list paths)]
269+ ^- pubs
270+ %+ perm where
271+ |= old=(unit (set ship))
272+ ?~ old ~ `(~(gas in u.old) who)
273+ :: :: Kill a list of paths, i.e. tell
274+ ++ kill :: subs to not expect updates.
275+ (curr edit |=(=buoy buoy(tid (latest tid.buoy))))
276+ :: :: Reopen list of killed paths.
277+ ++ live :: No-ops on live paths.
278+ %+ curr edit
279+ |= =buoy
280+ ?^ tid.buoy buoy
281+ %*(. buoy(tid *tide) rok.tid (put:rok ~ +(tid.buoy) *rock:lake))
282+ ::
283+ ++ read :: See current published states.
284+ ^- (map paths [allowed=(unit (set ship)) =rock:lake])
285+ %- malt %+ murn ~(tap by pub)
286+ |= [path=paths =buoy]
287+ ^- (unit [paths (unit (set ship)) rock:lake])
288+ ?@ tide=tid.buoy ~
289+ :^ ~ path alo.buoy =< rock
290+ =/ snap=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
291+ %+ roll (tap:wav (lot:wav wav.tide `aeon.snap ~))
292+ |= [[=aeon =wave:lake] =_snap]
293+ ?. =(aeon +(aeon.snap)) snap
294+ [aeon (wash:lake rock.snap wave)]
295+ ::
296+ ++ apply :: Handle request from subscriber.
297+ |= req=(request:poke paths)
298+ ^- (quip card:agent:gall pubs)
299+ =/ =buoy (~(gut by pub) path.req *buoy)
300+ ?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
301+ ?@ tid.buoy
302+ :_ 0/pub :_ ~
303+ (send tomb/~ src.bowl dude.req tid.buoy path.req)
304+ ?~ when.req
305+ =/ last (fall (pry:rok rok.tid.buoy) *[=key =val]:rok)
306+ :_ 0/pub :_ ~
307+ (send scry/rock/val.last src.bowl dude.req key.last path.req)
308+ ?^ dat=(get:wav wav.tid.buoy u.when.req)
309+ :_ 0/pub :_ ~
310+ (send scry/wave/u.dat src.bowl [dude u.when path]:req)
311+ ?: %+ lte u.when.req
312+ key::(fall (ram:wav wav.tid.buoy) (pry:rok rok.tid.buoy) [=key val]:wav)
313+ :_ 0/pub :_ ~
314+ (send yore/~ src.bowl [dude u.when path]:req)
315+ ?> =(u.when.req +((latest tid.buoy)))
316+ :- ~[(send nigh/~ src.bowl [dude u.when path]:req)]
317+ :- %0
318+ %+ ~(put by pub) path.req
319+ %= buoy
320+ mem.tid (~(put bi mem.tid.buoy) src.bowl dude.req (add ~s25 now.bowl))
321+ ==
322+ ::
323+ :: Non-public facing arms below
324+ ::
325+ ++ send
326+ |= [payload=_|3:*(response:poke lake paths) =ship =dude =aeon path=paths]
327+ ^- card:agent:gall
328+ =* mark (cat 3 %sss- name:lake)
329+ :* %pass (zoom scry-response/(scot %p ship)^dude^(scot %ud aeon)^path)
330+ %agent [ship dude]
331+ %poke mark result-type ^- (response:poke lake paths)
332+ [path dap.bowl aeon payload]
333+ ==
334+ ++ latest
335+ |= =$@(aeon tide)
336+ ^- aeon
337+ ?@ tide tide
338+ %+ max (fall (bind (pry:rok rok.tide) head) 0)
339+ (fall (bind (ram:wav wav.tide) head) 0)
340+ ::
341+ ++ edit
342+ |= [ps=(list paths) edit=$-(buoy buoy)]
343+ ^- pubs
344+ :- %0
345+ %- ~(rep in (sy ps))
346+ |= [path=paths =_pub]
347+ %- fall :_ pub %- mole |.
348+ (~(jab by pub) path edit)
349+ ::
350+ ++ form
351+ |= =tide
352+ ^+ tide
353+ =/ max-rock=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
354+ =/ max-wave (fall (bind (ram:wav wav.tide) head) 0)
355+ =. rok.tide
356+ %+ gas:rok +<-:gas:rok
357+ %- tab:rok :_ [~ +(rocks.rul.tide)]
358+ ?: ?| =(waves.rul.tide 0)
359+ (lth max-wave (add aeon.max-rock waves.rul.tide))
360+ ==
361+ rok.tide
362+ %+ put:rok rok.tide
363+ %+ roll (tab:wav wav.tide `aeon.max-rock max-wave)
364+ |: [*[now=aeon =wave:lake] `[prev=aeon =rock:lake]`max-rock]
365+ ~| %aeon-awry
366+ ?> =(now +(prev))
367+ [now (wash:lake rock wave)]
368+ ~| %rock-zero
369+ tide(wav (lot:wav wav.tide (bind (ram:rok rok.tide) |=([r=@ *] (dec r))) ~))
370+ --
371+--
base-desk/lib/strand.hoon+1−188
@@ -1,188 +1 @@
1−|%
1+rand
2−+$ card card:agent:gall
3−+$ input
4− $% [%poke =cage]
5− [%sign =wire =sign-arvo]
6− [%agent =wire =sign:agent:gall]
7− [%watch =path]
8− ==
9−+$ strand-input [=bowl in=(unit input)]
10−+$ tid @tatid
11−+$ bowl
12− $: our=ship
13− src=ship
14− tid=tid
15− mom=(unit tid)
16− wex=boat:gall
17− sup=bitt:gall
18− eny=@uvJ
19− now=@da
20− byk=beak
21− ==
22−::
23−:: cards: cards to send immediately. These will go out even if a
24−:: later stage of the computation fails, so they shouldn't have
25−:: any semantic effect on the rest of the system.
26−:: Alternately, they may record an entry in contracts with
27−:: enough information to undo the effect if the computation
28−:: fails.
29−:: wait: don't move on, stay here. The next sign should come back
30−:: to this same callback.
31−:: skip: didn't expect this input; drop it down to be handled
32−:: elsewhere
33−:: cont: continue computation with new callback.
34−:: fail: abort computation; don't send effects
35−:: done: finish computation; send effects
36−::
37−++ strand-output-raw
38− |* a=mold
39− $~ [~ %done *a]
40− $: cards=(list card)
41− $= next
42− $% [%wait ~]
43− [%skip ~]
44− [%cont self=(strand-form-raw a)]
45− [%fail err=(pair term tang)]
46− [%done value=a]
47− ==
48− ==
49−::
50−++ strand-form-raw
51− |* a=mold
52− $-(strand-input (strand-output-raw a))
53−::
54−:: Abort strand computation with error message
55−::
56−++ strand-fail
57− |= err=(pair term tang)
58− |= strand-input
59− [~ %fail err]
60−::
61−:: Asynchronous transcaction monad.
62−::
63−:: Combo of four monads:
64−:: - Reader on input
65−:: - Writer on card
66−:: - Continuation
67−:: - Exception
68−::
69−++ strand
70− |* a=mold
71− |%
72− ++ output (strand-output-raw a)
73− ::
74− :: Type of an strand computation.
75− ::
76− ++ form (strand-form-raw a)
77− ::
78− :: Monadic pure. Identity computation for bind.
79− ::
80− ++ pure
81− |= arg=a
82− ^- form
83− |= strand-input
84− [~ %done arg]
85− ::
86− :: Monadic bind. Combines two computations, associatively.
87− ::
88− ++ bind
89− |* b=mold
90− |= [m-b=(strand-form-raw b) fun=$-(b form)]
91− ^- form
92− |= input=strand-input
93− =/ b-res=(strand-output-raw b)
94− (m-b input)
95− ^- output
96− :- cards.b-res
97− ?- -.next.b-res
98− %wait [%wait ~]
99− %skip [%skip ~]
100− %cont [%cont ..$(m-b self.next.b-res)]
101− %fail [%fail err.next.b-res]
102− %done [%cont (fun value.next.b-res)]
103− ==
104− ::
105− :: The strand monad must be evaluted in a particular way to maintain
106− :: its monadic character. +take:eval implements this.
107− ::
108− ++ eval
109− |%
110− :: Indelible state of a strand
111− ::
112− +$ eval-form
113− $: =form
114− ==
115− ::
116− :: Convert initial form to eval-form
117− ::
118− ++ from-form
119− |= =form
120− ^- eval-form
121− form
122− ::
123− :: The cases of results of +take
124− ::
125− +$ eval-result
126− $% [%next ~]
127− [%fail err=(pair term tang)]
128− [%done value=a]
129− ==
130− ::
131− ++ validate-mark
132− |= [in=* =mark =bowl]
133− ^- cage
134− =+ .^ =dais:clay %cb
135− /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[mark]
136− ==
137− =/ res (mule |.((vale.dais in)))
138− ?: ?=(%| -.res)
139− ~|(%spider-mark-fail (mean leaf+"spider: ames vale fail {<mark>}" p.res))
140− [mark p.res]
141− ::
142− :: Take a new sign and run the strand against it
143− ::
144− ++ take
145− :: cards: accumulate throughout recursion the cards to be
146− :: produced now
147− =| cards=(list card)
148− |= [=eval-form =strand-input]
149− ^- [[(list card) =eval-result] _eval-form]
150− =* take-loop $
151− =. in.strand-input
152− ?~ in.strand-input ~
153− =/ in u.in.strand-input
154− ?. ?=(%agent -.in) `in
155− ?. ?=(%fact -.sign.in) `in
156− ::
157− :- ~
158− :+ %agent wire.in
159− [%fact (validate-mark q.q.cage.sign.in p.cage.sign.in bowl.strand-input)]
160− :: run the strand callback
161− ::
162− =/ =output (form.eval-form strand-input)
163− :: add cards to cards
164− ::
165− =. cards
166− %+ welp
167− cards
168− :: XX add tag to wires?
169− cards.output
170− :: case-wise handle next steps
171− ::
172− ?- -.next.output
173− %wait [[cards %next ~] eval-form]
174− %skip [[cards %next ~] eval-form]
175− %fail [[cards %fail err.next.output] eval-form]
176− %done [[cards %done value.next.output] eval-form]
177− %cont
178− :: recurse to run continuation with initialization input
179− ::
180− %_ take-loop
181− form.eval-form self.next.output
182− strand-input [bowl.strand-input ~]
183− ==
184− ==
185− --
186− --
187−--
188−::
base-desk/mar/belt.hoon+3−12
@@ -1,5 +1,7 @@
1:: belt: runtime belt structure
1:: belt: runtime belt structure
2::
2::
3+/+ dill
4+::
3|_ =belt:dill
5|_ =belt:dill
4++ grad %noun
6++ grad %noun
5:: +grab: convert from
7:: +grab: convert from
@@ -7,18 +9,7 @@
7++ grab
9++ grab
8 |%
10 |%
9 ++ noun belt:dill
11 ++ noun belt:dill
10− ++ json
12+ ++ json belt:dejs:dill
11− ^- $-(^json belt:dill)
12− =, dejs:format
13− %- of
14− :~ aro+(su (perk %d %l %r %u ~))
15− bac+ul
16− ctl+(cu taft so)
17− del+ul
18− met+(cu taft so)
19− ret+ul
20− txt+(ar (cu taft so))
21− ==
22 --
13 --
23:: +grow: convert to
14:: +grow: convert to
24::
15::
base-desk/mar/blit.hoon+3−44
@@ -1,5 +1,7 @@
1:: blit: runtime blit structure
1:: blit: runtime blit structure
2::
2::
3+/+ dill
4+::
3|_ =blit:dill
5|_ =blit:dill
4++ grad %noun
6++ grad %noun
5:: +grab: convert from
7:: +grab: convert from
@@ -13,49 +15,6 @@
13++ grow
15++ grow
14 |%
16 |%
15 ++ noun blit
17 ++ noun blit
16− ++ json
18+ ++ json (blit:enjs:dill blit)
17− ^- ^json
18− =, enjs:format
19− %+ frond -.blit
20− ?- -.blit
21− %bel b+&
22− %clr b+&
23− %hop (numb p.blit)
24− %lin a+(turn p.blit |=(c=@c s+(tuft c)))
25− %mor b+&
26− %url s+p.blit
27− ::
28− %sag
29− %- pairs
30− :~ 'path'^(path p.blit)
31− 'file'^s+(en:base64:mimes:html (as-octs:mimes:html (jam q.blit)))
32− ==
33− ::
34− %sav
35− %- pairs
36− :~ 'path'^(path p.blit)
37− 'file'^s+(en:base64:mimes:html (as-octs:mimes:html q.blit))
38− ==
39− ::
40− %klr
41− :- %a
42− %+ turn p.blit
43− |= [=stye text=(list @c)]
44− %- pairs
45− :~ 'text'^a+(turn text |=(c=@c s+(tuft c)))
46− ::
47− :- 'stye'
48− %- pairs
49− |^ :~ 'back'^(color p.q.stye)
50− 'fore'^(color q.q.stye)
51− 'deco'^a+(turn ~(tap in p.stye) |=(d=deco ?~(d ~ s+d)))
52− ==
53− ++ color
54− |= =tint
55− ?@ tint ?~(tint ~ s+tint)
56− s+(crip ((x-co:co 6) (rep 3 ~[b g r]:tint)))
57− --
58− ==
59− ==
60 --
19 --
61--
20--
base-desk/mar/sole/action.hoon+3−1
@@ -20,7 +20,9 @@
20 |= jon=^json ^- sole-action
20 |= jon=^json ^- sole-action
21 %- need %. jon
21 %- need %. jon
22 => [dejs-soft:format ..sole-action]
22 => [dejs-soft:format ..sole-action]
23− |^ (ot id+so dat+(fo %ret (of det+change tab+ni ~)) ~)
23+ |^ (ot id+id dat+(fo %ret (of det+change tab+ni ~)) ~)
24+ ++ id
25+ (ot who+(su ;~(pfix sig fed:ag)) ses+so ~)
24 ++ fo
26 ++ fo
25 |* [a=term b=fist]
27 |* [a=term b=fist]
26 |=(c=json ?.(=([%s a] c) (b c) (some [a ~])))
28 |=(c=json ?.(=([%s a] c) (b c) (some [a ~])))
base-desk/sur/hood.hoon+149−206
@@ -1,147 +1,159 @@
1=, clay
1=, clay
2=* dude dude:gall
2=* dude dude:gall
3|%
3|%
4−:: $snap: kiln snapshot
4++$ pike
5−::
5+ $: sync=(unit [=ship =desk])
6−+$ snap (map desk arak)
6+ hash=@uv
7−:: $diff: subscription update
7+ =zest
8−::
8+ wic=(set weft)
9−+$ diff
10− $% [%block =desk =arak =weft blockers=(set desk)]
11− [%reset =desk =arak]
12− [%commit =desk =arak]
13− [%merge-sunk =desk =arak =tang]
14− [%merge-fail =desk =arak =tang]
15− [%suspend =desk =arak]
16− [%revive =desk =arak]
17 ==
9 ==
18−:: $arak: foreign vat tracker
19::
10::
20−:: .rail: upstream tracking state, if any
11++$ pikes (map desk pike)
21−:: .rein: configuration for agents
22−::
23−+$ arak
24− $: rail=(unit rail)
25− =rein
26− ==
27−:: $rail: upstream tracking state
28::
12::
29−:: .publisher: Ship that originally published desk, if available
30−:: .paused: is tracking paused? or live
31−:: .ship: upstream ship (could be .our)
32−:: .desk: name of upstream desk
33−:: .aeon: next aeon to pull from upstream
34−:: .next: list of pending commits with future kelvins
35−::
36−+$ rail
37− $: publisher=(unit ship)
38− paused=?
39− =ship
40− =desk
41− =aeon
42− next=(list rung)
43− ==
44:: $rung: reference to upstream commit
13:: $rung: reference to upstream commit
45::
14::
46+$ rung [=aeon =weft]
15+$ rung [=aeon =weft]
47−:: $rein: diff from desk manifest
48−::
49−:: .liv: suspended? if suspended, no agents should run
50−:: .add: agents not in manifest that should be running
51−:: .sub: agents in manifest that should not be running
52−::
53−+$ rein
54− $: liv=_&
55− add=(set dude)
56− sub=(set dude)
57− ==
58−::
59−+$ vat [=desk hash=@uv =cass =arak]
60−:: +report-vats: report on all desk installations
61::
16::
17++$ sync-state [nun=@ta kid=(unit desk) let=@ud]
18++$ sink (unit [her=@p sud=desk kid=(unit desk) let=@ud])
62++ report-vats
19++ report-vats
63− |= [our=@p now=@da]
20+ =| $: =cone
64− ^- tang
21+ sor=(map desk [ship desk])
65− =+ .^ raz=(list vat)
22+ zyn=(map [desk ship desk] sync-state)
66− %gx /(scot %p our)/hood/(scot %da now)/kiln/vats/noun
23+ desks=(set desk)
24+ =pikes
25+ =rock:tire:clay
26+ kel=weft
67 ==
27 ==
68− :- (report-kids our now)
28+ |_ [our=@p now=@da]
69− (turn raz |=(v=vat (report-vat our now v)))
29+ +* ego (scot %p our)
70−:: +report-vat: report on a single desk installation
30+ wen (scot %da now)
71−::
31+ ++ $
72−++ report-vat
32+ |= [? ? ? ? ?]
73− |= [our=ship now=@da vat]
33+ (report-vats:abed +<)
74− ^- tank
34+ ++ abed
75− ?: =(ud.cass 0)
35+ %= ..abed
36+ cone .^(^cone %cx /[ego]//[wen]/domes)
37+ sor .^((map desk [ship desk]) %gx /[ego]/hood/[wen]/kiln/sources/noun)
38+ zyn .^ (map [desk ship desk] sync-state) %gx
39+ /[ego]/hood/[wen]/kiln/syncs/noun
40+ ==
41+ desks .^((set desk) %cd /[ego]/base/[wen])
42+ pikes .^(^pikes %gx /[ego]/hood/[wen]/kiln/pikes/kiln-pikes)
43+ rock .^(rock:tire:clay %cx /[ego]//[wen]/tire)
44+ kel (weft .^(* cx/(en-beam [our %base da+now] /sys/kelvin)))
45+ ==
46+ ++ vat-info
47+ |= desk=_`desk`%base
48+ =/ pike (~(got by pikes) desk)
49+ =/ zest -:(~(got by rock) desk)
50+ =/ kel-path /[ego]/[desk]/[wen]/sys/kelvin
51+ =/ sink=sink
52+ ?~ s=(~(get by sor) desk)
53+ ~
54+ ?~ z=(~(get by zyn) desk u.s)
55+ ~
56+ `[-.u.s +.u.s +.u.z]
57+ =/ hash .^(@uv %cz /[ego]/[desk]/[wen])
58+ =/ dek (~(got by rock) desk)
59+ =/ =dome (~(got by cone) our desk)
60+ =+ .^(=waft %cx kel-path)
61+ :* &1 &2 &3 &4 &5 &6 &7 &8
62+ desk=desk
63+ ^= running =(%live zest)
64+ ^= suspended =(%dead zest)
65+ ^= exists !=(ud.cass 0):.^(=cass %cw /[ego]/[desk]/[wen])
66+ ^= bad-desk ?!(.^(? %cu kel-path))
67+ ^= meb :: =(list @uv)
68+ ?~ sink [hash]~
69+ (mergebase-hashes our desk now her.u.sink sud.u.sink)
70+ ^- [on=(list [@tas ?]) of=(list [@tas ?])]
71+ (skid ~(tap by ren.dome) |=([* ?] +<+))
72+ ^= sat
73+ ?- zest.dek
74+ %live "running"
75+ %dead "suspended"
76+ %held "suspended until next update"
77+ ==
78+ ^- kul=tape
79+ %+ roll
80+ %+ sort
81+ ~(tap in (waft-to-wefts:clay waft))
82+ |= [a=weft b=weft]
83+ ?: =(lal.a lal.b)
84+ (lte num.a num.b)
85+ (lte lal.a lal.b)
86+ |= [=weft =tape]
87+ (welp " {<[lal num]:weft>}" tape)
88+ ^= blocking
89+ ?& !=(%base desk)
90+ !=(%live zest.pike)
91+ !(~(has in wic.pike) kel)
92+ == ==
93+ ++ report-vats
94+ |= $: verb=?
95+ show-suspended=?
96+ show-running=?
97+ show-blocking=?
98+ show-nonexistent=?
99+ ==
100+ %+ turn
101+ %+ skim
102+ %+ turn ~(tap in desks)
103+ |= =desk (vat-info desk)
104+ |= vat-info
105+ :: just unconditionally show "bad" desks, whatever that means
106+ ?| bad-desk
107+ &(suspended show-suspended)
108+ &(running show-running)
109+ &(blocking show-blocking)
110+ &(!exists show-nonexistent)
111+ ==
112+ |= =vat-info
113+ :+ %rose [" " " " "::"]
114+ :- leaf+"{<desk.vat-info>}"
115+ %- flop
116+ %- report-vat
117+ [verb vat-info]
118+ ++ report-vat
119+ |= [verb=? vat-info]
120+ ^- tang
121+ ?: !exists
76− leaf+"desk does not yet exist: {<desk>}"
122+ ~[leaf+"desk does not yet exist: {<desk>}"]
77− =/ kel-path
123+ ?: =(%kids desk)
78− /(scot %p our)/[desk]/(scot %da now)/sys/kelvin
124+ ~[leaf+"%kids %cz hash: {<hash>}"]
79− ?. .^(? %cu kel-path)
125+ ?: bad-desk
80− leaf+"bad desk: {<desk>}"
126+ ~[leaf+"bad desk: {<desk>}"]
81− =+ .^(=weft %cx kel-path)
127+ %- flop
82− :+ %rose ["" "{<desk>}" "::"]
128+ ?. verb
83− ^- tang
129+ :~ leaf/"/sys/kelvin: {kul}"
84− =/ meb (mergebase-hashes our desk now arak)
130+ leaf/"app status: {sat}"
85− =/ poz
131+ leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
86− ?~ rail.arak "local"
132+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
87− ?:(paused.u.rail.arak "paused" "tracking")
133+ ==
88− =/ sat ?:(liv.rein.arak "running" "suspended")
89− =/ pen
90− ?~ rail.arak "~"
91− <(turn next.u.rail.arak |=([@ lal=@tas num=@] [lal num]))>
92− :~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
134+ :~ leaf/"/sys/kelvin: {kul}"
93− leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
135+ leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
94− leaf/"%cz hash: {<hash>}"
136+ leaf/"%cz hash: {<hash>}"
95− ::
137+ ::
96− leaf/"app status: {sat}"
138+ leaf/"app status: {sat}"
97− leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
139+ leaf/"force on: {?:(=(~ on) "~" <on>)}"
98− leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
140+ leaf/"force off: {?:(=(~ of) "~" <of>)}"
99− ::
141+ ::
100− leaf/"publishing ship: {?~(rail.arak <~> <publisher.u.rail.arak>)}"
142+ leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
101− leaf/"updates: {poz}"
143+ leaf/"updates: {?~(sink "local" "remote")}"
102− leaf/"source ship: {?~(rail.arak <~> <ship.u.rail.arak>)}"
144+ leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
103− leaf/"source desk: {?~(rail.arak <~> <desk.u.rail.arak>)}"
145+ leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
104− leaf/"source aeon: {?~(rail.arak <~> <aeon.u.rail.arak>)}"
146+ leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
105− leaf/"pending updates: {pen}"
147+ leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
106− ==
148+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
107−:: +report-kids: non-vat cz hash report for kids desk
149+ ==
108−::
109−++ report-kids
150+ ++ report-kids
110− |= [our=ship now=@da]
111− ^- tank
151+ ^- tank
112− =/ dek %kids
113− =/ ego (scot %p our)
114− =/ wen (scot %da now)
115− ?. (~(has in .^((set desk) %cd /[ego]//[wen])) dek)
152+ ?. (~(has in .^((set desk) %cd /[ego]//[wen])) %kids)
116− leaf/"no %kids desk"
153+ leaf/"no %kids desk"
117− =+ .^(hash=@uv %cz /[ego]/[dek]/[wen])
154+ =+ .^(hash=@uv %cz /[ego]/kids/[wen])
118− leaf/"%kids %cz hash: {<hash>}"
155+ leaf/"%kids %cz hash: {<hash>}"
119−:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
156+ --
120−::
121−++ read-kelvin-foreign
122− |= [=ship =desk =aeon]
123− ^- weft
124− ~| read-foreign-kelvin/+<
125− =/ her (scot %p ship)
126− =/ syd (scot %tas desk)
127− =/ yon (scot %ud aeon)
128− ::
129− =/ dom .^(dome cv/~[her syd yon])
130− =/ tak (scot %uv (~(got by hit.dom) let.dom))
131− =/ yak .^(yaki cs/~[her syd yon %yaki tak])
132− =/ lob (scot %uv (~(got by q.yak) /sys/kelvin))
133− =/ peg .^(page cs/~[her syd yon %blob lob])
134− ;;(weft q.peg)
135−:: +read-kelvin-local: read /sys/kelvin from a local desk
136−::
137−++ read-kelvin-local
138− |= [our=ship =desk now=@da]
139− ^- (unit weft)
140− ~| read-kelvin-local+desk
141− =/ pax (en-beam [our desk da+now] /sys/kelvin)
142− ?. .^(? cu/pax)
143− ~
144− [~ .^(weft cx/pax)]
145:: +read-bill-foreign: read /desk/bill from a foreign desk
157:: +read-bill-foreign: read /desk/bill from a foreign desk
146::
158::
147++ read-bill-foreign
159++ read-bill-foreign
@@ -152,7 +164,7 @@
152 =/ syd (scot %tas desk)
164 =/ syd (scot %tas desk)
153 =/ yon (scot %ud aeon)
165 =/ yon (scot %ud aeon)
154 ::
166 ::
155− =/ dom .^(dome cv/~[her syd yon])
167+ =/ dom .^(domo cv/~[her syd yon])
156 =/ tak ~| aeons=~(key by hit.dom)
168 =/ tak ~| aeons=~(key by hit.dom)
157 (scot %uv (~(got by hit.dom) aeon))
169 (scot %uv (~(got by hit.dom) aeon))
158 =/ yak .^(yaki cs/~[her syd yon %yaki tak])
170 =/ yak .^(yaki cs/~[her syd yon %yaki tak])
@@ -169,21 +181,6 @@
169 ?. .^(? cu/pax)
181 ?. .^(? cu/pax)
170 *(list dude)
182 *(list dude)
171 .^((list dude) cx/pax)
183 .^((list dude) cx/pax)
172−:: +adjust-dudes: which agents should be started and stopped
173−::
174−:: Will ask Gall to start agents that it's already running
175−:: but that should be ok, and might be safer in case other
176−:: unprocessed moves would have turned them off.
177−::
178−++ adjust-dudes
179− |= $: local=[our=ship =desk now=@da]
180− =rein
181− ==
182− ^- [jolt=(list dude) idle=(list dude)]
183− =/ all=(list dude) (read-bill local)
184− =/ want (get-apps-want local all rein)
185− =/ have (get-apps-live local)
186− [want (skip have ~(has in (sy want)))]
187::
184::
188++ get-remote-diff
185++ get-remote-diff
189 |= [our=ship here=desk now=@da her=ship there=desk when=aeon]
186 |= [our=ship here=desk now=@da her=ship there=desk when=aeon]
@@ -210,38 +207,18 @@
210 ^- (list [=dude live=?])
207 ^- (list [=dude live=?])
211 %~ tap in
208 %~ tap in
212 .^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
209 .^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
213−:: +get-apps-want: find which apps should be running on a desk
214−::
215−++ get-apps-want
216− |= [local=[our=ship =desk now=@da] duz=(list dude) =rein]
217− ^- (list dude)
218− ?. liv.rein ~
219− ?. |(=(`zuse+zuse (read-kelvin-local local)) =(%base desk.local)) ~
220− =. duz (skip duz ~(has in sub.rein))
221− =. duz (weld duz (skip ~(tap in add.rein) ~(has in (sy duz))))
222− duz
223::
210::
224++ mergebase-hashes
211++ mergebase-hashes
225− |= [our=@p =desk now=@da =arak]
212+ |= [our=@p syd=desk now=@da her=ship sud=desk]
226− ?~ rail.arak
227− ~
228− =/ her (scot %p ship.u.rail.arak)
213+ =/ her (scot %p her)
229 =/ ego (scot %p our)
214 =/ ego (scot %p our)
230 =/ wen (scot %da now)
215 =/ wen (scot %da now)
231− %+ turn .^((list tako) %cs ~[ego desk wen %base her desk.u.rail.arak])
216+ %+ turn .^((list tako) %cs ~[ego syd wen %base her sud])
232− |=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
217+ |=(=tako .^(@uv %cs ~[ego syd wen %hash (scot %uv tako)]))
233::
218::
234++ enjs
219++ enjs
235 =, enjs:format
220 =, enjs:format
236 |%
221 |%
237− ++ vats
238− |= v=(list ^vat)
239− ^- json
240− %- pairs
241− %+ turn v
242− |= va=^vat
243− [desk.va (vat va)]
244− ::
245 ++ tim
222 ++ tim
246 |= t=@
223 |= t=@
247 ^- json
224 ^- json
@@ -254,15 +231,6 @@
254 da+(tim da.c)
231 da+(tim da.c)
255 ==
232 ==
256 ::
233 ::
257− ++ vat
258− |= v=^vat
259− %- pairs
260− :~ desk+s+desk.v
261− hash+s+(scot %uv hash.v)
262− cass+(cass cass.v)
263− arak+(arak arak.v)
264− ==
265− ::
266 ++ weft
234 ++ weft
267 |= w=^weft
235 |= w=^weft
268 %- pairs
236 %- pairs
@@ -276,30 +244,5 @@
276 :~ aeon+(numb aeon.r)
244 :~ aeon+(numb aeon.r)
277 weft+(weft weft.r)
245 weft+(weft weft.r)
278 ==
246 ==
279− ::
280− ++ rein
281− |= r=^rein
282− %- pairs
283− :~ add+a+(turn ~(tap in add.r) (lead %s))
284− sub+a+(turn ~(tap in sub.r) (lead %s))
285− ==
286− ::
287− ++ arak
288− |= a=^arak
289− %- pairs
290− :~ rail+?~(rail.a ~ (rail u.rail.a))
291− rein+(rein rein.a)
292− ==
293− ::
294− ++ rail
295− |= r=^rail
296− %- pairs
297− :~ ship+s+(scot %p ship.r)
298− publisher+?~(publisher.r ~ s+(scot %p u.publisher.r))
299− desk+s+desk.r
300− paused+b+paused.r
301− aeon+(numb aeon.r)
302− next+a+(turn next.r rung)
303− ==
304 --
247 --
305--
248--
base-desk/sur/sole.hoon+2−1
@@ -3,8 +3,9 @@
3 ::
3 ::
4^?
4^?
5|%
5|%
6++$ sole-id [who=@p ses=@ta]
6+$ sole-action :: sole to app
7+$ sole-action :: sole to app
7− $: id=@ta :: duct id
8+ $: id=sole-id :: session id
8 $= dat
9 $= dat
9 $% :: [%abo ~] :: reset interaction
10 $% :: [%abo ~] :: reset interaction
10 [%det sole-change] :: command line edit
11 [%det sole-change] :: command line edit
base-desk/sur/sss.hoonnew file+43
@@ -0,0 +1,43 @@
1+|%
2+++ lake
3+ |$ [rock wave]
4+ $_ ^?
5+ |%
6+ ++ name *term
7+ +$ rock ^rock
8+ +$ wave ^wave
9+ ++ wash |~ [rock wave] *rock
10+ --
11++$ aeon @ud
12++$ dude dude:agent:gall
13++$ what ?(%rock %wave)
14+++ poke
15+ |%
16+ ++ request
17+ |* paths=mold
18+ $: path=paths
19+ =dude
20+ when=(unit aeon)
21+ ==
22+ ++ response
23+ |* [=(lake) paths=mold]
24+ $: path=paths
25+ =dude
26+ =aeon
27+ $% [type=?(%nigh %yore %tomb) ~]
28+ $: type=%scry
29+ $% [what=%rock =rock:lake]
30+ [what=%wave =wave:lake]
31+ == == == ==
32+ ++ on-rock
33+ |* [=(lake) paths=mold]
34+ $: path=paths
35+ src=ship
36+ from=dude
37+ stale=?
38+ fail=?
39+ =rock:lake
40+ wave=(unit wave:lake)
41+ ==
42+ --
43+--
desk/desk.docket-0+1−1
@@ -4,7 +4,7 @@
4 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
4 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
5 glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v4.88rt1.guqn5.nnatp.lca68.ej9aj.glob' 0v4.88rt1.guqn5.nnatp.lca68.ej9aj]
5 glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v4.88rt1.guqn5.nnatp.lca68.ej9aj.glob' 0v4.88rt1.guqn5.nnatp.lca68.ej9aj]
6 base+'astrolabe'
6 base+'astrolabe'
7− version+[1 0 4]
7+ version+[1 0 5]
8 website+'https://github.com/johnhyde/astrolabe'
8 website+'https://github.com/johnhyde/astrolabe'
9 license+'MIT'
9 license+'MIT'
10==
10==
desk/sys.kelvin+1−1
@@ -1 +1 @@
1−[%zuse 417]
1+[%zuse 414]