From 328ebe85135912678bdacd3381126ffd66ef2761 Mon Sep 17 00:00:00 2001 From: polwex Date: Fri, 27 Jun 2025 22:53:52 +0700 Subject: init --- desk/sur/tlon-chat.hoon | 1268 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1268 insertions(+) create mode 100644 desk/sur/tlon-chat.hoon (limited to 'desk/sur/tlon-chat.hoon') diff --git a/desk/sur/tlon-chat.hoon b/desk/sur/tlon-chat.hoon new file mode 100644 index 0000000..dd82833 --- /dev/null +++ b/desk/sur/tlon-chat.hoon @@ -0,0 +1,1268 @@ +|% +++ meta +|% ++$ data + $: title=cord + description=cord + image=cord + cover=cord + == ++$ diff + $% [%title =cord] + [%description =cord] + [%image =cord] + [%cover =cord] + == +-- +++ d +|% +:: $flag: identifier for a diary channel ++$ flag (pair ship term) +:: $feel: either an emoji identifier like :diff or a URL for custom ++$ feel @ta +:: $view: the persisted display format for a diary ++$ view ?(%grid %list) +:: $sort: the persisted sort type for a diary ++$ sort ?(%alpha %time) +:: $shelf: my ship's diaries ++$ shelf (map flag diary) +:: $said: used for references ++$ said (pair flag outline) +:: $plan: index into diary state +:: p: Note being referred to +:: q: Quip being referred to, if any +:: ++$ plan + (pair time (unit time)) +:: +:: $diary: written longform communication +:: +:: net: an indicator of whether I'm a host or subscriber +:: log: the history of all modifications +:: perm: holds the diary's permissions +:: view: what format to display +:: sort: how to order posts +:: notes: the actual contents of the diary +:: remark: what is the last thing we've read +:: banter: comments organized by post +:: ++$ diary + $: =net + =log + =perm + =view + =sort + =notes + =remark + == +:: +:: $notes: a set of time ordered diary posts +:: +++ notes + =< rock + |% + +$ rock + ((mop time note) lte) + ++ on + ((^on time note) lte) + +$ diff + (pair time delta) + +$ delta + $% [%add p=essay] + [%edit p=essay] + [%del ~] + [%quips p=diff:quips] + [%add-feel p=ship q=feel] + [%del-feel p=ship] + == + -- +:: +:: $quips: a set of time ordered note comments +:: +++ quips + =< rock + |% + +$ rock + ((mop time quip) lte) + ++ on + ((^on time quip) lte) + +$ diff + (pair time delta) + +$ delta + $% [%add p=memo] + [%del ~] + [%add-feel p=ship q=feel] + [%del-feel p=ship] + == + -- +:: +:: $outline: abridged $note +:: .quips: number of comments +:: ++$ outline + [quips=@ud quippers=(set ship) essay] +:: +++ outlines + =< outlines + |% + +$ outlines ((mop time outline) lte) + ++ on ((^on time outline) lte) + -- +:: +:: $note: a diary post +:: ++$ note [seal essay] +:: $quip: a post comment +:: ++$ quip [cork memo] +:: +:: $seal: host-side data for a note +:: ++$ seal + $: =time + =quips + feels=(map ship feel) + == +:: +:: $cork: host-side data for a quip +:: ++$ cork + $: =time + feels=(map ship feel) + == +:: $essay: the post data itself +:: +:: title: the name of the post +:: image: a visual displayed as a header +:: content: the body of the post +:: author: the ship that wrote the post +:: sent: the client-side time the post was made +:: ++$ essay + $: title=@t + image=@t + content=(list verse) + author=ship + sent=time + == ++$ story (pair (list block) (list inline)) +:: $memo: the comment data itself +:: +:: content: the body of the comment +:: author: the ship that wrote the comment +:: sent: the client-side time the comment was made +:: ++$ memo + $: content=story + author=ship + sent=time + == +:: $verse: a chunk of post content +:: +:: blocks stand on their own. inlines come in groups and get wrapped +:: into a paragraph +:: ++$ verse + $% [%block p=block] + [%inline p=(list inline)] + == +:: $listing: recursive type for infinitely nested