Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Preparation for book

  • Loading branch information...
commit fc177e5d9b7f3c01adae1be89a62863b8fd5080b 1 parent 1b5dc1f
Meredith Gregory authored
Showing with 2,901 additions and 0 deletions.
  1. +5 −0 pom.xml
  2. +85 −0 src/main/book/Toc.txt
  3. +25 −0 src/main/book/content/bibliography/monadic.aux
  4. +16 −0 src/main/book/content/bibliography/monadic.bib
  5. +68 −0 src/main/book/content/build.xml
  6. +3 −0  src/main/book/content/chapters/eight/#model-to-store.tex#
  7. +1 −0  src/main/book/content/chapters/eight/.#model-to-store.tex
  8. +31 −0 src/main/book/content/chapters/eight/ch.aux
  9. +101 −0 src/main/book/content/chapters/eight/ch.tex
  10. +3 −0  src/main/book/content/chapters/eight/continuations-revisited.tex
  11. +1 −0  src/main/book/content/chapters/eight/domain-state-storage.tex
  12. +3 −0  src/main/book/content/chapters/eight/model-to-store.tex
  13. +3 −0  src/main/book/content/chapters/eight/storage-LINQ.tex
  14. +3 −0  src/main/book/content/chapters/five/abstract-syntax.tex
  15. +3 −0  src/main/book/content/chapters/five/application-domain-model.tex
  16. +31 −0 src/main/book/content/chapters/five/ch.aux
  17. +101 −0 src/main/book/content/chapters/five/ch.tex
  18. +1 −0  src/main/book/content/chapters/five/domain-model.tex
  19. +3 −0  src/main/book/content/chapters/five/transform-pipeline.tex
  20. +3 −0  src/main/book/content/chapters/four/EBNF.tex
  21. +31 −0 src/main/book/content/chapters/four/ch.aux
  22. +101 −0 src/main/book/content/chapters/four/ch.tex
  23. +3 −0  src/main/book/content/chapters/four/obligatory-parsing-monad.tex
  24. +3 −0  src/main/book/content/chapters/four/parser-combinators.tex
  25. +1 −0  src/main/book/content/chapters/four/parsing.tex
  26. +3 −0  src/main/book/content/chapters/nine/application-to-framework.tex
  27. +32 −0 src/main/book/content/chapters/nine/ch.aux
  28. +101 −0 src/main/book/content/chapters/nine/ch.tex
  29. +3 −0  src/main/book/content/chapters/nine/deployment.tex
  30. +3 −0  src/main/book/content/chapters/nine/end-to-end.tex
  31. +1 −0  src/main/book/content/chapters/nine/putting-it-all-together.tex
  32. +4 −0 src/main/book/content/chapters/one/#how-are-we-going-to-get-there.tex#
  33. +1 −0  src/main/book/content/chapters/one/.#how-are-we-going-to-get-there.tex
  34. +37 −0 src/main/book/content/chapters/one/ch.aux
  35. +101 −0 src/main/book/content/chapters/one/ch.tex
  36. +3 −0  src/main/book/content/chapters/one/how-are-we-going-to-get-there.tex
  37. +1 −0  src/main/book/content/chapters/one/motivation.tex
  38. +110 −0 src/main/book/content/chapters/one/sample.tex
  39. +4 −0 src/main/book/content/chapters/one/where-are-we-going.tex
  40. +63 −0 src/main/book/content/chapters/one/where-are-we.tex
  41. +39 −0 src/main/book/content/chapters/one/where-are-we.tex~
  42. +30 −0 src/main/book/content/chapters/seven/ch.aux
  43. +100 −0 src/main/book/content/chapters/seven/ch.tex
  44. +1 −0  src/main/book/content/chapters/seven/collections-as-monads.tex
  45. +3 −0  src/main/book/content/chapters/seven/container.tex
  46. +3 −0  src/main/book/content/chapters/seven/monad-and-comonad.tex
  47. +3 −0  src/main/book/content/chapters/six/brunos-zippers.tex
  48. +31 −0 src/main/book/content/chapters/six/ch.aux
  49. +101 −0 src/main/book/content/chapters/six/ch.tex
  50. +1 −0  src/main/book/content/chapters/six/constructing-contexts-zippers-data-types.tex
  51. +3 −0  src/main/book/content/chapters/six/mapping-uris-zipper-based-paths.tex
  52. +3 −0  src/main/book/content/chapters/six/zippers-and-contexts.tex
  53. +30 −0 src/main/book/content/chapters/ten/ch.aux
  54. +100 −0 src/main/book/content/chapters/ten/ch.tex
  55. +3 −0  src/main/book/content/chapters/ten/new-queries.tex
  56. +3 −0  src/main/book/content/chapters/ten/search-for-behavior.tex
  57. +1 −0  src/main/book/content/chapters/ten/semantic-web.tex
  58. +31 −0 src/main/book/content/chapters/three/ch.aux
  59. +101 −0 src/main/book/content/chapters/three/ch.tex
  60. +7 −0 src/main/book/content/chapters/three/code-first.tex
  61. +1 −0  src/main/book/content/chapters/three/io-monad-for-http-streams.tex
  62. +3 −0  src/main/book/content/chapters/three/state-statelessness-continuations.tex
  63. +3 −0  src/main/book/content/chapters/three/synchrony-asynchrony-buffering.tex
  64. +31 −0 src/main/book/content/chapters/two/ch.aux
  65. +101 −0 src/main/book/content/chapters/two/ch.tex
  66. +3 −0  src/main/book/content/chapters/two/core-design-patterns.tex
  67. +3 −0  src/main/book/content/chapters/two/notation-and-terminology.tex
  68. +1 −0  src/main/book/content/chapters/two/toolbox.tex
  69. +3 −0  src/main/book/content/chapters/two/variation-in-presentation.tex
  70. +2 −0  src/main/book/content/index/index.tex
  71. +24 −0 src/main/book/content/local/local.aux
  72. +11 −0 src/main/book/content/local/local.tex
  73. +26 −0 src/main/book/content/monadic.aux
  74. 0  src/main/book/content/monadic.bbl
  75. +16 −0 src/main/book/content/monadic.bib
  76. +58 −0 src/main/book/content/monadic.blg
  77. 0  src/main/book/content/monadic.idx
  78. +10 −0 src/main/book/content/monadic.lof
  79. +518 −0 src/main/book/content/monadic.log
  80. +10 −0 src/main/book/content/monadic.lot
  81. +47 −0 src/main/book/content/monadic.out
  82. BIN  src/main/book/content/monadic.pdf
  83. +83 −0 src/main/book/content/monadic.tex
  84. +47 −0 src/main/book/content/monadic.toc
  85. +180 −0 src/main/book/design-patterns.xml
  86. +30 −0 src/main/scala/com/biosimilarity/validation/TraceMonitor.scala
View
5 pom.xml
@@ -7,6 +7,7 @@
<properties>
<scala.version>2.8-SNAPSHOT</scala.version>
<scala.home>/Users/lgm/work/src/projex/biosimilarity/scala</scala.home>
+ <doxiaVersion>1.1</doxiaVersion>
</properties>
<repositories>
@@ -62,6 +63,10 @@
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
+ <pluginRepository>
+ <id>Doxia plugin lib</id>
+ <url>http://repo1.maven.org/maven2/org/apache/</url>
+ </pluginRepository>
</pluginRepositories>
<dependencies>
View
85 src/main/book/Toc.txt
@@ -0,0 +1,85 @@
+Advanced Programming in Scala: Programming Design Patterns for the Web
+Table of Contents for APress Book Proposal
+
+Chapter One: Motivation and background
+
+ * Where are we and why are we here?
+
+ o The concurrency squeeze: from the hardware up, from the web down, applications must be parallel, concurrent and distributed
+
+ o Advances in functional programming, monads and the awkward squad
+ o Ubiquity of robust, high-performance virtual machines
+
+ * Where are we heading?
+ o A functional web
+ o DSL-based design
+
+ * How are we going to get there?
+ o Leading by example: a web application for storing and retrieving programs in a toy DSL (or... how Mozilla ought to have done bespin's backend)
+
+Chapter Two: Our toolbox
+
+ * Introduction to notation and terminology
+
+ * Introduction to our core design patterns
+
+ * Variations in presentation
+
+Chapter Three: An I/O-monad for http-streams
+
+ * Code first, questions later
+
+ * Synchrony, asynchrony and buffering
+
+ * State, statelessness and continuations
+
+Chapter Four: Parsing requests, monadically
+
+ * Obligatory parsing monad
+
+ * Your parser combinators are showing
+
+ * EBNF and why higher levels of abstraction are better
+
+Chapter Five: The domain model as an abstract syntax
+
+ * Our application domain model
+
+ * Our abstract syntax
+
+ * A transform pipeline
+
+Chapter Six: Zippers and contexts and URIs, oh my!
+
+ * Zippers are not just for Bruno anymore
+
+ * Constructing contexts and zippers from data types
+
+ * Mapping URIs to zipper-based paths and back
+
+Chapter Seven: A review of collections as monads
+
+ * Monad as container
+
+ * Monads and take-out (when there is a co-monad)
+
+Chapter Eight: Domain model, storage and state
+
+ * Mapping our domain model to storage
+
+ * Storage and language-integrated query
+
+ * Continuations revisited
+
+Chapter Nine: Putting it all together
+
+ * Our web application end to end
+ * Deploying our application on Stax
+ o Why we are not deploying on GAE
+
+ * From one web application to a web framework
+
+Chapter Ten: A semantic web
+
+ * How our web framework enables different kinds of application queries
+ * Searching for programs
View
25 src/main/book/content/bibliography/monadic.aux
@@ -0,0 +1,25 @@
+\relax
+\@setckpt{bibliography/monadic}{
+\setcounter{page}{22}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{10}
+\setcounter{section}{2}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
16 src/main/book/content/bibliography/monadic.bib
@@ -0,0 +1,16 @@
+@Comment \begin{thebibliography}{99}
+@Comment \addcontentsline{toc}{chapter}{Bibliography}
+@Comment \bibitem{lamport} L. Lamport. {\bf \LaTeX \ A Document Preparation System}
+@Comment Addison-Wesley, California 1986.
+@Comment \end{thebibliography}
+
+@article{milner91polyadicpi,
+ Author = {Robin Milner},
+ Date-Added = {2007-05-14 14:24:05 -0500},
+ Date-Modified = {2007-05-14 14:24:05 -0500},
+ Editor = {F.L. Hamer, W. Brauer, H. Schwichtenberg},
+ Journal = {Logic and Algebra of Specification},
+ Title = {The polyadic $\pi$-calculus: A tutorial},
+ Url = {http://www.lfcs.informatics.ed.ac.uk/reports/91/ECS-LFCS-91-180/ECS-LFCS-91-180.ps},
+ Volume = {Springer-Verlag},
+ Year = {1993}}
View
68 src/main/book/content/build.xml
@@ -0,0 +1,68 @@
+<?xml version='1.0'?>
+<project name="monadic" xmlns:ac="antlib:net.sf.antcontrib"
+ default="help" basedir=".">
+
+ <!-- ****************** Properties ********************* -->
+ <property name="monadic.dir" value="${basedir}"/>
+ <property name="scala.dir" value="${monadic.dir}/../../scala"/>
+ <property name="webapp.dir" value="${monadic.dir}/../../webapp"/>
+ <property name="target.dir" value="${monadic.dir}/../../../target"/>
+ <property name="monadic.reverse.path"
+ value="`echo ${monadic.package} | sed 's/\./\//g'`"/>
+ <path id="monadic.stem.path">
+ <pathelement location="${monadic.package}"/>
+ </path>
+
+ <pathconvert targetos="unix"
+ property="monadic.stem.dir"
+ refid="monadic.stem.path">
+ <chainedmapper>
+ <flattenmapper/>
+ <filtermapper>
+ <replacestring from="." to="/"/>
+ </filtermapper>
+ </chainedmapper>
+ </pathconvert>
+
+ <!-- ****************** Targets ********************* -->
+
+ <target name="monadic-pdf">
+ <echo message="*** Running latex before bibtex ***"/>
+ <exec executable="pdflatex"
+ failonerror="true"
+ logerror="true"
+ dir="${monadic.dir}">
+ <arg value="monadic.tex" />
+ </exec>
+ <echo message="*** Running bibtex ***"/>
+ <exec executable="bibtex"
+ failonerror="true"
+ logerror="true"
+ dir="${monadic.dir}">
+ <arg value="monadic" />
+ </exec>
+ <echo message="*** Running latex after bibtex ***"/>
+ <exec executable="pdflatex"
+ failonerror="true"
+ logerror="true"
+ dir="${monadic.dir}">
+ <arg value="monadic.tex" />
+ </exec>
+ </target>
+
+ <target name="monadic-clean">
+ <delete failonerror="false">
+ <fileset dir="${monadic.dir}" includes="**/*.aux"/>
+ <fileset dir="${monadic.dir}" includes="**/*.bbl"/>
+ <fileset dir="${monadic.dir}" includes="**/*.blg"/>
+ <fileset dir="${monadic.dir}" includes="**/*.dvi"/>
+ <fileset dir="${monadic.dir}" includes="**/*.idx"/>
+ <fileset dir="${monadic.dir}" includes="**/*.lof"/>
+ <fileset dir="${monadic.dir}" includes="**/*.log"/>
+ <fileset dir="${monadic.dir}" includes="**/*.lot"/>
+ <fileset dir="${monadic.dir}" includes="**/*.out"/>
+ <fileset dir="${monadic.dir}" includes="**/*.pdf"/>
+ <fileset dir="${monadic.dir}" includes="**/*.toc"/>
+ </delete>
+ </target>
+</project>
View
3  src/main/book/content/chapters/eight/#model-to-store.tex#
@@ -0,0 +1,3 @@
+\section{Mapping our domain model to storage}
+
+TBD
View
1  src/main/book/content/chapters/eight/.#model-to-store.tex
View
31 src/main/book/content/chapters/eight/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {8}Domain model, storage and state}{17}{chapter.8}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {8.1}Mapping our domain model to storage}{17}{section.8.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {8.2}Storage and language-integrated query}{17}{section.8.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {8.3}Continuations revisited}{17}{section.8.3}}
+\@setckpt{chapters/eight/ch}{
+\setcounter{page}{18}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{8}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/eight/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Domain model, storage and state}
+\begin{center}
+{\small\em Mapping to the backend}
+\end{center}
+
+\input{chapters/eight/domain-state-storage}
+\input{chapters/eight/model-to-store}
+\input{chapters/eight/storage-LINQ}
+\input{chapters/eight/continuations-revisited}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/eight/continuations-revisited.tex
@@ -0,0 +1,3 @@
+\section{Continuations revisited}
+
+TBD
View
1  src/main/book/content/chapters/eight/domain-state-storage.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/eight/model-to-store.tex
@@ -0,0 +1,3 @@
+\section{Mapping our domain model to storage}
+
+TBD
View
3  src/main/book/content/chapters/eight/storage-LINQ.tex
@@ -0,0 +1,3 @@
+\section{Storage and language-integrated query}
+
+TBD
View
3  src/main/book/content/chapters/five/abstract-syntax.tex
@@ -0,0 +1,3 @@
+\section{Our abstract syntax}
+
+TBD
View
3  src/main/book/content/chapters/five/application-domain-model.tex
@@ -0,0 +1,3 @@
+\section{Our application domain model}
+
+TBD
View
31 src/main/book/content/chapters/five/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {5}The domain model as abstract syntax}{11}{chapter.5}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {5.1}Our abstract syntax}{11}{section.5.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {5.2}Our application domain model}{11}{section.5.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {5.3}A transform pipeline}{11}{section.5.3}}
+\@setckpt{chapters/five/ch}{
+\setcounter{page}{12}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{5}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/five/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{The domain model as abstract syntax}
+\begin{center}
+{\small\em In which Pooh and Piglet understand the value of pipelines}
+\end{center}
+
+\input{chapters/five/domain-model}
+\input{chapters/five/abstract-syntax}
+\input{chapters/five/application-domain-model}
+\input{chapters/five/transform-pipeline}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
1  src/main/book/content/chapters/five/domain-model.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/five/transform-pipeline.tex
@@ -0,0 +1,3 @@
+\section{A transform pipeline}
+
+TBD
View
3  src/main/book/content/chapters/four/EBNF.tex
@@ -0,0 +1,3 @@
+\section{EBNF and why higher levels of abstraction are better}
+
+TBD
View
31 src/main/book/content/chapters/four/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {4}Parsing requests, monadically}{9}{chapter.4}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {4.1}Obligatory parsing monad}{9}{section.4.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {4.2}Your parser combinators are showing}{9}{section.4.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {4.3}EBNF and why higher levels of abstraction are better}{9}{section.4.3}}
+\@setckpt{chapters/four/ch}{
+\setcounter{page}{10}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{4}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/four/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Parsing requests, monadically}
+\begin{center}
+{\small\em How to get from the obligatory to the well formed}
+\end{center}
+
+\input{chapters/four/parsing}
+\input{chapters/four/obligatory-parsing-monad}
+\input{chapters/four/parser-combinators}
+\input{chapters/four/EBNF}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/four/obligatory-parsing-monad.tex
@@ -0,0 +1,3 @@
+\section{Obligatory parsing monad}
+
+TDB
View
3  src/main/book/content/chapters/four/parser-combinators.tex
@@ -0,0 +1,3 @@
+\section{Your parser combinators are showing}
+
+TBD
View
1  src/main/book/content/chapters/four/parsing.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/nine/application-to-framework.tex
@@ -0,0 +1,3 @@
+\section{From one web application to web framework}
+
+TBD
View
32 src/main/book/content/chapters/nine/ch.aux
@@ -0,0 +1,32 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {9}Putting it all together}{19}{chapter.9}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {9.1}Our web application end-to-end}{19}{section.9.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {9.2}Deploying our application}{19}{section.9.2}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.1}Why we are not deploying on GAE}{19}{subsection.9.2.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {9.3}From one web application to web framework}{19}{section.9.3}}
+\@setckpt{chapters/nine/ch}{
+\setcounter{page}{20}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{9}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/nine/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Putting it all together}
+\begin{center}
+{\small\em The application as a whole}
+\end{center}
+
+\input{chapters/nine/putting-it-all-together}
+\input{chapters/nine/end-to-end}
+\input{chapters/nine/deployment}
+\input{chapters/nine/application-to-framework}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/nine/deployment.tex
@@ -0,0 +1,3 @@
+\section{Deploying our application}
+
+\subsection{Why we are not deploying on GAE}
View
3  src/main/book/content/chapters/nine/end-to-end.tex
@@ -0,0 +1,3 @@
+\section{Our web application end-to-end}
+
+TBD
View
1  src/main/book/content/chapters/nine/putting-it-all-together.tex
@@ -0,0 +1 @@
+TBD
View
4 src/main/book/content/chapters/one/#how-are-we-going-to-get-there.tex#
@@ -0,0 +1,4 @@
+\section{How are we going to get there}
+
+\subsection{Leading by example}
+
View
1  src/main/book/content/chapters/one/.#how-are-we-going-to-get-there.tex
View
37 src/main/book/content/chapters/one/ch.aux
@@ -0,0 +1,37 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {1}Motivation and Background}{3}{chapter.1}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {1.1}Where are we}{4}{section.1.1}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}The concurrency squeeze: from the hardware up, from the web down}{4}{subsection.1.1.1}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}Advances in functional programming, monads and the awkward squad}{4}{subsection.1.1.2}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.3}Ubiquity of robust, high-performance virtual machines}{4}{subsection.1.1.3}}
+\@writefile{toc}{\contentsline {section}{\numberline {1.2}Where are we going}{4}{section.1.2}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}A functional web}{4}{subsection.1.2.1}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.2}DSL-based design}{4}{subsection.1.2.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {1.3}How are we going to get there}{4}{section.1.3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.3.1}Leading by example}{4}{subsection.1.3.1}}
+\@setckpt{chapters/one/ch}{
+\setcounter{page}{5}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{1}
+\setcounter{section}{3}
+\setcounter{subsection}{1}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{2}
+}
View
101 src/main/book/content/chapters/one/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Motivation and Background}
+\begin{center}
+{\small\em Where are we; how did we get here; and where are we going?}
+\end{center}
+
+\input{chapters/one/motivation}
+\input{chapters/one/where-are-we}
+\input{chapters/one/where-are-we-going}
+\input{chapters/one/how-are-we-going-to-get-there}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/one/how-are-we-going-to-get-there.tex
@@ -0,0 +1,3 @@
+\section{How are we going to get there}
+
+\subsection{Leading by example}
View
1  src/main/book/content/chapters/one/motivation.tex
@@ -0,0 +1 @@
+TBD
View
110 src/main/book/content/chapters/one/sample.tex
@@ -0,0 +1,110 @@
+\documentclass[12pt]{llncs}
+%\documentclass{jktr}
+
+\usepackage[pdftex]{hyperref}
+\usepackage {listings}
+\usepackage {mathpartir}
+\usepackage{bcprules}
+%\usepackage{listings}
+
+\usepackage{graphicx}
+%\usepackage[margins=2.5cm,nohead,nofoot]{geometry}
+%\usepackage{geometry}
+\usepackage{amsfonts}
+\usepackage{amstext}
+\usepackage{latexsym}
+\usepackage{amssymb}
+\usepackage{color}
+
+
+%\include{myPreamble}
+\include{ChapterOne.local}
+
+%\ifpdf
+%\usepackage[pdftex]{graphicx}
+%\else
+%\usepackage{graphicx}
+%\fi
+
+ % \ifpdf
+% \usepackage{pdfsync}
+% \if
+
+
+%\title{Brief Article}
+%\author{David F. Snyder}
+%\author{L.G. Meredith}
+
+%\address{Dept. of Math., Texas State University--San Marcos, San Marcos, TX 78666}
+
+\pagestyle{empty}
+
+
+\begin{document}
+
+\lstset{language=[Objective]Caml,frame=shadowbox}
+
+\input{ChapterOne.front}
+
+% section front matter (end)
+
+\input{ChapterOne.intro}
+
+% section introduction (end)
+
+% \input{ChapterOne.knotations}
+
+% section notation (end)
+
+\input{ChapterOne.process.calculi}
+
+% section concurrent_process_calculi_and_spatial_logics_ (end)
+
+%\input{ChapterOne.knots2pi}
+
+%\input{ChapterOne.trefoil}
+
+%\input{ChapterOne.mainthm}
+
+% subsection basic_interpretation (end)
+
+\input{ChapterOne.rho.presentation}
+
+\input{ChapterOne.qmops}
+
+\input{ChapterOne.sterngerlach}
+
+\input{ChapterOne.metric}
+
+% section concurrent_process_calculi (end)
+
+%\input{ChapterOne.proofsketch}
+
+% section proof sketch (end)
+
+%\input{ChapterOne.slviaknots}
+
+% section spatial logic via knots (end)
+
+\input{ChapterOne.conclusion}
+
+% section conclusion (end)
+
+%\input{ChapterOne.dtcodes}
+
+% section wiring algorithm (end)
+
+\input{ChapterOne.ack}
+
+% section acknowledgments (end)
+
+\newpage
+
+
+\bibliographystyle{plain}
+\bibliography{../../biblios/main.bib}
+
+\input{ChapterOne.rhodetails}
+
+\end{document}
+
View
4 src/main/book/content/chapters/one/where-are-we-going.tex
@@ -0,0 +1,4 @@
+\section{Where are we going}
+
+\subsection{A functional web}
+\subsection{DSL-based design}
View
63 src/main/book/content/chapters/one/where-are-we.tex
@@ -0,0 +1,63 @@
+\section{Where are we}
+
+\subsection{The concurrency squeeze: from the hardware up, from the web down}
+
+It used to be fashionable in academic papers or think tank reports to
+predict or bemoan the imminent demise of Moore's law, to wax on about
+the need to ``go sideways'' in hardware design from the number of
+cores per die to the number of processors per box. Those days of
+polite conversation about the on coming storm are definitely in our
+rear view mirror. Today's developer knows that if her program is
+commercially interesting at all then it needs to be web-accessible on
+a 24x7 basis; and if it's going to be commercially significant it will
+need to support at least 100's if not thousands of concurrent accesses
+to its features and functions. Her application is most likely hosted
+by some commercial outfit, a Joyent or an EngineYard or an Amazon EC3
+or $\ldots$ who are deploying her code over multiple servers each of
+which is in turn multi-processor with multiple cores. This means that
+from the hardware up and from the web down today's intrepid developer
+is dealing with parallelism, concurrency and distribution.
+
+Unfortunately, the methods available in in mainstream programming
+languages of dealing with these different aspects of simultaneous
+execution are not up to the task of supporting development at this
+scale. The core issue is complexity. The modern application developer
+is faced with a huge range of concurrency and concurrency control
+models, from transactions in the database to message-passing between
+server components. Whether to partition her data is no longer an
+option, she's thinking hard about \emp{how} to partition her data and
+whether or not this ``eventual consistency'' thing is going to
+liberate her or bring on a new host of programming nightmares. By
+comparison threads packages seem like quaint relics from a time when
+concurrent programming was a little hobby project she did after
+hours. The modern programmer needs to simplify her life in order to
+maintain a competitive level of productivity.
+
+Functional programming provides a sort of transition technology. On
+the one hand, it's not that much of a radical departure from
+mainstream programming like Java. On the other it offers simple,
+uniform model that introduces a number of key features that
+considerably improve productivity and maintainability. Java brought
+the C/C++ programmer several steps closer to a functional paradigm,
+introducing garbage collection, type abstractions such as generics and
+other niceties. Languages like OCaml, F# and Scala go a step further,
+bringing the modern developer into contact with higher order
+functions, the relationship between types and pattern matching and
+powerful abstractions like monads. Yet, functional programming does
+not embrace concurrency and distribution in its foundations. It is not
+based a model of computation, like the actor model or the process
+calculi that are based on a notion of execution that is fundamentally
+concurrent. That said, it meshes nicely with a variety of concurrency
+programming models. In particular, the combination of higher order
+functions (with the ability to pass functions as arguments and return
+functions as values) together with the structuring techniques of
+monads make models such as software transactional memory or data flow
+parallelism quite easy to integrate, while pattern-matching
+additionally makes message-passing style easier to incorporate.
+
+\subsection{Ubiquity of robust, high-performance virtual machines}
+
+
+
+\subsection{Advances in functional programming, monads and the awkward squad}
+
View
39 src/main/book/content/chapters/one/where-are-we.tex~
@@ -0,0 +1,39 @@
+\section{Where are we}
+
+\subsection{The concurrency squeeze: from the hardware up, from the web down}
+
+It used to be fashionable in academic papers or think tank reports to
+predict or bemoan the imminent demise of Moore's law, to wax on about
+the need to ``go sideways'' in hardware design from the number of
+cores per die to the number of processors per box. Those days of
+polite conversation about the on coming storm are definitely in our
+rear view mirror. Today's developer knows that if her program is
+commercially interesting at all then it needs to be web-accessible on
+a 24x7 basis; and if it's going to be commercially significant it will
+need to support at least 100's if not thousands of concurrent accesses
+to its features and functions. Her application is most likely hosted
+by some commercial outfit, a Joyent or an EngineYard or an Amazon EC3
+or $\ldots$ who are deploying her code over multiple servers each of
+which is in turn multi-processor with multiple cores. This means that
+from the hardware up and from the web down today's intrepid developer
+is dealing with parallelism, concurrency and distribution.
+
+Unfortunately, the methods available in in mainstream programming
+languages of dealing with these different aspects of simultaneous
+execution are not up to the task of supporting development at this
+scale. The core issue is complexity. The modern application developer
+is faced with a huge range of concurrency and concurrency control
+models, from transactions in the database to message-passing between
+server components. Whether to partition her data is no longer an
+option, she's thinking hard about \emp{how} to partition her data and
+whether or not this ``eventual consistency'' thing is going to
+liberate her or bring on a new host of programming nightmares. By
+comparison threads packages seem like quaint relics from a time when
+concurrent programming was a little hobby project she did after
+hours. The modern programmer needs to simplify her life in order to
+maintain a competitive level of productivity.
+
+\subsection{Ubiquity of robust, high-performance virtual machines}
+
+\subsection{Advances in functional programming, monads and the awkward squad}
+
View
30 src/main/book/content/chapters/seven/ch.aux
@@ -0,0 +1,30 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {7}A review of collections as monads}{15}{chapter.7}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {7.1}Monad as container}{15}{section.7.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {7.2}Monads and take-out}{15}{section.7.2}}
+\@setckpt{chapters/seven/ch}{
+\setcounter{page}{16}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{7}
+\setcounter{section}{2}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
100 src/main/book/content/chapters/seven/ch.tex
@@ -0,0 +1,100 @@
+%ch.tex
+
+
+\chapter{A review of collections as monads}
+\begin{center}
+{\small\em Where are we; how did we get here; and where are we going?}
+\end{center}
+
+\input{chapters/seven/collections-as-monads}
+\input{chapters/seven/container}
+\input{chapters/seven/monad-and-comonad}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
1  src/main/book/content/chapters/seven/collections-as-monads.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/seven/container.tex
@@ -0,0 +1,3 @@
+\section{Monad as container}
+
+TBD
View
3  src/main/book/content/chapters/seven/monad-and-comonad.tex
@@ -0,0 +1,3 @@
+\section{Monads and take-out}
+
+TBD
View
3  src/main/book/content/chapters/six/brunos-zippers.tex
@@ -0,0 +1,3 @@
+\section{Zippers are not just for Bruno anymore}
+
+TBD
View
31 src/main/book/content/chapters/six/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {6}Zippers and contexts and URI's, oh my!}{13}{chapter.6}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {6.1}Zippers are not just for Bruno anymore}{13}{section.6.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {6.2}Constructing contexts and zippers from data types}{13}{section.6.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {6.3}Mapping URIs to zipper-based paths and back}{13}{section.6.3}}
+\@setckpt{chapters/six/ch}{
+\setcounter{page}{14}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{6}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/six/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Zippers and contexts and URI's, oh my!}
+\begin{center}
+{\small\em Zippers are not just for Bruno anymore}
+\end{center}
+
+\input{chapters/six/constructing-contexts-zippers-data-types}
+\input{chapters/six/brunos-zippers}
+\input{chapters/six/zippers-and-contexts}
+\input{chapters/six/mapping-uris-zipper-based-paths}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
1  src/main/book/content/chapters/six/constructing-contexts-zippers-data-types.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/six/mapping-uris-zipper-based-paths.tex
@@ -0,0 +1,3 @@
+\section{Mapping URIs to zipper-based paths and back}
+
+TBD
View
3  src/main/book/content/chapters/six/zippers-and-contexts.tex
@@ -0,0 +1,3 @@
+\section{Constructing contexts and zippers from data types}
+
+TBD
View
30 src/main/book/content/chapters/ten/ch.aux
@@ -0,0 +1,30 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {10}The semantic web}{21}{chapter.10}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {10.1}How our web framework enables different kinds of application queries}{21}{section.10.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {10.2}Searching for programs}{21}{section.10.2}}
+\@setckpt{chapters/ten/ch}{
+\setcounter{page}{22}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{10}
+\setcounter{section}{2}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
100 src/main/book/content/chapters/ten/ch.tex
@@ -0,0 +1,100 @@
+%ch.tex
+
+
+\chapter{The semantic web}
+\begin{center}
+{\small\em Where are we; how did we get here; and where are we going?}
+\end{center}
+
+\input{chapters/ten/semantic-web}
+\input{chapters/ten/new-queries}
+\input{chapters/ten/search-for-behavior}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/ten/new-queries.tex
@@ -0,0 +1,3 @@
+\section{How our web framework enables different kinds of application queries}
+
+TBD
View
3  src/main/book/content/chapters/ten/search-for-behavior.tex
@@ -0,0 +1,3 @@
+\section{Searching for programs}
+
+TBD
View
1  src/main/book/content/chapters/ten/semantic-web.tex
@@ -0,0 +1 @@
+TBD
View
31 src/main/book/content/chapters/three/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {3}An IO-monad for http streams}{7}{chapter.3}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {3.1}Code first, questions later}{7}{section.3.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {3.2}Synchrony, asynchrony and buffering}{7}{section.3.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {3.3}State, statelessness and continuations}{7}{section.3.3}}
+\@setckpt{chapters/three/ch}{
+\setcounter{page}{8}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{3}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/three/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{An IO-monad for http streams}
+\begin{center}
+{\small\em Code first; questions later}
+\end{center}
+
+\input{chapters/three/io-monad-for-http-streams}
+\input{chapters/three/code-first}
+\input{chapters/three/synchrony-asynchrony-buffering}
+\input{chapters/three/state-statelessness-continuations}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
7 src/main/book/content/chapters/three/code-first.tex
@@ -0,0 +1,7 @@
+\section{Code first, questions later}
+
+TBD
+
+\subsection{An HTTP-request processor}
+
+\subsection{What we did}
View
1  src/main/book/content/chapters/three/io-monad-for-http-streams.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/three/state-statelessness-continuations.tex
@@ -0,0 +1,3 @@
+\section{State, statelessness and continuations}
+
+TBD
View
3  src/main/book/content/chapters/three/synchrony-asynchrony-buffering.tex
@@ -0,0 +1,3 @@
+\section{Synchrony, asynchrony and buffering}
+
+TBD
View
31 src/main/book/content/chapters/two/ch.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {chapter}{\numberline {2}Toolbox}{5}{chapter.2}}
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\@writefile{toc}{\contentsline {section}{\numberline {2.1}Introduction to notation and terminology}{5}{section.2.1}}
+\@writefile{toc}{\contentsline {section}{\numberline {2.2}Introduction to core design patterns}{5}{section.2.2}}
+\@writefile{toc}{\contentsline {section}{\numberline {2.3}Variations in presentation}{5}{section.2.3}}
+\@setckpt{chapters/two/ch}{
+\setcounter{page}{6}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{2}
+\setcounter{section}{3}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+\setcounter{section@level}{1}
+}
View
101 src/main/book/content/chapters/two/ch.tex
@@ -0,0 +1,101 @@
+%ch.tex
+
+
+\chapter{Toolbox}
+\begin{center}
+{\small\em Notation and terminology}
+\end{center}
+
+\input{chapters/two/toolbox}
+\input{chapters/two/notation-and-terminology}
+\input{chapters/two/core-design-patterns}
+\input{chapters/two/variation-in-presentation}
+
+% \section{Existence problems}
+% We begin with some metamathematics.
+% All problems about the existence of maps can be cast into one of the
+% following two forms, which are in a sense mutually dual.
+
+% \noindent
+% {\bf The Extension Problem}\index{extension problem} \ %%% NB index entry tag
+% Given an inclusion $ A \stackrel{i}{\hookrightarrow} X $, and a map
+% $ A \stackrel{f}{\rightarrow} Y $,
+% does there exist a map $f^{\dagger}:X\to Y$ such that
+% $f^{\dagger}$ agrees with $f$ on $A$?
+
+% Here the appropriate source category for maps should be clear from the
+% context and, moreover, commutativity through a
+% candidate $f^{\dagger}$ is precisely
+% the restriction requirement; that is,
+% $$f^{\dagger} : f^{\dagger}\circ i = f^{\dagger}|_A = f\,. $$
+% If such an $f^{\dagger}$ exists\footnote{${}^{\dagger}$ suggests striving
+% for perfection, crusading}, then it is called an {\bf
+% extension}\index{extension!of a map|bi} of $f$ and is said to {\bf
+% extend}\index{extend|bi} $f$. In any diagrams, the presence of
+% a dotted arrow or an arrow carrying a ? indicates a pious hope, in no way
+% begging the question of its existence. Note that we shall usually
+% omit $\circ$ from composite maps.
+
+% \noindent
+% {\bf The Lifting Problem}\index{lifting problem} \
+% Given a pair of maps $E \stackrel{p}{\rightarrow}B$ and $X \stackrel{f}
+% {\rightarrow} B $,
+% does there exist a map $f^{\circ} : X \to E$, with
+% $pf^{\circ} = f $?
+
+
+% That {\em all\/} existence problems about maps are essentially of one
+% type or
+% the other from these two is seen as follows. Evidently, all existence problems
+% are representable by triangular diagrams\index{triangular diagrams} and it
+% is easily seen that there are only these six possibilities:
+% \begin{center}\begin{picture}(300,70) %augch2 75
+% \put(5,60){\vector(1,0){30}}
+% \put(55,60){\vector(1,0){30}}
+% \put(135,60){\vector(-1,0){30}}
+% \put(185,60){\vector(-1,0){30}}
+% \put(235,60){\vector(-1,0){30}}
+% \put(285,60){\vector(-1,0){30}}
+% \put(0,55){\vector(0,-1){30}}
+% \put(50,55){\vector(0,-1){30}}
+% \put(100,25){\vector(0,1){30}}
+% \put(150,25){\vector(0,1){30}}
+% \put(200,55){\vector(0,-1){30}}
+% \put(250,55){\vector(0,-1){30}}
+% \put(28,33){\small ?}
+% \put(78,33){\small ?}
+% \put(128,33){\small ?}
+% \put(178,33){\small ?}
+% \put(228,33){\small ?}
+% \put(278,33){\small ?}
+% \put(10,3){\bf 1}
+% \put(60,3){\bf 2}
+% \put(110,3){\bf 3}
+% \put(160,3){\bf 4}
+% \put(210,3){\bf 5}
+% \put(260,3){\bf 6}
+% \put(35,55){\vector(-1,-1){30}}
+% \put(155,25){\vector(1,1){30}}
+% \put(135,55){\vector(-1,-1){30}}
+% \put(55,25){\vector(1,1){30}}
+% \put(235,55){\vector(-1,-1){30}}
+% \put(255,25){\vector(1,1){30}}
+% \end{picture}\end{center}
+
+
+
+% \begin{figure}
+% \begin{picture}(300,220)(0,0)
+% \put(-20,-20){\resizebox{20 cm}{!}{\includegraphics{3dpdf}}}
+% \put(260,-10){\resizebox{15 cm}{!}{\includegraphics{contpdf}}}
+% \put(220,80){$\beta$}
+% \put(400,-10){$N$}
+% \put(260,170){$\beta$}
+% \put(90,15){$N$}
+% \end{picture}
+% \caption{{\em The log-gamma family of densities with central mean
+% $<N> \, = \frac{1}{2}$ as a surface and as a contour plot. }}
+% \label{pdf}
+% \end{figure}
+
+\newpage
View
3  src/main/book/content/chapters/two/core-design-patterns.tex
@@ -0,0 +1,3 @@
+\section{Introduction to core design patterns}
+
+TBD
View
3  src/main/book/content/chapters/two/notation-and-terminology.tex
@@ -0,0 +1,3 @@
+\section{Introduction to notation and terminology}
+
+TBD
View
1  src/main/book/content/chapters/two/toolbox.tex
@@ -0,0 +1 @@
+TBD
View
3  src/main/book/content/chapters/two/variation-in-presentation.tex
@@ -0,0 +1,3 @@
+\section{Variations in presentation}
+
+TBD
View
2  src/main/book/content/index/index.tex
@@ -0,0 +1,2 @@
+\index{monad!categorical}
+\index{monad!haskell}
View
24 src/main/book/content/local/local.aux
@@ -0,0 +1,24 @@
+\relax
+\@setckpt{local/local}{
+\setcounter{page}{1}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{0}
+\setcounter{section}{0}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{theorem}{0}
+}
View
11 src/main/book/content/local/local.tex
@@ -0,0 +1,11 @@
+\newtheorem{theorem}{Theorem}[section]
+\newtheorem{proposition}[theorem]{Proposition}
+\newtheorem{corollary}[theorem]{Corollary}
+\newtheorem{lemma}[theorem]{Lemma}
+\newtheorem{remark}[theorem]{Remark}
+\newtheorem{definition}[theorem]{Definition}
+
+
+\def\R{\mathbb{ R}}
+\def\S{\mathbb{ S}}
+\def\I{\mathbb{ I}}
View
26 src/main/book/content/monadic.aux
@@ -0,0 +1,26 @@
+\relax
+\ifx\hyper@anchor\@undefined
+\global \let \oldcontentsline\contentsline
+\gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
+\global \let \oldnewlabel\newlabel
+\gdef \newlabel#1#2{\newlabelxx{#1}#2}
+\gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
+\AtEndDocument{\let \contentsline\oldcontentsline
+\let \newlabel\oldnewlabel}
+\else
+\global \let \hyper@last\relax
+\fi
+
+\@writefile{toc}{\contentsline {chapter}{Contents}{i}{section*.1}}
+\@writefile{toc}{\contentsline {chapter}{Preface}{1}{chapter*.5}}
+\@input{chapters/one/ch.aux}
+\@input{chapters/two/ch.aux}
+\@input{chapters/three/ch.aux}
+\@input{chapters/four/ch.aux}
+\@input{chapters/five/ch.aux}
+\@input{chapters/six/ch.aux}
+\@input{chapters/seven/ch.aux}
+\@input{chapters/eight/ch.aux}
+\@input{chapters/nine/ch.aux}
+\@input{chapters/ten/ch.aux}
+\@input{bibliography/monadic.aux}
View
0  src/main/book/content/monadic.bbl
No changes.
View
16 src/main/book/content/monadic.bib
@@ -0,0 +1,16 @@
+@Comment \begin{thebibliography}{99}
+@Comment \addcontentsline{toc}{chapter}{Bibliography}
+@Comment \bibitem{lamport} L. Lamport. {\bf \LaTeX \ A Document Preparation System}
+@Comment Addison-Wesley, California 1986.
+@Comment \end{thebibliography}
+
+@article{milner91polyadicpi,
+ Author = {Robin Milner},
+ Date-Added = {2007-05-14 14:24:05 -0500},
+ Date-Modified = {2007-05-14 14:24:05 -0500},
+ Editor = {F.L. Hamer, W. Brauer, H. Schwichtenberg},
+ Journal = {Logic and Algebra of Specification},
+ Title = {The polyadic $\pi$-calculus: A tutorial},
+ Url = {http://www.lfcs.informatics.ed.ac.uk/reports/91/ECS-LFCS-91-180/ECS-LFCS-91-180.ps},
+ Volume = {Springer-Verlag},
+ Year = {1993}}
View
58 src/main/book/content/monadic.blg
@@ -0,0 +1,58 @@
+This is BibTeX, Version 0.99c (Web2C 7.5.4)
+The top-level auxiliary file: monadic.aux
+A level-1 auxiliary file: chapters/one/ch.aux
+A level-1 auxiliary file: chapters/two/ch.aux
+A level-1 auxiliary file: chapters/three/ch.aux
+A level-1 auxiliary file: chapters/four/ch.aux
+A level-1 auxiliary file: chapters/five/ch.aux
+A level-1 auxiliary file: chapters/six/ch.aux
+A level-1 auxiliary file: chapters/seven/ch.aux
+A level-1 auxiliary file: chapters/eight/ch.aux
+A level-1 auxiliary file: chapters/nine/ch.aux
+A level-1 auxiliary file: chapters/ten/ch.aux
+A level-1 auxiliary file: bibliography/monadic.aux
+I found no \citation commands---while reading file monadic.aux
+I found no \bibdata command---while reading file monadic.aux
+I found no \bibstyle command---while reading file monadic.aux
+You've used 0 entries,
+ 0 wiz_defined-function locations,
+ 94 strings with 711 characters,
+and the built_in function-call counts, 0 in all, are:
+= -- 0
+> -- 0
+< -- 0
++ -- 0
+- -- 0
+* -- 0
+:= -- 0
+add.period$ -- 0
+call.type$ -- 0
+change.case$ -- 0
+chr.to.int$ -- 0
+cite$ -- 0
+duplicate$ -- 0
+empty$ -- 0
+format.name$ -- 0
+if$ -- 0
+int.to.chr$ -- 0
+int.to.str$ -- 0
+missing$ -- 0
+newline$ -- 0
+num.names$ -- 0
+pop$ -- 0
+preamble$ -- 0
+purify$ -- 0
+quote$ -- 0
+skip$ -- 0
+stack$ -- 0
+substring$ -- 0
+swap$ -- 0
+text.length$ -- 0
+text.prefix$ -- 0
+top$ -- 0
+type$ -- 0
+warning$ -- 0
+while$ -- 0
+width$ -- 0
+write$ -- 0
+(There were 3 error messages)
View
0  src/main/book/content/monadic.idx
No changes.
View
10 src/main/book/content/monadic.lof
@@ -0,0 +1,10 @@
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
View
518 src/main/book/content/monadic.log
@@ -0,0 +1,518 @@
+This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2008.11.17) 14 OCT 2009 12:46
+entering extended mode
+**monadic.tex
+(./monadic.tex
+LaTeX2e <2003/12/01>
+Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
+ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
+stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
+h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
+kish, ukrainian, nohyphenation, loaded.
+(/opt/local/share/texmf-dist/tex/latex/base/book.cls
+Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
+(/opt/local/share/texmf-dist/tex/latex/base/leqno.clo
+File: leqno.clo 1998/08/17 v1.1c Standard LaTeX option (left equation numbers)
+)
+(/opt/local/share/texmf-dist/tex/latex/base/bk12.clo
+File: bk12.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
+)
+\c@part=\count79
+\c@chapter=\count80
+\c@section=\count81
+\c@subsection=\count82
+\c@subsubsection=\count83
+\c@paragraph=\count84
+\c@subparagraph=\count85
+\c@figure=\count86
+\c@table=\count87
+\abovecaptionskip=\skip41
+\belowcaptionskip=\skip42
+\bibindent=\dimen102
+)
+(/opt/local/share/texmf-dist/tex/latex/amsmath/amsmath.sty
+Package: amsmath 2000/07/18 v2.13 AMS math features
+\@mathmargin=\skip43
+
+For additional information on amsmath, use the `?' option.
+(/opt/local/share/texmf-dist/tex/latex/amsmath/amstext.sty
+Package: amstext 2000/06/29 v2.01
+
+(/opt/local/share/texmf-dist/tex/latex/amsmath/amsgen.sty
+File: amsgen.sty 1999/11/30 v2.0
+\@emptytoks=\toks14
+\ex@=\dimen103
+))
+(/opt/local/share/texmf-dist/tex/latex/amsmath/amsbsy.sty
+Package: amsbsy 1999/11/29 v1.2d
+\pmbraise@=\dimen104
+)
+(/opt/local/share/texmf-dist/tex/latex/amsmath/amsopn.sty
+Package: amsopn 1999/12/14 v2.01 operator names
+)
+\inf@bad=\count88
+LaTeX Info: Redefining \frac on input line 211.
+\uproot@=\count89
+\leftroot@=\count90