2013-10-16 06:24:12 +04:00
|
|
|
!:
|
2014-05-31 02:41:22 +04:00
|
|
|
:: /=main=/bin/chat/hoon
|
2013-10-16 06:24:12 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
=> %= .
|
|
|
|
+
|
|
|
|
=> +
|
|
|
|
=> ^/===/lib/pony
|
2014-06-10 05:45:19 +04:00
|
|
|
=+ ^= flag
|
2014-07-03 02:08:02 +04:00
|
|
|
$? [%haus p=@p]
|
|
|
|
[%s p=path]
|
2014-06-10 05:45:19 +04:00
|
|
|
==
|
2014-05-31 02:41:22 +04:00
|
|
|
=+ flags=*(list flag)
|
2013-11-26 23:28:15 +04:00
|
|
|
=> |%
|
2014-07-03 02:08:02 +04:00
|
|
|
++ chat :: user action
|
|
|
|
$% [%all p=mess] :: say
|
|
|
|
[%back p=@da] :: backlog
|
|
|
|
[%how ~] :: help
|
|
|
|
[%who ~] :: who
|
|
|
|
== ::
|
|
|
|
++ mess :: message
|
|
|
|
$% [%do p=@t] :: act
|
|
|
|
[%exp p=@t q=tank] :: code
|
|
|
|
[%say p=@t] :: say
|
|
|
|
== ::
|
|
|
|
++ station path ::
|
|
|
|
++ zing :: client to server
|
|
|
|
$% [%backlog p=path q=@da] ::
|
|
|
|
[%hola p=station] ::
|
|
|
|
[%mess p=station q=mess] ::
|
|
|
|
== ::
|
|
|
|
++ zong :: server to client
|
|
|
|
$% [%mess p=@da q=ship r=mess] ::
|
|
|
|
== ::
|
|
|
|
--
|
|
|
|
=> |%
|
2013-11-26 23:28:15 +04:00
|
|
|
++ chat
|
2014-07-03 02:08:02 +04:00
|
|
|
|= now=@da
|
2013-11-26 23:28:15 +04:00
|
|
|
%+ cook |=(a=^chat a)
|
|
|
|
;~ pose
|
|
|
|
(cold [%how ~] wut)
|
2014-07-03 02:08:02 +04:00
|
|
|
(cold [%who ~] tis)
|
|
|
|
(stag %back (dat now))
|
|
|
|
(stag %all mess)
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
::
|
2014-07-03 02:08:02 +04:00
|
|
|
++ dat
|
|
|
|
|= now=@da
|
|
|
|
%+ cook
|
|
|
|
|= [p=@tas q=@]
|
|
|
|
?+ p `@da`0
|
|
|
|
%da `@da`q
|
|
|
|
%dr `@da`(sub now q)
|
|
|
|
==
|
|
|
|
;~(pfix (jest '\\\\ ~') crub:so)
|
2014-05-31 02:41:22 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
++ expn
|
|
|
|
%- sear
|
|
|
|
:_ text
|
|
|
|
|= a=@t
|
|
|
|
^- (unit ,[p=@t q=tank])
|
|
|
|
=+ hun=(rush a wide:vast)
|
2013-12-26 21:12:07 +04:00
|
|
|
?~ hun ~
|
2013-11-26 23:28:15 +04:00
|
|
|
?~(a ~ [~ a (sell (slap seed u.hun))])
|
|
|
|
::
|
|
|
|
++ mess
|
|
|
|
%+ cook |=(a=^mess a)
|
|
|
|
;~ pose
|
|
|
|
(stag %do ;~(pfix pat text))
|
2014-07-03 02:08:02 +04:00
|
|
|
(stag %exp ;~(pfix hax expn))
|
2014-05-14 20:36:26 +04:00
|
|
|
(stag %do (full (easy '')))
|
2014-07-03 02:08:02 +04:00
|
|
|
(stag %say text)
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
|
|
|
++ text (boss 256 (star prn))
|
2013-11-26 23:28:15 +04:00
|
|
|
--
|
|
|
|
|%
|
|
|
|
++ rend
|
2014-07-03 02:08:02 +04:00
|
|
|
|= [from=@p msg=^mess] :: roo=^room
|
2013-11-26 23:28:15 +04:00
|
|
|
^- tank
|
2014-07-03 02:08:02 +04:00
|
|
|
?- -.msg
|
|
|
|
%do =+ mes=?:(=(0 p.msg) "remains quietly present" (trip p.msg))
|
|
|
|
:- %leaf
|
|
|
|
"{<from>} {mes}"
|
|
|
|
%exp :~ %rose
|
|
|
|
[" " "" ""]
|
|
|
|
:- %leaf
|
|
|
|
"{<from>} {(trip p.msg)}"
|
|
|
|
q.msg
|
|
|
|
==
|
|
|
|
%say [%leaf "{<from>}: {(trip p.msg)}"]
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
--
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
=> %= .
|
|
|
|
-
|
2014-07-03 02:08:02 +04:00
|
|
|
:- :* ami=*(set ship)
|
|
|
|
bud=(sein `@p`-<) :: chat server
|
2013-11-26 23:28:15 +04:00
|
|
|
dun=| :: done
|
2014-07-03 02:08:02 +04:00
|
|
|
giz=*(list gift) :: stuff to send
|
|
|
|
sta=*station :: station
|
2014-07-03 05:53:53 +04:00
|
|
|
sub=*(list path) :: subscriptions
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
[who=`@p`-< how=`path`->]
|
|
|
|
==
|
2013-10-16 06:24:12 +04:00
|
|
|
|= [est=time *]
|
2014-05-31 02:41:22 +04:00
|
|
|
|= args=(list flag)
|
2014-07-03 02:08:02 +04:00
|
|
|
=. flags args
|
2014-06-10 05:45:19 +04:00
|
|
|
=. bud
|
2014-07-03 02:08:02 +04:00
|
|
|
?: (lien args |=(a=flag ?=(%haus -.a)))
|
|
|
|
(roll args |=([p=flag q=@p] ?:(?=(%haus -.p) p.p q)))
|
2014-05-31 02:41:22 +04:00
|
|
|
bud
|
2014-07-03 02:08:02 +04:00
|
|
|
=. sta
|
|
|
|
?: (lien args |=(a=flag ?=(%s -.a)))
|
|
|
|
(roll args |=([p=flag q=station] ?:(?=(%s -.p) p.p q)))
|
|
|
|
sta
|
2013-11-26 23:28:15 +04:00
|
|
|
|- ^- bowl
|
|
|
|
=< abet:init
|
|
|
|
|%
|
|
|
|
++ abet `bowl`[(flop giz) ?:(dun ~ [~ hope vent(giz ~)])]
|
2014-07-03 02:08:02 +04:00
|
|
|
++ hope
|
2014-07-03 05:53:53 +04:00
|
|
|
:_ (turn sub |=(pax=path [[%gr pax] [%gr ~]]))
|
|
|
|
[/up [%up %text ["& " ""]]]
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
2014-07-03 05:53:53 +04:00
|
|
|
++ init (subs:(subs:(joke %hola sta) (welp sta /mensajes)) (welp sta /amigos))
|
2013-11-26 23:28:15 +04:00
|
|
|
++ joke :: send message
|
2014-07-03 02:08:02 +04:00
|
|
|
|= msg=zing
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-07-03 02:08:02 +04:00
|
|
|
+>(giz :_(giz [%xz [bud %radio] who %zing msg]))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
2014-07-03 02:08:02 +04:00
|
|
|
++ join
|
|
|
|
|= you=ship
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-07-03 02:08:02 +04:00
|
|
|
%+ show(ami (~(put in ami) you))
|
|
|
|
%leaf
|
|
|
|
"{(scow %p you)} comes on the air"
|
|
|
|
++ joyn
|
|
|
|
|= yall=(list ship)
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-07-03 02:08:02 +04:00
|
|
|
%- shew(ami (~(gas in ami) yall))
|
|
|
|
(turn yall |=(you=ship [%leaf "{(scow %p you)} comes on the air"]))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ said :: server message
|
2014-07-03 02:08:02 +04:00
|
|
|
|= duz=(list zong)
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
|
|
|
?~ duz +>
|
|
|
|
%= $
|
|
|
|
duz t.duz
|
|
|
|
+>
|
2014-06-10 05:45:19 +04:00
|
|
|
=. giz
|
2014-07-03 02:08:02 +04:00
|
|
|
?. ?& :: ?=(%mess -.i.duz)
|
2014-06-10 05:45:19 +04:00
|
|
|
=+ ^= r
|
|
|
|
%+ rexp (scow %p who)
|
2014-07-03 02:08:02 +04:00
|
|
|
(trip =>(r.i.duz ?@(+ p p)))
|
2014-06-10 05:45:19 +04:00
|
|
|
&(!=(~ r) !=([~ ~] r) !=([~ ~ ~] r))
|
|
|
|
==
|
2014-07-03 02:08:02 +04:00
|
|
|
giz
|
2014-06-10 05:45:19 +04:00
|
|
|
[[%xy /d [%blit [%bel ~]~]] giz]
|
2014-07-03 02:08:02 +04:00
|
|
|
%- show
|
|
|
|
^- tank
|
2014-05-22 23:28:57 +04:00
|
|
|
?- -.i.duz
|
2014-07-03 02:08:02 +04:00
|
|
|
%mess (rend q.i.duz r.i.duz)
|
|
|
|
== ==
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ shew |=(tax=(list tank) +>(giz [[%lo tax] giz])) :: print to screen
|
2013-12-09 01:23:03 +04:00
|
|
|
++ show |=(tan=tank +>(giz [[%la tan] giz])) :: print to screen
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
|
|
|
++ subs
|
|
|
|
|= pax=path
|
|
|
|
^+ +>
|
2014-07-03 05:53:53 +04:00
|
|
|
+>(sub [pax sub], giz :_(giz [%zz /g [%gr pax] %show [bud %radio] who pax]))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ toke :: user action
|
2014-07-03 02:08:02 +04:00
|
|
|
|= [now=@da txt=@t]
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-05-31 02:41:22 +04:00
|
|
|
?: =(0 txt) +>
|
2014-07-03 02:08:02 +04:00
|
|
|
=+ rey=(rush txt (chat now))
|
2013-12-09 01:23:03 +04:00
|
|
|
?~ rey
|
2013-11-26 23:28:15 +04:00
|
|
|
(show %leaf "invalid input")
|
2013-12-09 01:23:03 +04:00
|
|
|
?- -.u.rey
|
2014-07-03 02:08:02 +04:00
|
|
|
%all (joke %mess sta p.u.rey)
|
|
|
|
%back (joke %backlog sta p.u.rey)
|
|
|
|
%how (shew (turn (lore ^:@/===doc%/help/txt) |=(a=@t [%leaf (trip a)])))
|
|
|
|
%who (show %rose [", " "" ""] (turn (~(tap in ami)) |=(p=ship >p<)))
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ vent :: handle event
|
|
|
|
|= [now=@da pax=path nut=note]
|
|
|
|
^- bowl
|
|
|
|
=. est now
|
|
|
|
=< abet
|
2014-07-03 02:08:02 +04:00
|
|
|
?+ -.pax ~& [%chat-vent-unknown -.nut] +>.$
|
|
|
|
%gr ?> ?=(%gr -.nut)
|
|
|
|
?+ p.nut ~& %vent-rush-logo-fail +>.$
|
|
|
|
%user (join ((hard ship) q.nut))
|
|
|
|
%users (joyn ((hard (list ship)) q.nut))
|
|
|
|
%zong (said [((hard zong) q.nut) ~])
|
2014-07-03 05:53:53 +04:00
|
|
|
%zongs (said ((hard (list zong)) q.nut))
|
2014-07-03 02:08:02 +04:00
|
|
|
==
|
|
|
|
%up ?>(?=(%up -.nut) (toke now p.nut))
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
--
|