Merge branch 'remove-hall'

* remove-hall:
  apps: remove %hall and %talk

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-11-01 18:11:30 +08:00
commit f30e1d9993
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
17 changed files with 0 additions and 7597 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
:: Load legacy messages from backup
::
:::: /gen/hall/load-old/hoon
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ byk/beak}
{{man/knot ~} ~}
==
[%load-legacy man]

View File

@ -1,13 +0,0 @@
:: Load channel messages from backup
::
:::: /hoon/load/hall/gen
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ byk/beak}
{{man/knot ~} ~}
==
[%hall-load man]

View File

@ -1,13 +0,0 @@
:: Enable channel logging to clay
::
:::: /hoon/log/hall/gen
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ byk/beak}
{{man/knot ~} ~}
==
[%hall-log man]

View File

@ -1,13 +0,0 @@
:: Save channel messages to backup
::
:::: /hoon/save/hall/gen
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ byk/beak}
{{man/knot ~} ~}
==
[%hall-save man]

View File

@ -1,13 +0,0 @@
:: Disable channel logging to clay
::
:::: /hoon/unlog/hall/gen
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ byk/beak}
{{man/knot ~} ~}
==
[%hall-unlog man]

View File

@ -1,157 +0,0 @@
/- *chat, hall
/+ hall-json
|%
++ msg-to-json
=, enjs:format
|= upd=update
^- json
?> ?=(%messages -.upd)
%+ frond %update
%- pairs
:~
:- %messages
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
[%start (numb start.upd)]
[%end (numb end.upd)]
[%envelopes [%a (turn env.upd enve:enjs:hall-json)]]
==
==
::
++ config-to-json
|= str=streams
=, enjs:format
^- json
%+ frond %chat
%- pairs
:~
::
[%inbox (conf:enjs:hall-json inbox.str)]
::
:- %configs
%- pairs
%+ turn ~(tap by configs.str)
|= [cir=circle:hall con=(unit config:hall)]
^- [@t json]
:- (crip (circ:en-tape:hall-json cir))
?~(con ~ (conf:enjs:hall-json u.con))
::
:- %circles :- %a
%+ turn ~(tap in circles.str)
|= nom=name:hall
[%s nom]
::
:- %peers
%- pairs
%+ turn ~(tap by peers.str)
|= [cir=circle:hall per=(set @p)]
^- [@t json]
:- (crip (circ:en-tape:hall-json cir))
[%a (turn ~(tap in per) ship)]
::
==
::
++ numbers-to-json
|= num=(list [circle:hall @ud])
^- json
=, enjs:format
%+ frond %chat
%- pairs
:~
::
:: %config
:- %numbers
:- %a
%+ turn num
|= [cir=circle:hall len=@ud]
^- json
%- pairs
:~
[%circle (circ:enjs:hall-json cir)]
[%length (numb len)]
==
==
::
++ update-to-json
|= upd=update
^- json
=, enjs:format
%+ frond %update
%- pairs
:~
::
:: %inbox
?: =(%inbox -.upd)
?> ?=(%inbox -.upd)
[%inbox (conf:enjs:hall-json con.upd)]
::
:: %message
?: =(%message -.upd)
?> ?=(%message -.upd)
:- %message
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
[%envelope (enve:enjs:hall-json env.upd)]
==
::
:: %messages
?: =(%messages -.upd)
?> ?=(%messages -.upd)
:- %messages
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
[%start (numb start.upd)]
[%end (numb end.upd)]
[%envelopes [%a (turn env.upd enve:enjs:hall-json)]]
==
::
:: %config
?: =(%config -.upd)
?> ?=(%config -.upd)
:- %config
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
[%config (conf:enjs:hall-json con.upd)]
==
::
:: %circles
?: =(%circles -.upd)
?> ?=(%circles -.upd)
:- %circles
%- pairs
:~
:- %circles
:- %a
%+ turn ~(tap in cir.upd)
|= nom=name:hall
[%s nom]
==
::
:: %peers
?: =(%peers -.upd)
?> ?=(%peers -.upd)
:- %peers
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
[%peers [%a (turn ~(tap in per.upd) ship:enjs:format)]]
==
::
:: %delete
?: =(%delete -.upd)
?> ?=(%delete -.upd)
:- %delete
%- pairs
:~
[%circle (circ:enjs:hall-json cir.upd)]
==
::
:: %noop
[*@t *^json]
==
::
--

View File

@ -1,610 +0,0 @@
::
:::: /lib/hall-json/hoon
::
/- hall
=, hall
::
|_ bol/bowl:gall
++ en-tape ::: sur to tape
|%
++ circ ::: circle
|= a/circle
:(weld (scow %p hos.a) "/" (trip nom.a))
::
++ rang ::: range
|= a/range
?~ a ~
;: weld
"/" (scow hed.u.a)
?~ tal.u.a ~
(scow u.tal.u.a)
==
::
++ sorc ::: source
|= a/source
(weld (circ cir.a) (rang ran.a))
--
::
++ de-tape ::: tape to sur (parse)
|%
++ circ ::: circle
;~((glue net) ;~(pfix sig fed:ag) urs:ab)
::
++ pont
;~ pfix net
%+ sear
|= a/coin
^- (unit place)
?+ a ~
[%$ %da @da] `p.a
[%$ %ud @ud] `p.a
==
nuck:so
==
::
++ sorc
;~(plug circ (punt ;~(plug pont (punt pont))))
--
::
++ enjs ::: sur to json
=, enjs:format
|%
::TODO these first few should probably make their way
:: into the stdlib...
++ sa ::: set as array
|* {a/(set) b/$-(* json)}
^- json
[%a (turn ~(tap in a) b)]
::
++ mo ::: map as object
|* {a/(map) b/$-(* @t) c/$-(* json)}
^- json
=- (pairs (turn ~(tap by a) -))
|* {k/* v/*} [(b k) (c v)]
::
++ dank ::: tank
|= a=^tank
?: ?=($leaf -.a) (frond %leaf (tape p.a))
:: TODO: No idea what a plum is, but it was recently added
::
?: ?=($plum -.a) (frond %plum [%o ~])
%+ frond -.a
%- pairs
?- -.a
$palm
:+ :- %style
%- pairs :~
mid+(tape p.p.a)
cap+(tape q.p.a)
open+(tape r.p.a)
close+(tape s.p.a)
==
lines+a+(turn q.a dank)
~
$rose
:+ :- %style
%- pairs :~
mid+(tape p.p.a)
open+(tape q.p.a)
close+(tape r.p.a)
==
lines+a+(turn q.a dank)
~
==
::
++ cord ::: string from cord
|= a/@t
s+a
::
++ mabe ::: null or value
|* {a/(unit) b/$-(* json)}
^- json
?~(a ~ (b u.a))
::
::: ||
::: || %query-models
::: ||
::: models relating to queries, their results and updates.
::+|
::
++ pici ::: prize-client
|= a/prize-client
^- json
%- pairs :~
:- %gys
=- (pairs ~(tap by (~(run by gys.a) -)))
|=((set (set circle)) (sa +< audi))
::
nis+(mo nis.a (cury scot %p) cord)
==
::
++ ruci ::: rumor-client
|= a/rumor-client
^- json
%+ frond -.a
?- -.a
$glyph (digy +.a)
$nick (dini +.a)
==
::
++ pack ::: package
|= a/package
^- json
%- pairs :~
nes+a+(turn nes.a enve) ::TODO maybe map
cos+(loby cos.a)
pes+(crow pes.a)
==
::
++ digy ::: diff-glyph
|= a/diff-glyph
^- json
%- pairs :~
bin+b+bin.a
gyf+s+gyf.a
aud+(audi aud.a)
==
::
++ dini ::: diff-nick
|= a/diff-nick
^- json
(pairs who+(ship who.a) nic+s+nic.a ~)
::
++ ruso ::: rumor-story
|= a/rumor-story
^- json
%+ frond -.a
?+ -.a !!
$new (conf cof.a)
:: $bear not needed
$config (pairs cir+(circ cir.a) dif+(dico dif.a) ~)
$status %- pairs :~
cir+(circ cir.a)
who+(ship who.a)
dif+(disa dif.a)
==
$remove b+&
$gram (enve nev.a)
==
::
++ dico ::: diff-config
|= a/diff-config
^- json
%+ frond -.a
?- -.a
$full (conf cof.a)
$source (pairs add+b+add.a src+(sorc src.a) ~)
$caption s+cap.a
$usage (pairs add+b+add.a tas+(sa tas.a cord) ~)
$filter (filt fit.a)
$secure s+sec.a
$permit (pairs add+b+add.a sis+(sa sis.a ship) ~)
$remove b+&
$read (numb red.a)
==
::
++ disa ::: diff-status
|= a/diff-status
^- json
%+ frond -.a
?- -.a
$full (stat sat.a)
$presence s+pec.a
$human (dihu dif.a)
$remove b+&
==
::
++ dihu ::: diff-human
|= a/diff-human
^- json
%+ frond -.a
?- -.a
$full (huma man.a)
$handle (frond %han (mabe han.a cord))
$true (frond %tru (mabe tru.a trun))
==
::
::: ||
::: || %circles
::: ||
::: messaging targets and their metadata
::+|
::
++ circ ::: circle
|= a/circle
^- json
s+(crip (circ:en-tape a))
::
++ loby ::: lobby
|= a/lobby
%- pairs :~
loc+(conf loc.a)
rem+(mo rem.a (cork circ:en-tape crip) conf)
==
::
++ conf ::: config
|= a/config
^- json
%- pairs :~
src+(sa src.a sorc)
cap+s+cap.a
tag+(sa tag.a cord)
fit+(filt fit.a)
con+(cont con.a)
red+(numb red.a)
==
::
++ sorc ::: source
|= a/source
^- json
s+(crip (sorc:en-tape a))
::
++ filt ::: filter
|= a/filter
^- json
(pairs cas+b+cas.a utf+b+utf.a ~)
::
++ cont ::: control
|= a/control
^- json
(pairs sec+s+sec.a sis+(sa sis.a ship) ~)
::
++ crow ::: crowd
|= a/crowd
^- json
%- pairs :~
loc+(grop loc.a)
rem+(mo rem.a (cork circ:en-tape crip) grop)
==
::
++ grop ::: group
|= a/group
^- json
(mo a (cury scot %p) stat)
::
++ stat ::: status
|= a/status
^- json
(pairs pec+s+pec.a man+(huma man.a) ~)
::
++ huma ::: human
|= a/human
^- json
(pairs han+(mabe han.a cord) tru+(mabe tru.a trun) ~)
::
++ trun ::: truename
|= a/truename
^- json
(pairs fir+s+fir.a mid+(mabe mid.a cord) las+s+las.a ~)
::
::: ||
::: || %message-data
::: ||
::: structures for containing main message data
::+|
::
++ enve ::: envelope
|= a/envelope
^- json
(pairs num+(numb num.a) gam+(gram gam.a) ~)
::
++ gram ::: telegram
|= a/telegram
^- json
%- pairs :~
aut+(ship aut.a)
::TODO can we avoid this code duplication somehow?
uid+s+(scot %uv uid.a)
aud+(audi aud.a)
wen+(time wen.a)
sep+(spec sep.a)
==
::
++ thot ::: thought
|= a/thought
^- json
%- pairs :~
uid+s+(scot %uv uid.a)
aud+(audi aud.a)
wen+(time wen.a)
sep+(spec sep.a)
==
::
++ spec ::: speech
|= a/speech
^- json
:: only %url has just a single piece of data.
?: ?=($url -.a)
(frond %url s+(crip (apix:en-purl:html url.a)))
%+ frond -.a
%- pairs
?- -.a
$lin ~[pat+b+pat.a msg+s+msg.a]
$exp ~[exp+s+exp.a res+a+(turn res.a tank)]
$ire ~[top+s+(scot %uv top.a) sep+(spec sep.a)] ::TODO @uv as number?
$fat ~[tac+(atta tac.a) sep+(spec sep.a)]
$inv ~[inv+b+inv.a cir+(circ cir.a)]
$app ~[app+s+app.a sep+(spec sep.a)]
==
::
++ atta ::: attache
|= a/attache
^- json
%+ frond -.a
?- -.a
$name (pairs nom+s+nom.a tac+(atta tac.a) ~)
$text s+(of-wain:format +.a)
$tank a+(turn +.a tank)
==
::
::: ||
::: || %message-metadata
::: ||
::: structures for containing message metadata
::+|
::
++ audi ::: audience
|= a/audience
^- json
(sa a circ)
--
::
++ dejs ::: json to sur
=, dejs-soft:format
|%
::TODO these first few should maybe make their way
:: into the stdlib...
++ re ::: recursive reparsers
|* {gar/* sef/_|.(fist)}
|= jon/json
^- (unit _gar)
=- ~! gar ~! (need -) -
((sef) jon)
::
++ as ::: array as set
|* a/fist
(cu ~(gas in *(set _(need *a))) (ar a))
::
++ dank ::: tank
^- $-(json (unit tank))
%+ re *tank |. ~+
%- of :~
leaf+sa
palm+(ot style+(ot mid+sa cap+sa open+sa close+sa ~) lines+(ar dank) ~)
rose+(ot style+(ot mid+sa open+sa close+sa ~) lines+(ar dank) ~)
==
::
::: ||
::: || %query-models
::: ||
::: models relating to queries, their results and updates.
::+|
::
++ pici ::: prize-client
^- $-(json (unit prize-client))
%- ot :~
gys+(om (as (as circ)))
nis+(op fed:ag so)
==
::
++ ruci ::: rumor-client
^- $-(json (unit rumor-client))
%- of :~
glyph+digy
nick+dini
==
::
++ pack ::: package
^- $-(json (unit package))
%- ot :~
nes+(ar enve)
cos+loby
pes+crow
==
::
++ digy ::: diff-glyph
^- $-(json (unit diff-glyph))
(ot bin+bo gyf+so aud+audi ~)
::
++ dini ::: diff-nick
^- $-(json (unit diff-nick))
(ot who+(su fed:ag) nic+so ~)
::
++ ruso ::: rumor-story
^- $-(json (unit rumor-story))
%- of :~
new+conf
:: bear not needed
config+(ot cir+circ dif+dico ~)
status+(ot cir+circ who+(su fed:ag) dif+disa ~)
remove+ul
gram+(ot src+circ nev+enve ~)
==
::
++ dico ::: diff-config
^- $-(json (unit diff-config))
%- of :~
full+conf
source+(ot add+bo src+sorc ~)
usage+(ot add+bo tas+(as so) ~)
caption+so
filter+filt
secure+secu
permit+(ot add+bo sis+(as (su fed:ag)) ~)
remove+ul
==
::
++ disa ::: diff-status
^- $-(json (unit diff-status))
%- of :~
full+(ot pec+pres man+huma ~)
presence+pres
human+dihu
remove+ul
==
::
++ dihu ::: diff-human
^- $-(json (unit diff-human))
%- of :~
full+huma
handle+(mu so)
true+(mu trun)
==
::
::: ||
::: || %circles
::: ||
::: messaging targets and their metadata.
::+|
::
::TODO maybe just an object?
++ circ ::: circle
^- $-(json (unit circle))
(su circ:de-tape)
::
++ loby ::: lobby
^- $-(json (unit lobby))
(ot loc+conf rem+(op circ:de-tape conf) ~)
::
++ conf ::: config
^- $-(json (unit config))
%- ot :~
src+(as sorc)
cap+so
tag+(as so)
fit+filt
con+cont
red+ni
==
::
::TODO maybe just an object?
++ sorc ::: source
^- $-(json (unit source))
(su sorc:de-tape)
::
++ filt ::: filter
^- $-(json (unit filter))
(ot cas+bo utf+bo ~)
::
++ cont ::: control
^- $-(json (unit control))
(ot sec+secu sis+(as (su fed:ag)) ~)
::
++ secu ::: security
^- $-(json (unit security))
(su (perk %channel %village %journal %mailbox %custom ~))
::
++ crow ::: crowd
^- $-(json (unit crowd))
(ot loc+grop rem+(op circ:de-tape grop) ~)
::
++ grop ::: group
^- $-(json (unit group))
(op fed:ag stat)
::
++ stat ::: status
^- $-(json (unit status))
(ot pec+pres man+huma ~)
::
++ pres ::: presence
^- $-(json (unit presence))
(su (perk %gone %idle %hear %talk ~))
::
++ huma ::: human
^- $-(json (unit human))
(ot han+(mu so) tru+(mu trun) ~)
::
++ trun ::: truename
^- $-(json (unit truename))
(ot fir+so mid+(mu so) las+so ~)
::
::: ||
::: || %message-data
::: ||
::: structures for containing main message data.
::+|
::
++ enve ::: envelope
^- $-(json (unit envelope))
(ot num+ni gam+gram ~)
::
++ gram ::: telegram
^- $-(json (unit telegram))
%- ot :~
aut+(su fed:ag)
::TODO can we do anything about this duplication?
uid+seri
aud+audi
wen+di
sep+spec
==
::
++ thot ::: thought
^- $-(json (unit thought))
%- ot :~
uid+seri
aud+audi
wen+di
sep+spec
==
::
++ spec ::: speech
^- $-(json (unit speech))
%+ re *speech |. ~+
%- of :~
lin+(ot pat+bo msg+so ~)
url+(su aurf:de-purl:html)
exp+eval
ire+(ot top+seri sep+spec ~)
fat+(ot tac+atta sep+spec ~)
inv+(ot inv+bo cir+circ ~)
app+(ot app+so sep+spec ~)
==
::
++ eval ::: %exp speech
::: extract contents of an %exp speech, evaluating
::: the {exp} if there is no {res} yet.
::
|= a/json
^- (unit {cord (list tank)})
=+ exp=((ot exp+so ~) a)
?~ exp ~
:+ ~ u.exp
=+ res=((ot res+(ar dank) ~) a)
?^ res u.res
:: XX revisit
::
:: this double-virtualizes and clams to disable .^
:: the subject of the eval should include [our now eny]
::
;; (list tank)
=< +>
%+ mong
:- mute
|.([(sell (slap !>(..^zuse) (ream u.exp)))]~)
|=(^ ~)
::
++ atta ::: attache
^- $-(json (unit attache))
%+ re *attache |. ~+
%- of :~
name+(ot nom+so tac+atta ~)
text+(cu to-wain:format so)
tank+(ar dank)
==
::
::: ||
::: || %message-metadata
::: ||
:: structures for containing message metadata.
::+|
::
++ seri ::: serial
^- $-(json (unit serial))
(ci (slat %uv) so)
::
++ audi ::: audience
^- $-(json (unit audience))
(as circ)
--
--

View File

@ -1,199 +0,0 @@
::
/? 310
/- hall
=, eyre
=>
|%
++ audience (map partner (pair envelope delivery)) :: destination+state
++ bouquet (set flavor) :: complete aroma
++ delivery :: delivery state
$? $pending :: undelivered
$received :: delivered
$rejected :: undeliverable
$released :: sent one-way
$accepted :: fully processed
== ::
++ envelope (pair ? (unit partner)) :: visible sender
++ flavor path :: content flavor
++ passport :: foreign flow
$% {$twitter p/@t} :: twitter
== ::
++ presence ?($gone $hear $talk) :: status type
++ speech :: narrative action
$% {$lan p/knot q/@t} :: local announce
{$exp p/@t} :: hoon line
{$non ~} :: no content (yo)
{$ext p/@tas q/*} :: extended action
{$fat p/torso q/speech} :: attachment
{$url p/purf} :: parsed url
{$ire p/serial q/speech} :: in-reply-to
{$lin p/? q/@t} :: no/@ text line
{$mor p/(list speech)} :: multiplex
{$app p/@tas q/@t} :: app message
$: $api :: api message
service/@tas :: service name
id/@t :: id on the service
id-url/purf :: link to id
summary/@t :: summary of event
body/@t :: body of event
url/purf :: link to event
meta/json :: other data for web
== ::
== ::
++ serial @uvH :: unique identity
++ partner (each station passport) :: interlocutor
++ statement (trel @da bouquet speech) :: when this
++ station (pair ship knot) :: domestic flow
++ telegram (pair ship thought) :: who which whom what
++ thought (trel serial audience statement) :: which whom what
++ torso :: attachment
$% {$name (pair @t torso)} :: named attachment
{$text (list @t)} :: text lines
{$tank (list tank)} :: tank list
== ::
--
|%
++ from-json
=, dejs-soft:format
|: $:{a/^json} ^- (list telegram:hall)
=- %- zing
%+ turn
(need ((ar (ot ship+(su fed:ag) thought+thot ~)) a))
convert-telegram
|%
++ of
|* a/(pole {@tas fist})
|= b/^json
%. ((of:dejs-soft:format a) b)
%- slog
?+ b ~
{$o *}
%+ murn `(list {@tas fist})`a
|= {c/term d/fist} ^- (unit tank)
=+ (~(get by p.b) c)
?~ - ~
=+ (d u)
?~ - (some >[c u]<)
~
==
++ op :: parse keys of map
|* {fel/rule wit/fist}
%+ cu malt
%+ ci
|= a/(map cord _(need *wit))
^- (unit (list _[(wonk *fel) (need *wit)]))
(zl (turn ~(tap by a) (head-rush fel)))
(om wit)
::
++ as :: array as set
|* a/fist
(cu ~(gas in *(set _(need *a))) (ar a))
::
++ ke :: callbacks
|* {gar/* sef/_|.(fist)}
|= jon/^json
^- (unit _gar)
=- ~! gar ~! (need -) -
((sef) jon)
::
++ lake |*(a/_* $-(^json (unit a)))
++ head-rush
|* a/rule
|* {cord *}
=+ nit=(rush +<- a)
?~ nit ~
(some [u.nit +>->])
::
++ thot
^- $-(^json (unit thought))
%- ot :~
serial+`$-(^json (unit serial))`(ci (slat %uv) so)
audience+`$-(^json (unit audience))`audi
statement+`$-(^json (unit statement))`stam
==
::
++ audi `$-(^json (unit audience))`(op parn memb)
++ auri (op parn (ci (soft presence) so))
++ memb ^- $-(^json (unit (pair envelope delivery)))
(ot envelope+lope delivery+(ci (soft delivery) so) ~)
++ lope (ot visible+bo sender+(mu (su parn)) ~)
::
++ parn
^- $-(nail (like partner))
%+ pick
;~((glue net) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft passport)
;~((glue net) sym urs:ab) :: XX [a-z0-9_]{1,15}
::
++ stam (ot date+di bouquet+(as (ar so)) speech+spec ~)
++ spec
%+ ke *speech |. ~+
%- of :~
lin+(ot say+bo txt+so ~)
url+(ot txt+(su aurf:de-purl:html) ~)
exp+(ot txt+so ~)
app+(ot txt+so src+so ~)
fat+(ot tor+tors taf+spec ~)
ext+(ot nom+so txe+blob ~)
non+ul
mor+(ar spec)
:: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~)
==
++ tors
%+ ke *torso |. ~+
%- of :~
name+(ot nom+so mon+tors ~)
text+(cu to-wain:format so)
tank+(ot dat+(cu (list tank) blob) ~)
==
::
++ blob (cu cue (su fel:de-base64:mimes:html))
::
::
++ convert-telegram
|= t/telegram
^- (list telegram:hall)
=+ aud=(convert-audience q.q.t)
%+ turn (convert-speech r.r.q.t)
|= s/speech:hall
[p.t p.q.t aud p.r.q.t s]
::
++ convert-audience
|= a/audience
^- audience:hall
%- sy
^- (list circle:hall)
%+ murn ~(tap in ~(key by a))
|= p/partner
^- (unit circle:hall)
?- -.p
%& :+ ~ p.p.p
?: ?| =(q.p.p 'porch')
=(q.p.p 'court')
=(q.p.p 'floor')
==
%inbox
q.p.p
%| ~
==
::
++ convert-speech
|= s/speech
^- (list speech:hall)
?+ -.s ~&([%ignoring -.s] ~)
$lin [%lin !p.s q.s]~
$url [%url p.s]~
$exp [%exp p.s ~]~
$ire %+ turn (convert-speech q.s)
|= i/speech:hall
[%ire p.s i]
$app [%app p.s [%lin | q.s]]~
$fat ?: &(?=($exp -.q.s) ?=($tank -.p.s))
[%exp p.q.s +.p.s]~
=+ ses=(convert-speech q.s)
=? ses =(0 (lent ses)) [%lin | '']~
[[%fat p.s (snag 0 ses)] (slag 1 ses)]
$mor (zing (turn p.s convert-speech))
==
--
--

View File

@ -1,286 +0,0 @@
::
:::: /lib/hall/hoon
::
/- *hall
::
::::
::
|_ bol/bowl:gall
::
::TODO add to zuse?
++ true-self
|= [our/ship now/@da who/ship]
?. ?=($earl (clan:title who)) who
(sein:title our now who)
::
++ above
|= [our/ship now/@da who/ship]
?: ?=($czar (clan:title who)) ~zod
(sein:title our now who)
::
++ said-url :: app url
|= url/purl:eyre
:^ ost.bol %poke /said-url
:+ [our.bol %hall] %hall-action
^- action
:+ %phrase
[[our.bol %inbox] ~ ~]
[%app dap.bol %lin | (crip (en-purl:html url))]~ :: XX
::
++ said :: app message
|= mes/(list tank)
:- %hall-action
^- action
:- %phrase
:- [[our.bol %inbox] ~ ~]
|- ^- (list speech)
?~ mes ~
:_ $(mes t.mes)
^- speech
[%app dap.bol %lin | (crip ~(ram re i.mes))]
::
++ uniq
^- {serial _eny.bol}
[(shaf %serial eny.bol) (shax eny.bol)]
::
::TODO add to zuse?
++ simple-wrap
|= {txt/tape wyd/@ud}
^- (list tape)
?~ txt ~
=+ ^- {end/@ud nex/?}
?: (lte (lent txt) wyd) [(lent txt) &]
=+ ace=(find " " (flop (scag +(wyd) `tape`txt)))
?~ ace [wyd |]
[(sub wyd u.ace) &]
:- (tufa (scag end `(list @)`txt))
$(txt (slag ?:(nex +(end) end) `tape`txt))
::
++ range-to-path
:: msg range to path
::
:: turns a range structure into a path used for
:: subscriptions.
::
|= ran/range
^- path
?~ ran ~
:- (place-to-knot hed.u.ran)
?~ tal.u.ran ~
[(place-to-knot u.tal.u.ran) ~]
::
++ place-to-knot
:: msg pointer to path component
::
:: turns a place structure into a knot for use in
:: subscription paths.
::
|= pla/place
^- knot
?. ?=($sd -.pla) (scot -.pla +.pla)
(cat 3 '-' (scot %ud (abs:si +.pla)))
::
++ path-to-range
:: path to msg range
::
:: turns the tail of a subscription path into a
:: range structure, skipping over non-range terms.
::
|= pax/path
^- range
?~ pax ~
=/ hes/(unit place) (rush i.pax placer)
:: skip past non-number parts of path.
?~ hes $(pax t.pax)
:+ ~ u.hes
?~ t.pax ~
(rush i.t.pax placer)
::
++ placer
:: parse a range place
;~ pose
(stag %ud dem:ag)
::
=- (stag %da (sear - crub:so))
|= a/dime
^- (unit @da)
?:(?=($da p.a) `q.a ~)
::
%+ stag %sd
%+ cook (cury new:si |)
;~(pfix hep dem:ag)
==
::
++ change-glyphs :: ...
::
|= {gys/(jug char audience) bin/? gyf/char aud/audience}
^+ gys
:: simple bind.
?: bin (~(put ju gys) gyf aud)
:: unbind all of glyph.
?~ aud (~(del by gys) gyf)
:: unbind single.
(~(del ju gys) gyf aud)
::
++ change-nicks
:: change nick map
::
:: changes a nickname in a map, adding if it doesn't
:: yet exist, removing if the nickname is empty.
::
|= {nis/(map ship cord) who/ship nic/cord}
^+ nis
?: =(nic '')
(~(del by nis) who)
(~(put by nis) who nic)
::
++ change-config
:: applies a config diff to the given config.
::
|= {cof/config dif/diff-config}
^+ cof
?- -.dif
$full cof.dif
$caption cof(cap cap.dif)
$filter cof(fit fit.dif)
$remove cof
$read cof(red red.dif)
::
$usage
%= cof
tag
%. tas.dif
?: add.dif
~(uni in tag.cof)
~(dif in tag.cof)
==
::
$source
%= cof
src
%. src.dif
?: add.dif
~(put in src.cof)
~(del in src.cof)
==
::
$permit
%= cof
sis.con
%. sis.dif
?: add.dif
~(uni in sis.con.cof)
~(dif in sis.con.cof)
==
::
$secure
%= cof
sec.con
sec.dif
::
sis.con
?. .= ?=(?($white $green) sec.dif)
?=(?($white $green) sec.con.cof)
~
sis.con.cof
==
==
::
++ change-status
:: applies a status diff to the given status.
::
|= {sat/status dif/diff-status}
^+ sat
?- -.dif
$full sat.dif
$presence sat(pec pec.dif)
$remove sat
::
$human
%= sat
man
?- -.dif.dif
$full man.dif.dif
$true [han.man.sat tru.dif.dif]
$handle [han.dif.dif tru.man.sat]
==
==
==
::
::TODO annotate all!
++ depa :: de-pathing core
=> |% ++ grub * :: result
++ weir (list coin) :: parsed wire
++ fist $-(weir grub) :: reparser instance
--
|%
::
++ al
|* {hed/$-(coin *) tal/fist}
|= wir/weir ^+ [*hed *tal]
?~ wir !!
[(hed i.wir) (tal t.wir)]
::
++ at
|* typ/{@tas (pole @tas)}
=+ [i-typ t-typ]=typ
|= wer/weir
^- (tup:dray:wired i-typ t-typ) :: ie, (tup %p %tas ~) is {@p @tas}
?~ wer !!
?~ t-typ
?^ t.wer !!
((do i-typ) i.wer)
:- ((do i-typ) i.wer)
(^$(typ t-typ) t.wer)
::
++ mu :: true unit
|* wit/fist
|= wer/weir
?~(wer ~ (some (wit wer)))
::
++ af :: object as frond
|* buk/(pole {cord fist})
|= wer/weir
?> ?=({{$$ $tas @tas} *} wer)
?~ buk !!
=+ [[tag wit] t-buk]=buk
?: =(tag q.p.i.wer)
[tag ~|(tag+`@tas`tag (wit t.wer))]
?~ t-buk ~|(bad-tag+`@tas`q.p.i.wer !!)
(^$(buk t-buk) wer)
::
++ or
=+ typ=$:|-($@(@tas {@tas $}))
|@ ++ $
|= con/coin
::^- _(snag *@ (turn (limo typ) |*(a/@tas [a (odo:raid:wired a)])))
?> ?=($$ -.con)
=/ i-typ ?@(typ typ -.typ)
?: =(i-typ p.p.con)
:- i-typ
^- (odo:raid:wired i-typ)
q.p.con
?@ typ ~|(%bad-odor !!)
(^$(typ +.typ) con)
--
::
++ do
|* typ/@tas
=/ typecheck `@tas`typ
|= con/coin
^- (odo:raid:wired typ)
?. ?=($$ -.con) ~|(%not-dime !!)
?. =(typ p.p.con) ~|(bad-odor+`@tas`p.p.con !!)
q.p.con
::
++ ul :: null
|=(wer/weir ?~(wer ~ !!))
::
++ un
|* wit/$-(coin *)
|= wer/weir ^+ *wit
?~ wer !!
?^ t.wer !!
(wit i.wer)
--
--

View File

@ -1,74 +0,0 @@
::
:::: /mar/hall/action/hoon
::
/- hall
/+ hall-json
::
|_ act/action:hall
::
++ grab ::: convert from
|%
++ noun action:hall ::: from %noun
++ json ::: from %json
=, dejs:hall-json
=, dejs-soft:format
|= a/json
^- action:hall
=- (need ((of -) a))
:~ create+(ot nom+so des+so sec+secu ~)
design+(ot nom+so cof+conf ~)
delete+(ot nom+so why+(mu so) ~)
depict+(ot nom+so des+so ~)
filter+(ot nom+so fit+filt ~)
permit+(ot nom+so inv+bo sis+(as (su fed:ag)) ~)
source+(ot nom+so sub+bo srs+(as sorc) ~)
read+(ot nom+so red+ni ~)
usage+(ot nom+so add+bo tas+(as so) ~)
newdm+(ot sis+(as (su fed:ag)) ~)
::
convey+(ar thot)
phrase+(ot aud+audi ses+(ar spec:dejs:hall-json) ~)
::
notify+(ot aud+audi pes+(mu pres) ~)
naming+(ot aud+audi man+huma ~)
::
glyph+(ot gyf+so aud+audi bin+bo ~)
nick+(ot who+(su fed:ag) nic+so ~)
::
public+(ot add+bo cir+circ ~)
==
--
::
++ grow ::: convert to
|%
++ json ::: to %json
=, enjs:hall-json
=, enjs:format
%+ frond -.act
::: only %convey has just a single piece of data.
?: ?=($convey -.act) a+(turn tos.act thot)
%- pairs
?- -.act
$create ~[nom+s+nom.act des+s+des.act sec+s+sec.act]
$design ~[nom+s+nom.act cof+(conf cof.act)]
$delete ~[nom+s+nom.act why+(mabe why.act cord:enjs)]
$depict ~[nom+s+nom.act des+s+des.act]
$filter ~[nom+s+nom.act fit+(filt fit.act)]
$permit ~[nom+s+nom.act inv+b+inv.act sis+(sa sis.act ship)]
$source ~[nom+s+nom.act sub+b+sub.act srs+(sa srs.act sorc)]
$read ~[nom+s+nom.act red+(numb red.act)]
$usage ~[nom+s+nom.act add+b+add.act tas+(sa tas.act cord:enjs)]
$newdm ~[sis+(sa sis.act ship)]
::
$phrase ~[aud+(audi aud.act) ses+a+(turn ses.act spec:enjs)]
::
$notify ~[aud+(audi aud.act) pes+(mabe pes.act cord:enjs)]
$naming ~[aud+(audi aud.act) man+(huma man.act)]
::
$glyph ~[gyf+s+gyf.act aud+(sa aud.act circ) bin+b+bin.act]
$nick ~[who+(ship who.act) nic+s+nic.act]
::
$public ~[add+b+add.act cir+(circ cir.act)]
==
--
--

View File

@ -1,40 +0,0 @@
::
:::: /mar/hall/command/hoon
::
/? 310
/- hall
/+ hall-json
::
=, hall
|_ cod/command
::
++ grab :: convert from
|%
++ noun command :: from %noun
++ json :: from %json
=, dejs:hall-json
=, dejs-soft:format
|= a/json
^- command:hall
=- (need ((of -) a))
:~ publish+(ar thot)
present+(ot nos+(as so) dif+disa ~)
:: bearing not needed
==
--
::
++ grow :: convert to
|%
++ json :: to %json
=, enjs:hall-json
=, enjs:format
%+ frond -.cod
:: only %publish has just a single piece of data.
?: ?=($publish -.cod) a+(turn tos.cod thot)
%- pairs
?+ -.cod !!
$present ~[nos+(sa nos.cod cord:enjs:hall-json) dif+(disa dif.cod)]
:: bearing nto needed
==
--
--

View File

@ -1,42 +0,0 @@
::
:::: /mar/hall/prize/hoon
::
/- hall
/+ hall-json
::
|_ piz/prize:hall
::
++ grab ::: convert from
|%
++ noun prize:hall ::: from %noun
++ json ::: from %json
=, dejs:hall-json
=, dejs-soft:format
|= a/json
^- prize:hall
=- (need ((of -) a))
:~ client+pici
circles+(as so)
public+(as circ)
:: burden not needed
:: report not needed
circle+pack
==
--
::
++ grow ::: convert to
|%
++ json ::: to %json
=, enjs:hall-json
=, enjs:format
%+ frond -.piz
?+ -.piz !!
$client (pici +.piz)
$circles (sa cis.piz cord:enjs:hall-json)
$public (sa cis.piz circ)
:: burden not needed
:: report not needed
$circle (pack +.piz)
==
--
--

View File

@ -1,40 +0,0 @@
::
:::: /mar/hall/rumor/hoon
::
/- hall
/+ hall-json
::
|_ rum/rumor:hall
::
++ grab ::: convert from
|%
++ noun rumor:hall ::: from %noun
++ json ::: from %json
=, dejs:hall-json
=, dejs-soft:format
|= a/json
^- rumor:hall
=- (need ((of -) a))
:~ client+ruci
circles+(ot add+bo cir+so ~)
public+(ot add+bo cir+circ ~)
:: burden not needed
circle+ruso
==
--
::
++ grow ::: convert to
|%
++ json ::: to %json
=, enjs:hall-json
=, enjs:format
%+ frond -.rum
?+ -.rum !!
$client (ruci rum.rum)
$circles (pairs add+b+add.rum cir+s+cir.rum ~)
$public (pairs add+b+add.rum cir+(circ cir.rum) ~)
:: burden not needed
$circle (ruso rum.rum)
==
--
--

View File

@ -1,41 +0,0 @@
::
:::: /mar/hall/telegrams/hoon
::
/- hall
/+ hall-json
::
|_ gaz/(list telegram:hall)
::
++ grab ::: convert from
|%
++ noun (list telegram:hall) ::: from %noun
::
++ mime ::: from %mime
|= ^mime
(json (rash q.q apex:de-json:html))
::
++ json ::: from %json
=, dejs-soft:format
|= a/json
^- (list telegram:hall)
(need ((ar gram:dejs:hall-json) a))
--
::
++ grow ::: convert to
|%
++ mime ::: to %mime
:- /text/json
(as-octs:mimes:html (crip (en-json:html json)))
::
++ json a+(turn gaz gram:enjs:hall-json) ::: to %json
--
::
++ grad
|%
++ form %hall-telegrams
++ diff |=((list telegram:hall) +<)
++ pact |=((list telegram:hall) +<)
++ join |= {(list telegram:hall) (list telegram:hall)}
`(unit mime)`~
--
--

View File

@ -1,45 +0,0 @@
/- hall
::
|%
+$ diff
$% [%hall-rumor rumor:hall]
[%chat-update update]
[%chat-config streams]
[%json json]
==
::
+$ poke
$% [%hall-action action:hall]
[%launch-action [@tas path @t]]
==
::
+$ streams
$: :: inbox config
::
inbox=config:hall
:: names and configs of all circles we know about
::
configs=(map circle:hall (unit config:hall))
:: messages for all circles we know about
::
messages=(map circle:hall (list envelope:hall))
::
::
circles=(set name:hall)
::
::
peers=(map circle:hall (set @p))
==
::
+$ update
$% [%inbox con=config:hall]
[%message cir=circle:hall env=envelope:hall]
[%messages cir=circle:hall start=@ud end=@ud env=(list envelope:hall)]
[%config cir=circle:hall con=config:hall]
[%circles cir=(set name:hall)]
[%peers cir=circle:hall per=(set @p)]
[%delete cir=circle:hall]
==
::
+$ action [%actions lis=(list action:hall)]
--