shrub/pkg/arvo/lib/message.hoon

52 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-01-19 02:07:28 +03:00
/- neo
:: sender ship namesapce (~bus)
:: /messages/1
:: host ship namespace
:: /chat/foo
:: /chat/foo/messages/1 :: symlink to /+bus/messages/1
::
:: /~zod/chat/foo/messages/1 <- []
:: /~zod/chat/foo/messages/1 <-
:: /~zod/chat/foo/messages/1 <-
::
:: /~bus/subs/foo -> /~zod/chat/foo
::
:: [/~bus/subs/foo/messages/1 %make ]
:: possibly optimisticaly update, then forward note to foreign ship
::
:: %make
:: ^- firm:neo
2024-01-19 02:07:28 +03:00
|%
2024-01-19 23:52:55 +03:00
+$ state [from=ship now=time message=@t]
+$ poke ~
++ kids *kids:neo
++ deps *deps:neo
++ form
^- form:neo
2024-02-19 23:56:04 +03:00
|_ [=bowl:neo case=@ud vase-state=vase *]
+* sta !<(state vase-state)
2024-01-19 23:52:55 +03:00
++ call
|= [old-state=* act=*]
:: =+ ;;(=action act)
:: ~& call/act
*(list card:neo)
2024-01-19 23:52:55 +03:00
++ reduce
|= act=*
2024-02-19 23:56:04 +03:00
^- vase
!>(sta)
2024-01-19 23:52:55 +03:00
++ init
2024-02-19 23:56:04 +03:00
|= vas=(unit vase)
?> ?=(^ vas)
=+ !<(=state u.vas)
!>(state)
2024-01-19 23:52:55 +03:00
++ echo
|= [=pith val=*]
*(list card:neo)
++ born
*(list card:neo)
++ take
|= =sign:neo
*(list card:neo)
--
--