From ff89d5b3dbe1c0e11902b15201f380920ade8449 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 15 Oct 2013 19:24:12 -0700 Subject: [PATCH] New chat program. --- main/bin/chat.hoon | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 main/bin/chat.hoon diff --git a/main/bin/chat.hoon b/main/bin/chat.hoon new file mode 100644 index 0000000000..790b18a939 --- /dev/null +++ b/main/bin/chat.hoon @@ -0,0 +1,41 @@ +!: +:: /=main=/bin/chat/hoon +:: +=> .(-< `who=@p`-<) +=> .(+ =>(+ ^/===/lib/pony)) +|= [est=time *] +|= ~ +=+ bud=(sein who) +^- bowl +:- ~ :- ~ +:- ^- (list slip) + :~ [/hi [%lq %hi]] + [/yu [%lq %yu]] + [/up [%up %text ": " ""]] + [/re [%ow ~]] + == +|= [now=@da pax=path nut=note] +^- bowl +%- pogo +:_ ^$ +^- bowl +?+ pax !! + /re + ?> ?=(%ow -.nut) + [~ ~] +:: + /up + ?> ?=(%up -.nut) + :_(~ :_(~ [%sq bud %ye /re p.nut])) +:: + /hi + ?> ?=(%lq -.nut) + =+ msg=?:(=(0 r.nut) "remains quietly present" (trip ((hard ,@) r.nut))) + :_(~ `(list gift)`:_(~ [%la %leaf "< {(trip (numb p.nut now))}: {msg}"])) +:: + /yu + ?> ?=(%lq -.nut) + =+ dof=((hard ,[p=@p q=@t]) r.nut) + =+ msg=?:(=(0 q.dof) "remains quietly present" (trip q.dof)) + :_(~ :_(~ [%la %leaf "> {(trip (numb p.dof now))}: {msg}"])) +==