%! TeX Root: main.tex
% vim: set et tw=80 ts=4 sw=4:
\documentclass{article}
\usepackage{fontspec}

\setmainfont{Andika}[StylisticSet = 13]
\setmonofont{Iosevka}[
    Scale=MatchUppercase,
    CharacterVariant={99:8}
]
\newfontfamily\h{Cousine}[Scale=MatchUppercase]

\usepackage[margin=25mm]{geometry}
\usepackage{nguhslides/nguhgloss}
\usepackage{xcolor}

\usepackage{hyperref}
\hypersetup{colorlinks=true,allcolors=blue!50!black}

\let\nf\normalfont
\def\z#1{\texttt{#1}}
\def\Clong{\z{811\#0*034C534*4\#C004-*\#3*75}}

\def\doctitle{\Clong}
\def\docstitle{A CCC3 Submission}
\def\docauthor{Annwan}
\def\docdate{\today}

\setlength\parskip{1ex}
\setlength\parindent{0ex}

\begin{document}
\thispagestyle{empty}
\topskip0pt
\vspace*{\fill}
\begin{center}
  {\Large \doctitle}\\
  {\large \docstitle}\\
  {\docauthor}\\
  {\docdate}
\end{center}
\vspace*{\fill}
\clearpage
\setcounter{page}{1}
\def\thepage{\Roman{page}}
\tableofcontents
\clearpage
\setcounter{page}{1}
\def\thepage{\arabic{page}}
\section{Presentation}

\Clong is the language of telephone exchanges

\section{Phone-ology}

Telephone exchanges cannot speak like humans do. Instead, \Clong uses DTMF
Keypad Tones to convey information.

Here is a table of DTMF tones for reference.

\begin{center}
    \begin{tabular}{c|cccc}
        & \bf 1209 Hz & \bf 1336 Hz & \bf 1477 Hz & \bf 1633 Hz \\\hline
        \bf 697 Hz & \z 1 & \z 2 & \z 3 & \z A \\
        \bf 770 Hz & \z 4 & \z 5 & \z 6 & \z B \\
        \bf 852 Hz & \z 7 & \z 8 & \z 9 & \z C \\
        \bf 941 Hz & \z * & \z 0 & \z \# & \z D
    \end{tabular}
\end{center}

\section{Units of speach -- Packets}

Linguistic information is encoded into packets. A packet is of the following
form
\begin{description}
\item[Recipient Identification] is a complete international phone number without
    the national escape (length is variable, but numbers are prefix-unique). The
    number \z{\#} is used for broadcast.
\item[Sender Information] is a complete international phone number without the
    national escape (length is variable, but numbers are prefix-unique).
\item[Sequence number] The number of packets transmitted previously between
    the two parties (so that they may be reordered if the arrive out-of-order).
    (over 3 tones decimal)
\item[Packet Type] one tone
    \begin{description}
        \item[\z1] Semantic packet
        \item[\z\#] Litteral string 
        \item[\z*] Grammar packet
        \item[\z0] Continuation
    \end{description}
\item[Data Length] 2 tone decimal, in tones, less than or equal to 32.
\item[Data] contents of the packets
\end{description}

Should the data of a packet not fit within 32 tones, you shall use a
continuation packet. 

\subsection{Semantic Packet}

A semantic packet is a packet encoding a concept. Its format is that of the
Universal Decimal Clasification with the periods omitted to encode the topics.
Numeric values are encoded with their appropriate digit, colons are encoded as
\z{C*}, parens are encoded as \z{A*} and \z{A\#}, brackets are encoded as \z{B*}
and \b{B\#}, quotes are encoded as \z{C\#}, dash is encoded as \z{D*}, equals is
encoded as \z{D\#} and plus is encoded as a lone \z\#.

A reference to a variable (see \ref{variables}) is to be included in between \z{*}.

Non-UDC notation is to be included as a variable refering to a litteral string
containing the data to be included.

An abbriged summary of the UDC classification containing every topic number and every construct used in the examples and the translation is available in Apendix \ref{udcsummary}. A more complete summary is available online at \url{https://udcsummary.info/}. The full specification can be obtained from the UDC consortium (by paying a substantial amount of money) or can probably be consulted at your nearest library.

\subsection{Litteral string packets}

The Data of a proper noun pack
\begin{enumerate}
\item Two Stars (\z{**})
\item The length of the encoding of the proper noun in tones, expressed as an
hexadecimal digit where \z* stands for 14, \z\# stands for 15 and \z0
stands for 16.
\item the proper noun encoded according to EBCDIC page 00803 in hexadecimal
where \z* stands for 0xE and \z\# stands for 0xF.
\end{enumerate}
If the noun exceeds 16 tones (8 bytes) when encoded, one shall use continuation
packets.

If the noun cannot be fully encoded into EBCDIC 00803 it shall be expressed
as a sequences of hexadecimal unicode codepoints of the form U+xxxxxxxx in
normalised decomposed form  then subsequently encoded to EBCDIC page 00803

A proper noun must be used in the context of a Proper Noun Qualifier Packet (see
\ref{references}).

A copy of the EBCDIC code page can be found in Appendix \ref{ebcdic}

\subsection{Syntactic Packet}

Syntactic Packets start with a \z* followed by one or more digit or letters. If
they take parameters those are expressed after the Syntactic packet in the order
specified. They are of two kinds:

\subsubsection {Morphological packets} There exists 5 such packets. They encode
the gramatical role of parameters in the sentence.

\begin{description}
\item[Assertive \z{*1}] takes one argument and produces the clause that
asserts that the postulate is true, or that the object exists
\item[Intransitive \z{*2A}] takes two arguments and produces the clause with
the first argument as Agent and the second argument as Verb
\item[Intransitive Passive \z{*2B}] takes two arguments and produces the
clause with the first argument as Patient and the second argument as Verb
\item[Transitive \z{*3}] takes three arguments and produces the clause with the
first argument as Subject, the sencond argument as Object, and the third
argument as Verb. For an equivalent of a passive construction, simply reverse
the arguments
\item[Ditransitive \z{*4}] takes four arguments and produces the clause with
the first argument as Subject, the second as Object, the third as Beneficiary
and the fourth as Verb.
\item[Collectionaliser \z{*C}] takes two constructs and forms the collection of
    those constructs. For larger collections, one instance of the
    collectionaliser is required per element. While the order is not
    gramatically mandated, it is common to emit all the collectionalisers of a
    group at the start, then list the elements.
\end{description}

\subsubsection{Referential Packets}
\label{references}
\begin{description}
    \item[Proper Noun Qualifier \z{*D}] Proper nouns cannot be used on their
        own, instead they must be qualified by:LL: the type of {\it thing} refered
        to by the proper noun. For that one uses this qualifer. Takes a proper
        noun and a common noun and produces the a reference to the {\it thing}
        described by the common noun refered to by the proper noun.
    \item[Variable Definition Packet \z{*0}] takes a variable name and a
        syntactic construct and assigns the syntactic construct as value of the
        variable. the Variable may, after this point be used in stead of the
        construct, this is effectively a pronoun, but not limited to just nouns
        and noun phrases.
    \item[Participant Reference \z{*A1} and \z{*A2}] refer to the
        participants of the conversation. The respectly refer to the speaker,
        the listner and both the speaker and the listner
    \item
\end{description}

\subsection{Continuation Packet}
\label{continuation}

A continuation packet is used whenever a packet goes over it's maximum size
(3+16 tones for proper noun packets, 20 tones for semantic packets) to contain
the rest of the information to be contained.

A continuation packet is formed as follws
\begin{itemize}
    \item A Star and an Octothorpe (\z{*\#})
    \item The number of tones in the body of the semantic packet as a single
        hexadecimal digit with \z* standing for 14, \z\# standing for 15 and \z0
        standing for 16.
    \item The tones of the body
\end{itemize}

If the entire contents cannot be fit in the body of the packey, more
continuation packets shall be used.

\subsection{Variable packet}\label{variables}

A variable packet represents a variable to be refered too as later, they act a
bit like pronouns but can refer to any construct of the language. They are
formed by two Octothorpes followed by the identifier of the variables composed
of up to 18 digits.

\section{Ordering things around -- Syntax}

\section{Sample Texts}

These text samples do not contain the control flow communications. The
corresponding audio samples are as if said by a speaker at adress 42069
(decimal) broadcasting to the network.

\begin{quote}
Hark! It was ruled by Agamashuya and His son Gu Sabah: Tian practices against
the lesser side of the invisible origin of light, beset by cosmetic prohibitions
of silence and restraint; for Ngu, a slave to creativity, shall make inspection
and certification prior to confirmation of Najva Guns’ official status. Deny
thine humanity: There are no politics in real life.
\end{quote}
{
\catcode`#=12
\MultiglossFormatFirst{\tt}
\MultiglossFormatSecond{\sc}
\multigloss {
    *B | *B | *B
    cnew | cnew | cnew

    *1 |  *A1 
    assert | 1sg

    *0 |  ##0 |  *D | **0*44*#0#0#0#0#0#0 |  *#0#4#1*44*#0#0#0#0 |
    let | var[0] | ppn | \nf ``Agamashuya'' | cont

    *#0#0#0#6#7*44*#0#0 | *#0#0#0#0#0#6#1*44* | *#0#0#0#0#0#0#0#6C4
    cont | cont | cont 
    
    *#0*44*#0#0#0#0#0#0 | *#0#6#1*44*#0#0#0#0 | *#0#0#0#7#3*44*#0#0
    cont | cont | cont
    
    *#0#0#0#0#0#6#8*44* | *#0#0#0#0#0#0#0#7#5 | *#0*44*#0#0#0#0#0#0
    cont | cont | cont
    
    *#0#7#9*44*#0#0#0#0 | *#8#0#0#6#1 |  BA05
    cont | cont | \nf person 
    
    *3 |  *C | ##0 |  *D | **0*44*#0#0#0#0#0#0
    trans | col | var[0] | ppn | \nf ``Gu Sabah''

    *#0#4#7*44*#0#0#0#0 | *#0#0#0#7#5*44*#0#0 | *#0#0#0#0#0#2#0*44*
    cont | cont | cont
    
    *#0#0#0#0#0#0#0#5#3 | *#0*44*#0#0#0#0#0#0 | *#0#6#1*44*#0#0#0#0
    cont | cont | cont
    
    *#0#0#0#6#2*44*#0#0 | *#0#0#0#0#0#6#1*44* | *#0#0#0#0#0#0#0#6#8
    cont | cont | cont
    
    BA055*1B0BA055*6CB*0 | *#4B#B1 |  * |  328 
    {\nf male child of} var[0] | cont | gnr | govern 

    *3 | *D | **0*44*#0#0#0#0#0#0 | *#0#5#4*44*#0#0#0#0 | *#0#0#0#6#9*44*#0#0
    trans | ppn | \nf``Tian'' | cont | cont
    
    *#0#0#0#0#0#6#1*44* | *#0#0#0#0#0#0#0#6C5 | *1 | *2A | - | -
    cont|cont|assert|ntrans|\nf prohibition::apearance::[silence+restraint]|\nf beset

    - | -
    \nf[side::lesser]::[origin::light]::invisible | \nf fight

}

For Ngu, a slave to creativity, shall make inspection and certification prior to
confirmation of Nahva Guns’ official status.

Deny thine humanity.

There are no politics in real life

}

\appendix
\def\thesubsubsection{\arabic{subsubsection}}
\clearpage
\setcounter{page}{1}
\def\thepage{\roman{page}}
\section{EBCDIC Code Page 803}
\label{ebcdic}
{\setmainfont{Iosevka}\def\arraystretch{1.25}\begin{center}
  \def\s#1{\footnotesize\itshape\bfseries #1}
  \begin{tabular}{c|cccc|cccc|cccc|cccc}
    & \bf x0 & \bf x1 & \bf x2 & \bf x3 & \bf x4 & \bf x5 & \bf x6 & \bf x7 & \bf x8 & \bf x9 & \bf xA & \bf xB & \bf xC & \bf xD & \bf xE & \bf xF \\\hline
    \bf 0x&\s{NUL}&\s{SOH}&\s{STX}&\s{ETX}&\s{ST}&\s{HT}&\s{SSA}&\s{DEL}&\s{SSA}&\s{RI}&\s{SS2}&\s{VT}&\s{FF}&\s{CR}&\s{SO}&\s{SI}\\
    \bf 1x&\s{DLE}&\s{DC1}&\s{DC2}&\s{DC3}&\s{OSC}&\s{NL}&\s{BS}&\s{ESA}&\s{CAN}&\s{EM}&\s{PU2}&\s{SS3}&\s{IFS}&\s{IGS}&\s{IRS}&\s{ITB}\\
    \bf 2x&\s{PAD}&\s{HOP}&\s{BPH}&\s{NBH}&\s{IND}&\s{LF}&\s{ETB}&\s{ESC}&\s{HTS}&\s{HTJ}&\s{VTS}&\s{PLD}&\s{UP}&\s{ENQ}&\s{ACK}&\s{BEL}\\
    \bf 3x&\s{DCS}&\s{BU1}&\s{SYN}&\s{STS}&\s{CCH}&\s{MW}&\s{SPA}&\s{EOT}&\s{SOS}&\s{SGCI}&\s{SCI}&\s{CSI}&\s{DC4}&\s{NAK}&\s{PM}&\s{SUB}\\\hline
    \bf 4x& \s{SP} &&&&&&&&&&\$&.&<&(&+&|\\
    \bf 5x&\h א&&&&&&&&&&!\h לי֞&*&)&;&¬\\
    \bf 6x&-&/&&&&&&&&&&,&\%&\_&>&?\\
    \bf 7x&&&&&&&&&&&:&\#&@&\textquotesingle&=&\textquotedbl\\\hline
    \bf 8x&&\h ב &\h ג &\h ד &\h ה &\h ו &\h ז &\h ח &\h ט &\h י &&&&&&\\
    \bf 9x&&\h ך &\h כ &\h ל &\h ם &\h מ &\h ן &\h נ &\h ס &\h ע &&&€&&\h ₪ &\\
    \bf Ax&&&\h ע &\h ף &\h פ &\h ץ &\h צ &\h ק &\h ר &\h ש &\h ת &&&&&\\
    \bf Bx&&&&&&&&&&&&&&&&\\\hline
    \bf Cx&&A&B&C&D&E&F&G&H&I&&&&&&\\
    \bf Dx&&J&K&L&M&N&O&P&Q&R&&\s{LRO}&\s{RLO}&\s{PDF}&&\\
    \bf Ex&&&S&T&U&V&W&X&Y&Z&&&&&&\\
    \bf Fx&0&1&2&3&4&5&6&7&8&9&&\s{LRF}&\s{RLF}&\s{LRM}&\s{RLM}&\s{APC}\\
  \end{tabular}
\end{center}}
\clearpage\section{An Abriged Summary of the Universal Decimal Classification}
\label{udcsummary}

\subsection{Main Tables}
{\setcounter{subsubsection}{-1}
\subsubsection{Science and Knowledge, Organisation, Computer Science, Information, Documentation, Librarianship, Institutions, Publications}
\subsubsection{Philosophy, Psychology}
\begin{description}
    \item[11183] Truth (Philosophy)
    \item[1612223] Truth (Logic) (used a a negation)
    \item[17025] Prohibitions (moral obligations and prohibitions)
\end{description}
\subsubsection{Religion, Theology}
\subsubsection{Social Sciences}
\begin{description}
    \item[32] Politics
    \item[328] Parliaments. Representation of the people. Governments.
    \item[32325] Deny (legal obligations and prohibitions)
\end{description}
\subsubsection{\it Unused}
\subsubsection{Mathematics, Natural Sciences}
\begin{description}
    \item[5308485] light source
\end{description}
\subsubsection{Applied Sciences, Medicine, Technology}
\subsubsection{The Arts, Recreation, Entertainment, Sport}
\subsubsection{Language, Linguistics, Litterature}
\begin{description}
    \item[81] Linguistics and Languages
    \item[811] Languages
\end{description}
\subsubsection{Geography, Biography, History}
}
\subsection{Auxiliary Signs}

\subsubsection*{{\ttfamily +} Coordination, Addition} The coordination sign + (plus) connects two or more separated (non-consecutive, non-related) UDC numbers, to denote a compound subject for which no single number exists
\subsubsection*{{\ttfamily /} Consecutive extension} The extension sign / (stroke or slash) connects the first and last of a series of consecutive UDC numbers to denote a broad subject, or range of concepts.

If the number following the stroke is more than three digits long and begins with a group of digits in common with the preceding number, it may be abbreviated by omitting the digits common to both, so long as the first item after the stroke is a point. Thus, in the notation built from 629.734 and 629.735, the group 629 is common to both and is not repeated; the group .735 following the stroke is coordinate with .734 preceding it: 629.734/.735; this is equivalent to 629.734+629.735 .
\subsubsection*{{\ttfamily :} Simple relation} The relation sign : (colon) indicates relationship between two or more subjects by connecting their UDC numbers. Unlike the plus and stroke, the colon restricts rather than extends the subjects it connects.

When the colon is used to link auxiliary numbers with biterminal signs (i.e. parentheses or quotation marks), the resultant compound number is enclosed within a single set of signs, e.g. (44:450). If required, the type of relationship between two concepts, such as bias phase, comparison, influence etc. may be further specified using common auxiliaries of phase relations.

\subsubsection*{{\ttfamily ::} Order-Fixing} The double colon :: indicates a relationship and fixes the order of the UDC numbers. The symbol is used when there is a need to stress that the number following the double colon is a specification (part of the definition) of the subject by adding attribute(s) to the preceding number and that the reverse order does not represent the same meaning.

\subsubsection*{{\ttfamily []} Subgrouping} Square brackets [ ] may be used as a subgrouping device within a complex combination of UDC numbers, in order to clarify the relationship of the components. Subgrouping may be needed when a subject denoted by two or more UDC numbers linked by plus sign, stroke or colon is as a whole related to another number by colon, or is modified by a common or special auxiliary

\subsubsection*{{\ttfamily *} Introduction of non-UDC notation}

\subsection{Auxiliary Numbers}
\subsubsection*{{\ttfamily (0...)} Common auxiliaries of form}
\begin{description}
    \item[(002)] Appearance
\end{description}
\subsubsection*{{\ttfamily (-1/9)} Common auxiliaries of place}
\begin{description}
    \item[(-1972)] Under side
\end{description}
\subsubsection*{{\ttfamily (=...)} Common auxiliaries of human ancestry, etnic grouping and nationality}
\subsubsection*{{\ttfamily "..."} Common auxiliaries of time}
\begin{description}
    \item[“311”] in the past, before
\end{description}
\subsubsection*{{\ttfamily -0...} Common auxiliaries of general characteristics: Properties, Materials, Relations/Processes and Persons}
\begin{description}
    \item[-055] Person
    \item[-0551] Male Person
    \item[-0556] Person in filial or descendent relation
\end{description}
\end{document}
