Browse Source

Initial import

master
Peter J. Jones 8 years ago
commit
364f37f990
2 changed files with 130 additions and 0 deletions
  1. 1
    0
      Makefile
  2. 129
    0
      main.tex

+ 1
- 0
Makefile View File

@@ -0,0 +1 @@
include $(HOME)/Develop/pmade/rc/latex/latex.mk

+ 129
- 0
main.tex View File

@@ -0,0 +1,129 @@
% ============================================================================
\documentclass{beamer}
\mode<presentation>
\beamertemplatenavigationsymbolsempty % remove presenter buttons

% ============================================================================
\usepackage{listings}

\lstset{%
basicstyle=\ttfamily,
numbers=left,
numberstyle=\tiny\color{gray},
stepnumber=1,
columns=fixed,
framerule=0.2pt,
rulecolor=\color{gray},
frame=l,
xleftmargin=\leftmargin,
xrightmargin=\rightmargin,
}

% ============================================================================
\title{EspressoScript}
\subtitle{Because CoffeeScript is Too Verbose}
\author{Peter Jones\\pjones@pmade.com}

% ============================================================================
\begin{document}

% ============================================================================
\begin{frame}
\titlepage
\end{frame}

% ============================================================================
\begin{frame}
\frametitle{EspressoScript is Compiled Server-Side}
EspressoScript compiles down to CoffeeScript\\(which compiles down to
JavaScript).
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Comments}

Invalid expressions are automatically treated as comments.
\begin{lstlisting}
This is a comment.
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Strings}
Strings begin with a single quote. No need to terminate.
Interpolation is done with a backtick.
\begin{lstlisting}
x = 'This is a string.
y = 'A string with interpolation: `x
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Arrays}
More than one type literal or expression is automatically turned
into an array.

\begin{lstlisting}
x = 1 2 3
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Automatic Loop Generation}

Function calls followed by an array automatically call that function
once for each element of the array.

\begin{lstlisting}
x = 1 2 3
myFunction() x
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Hashes}

Hashes are automatically created when the array syntax flows across
multiple lines in pairs.

\begin{lstlisting}
x = name 'Peter
email 'pjones@pmade.com
serious f
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Functions}
Function definition syntax and call syntax have been simplified.
\begin{lstlisting}
x <- (i j) i + j
x(1 2)
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Syntax: Classes}

Class definition couldn't be simpler. Call methods using CamelCase.
\begin{lstlisting}
Person =
init <- (@name)
name <- @name

me = Person('Peter)
meName()
\end{lstlisting}
\end{frame}

\begin{frame}
\begin{center}
Just kidding.
\end{center}
\end{frame}

% ============================================================================
\end{document}

Loading…
Cancel
Save