5title: A new-Gall example app
8# A new-Gall example app
12:: new gall example, may or may not compile.
15++ query :> valid queries
16 $% {$number $~} :< current number
17 {$mul-of val/@ud} :< is num multiple of?
19++ prize :> query results
20 $% {$number num/@ud} :< /number
21 {$mul-of mul/?} :< /mul-of
23++ rumor :> query result changes
24 $% {$number delta} :< /number
25 {$mul-of mul/?} ::TODO or just flip? :< /mul-of
27:: the above would ordinarily be placed in sur/, ::
28:: since other apps might want to use it. ::
29++ brain {num/@ud $~} :< application state
30++ delta :> state change
31 $% {$increment $~} :< +1
38++ leak :> read permission
39 |= {who/ship qer/query}
41 & :: everyone's allowed
43++ peek :> synchronous read
45 ^- (unit (unit prize))
47 $number ``[%number num]
48 $mul-of ?: =(0 mul.qer) [~ ~]
49 ``[%mul-of =(0 (mod num mul.qer))]
52++ poke-loob :> regular old poke
59++ bake :> apply delta to state
64 $increment +>(num +(num))
65 $decrement +>(num (dec num))
68++ feel :> delta to rumor
69 |= {qer/query del/delta}
76 :: since we only want to send a rumor if result
77 :: changed, we need to deduce the old state from
78 :: the current state and the delta. depends on the
79 :: fact that state changes before ++feel. funky!
80 :: we could, of course, store mul/? in state, and
81 :: make a delta for it, but should we need to?
90 =/ new =(0 (mod num mul.qer))
95:: not pictured: ++path-to-query
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list