mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
neo: working sync, UI prototype
This commit is contained in:
parent
4ba5d38289
commit
2cd20697e4
@ -11,6 +11,11 @@
|
|||||||
|%
|
|%
|
||||||
++ pave pave:neo
|
++ pave pave:neo
|
||||||
++ ford ford:neo
|
++ ford ford:neo
|
||||||
|
++ slug
|
||||||
|
|= a=tang
|
||||||
|
^+ same
|
||||||
|
?~ a same
|
||||||
|
~_ i.a $(a t.a)
|
||||||
++ bump-ever
|
++ bump-ever
|
||||||
|= =ever:neo
|
|= =ever:neo
|
||||||
^- ever:neo
|
^- ever:neo
|
||||||
@ -65,7 +70,7 @@
|
|||||||
:: diary=(axal:neo memo:neo)
|
:: diary=(axal:neo memo:neo)
|
||||||
:: dead=(map @uvH (axal:neo room:neo))
|
:: dead=(map @uvH (axal:neo room:neo))
|
||||||
=sound:neo
|
=sound:neo
|
||||||
foreign=(map [care:neo pith] cane:neo)
|
foreign=(map tour:neo riot:neo)
|
||||||
=halt:neo
|
=halt:neo
|
||||||
=fleet:neo
|
=fleet:neo
|
||||||
$= fiesta
|
$= fiesta
|
||||||
@ -122,7 +127,7 @@
|
|||||||
=^ cards state
|
=^ cards state
|
||||||
abet:init:run
|
abet:init:run
|
||||||
[cards this]
|
[cards this]
|
||||||
++ on-save !>(state)
|
++ on-save !>(`state-0`state)
|
||||||
++ on-load
|
++ on-load
|
||||||
|= =vase
|
|= =vase
|
||||||
=+ !<(old=state-0 vase)
|
=+ !<(old=state-0 vase)
|
||||||
@ -140,7 +145,13 @@
|
|||||||
abet:(watch:run path)
|
abet:(watch:run path)
|
||||||
[cards this]
|
[cards this]
|
||||||
::
|
::
|
||||||
++ on-leave on-leave:def
|
++ on-leave
|
||||||
|
|= =path
|
||||||
|
^- (quip card _this)
|
||||||
|
=^ cards state
|
||||||
|
abet:(leave:run path)
|
||||||
|
[cards this]
|
||||||
|
::
|
||||||
++ on-agent
|
++ on-agent
|
||||||
|= [=wire =sign:agent:gall]
|
|= [=wire =sign:agent:gall]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
@ -246,6 +257,18 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
--
|
--
|
||||||
|
++ leave
|
||||||
|
|= =(pole knot)
|
||||||
|
^+ run
|
||||||
|
?. ?=([%sync %init as=@ car=@ rest=*] pole)
|
||||||
|
run
|
||||||
|
=+ ;;(=care:neo car.pole)
|
||||||
|
=+ ;;(=pulp:neo as.pole)
|
||||||
|
=/ pax=pith:neo (pave:neo rest.pole)
|
||||||
|
=/ =tone:neo [%peer pulp pole]
|
||||||
|
=. sound (~(del ju sound) [care rest.pole] tone)
|
||||||
|
run
|
||||||
|
::
|
||||||
++ next-clay
|
++ next-clay
|
||||||
|= syn=sign-arvo
|
|= syn=sign-arvo
|
||||||
^+ run
|
^+ run
|
||||||
@ -263,7 +286,6 @@
|
|||||||
=/ riff=room:neo
|
=/ riff=room:neo
|
||||||
[%ford-riff %ford-out ~ [1 1] !>(`[cac=(unit vase) ~]`[`!>(ford-riff) ~]) ~ ~]
|
[%ford-riff %ford-out ~ [1 1] !>(`[cac=(unit vase) ~]`[`!>(ford-riff) ~]) ~ ~]
|
||||||
=. apex (put:of-top #/out/std/imp/ford-riff riff)
|
=. apex (put:of-top #/out/std/imp/ford-riff riff)
|
||||||
:: =. run (make-riff #/src/std/imp/ford-riff riff)
|
|
||||||
=. run (make-riff #/out/reef reef)
|
=. run (make-riff #/out/reef reef)
|
||||||
=. run (re-export reef %hoon !,(*hoon @t))
|
=. run (re-export reef %hoon !,(*hoon @t))
|
||||||
=. run (make-riff #/out/std/pro/ford-out (ford-out reef))
|
=. run (make-riff #/out/std/pro/ford-out (ford-out reef))
|
||||||
@ -275,7 +297,6 @@
|
|||||||
=. run (make-riff-slap #/out/std/imp/ford-face reef txt-ford-face)
|
=. run (make-riff-slap #/out/std/imp/ford-face reef txt-ford-face)
|
||||||
=. run (make-riff-slap #/out/std/imp/ford-slop reef txt-ford-slop)
|
=. run (make-riff-slap #/out/std/imp/ford-slop reef txt-ford-slop)
|
||||||
=. run (make-riff-slap #/out/std/imp/ford-slap reef txt-ford-slap)
|
=. run (make-riff-slap #/out/std/imp/ford-slap reef txt-ford-slap)
|
||||||
=. run (make-riff-slap #/out/std/imp/ford-riff reef txt-ford-reef)
|
|
||||||
=. run (re-export reef %json !,(*hoon json))
|
=. run (re-export reef %json !,(*hoon json))
|
||||||
=. run (re-export reef %mime !,(*hoon mime))
|
=. run (re-export reef %mime !,(*hoon mime))
|
||||||
=. run (poke %noun !>(%clay))
|
=. run (poke %noun !>(%clay))
|
||||||
@ -309,8 +330,8 @@
|
|||||||
++ init
|
++ init
|
||||||
|= old=(unit vase)
|
|= old=(unit vase)
|
||||||
^- (quip card:neo vase)
|
^- (quip card:neo vase)
|
||||||
=+ !<(ref=vase (need old))
|
=+ !<(sta=[ref=(unit vase) ~] (need old))
|
||||||
`!>(`[cache=(unit vase) ~]`[`ref ~])
|
`!>(sta)
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
++ re-export
|
++ re-export
|
||||||
@ -343,9 +364,9 @@
|
|||||||
|= [=pith riff=vase]
|
|= [=pith riff=vase]
|
||||||
^+ run
|
^+ run
|
||||||
=. pith [p/our.bowl pith]
|
=. pith [p/our.bowl pith]
|
||||||
(on-card pith %make %ford-riff `!>(riff) ~)
|
(on-card pith %make %ford-riff `!>([`riff ~]) ~)
|
||||||
--
|
--
|
||||||
|
::
|
||||||
++ sync-room
|
++ sync-room
|
||||||
|= [=stud:neo =name:neo]
|
|= [=stud:neo =name:neo]
|
||||||
^+ run
|
^+ run
|
||||||
@ -361,7 +382,6 @@
|
|||||||
?. ?=([%x *] pax)
|
?. ?=([%x *] pax)
|
||||||
[~ ~]
|
[~ ~]
|
||||||
=/ pax=(pole iota) (pave:neo t.pax)
|
=/ pax=(pole iota) (pave:neo t.pax)
|
||||||
~& pax
|
|
||||||
?+ pax [~ ~]
|
?+ pax [~ ~]
|
||||||
[as=@ car=@ [%p who=@] pith=*] (run-peek [as car who pith]:pax)
|
[as=@ car=@ [%p who=@] pith=*] (run-peek [as car who pith]:pax)
|
||||||
==
|
==
|
||||||
@ -534,12 +554,179 @@
|
|||||||
?> ?=(%poke -.q.card)
|
?> ?=(%poke -.q.card)
|
||||||
!! :: XX: fix(forward-poke name val.q.card)
|
!! :: XX: fix(forward-poke name val.q.card)
|
||||||
(on-card card)
|
(on-card card)
|
||||||
|
++ dove
|
||||||
|
|_ here=pith:neo
|
||||||
|
++ curr
|
||||||
|
?~ rom=(get:of-top here)
|
||||||
|
;summary: Nothing here
|
||||||
|
;div(class "w-1/3")
|
||||||
|
;+ (val u.rom)
|
||||||
|
;dl
|
||||||
|
;* (room-meta here u.rom)
|
||||||
|
;dt: Dependecies
|
||||||
|
;dd
|
||||||
|
;dl
|
||||||
|
;* %- zing
|
||||||
|
%+ turn ~(tap by conf.u.rom)
|
||||||
|
|= [=term dep=pith:neo]
|
||||||
|
:~
|
||||||
|
;dt: {(trip term)}
|
||||||
|
;dd: {(en-tape:pith:neo dep)}
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
++ val
|
||||||
|
|= =room:neo
|
||||||
|
^- manx
|
||||||
|
=+ !<(grow=$-(pail:neo manx) (all-grow %node))
|
||||||
|
?^ man=(mole |.((grow [state.room state.icon.room])))
|
||||||
|
u.man
|
||||||
|
;code
|
||||||
|
{":: unable to render state as manx"}
|
||||||
|
{(text state.icon.room)}
|
||||||
|
==
|
||||||
|
++ style
|
||||||
|
%- trip
|
||||||
|
'''
|
||||||
|
dl {
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 4px 16px;
|
||||||
|
grid-template-columns: max-content;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
dd {
|
||||||
|
margin: 0;
|
||||||
|
grid-column-start: 2;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
::
|
||||||
|
++ lift
|
||||||
|
|= in=manx
|
||||||
|
^- manx
|
||||||
|
;html
|
||||||
|
;head
|
||||||
|
;title: {(en-tape:pith:neo here)}
|
||||||
|
;style: {style}
|
||||||
|
;script@"https://cdn.tailwindcss.com";
|
||||||
|
==
|
||||||
|
;body
|
||||||
|
;+ in
|
||||||
|
==
|
||||||
|
==
|
||||||
|
++ stud-tape
|
||||||
|
|= s=stud:neo
|
||||||
|
^- tape
|
||||||
|
?@ s (trip s)
|
||||||
|
"{(scow %p ship.s)}/{(trip desk.s)}/{(trip mark.s)}"
|
||||||
|
++ pith-a
|
||||||
|
|= [=pith:neo in=manx]
|
||||||
|
=/ tap (en-tape:pith:neo pith)
|
||||||
|
^- manx
|
||||||
|
?. |(=(~ pith) (has:of-top pith))
|
||||||
|
;span
|
||||||
|
;+ in
|
||||||
|
==
|
||||||
|
;a.underline/"/neo/hawk{tap}.html"
|
||||||
|
;+ in
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ room-li
|
||||||
|
|= [=pith:neo =room:neo]
|
||||||
|
^- manx
|
||||||
|
;li
|
||||||
|
;dl
|
||||||
|
;dt: Pith
|
||||||
|
;dd
|
||||||
|
;+ (pith-a (welp here pith) ;/((en-tape:pith:neo pith)))
|
||||||
|
==
|
||||||
|
;* (room-meta pith room)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
++ navbar-item
|
||||||
|
|= [=pith:neo in=manx]
|
||||||
|
^- manx
|
||||||
|
;li.p-2.border
|
||||||
|
;+ (pith-a pith in)
|
||||||
|
==
|
||||||
|
++ home
|
||||||
|
^- manx
|
||||||
|
;li.p-2.border
|
||||||
|
;a.underline/"/neo/hawk": Root
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ navbar
|
||||||
|
;nav.w-full.my-2
|
||||||
|
;ol.flex.align-center.justify-center.w-full.space-x-4
|
||||||
|
;*
|
||||||
|
:- home
|
||||||
|
=< q
|
||||||
|
^- (pair pith:neo (list manx))
|
||||||
|
%+ roll here
|
||||||
|
|= [=iota pit=pith:neo out=(list manx)]
|
||||||
|
^- (pair pith:neo (list manx))
|
||||||
|
=. pit (snoc pit iota)
|
||||||
|
:- pit
|
||||||
|
%+ snoc out
|
||||||
|
%+ navbar-item pit
|
||||||
|
;/(?@(iota "%{(trip iota)}" (scow iota)))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
++ room-meta
|
||||||
|
|= [=pith:neo =room:neo]
|
||||||
|
^- (list manx)
|
||||||
|
:~
|
||||||
|
;dt: Code
|
||||||
|
;dd: {(stud-tape code.room)}
|
||||||
|
;dt: State
|
||||||
|
;dd: {(stud-tape state.room)}
|
||||||
|
==
|
||||||
|
|
||||||
|
--
|
||||||
|
++ is-sys
|
||||||
|
|= =pith:neo
|
||||||
|
^- ?
|
||||||
|
?. ?=([@ *] pith)
|
||||||
|
|
|
||||||
|
|(=('out' i.pith) =('pre' i.pith) =('src' i.pith))
|
||||||
|
++ hawk
|
||||||
|
|= req=inbound-request:eyre
|
||||||
|
^- simple-payload:http
|
||||||
|
=/ line=request-line:serv (parse-request-line:serv url.request.req)
|
||||||
|
?> ?=([@ @ *] site.line)
|
||||||
|
~& site/site.line
|
||||||
|
=/ =pith:neo (pave:neo t.t.site.line)
|
||||||
|
=? pith ?=([%$ ~] pith)
|
||||||
|
~
|
||||||
|
~& pith/pith
|
||||||
|
=/ kids (kid:of-top pith)
|
||||||
|
=* dov ~(. dove pith)
|
||||||
|
%- manx-response:gen:serv
|
||||||
|
^- manx
|
||||||
|
%- lift:dov
|
||||||
|
;main.flex.flex-col.space-y-4
|
||||||
|
;+ navbar:dov
|
||||||
|
;div.flex
|
||||||
|
;* ?:((has:of-top pith) (limo curr:dov ~) *(list manx))
|
||||||
|
;div.flex.flex-col
|
||||||
|
;h3: Children
|
||||||
|
;ol.flex.flex-col
|
||||||
|
;* (turn (skip ~(tap by kids) |=([p=pith:neo *] (is-sys p))) room-li:dov)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
++ srv
|
++ srv
|
||||||
|_ eyre-id=@ta
|
|_ eyre-id=@ta
|
||||||
++ send
|
++ send
|
||||||
|= res=simple-payload:http
|
|= res=simple-payload:http
|
||||||
^+ run
|
^+ run
|
||||||
(emil (give-simple-payload:app:serv eyre-id res))
|
(emil (give-simple-payload:app:serv eyre-id res))
|
||||||
|
|
||||||
::
|
::
|
||||||
++ err
|
++ err
|
||||||
|= =tang
|
|= =tang
|
||||||
@ -549,7 +736,6 @@
|
|||||||
++ response
|
++ response
|
||||||
|= =path
|
|= =path
|
||||||
%- send
|
%- send
|
||||||
~& path
|
|
||||||
=/ res=(unit (unit cage))
|
=/ res=(unit (unit cage))
|
||||||
=/ res (mule |.((peek %x path)))
|
=/ res (mule |.((peek %x path)))
|
||||||
?: ?=(%& -.res)
|
?: ?=(%& -.res)
|
||||||
@ -575,8 +761,11 @@
|
|||||||
:: (login-redirect:app:serv request.req)
|
:: (login-redirect:app:serv request.req)
|
||||||
|
|
||||||
=/ line=request-line:serv (parse-request-line:serv url.request.req)
|
=/ line=request-line:serv (parse-request-line:serv url.request.req)
|
||||||
?> &(?=(^ site.line) =('neo' i.site.line))
|
?> &(?=([@ @ *] site.line) =('neo' i.site.line))
|
||||||
=/ =path t.site.line
|
?. =('scry' i.t.site.line)
|
||||||
|
?> =('hawk' i.t.site.line)
|
||||||
|
(send (hawk req))
|
||||||
|
=/ =path t.t.site.line
|
||||||
?: =(%'POST' method.request.req)
|
?: =(%'POST' method.request.req)
|
||||||
:: ?> authenticated.req
|
:: ?> authenticated.req
|
||||||
(on-post path (need (de:json:html q:(need body.request.req))))
|
(on-post path (need (de:json:html q:(need body.request.req))))
|
||||||
@ -587,7 +776,6 @@
|
|||||||
++ on-post
|
++ on-post
|
||||||
|= [=(pole knot) jon=json]
|
|= [=(pole knot) jon=json]
|
||||||
^+ run
|
^+ run
|
||||||
~& "POSTING"
|
|
||||||
?> ?=([as=@ car=@ ship=@ rest=*] pole)
|
?> ?=([as=@ car=@ ship=@ rest=*] pole)
|
||||||
?. =((slav %p ship.pole) our.bowl)
|
?. =((slav %p ship.pole) our.bowl)
|
||||||
(send invalid-req:gen:serv)
|
(send invalid-req:gen:serv)
|
||||||
@ -790,10 +978,13 @@
|
|||||||
[%sync rest=*]
|
[%sync rest=*]
|
||||||
?+ rest.pole !!
|
?+ rest.pole !!
|
||||||
[%init as=@ car=@ ship=@p path=*]
|
[%init as=@ car=@ ship=@p path=*]
|
||||||
|
?> =(our.bowl (slav %p ship.rest.pole))
|
||||||
=+ ;;(=pulp:neo as.rest.pole)
|
=+ ;;(=pulp:neo as.rest.pole)
|
||||||
=+ ;;(=care:neo car.rest.pole)
|
=+ ;;(=care:neo car.rest.pole)
|
||||||
|
=/ =tone:neo [%peer pulp pole]
|
||||||
=/ =pith:neo (pave path.rest.pole)
|
=/ =pith:neo (pave path.rest.pole)
|
||||||
=/ =cane:neo (make-cane:neo care pith (dip:of-top pith))
|
=. sound (~(put ju sound) [care pith] tone)
|
||||||
|
=/ =cane:neo (make-cane:neo care [p/our.bowl pith] (dip:of-top pith))
|
||||||
(fact ~ (~(cane juice pulp) cane))
|
(fact ~ (~(cane juice pulp) cane))
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
@ -843,7 +1034,6 @@
|
|||||||
++ sync
|
++ sync
|
||||||
|= [=knot =pith]
|
|= [=knot =pith]
|
||||||
=+ ;;(=care:neo knot)
|
=+ ;;(=care:neo knot)
|
||||||
~& sync/[care pith]
|
|
||||||
?+ -.sign ~|(weird-sync-sign/-.sign !!)
|
?+ -.sign ~|(weird-sync-sign/-.sign !!)
|
||||||
%watch-ack
|
%watch-ack
|
||||||
%. run
|
%. run
|
||||||
@ -854,8 +1044,8 @@
|
|||||||
:: TODO: security vuln, confused deputy
|
:: TODO: security vuln, confused deputy
|
||||||
%fact
|
%fact
|
||||||
?+ p.cage.sign !!
|
?+ p.cage.sign !!
|
||||||
%neo-wand (hear-wand care pith !<(wand:neo q.cage.sign))
|
%neo-wand (~(cane hear [care pith]) (wand:harden !<(wand:neo q.cage.sign)))
|
||||||
%neo-twig (hear-twig care pith !<(twig:neo q.cage.sign))
|
%neo-twig (~(stem hear [care pith]) (twig:harden !<(twig:neo q.cage.sign)))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%kick
|
%kick
|
||||||
@ -866,19 +1056,18 @@
|
|||||||
|= [=care:neo =pith:neo =wand:neo]
|
|= [=care:neo =pith:neo =wand:neo]
|
||||||
^+ run
|
^+ run
|
||||||
=/ =cane:neo (wand:harden wand)
|
=/ =cane:neo (wand:harden wand)
|
||||||
~& heard-wand/[care pith]
|
=/ =riot:neo [cane ~]
|
||||||
=. foreign (~(put by foreign) [care pith] cane)
|
=. foreign (~(put by foreign) [care pith] riot)
|
||||||
(resolved:stop care pith)
|
(resolved:stop care pith)
|
||||||
++ hear-twig
|
++ hear-twig
|
||||||
|= [=care:neo =pith:neo =twig:neo]
|
|= [=care:neo =pith:neo =twig:neo]
|
||||||
=/ can=(unit cane:neo) (~(get by foreign) [care pith])
|
=/ rot=(unit riot:neo) (~(get by foreign) [care pith])
|
||||||
?~ can
|
?~ rot
|
||||||
~& heard-twig-no-cane/[care pith]
|
~& heard-twig-no-cane/[care pith]
|
||||||
run
|
run
|
||||||
=/ =stem:neo (twig:harden twig)
|
=/ =stem:neo (twig:harden twig)
|
||||||
=. u.can (beat-cane u.can stem)
|
=. cane.u.rot (beat-cane cane.u.rot stem)
|
||||||
~& heard-twig/[care pith]
|
=. foreign (~(put by foreign) [care pith] u.rot)
|
||||||
=. foreign (~(put by foreign) [care pith] u.can)
|
|
||||||
run
|
run
|
||||||
--
|
--
|
||||||
++ is-our
|
++ is-our
|
||||||
@ -949,6 +1138,7 @@
|
|||||||
=/ =room:neo (got:of-top pax)
|
=/ =room:neo (got:of-top pax)
|
||||||
(~(put by kids.q.stem) sfix [ever.icon.room mode [state state.icon]:room])
|
(~(put by kids.q.stem) sfix [ever.icon.room mode [state state.icon]:room])
|
||||||
$(stems (~(put by stems) tour stem), tours t.tours)
|
$(stems (~(put by stems) tour stem), tours t.tours)
|
||||||
|
::
|
||||||
++ wash
|
++ wash
|
||||||
|_ =dish:neo
|
|_ =dish:neo
|
||||||
++ is-our
|
++ is-our
|
||||||
@ -975,12 +1165,21 @@
|
|||||||
(~(gas in *(set tour:neo)) [%x pith] ~)
|
(~(gas in *(set tour:neo)) [%x pith] ~)
|
||||||
++ check-y
|
++ check-y
|
||||||
^- (set tour:neo)
|
^- (set tour:neo)
|
||||||
?~ par-pith=(parent:of-top pith)
|
%- ~(gas in *(set tour:neo))
|
||||||
~
|
;: welp
|
||||||
=/ parent=room:neo (got:of-top u.par-pith)
|
*(list tour:neo)
|
||||||
?: =(~ (~(get ju sound) [%y u.par-pith]))
|
?~ par-pith=(parent:of-top pith)
|
||||||
~
|
~
|
||||||
(~(gas in *(set tour:neo)) [%y pith] ~)
|
=/ parent=room:neo (got:of-top u.par-pith)
|
||||||
|
?: =(~ (~(get ju sound) [%y u.par-pith]))
|
||||||
|
~
|
||||||
|
[%y u.par-pith]^~
|
||||||
|
::
|
||||||
|
?: =(~ (~(get ju sound) [%y pith]))
|
||||||
|
~
|
||||||
|
[%y pith]^~
|
||||||
|
==
|
||||||
|
|
||||||
++ check-z
|
++ check-z
|
||||||
^- (set tour:neo)
|
^- (set tour:neo)
|
||||||
%+ roll ~(tap in (anc:of-top pith))
|
%+ roll ~(tap in (anc:of-top pith))
|
||||||
@ -990,6 +1189,43 @@
|
|||||||
~
|
~
|
||||||
[%z pax]^~
|
[%z pax]^~
|
||||||
--
|
--
|
||||||
|
++ bash-cane
|
||||||
|
|= [then=cane:neo now=cane:neo]
|
||||||
|
|^ ^- stem:neo
|
||||||
|
?> =(care.then care.now)
|
||||||
|
:- ever.now
|
||||||
|
?- care.now
|
||||||
|
%x [%x pail.now]
|
||||||
|
%y [%y pail.now get-kids]
|
||||||
|
%z [%z pail.now get-kids]
|
||||||
|
==
|
||||||
|
++ get-kids
|
||||||
|
%- ~(gas by *(map pith [ever:neo mode:neo pail:neo]))
|
||||||
|
^- (list [pith:neo ever:neo mode:neo pail:neo])
|
||||||
|
%- zing
|
||||||
|
:~ ^- (list [pith:neo ever:neo mode:neo pail:neo])
|
||||||
|
%+ turn ~(tap by get-add)
|
||||||
|
|= [pa=pith:neo e=ever:neo p=pail:neo]
|
||||||
|
[pa e %add p]
|
||||||
|
::
|
||||||
|
^- (list [pith:neo ever:neo mode:neo pail:neo])
|
||||||
|
%+ turn ~(tap by get-dif)
|
||||||
|
|= [pa=pith:neo e=ever:neo p=pail:neo]
|
||||||
|
[pa e %dif p]
|
||||||
|
::
|
||||||
|
^- (list [pith:neo ever:neo mode:neo pail:neo])
|
||||||
|
%+ turn ~(tap by get-dif)
|
||||||
|
|= [pa=pith:neo e=ever:neo p=pail:neo]
|
||||||
|
[pa e %del p]
|
||||||
|
==
|
||||||
|
++ get-add
|
||||||
|
(~(dif by kids.now) kids.then)
|
||||||
|
++ get-dif
|
||||||
|
(~(int by kids.now) kids.then)
|
||||||
|
++ get-del
|
||||||
|
(~(dif by kids.then) kids.now)
|
||||||
|
--
|
||||||
|
::
|
||||||
++ beat-cane
|
++ beat-cane
|
||||||
|= [=cane:neo =stem:neo]
|
|= [=cane:neo =stem:neo]
|
||||||
^+ cane
|
^+ cane
|
||||||
@ -1299,7 +1535,6 @@
|
|||||||
|= pax=path
|
|= pax=path
|
||||||
=. pax (snip pax)
|
=. pax (snip pax)
|
||||||
?> ?=(^ pax)
|
?> ?=(^ pax)
|
||||||
~& path/t.pax
|
|
||||||
t.pax
|
t.pax
|
||||||
=/ is-imp
|
=/ is-imp
|
||||||
|= pax=path
|
|= pax=path
|
||||||
@ -1502,7 +1737,9 @@
|
|||||||
~
|
~
|
||||||
~ :: XX: revive
|
~ :: XX: revive
|
||||||
`[care.tour ever:hall pail kids]
|
`[care.tour ever:hall pail kids]
|
||||||
(~(get by foreign) tour)
|
?~ rot=(~(get by foreign) tour)
|
||||||
|
~
|
||||||
|
`cane.u.rot
|
||||||
++ acquire
|
++ acquire
|
||||||
|= =(pole iota:neo)
|
|= =(pole iota:neo)
|
||||||
^- (unit pail:neo)
|
^- (unit pail:neo)
|
||||||
@ -1513,7 +1750,7 @@
|
|||||||
`[state.u.val state.icon.u.val]
|
`[state.u.val state.icon.u.val]
|
||||||
?~ val=(~(get by foreign) [%x pole])
|
?~ val=(~(get by foreign) [%x pole])
|
||||||
~
|
~
|
||||||
`pail.u.val
|
`pail.cane.u.val
|
||||||
:: XX: check typing
|
:: XX: check typing
|
||||||
++ can-inject
|
++ can-inject
|
||||||
|= [=pith:neo =quay:neo]
|
|= [=pith:neo =quay:neo]
|
||||||
@ -1577,6 +1814,8 @@
|
|||||||
++ firm-vase
|
++ firm-vase
|
||||||
~| firm/pith
|
~| firm/pith
|
||||||
=/ rom=room:neo (got:of-top pith)
|
=/ rom=room:neo (got:of-top pith)
|
||||||
|
~| vase/(sell state.icon.rom)
|
||||||
|
~| room/rom(state.icon *vase)
|
||||||
=+ !<([cac=(unit vase) *] state.icon.rom)
|
=+ !<([cac=(unit vase) *] state.icon.rom)
|
||||||
(need cac)
|
(need cac)
|
||||||
++ firm
|
++ firm
|
||||||
@ -1602,7 +1841,35 @@
|
|||||||
:: ?: =(~ (~(get ju husks) stud))
|
:: ?: =(~ (~(get ju husks) stud))
|
||||||
:: run
|
:: run
|
||||||
:: watch
|
:: watch
|
||||||
|
::
|
||||||
|
++ hear
|
||||||
|
|_ =tour:neo
|
||||||
|
++ cane
|
||||||
|
|= =cane:neo
|
||||||
|
=/ =riot:neo (~(gut by foreign) tour %*(. *riot:neo care.cane care.cane))
|
||||||
|
=/ =stem:neo (bash-cane cane.riot cane)
|
||||||
|
=. cane.riot cane
|
||||||
|
=. foreign (~(put by foreign) tour riot)
|
||||||
|
(tell stem ~(tap in deps.riot))
|
||||||
|
|
||||||
|
++ tell
|
||||||
|
|= [=stem:neo deps=(list rave:neo)]
|
||||||
|
?~ deps
|
||||||
|
(resolved:stop tour)
|
||||||
|
=/ =rely:neo [term.i.deps stem]
|
||||||
|
=. run (poke-rely-xeno pith.tour pith.i.deps rely)
|
||||||
|
$(deps t.deps)
|
||||||
::
|
::
|
||||||
|
++ stem
|
||||||
|
|= =stem:neo
|
||||||
|
=/ =riot:neo
|
||||||
|
~| hear-stem-no-riot/tour
|
||||||
|
(~(got by foreign) tour)
|
||||||
|
=. cane.riot (beat-cane cane.riot stem)
|
||||||
|
=. foreign (~(put by foreign) tour riot)
|
||||||
|
(tell stem ~(tap in deps.riot))
|
||||||
|
--
|
||||||
|
::
|
||||||
++ xeno
|
++ xeno
|
||||||
|_ =tour:neo
|
|_ =tour:neo
|
||||||
++ ship `@p`?>(?=([%p @] pith.tour) +.i.pith.tour)
|
++ ship `@p`?>(?=([%p @] pith.tour) +.i.pith.tour)
|
||||||
@ -1749,6 +2016,10 @@
|
|||||||
|= [from=pith:neo to=pith:neo =rely:neo]
|
|= [from=pith:neo to=pith:neo =rely:neo]
|
||||||
(poke-move [p/our.bowl from] to %poke %rely !>(rely))
|
(poke-move [p/our.bowl from] to %poke %rely !>(rely))
|
||||||
::
|
::
|
||||||
|
++ poke-rely-xeno
|
||||||
|
|= [from=pith:neo to=pith:neo =rely:neo]
|
||||||
|
(poke-move from to %poke %rely !>(rely))
|
||||||
|
::
|
||||||
++ make-stem
|
++ make-stem
|
||||||
|= [=care:neo =room:neo]
|
|= [=care:neo =room:neo]
|
||||||
^- stem:neo
|
^- stem:neo
|
||||||
@ -1802,6 +2073,8 @@
|
|||||||
|= =tour:neo
|
|= =tour:neo
|
||||||
?> ?=([[%p @] *] pith.tour)
|
?> ?=([[%p @] *] pith.tour)
|
||||||
=/ =path (welp /sync/init/noun/[`@ta`care.tour] (pout pith.tour))
|
=/ =path (welp /sync/init/noun/[`@ta`care.tour] (pout pith.tour))
|
||||||
|
=/ =tone:neo
|
||||||
|
[%peer %noun path]
|
||||||
(emit %pass path %agent [+.i.pith.tour %neo] %watch path)
|
(emit %pass path %agent [+.i.pith.tour %neo] %watch path)
|
||||||
++ drop-tour
|
++ drop-tour
|
||||||
|= =tour:neo
|
|= =tour:neo
|
||||||
@ -1945,15 +2218,21 @@
|
|||||||
^+ arvo
|
^+ arvo
|
||||||
%+ roll ~(tap by conf)
|
%+ roll ~(tap by conf)
|
||||||
|= [[=term dep=pith:neo] a=_arvo]
|
|= [[=term dep=pith:neo] a=_arvo]
|
||||||
|
?> ?=([[%p @] *] dep)
|
||||||
=/ [req=? =quay:neo] (~(got by deps) term)
|
=/ [req=? =quay:neo] (~(got by deps) term)
|
||||||
|
=/ =tour:neo [-.quay dep]
|
||||||
=/ =pith:neo [p/our.bowl here]
|
=/ =pith:neo [p/our.bowl here]
|
||||||
:: XX: revive
|
?: =(our.bowl +.i.dep)
|
||||||
a
|
=/ =tone:neo [%rely term pith]
|
||||||
:: ?- -.quay
|
=. sound (~(put ju sound) [-.quay t.dep] tone)
|
||||||
:: %x a(voice (~(put ju voice) dep pith term))
|
arvo
|
||||||
:: %y a(tones (~(put ju tones) dep pith term))
|
::
|
||||||
:: %z a(noise (~(put ju noise) dep pith term))
|
=/ =riot:neo (~(got by foreign) tour)
|
||||||
:: ==
|
=/ =rave:neo [term pith]
|
||||||
|
=. deps.riot (~(put in deps.riot) rave)
|
||||||
|
=. foreign (~(put by foreign) tour riot)
|
||||||
|
arvo
|
||||||
|
:: XX: enforce conformance
|
||||||
::
|
::
|
||||||
++ make
|
++ make
|
||||||
|= [src=stud:neo init=(unit vase) =conf:neo]
|
|= [src=stud:neo init=(unit vase) =conf:neo]
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
^- (quip card vase)
|
^- (quip card vase)
|
||||||
?> =(%rely stud)
|
?> =(%rely stud)
|
||||||
=+ !<([=term =stem:neo] vax)
|
=+ !<([=term =stem:neo] vax)
|
||||||
|
~& chat-link/[were.bowl stem]
|
||||||
=/ sta sta
|
=/ sta sta
|
||||||
=. chat.sta (get-chat bowl)
|
=. chat.sta (get-chat bowl)
|
||||||
?> ?=(%y -.q.stem)
|
?> ?=(%y -.q.stem)
|
||||||
@ -71,6 +72,12 @@
|
|||||||
?~ old *chat-link
|
?~ old *chat-link
|
||||||
!<(chat-link u.old)
|
!<(chat-link u.old)
|
||||||
=. chat.sta (get-chat bowl)
|
=. chat.sta (get-chat bowl)
|
||||||
`!>(sta)
|
=/ =cane:neo q:(~(got by deps.bowl) %src)
|
||||||
|
:_ !>(sta)
|
||||||
|
~& init/kids.cane
|
||||||
|
%+ murn ~(tap by kids.cane)
|
||||||
|
|= [=pith [=ever:neo =pail:neo]]
|
||||||
|
^- (unit card)
|
||||||
|
~
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
35
pkg/arvo/neo/src/std/imp/message-link.hoon
Normal file
35
pkg/arvo/neo/src/std/imp/message-link.hoon
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/@ message
|
||||||
|
/@ chat
|
||||||
|
/@ chat-link
|
||||||
|
/@ sig
|
||||||
|
=>
|
||||||
|
|%
|
||||||
|
++ card card:neo
|
||||||
|
++ get-msg
|
||||||
|
|= =bowl:neo
|
||||||
|
^- vase
|
||||||
|
q.pail.q:(~(got by deps.bowl) %src)
|
||||||
|
::
|
||||||
|
--
|
||||||
|
^- firm:neo
|
||||||
|
|%
|
||||||
|
++ state %message
|
||||||
|
++ poke (sy %rely ~)
|
||||||
|
++ kids *kids:neo
|
||||||
|
++ deps
|
||||||
|
%- ~(gas by *deps:neo)
|
||||||
|
:~ src/[req=& %x [%message %sig]]
|
||||||
|
==
|
||||||
|
++ form
|
||||||
|
^- form:neo
|
||||||
|
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||||
|
++ poke
|
||||||
|
|= [=stud:neo vax=vase]
|
||||||
|
^- (quip card vase)
|
||||||
|
?> =(%rely stud)
|
||||||
|
`(get-msg bowl)
|
||||||
|
++ init
|
||||||
|
|= old=(unit vase)
|
||||||
|
`(get-msg bowl)
|
||||||
|
--
|
||||||
|
--
|
@ -213,9 +213,19 @@
|
|||||||
$% [%peer =peer]
|
$% [%peer =peer]
|
||||||
[%rely =term =pith]
|
[%rely =term =pith]
|
||||||
==
|
==
|
||||||
:: $sound: change tracking listeners
|
:: $sound: internal change tracking listeners
|
||||||
+$ sound
|
+$ sound
|
||||||
(jug tour tone)
|
(jug tour tone)
|
||||||
|
:: $noise: external change tracking listeners
|
||||||
|
+$ noise
|
||||||
|
(jug tour rely)
|
||||||
|
:: $rave: foreign dependency
|
||||||
|
+$ rave
|
||||||
|
[=term =pith]
|
||||||
|
:: $riot: foreign mirror
|
||||||
|
+$ riot
|
||||||
|
[=cane deps=(set rave)]
|
||||||
|
::
|
||||||
:: $ring: node change tracking
|
:: $ring: node change tracking
|
||||||
::
|
::
|
||||||
+$ ring
|
+$ ring
|
||||||
@ -408,6 +418,15 @@
|
|||||||
++ en-tape
|
++ en-tape
|
||||||
|= pit=$
|
|= pit=$
|
||||||
(spud (pout pit))
|
(spud (pout pit))
|
||||||
|
++ sub
|
||||||
|
|= [from=$ del=$]
|
||||||
|
~| pith-sub/[from del]
|
||||||
|
!.
|
||||||
|
|- ^+ from
|
||||||
|
?~ del from
|
||||||
|
?> ?=(^ from)
|
||||||
|
?> =(i.del i.from)
|
||||||
|
$(del t.del, from t.from)
|
||||||
++ en-cord
|
++ en-cord
|
||||||
|= pit=$
|
|= pit=$
|
||||||
(spat (pout pit))
|
(spat (pout pit))
|
||||||
@ -740,9 +759,11 @@
|
|||||||
%x ~
|
%x ~
|
||||||
%y
|
%y
|
||||||
=. ax ~(snip of ax)
|
=. ax ~(snip of ax)
|
||||||
|
=. fil.ax ~
|
||||||
(~(run by ~(tar of ax)) |=(r=room [ever.icon.r (to-pail:room r)]))
|
(~(run by ~(tar of ax)) |=(r=room [ever.icon.r (to-pail:room r)]))
|
||||||
::
|
::
|
||||||
%z
|
%z
|
||||||
|
=. fil.ax ~
|
||||||
(~(run by ~(tar of ax)) |=(r=room [ever.icon.r (to-pail:room r)]))
|
(~(run by ~(tar of ax)) |=(r=room [ever.icon.r (to-pail:room r)]))
|
||||||
==
|
==
|
||||||
++ dejs
|
++ dejs
|
||||||
|
Loading…
Reference in New Issue
Block a user