%% Presentation about Why Scheme is cool

%% Some useful variations of the document class
%%\documentclass[draft]{beamer}
%%\documentclass[handout]{beamer}
% silence hyperref warnings
\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{listings}
%% get the smiley
\usepackage{wasysym}
\mode<presentation>{\usetheme{Copenhagen}}
\title{Why Scheme rocks}
\author{Marek~Kubica}
\institute{munich-lisp}
\date{April~24,~2009}

%% get rid of navigation symbols
%\setbeamertemplate{navigation symbols}{}
\beamertemplatenavigationsymbolsempty

\lstset{
	language=Lisp,
	basicstyle=\normalsize,
	emph={syntax-rules,define-syntax},
	emphstyle=\color{blue}\bfseries,
	commentstyle=\color{red}\slshape,
	numberstyle=\color{green},
}

\titlegraphic{\includegraphics[height=4.5cm]{plt-larval}}

\begin{document}

\frame{\titlepage}

% define the logo after the title page
\logo{\includegraphics[width=1.5cm]{flag}}

\begin{frame}{My Scheme experience}
  \begin{block}{Scheming for fun}
    \begin{itemize}
      \item heard about Lisp long ago
      \item thought ages which Lisp to choose
      \item decided to start with Scheme (which implementation?)
    \end{itemize}
  \end{block}
  \begin{block}{What I'm doing with Scheme}
    \begin{itemize}
      \item Simple games
      \item Calculating my working hours
      \item Solving problems in a functional way
      \item General playthings like Haskell-style currying
        and useless macros
    \end{itemize}
    So don't ask \emph{too} tricky questions \smiley
  \end{block}
\end{frame}

\begin{frame}{Why Scheme?}
  \begin{block}{Advantages of Scheme}
    \begin{itemize}
      \item easy to pick up
      \item dynamically typed, garbage collected
      \item free and open development (free as in speech and beer)
      \item nice for doing first steps in functional programming
      \item Read Eval Print Loop (honestly, how can one live without?)
      \item livecoding!
    \end{itemize}
  \end{block}
\end{frame}


\begin{frame}{Scheme is dead}
  \begin{center}
    \LARGE{\textbf{SCHEME IS DEAD!}}
  \end{center}
  \pause
  \begin{block}{Not true}
    \begin{itemize}
      \item More and more users (recent interest in functional programming)
      \item Evolving standards
      \item Many implementations
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}{Growth}
  \begin{block}{PLT Scheme}
    \includegraphics[height=3cm]{postings-plt}
  \end{block}
  \begin{block}{Chicken}
    \includegraphics[height=3cm]{postings-chicken}
  \end{block}
\end{frame}

\begin{frame}{Growth, part two}
  \begin{block}{Standards}
    \begin{itemize}
      \item IEEE Std 1178-1990, somewhere in 1990
      \item R\textsuperscript{5}RS, 1st August 1998
      \item R\textsuperscript{6}RS, 27th September 2007
      \item R\textsuperscript{7}RS, Steering Comitee elected
    \end{itemize}
  \end{block}
  \begin{block}{SRFIs}
    Scheme Requests for Implementation \url{http://srfi.schemers.org/}.
    A collection of useful libraries that are ported to many
    implementations.
  \end{block}
\end{frame}

\begin{frame}{Growth, part three}
  Multiple high-quality implementations of Scheme, running on their
  own, targeting the JVM, CLR; compilers, interpreters
  \begin{block}{Implementations}
    \begin{columns}[onlytextwidth,t]
      \column{0.5\textwidth}
        \begin{enumerate}
          \item PLT Scheme 
          \item Chicken
          \item Larceny
          \item Guile
          \item Ikarus
          \item Ypsilon
          \item Gambit
        \end{enumerate}
      \column{0.5\textwidth}
        \begin{enumerate}
	  % let it start with a higher value
	  \setcounter{enumi}{7}
          \item Chez
          \item Bigloo
          \item Gauche
          \item IronScheme
          \item MIT Scheme
          \item Mosh Scheme
        \end{enumerate}
    \end{columns}
  \end{block}
  And these are only the ones with recent releases
\end{frame}

\begin{frame}{Livecoding}
  \begin{block}{What is live coding}
    Writing software which creates visuals/audio interactively as an
    performance of art.
  \end{block}
  \begin{block}{Scheme systems}
    Due its dynamic nature Scheme is a rather popular language
    \begin{itemize}
      \item Fluxus
      \item Impromptu
    \end{itemize}
    Care to see some videos?
  \end{block}
\end{frame}

\begin{frame}{Where to start?}
  \begin{columns}[c]
    \column{0.55\textwidth}
      \includegraphics[width=6cm]{mred}
    \column{0.45\textwidth}
      \begin{block}{DrScheme}
        \begin{itemize}
	  \item Nice editor for Scheme
	  \item Part of PLT Scheme
	  \item Works out-of-the-box (no configuration)
	  \item useful for beginners
	  \item macro-stepper
	  \item profiling tools
	\end{itemize}
      \end{block}
  \end{columns}
  And don't forget to pick a book!
\end{frame}

\begin{frame}{Structure and Interpretation of Computer Programs}
  \begin{columns}[c]
    \column{0.5\textwidth}
      \includegraphics[height=8cm]{sicp-cover}
    \column{0.5\textwidth}
      \begin{block}{SICP}
        \begin{itemize}
	  \item A computer science classic, the \emph{wizard book}
	  \item full text available online from MIT
	  \item lecture videos also available
	\end{itemize}
      \end{block}
  \end{columns}
\end{frame}

\begin{frame}{How to Design Programs}
  \begin{columns}[c]
    \column{0.5\textwidth}
      \includegraphics[height=8cm]{htdp-cover}
    \column{0.5\textwidth}
      \begin{block}{HtDP}
        \begin{itemize}
	  \item teaches many programming techniques
	  \item from the creators of PLT
	  \item full text available online
	\end{itemize}
      \end{block}
  \end{columns}
\end{frame}

\begin{frame}{The Scheme Programming Language}
  \begin{columns}[c]
    \column{0.5\textwidth}
      \includegraphics[height=8cm]{tspl3-cover}
    \column{0.5\textwidth}
      \begin{block}{TSPL}
        \begin{itemize}
	  \item describes the language
	  \item full text available online
	\end{itemize}
      \end{block}
  \end{columns}
\end{frame}

\begin{frame}{Wait, there's even more}
  \begin{columns}[c]
    \column{0.5\textwidth}
      \includegraphics[height=8cm]{sicp-wizard}
    \column{0.5\textwidth}
      \begin{block}{Some others}
        \begin{itemize}
	  \item Die Macht der Abstraktion
	  \item Concrete Abstractions
	  \item Simply Scheme
	  \item Teach yourself Scheme in fixnum days
	\end{itemize}
      \end{block}
  \end{columns}
\end{frame}

\begin{frame}{Why PLT?}
  \begin{block}{Advantages of PLT}
    \begin{itemize}
      \item Everything-in-one package
      \item Extensive documentation (master index: 354 pages)
      \item GUI toolkit, editor, libraries, FFI,
        3D support, network access, XML, documentation tools
      \item continuation based Web server (think Seaside)
      \item a package installation system, PLaneT
      \item friendly mailing list
    \end{itemize}
  \end{block}
  \begin{block}{Language experiments}
    \begin{itemize}
      \item Typed Scheme: static type system on top of Scheme
      \item Lazy Scheme: Scheme with lazy evaluation
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}[fragile]{PLaneT}
  A central repository for PLT packages
  \begin{block}{Usage}
    \begin{enumerate}
      \item Visit \url{http://planet.plt-scheme.org/}
      \item Choose package
      \item Copy-paste installation code into REPL
      \item Optional: read documentation
    \end{enumerate}
  \end{block}

  \begin{block}{Code}
    Let's get a flickr interface:
    \begin{lstlisting}
(require (planet dvanhorn/flickr:1:0/flickr))
    \end{lstlisting}
    downloads, installs and loads the package.
  \end{block}
\end{frame}

\begin{frame}{Macros}
  \begin{block}{Code that transforms code}
    Code is put in, transformed by a macro, executed as regular
    Scheme code.
    \begin{itemize}
      \item Pattern-based transformations
      \item not like C macros
      \item syntax-case vs. syntax-rules
      \item PLT supports defmacro, too: (require mzlib/defmacro)
    \end{itemize}
  \end{block}
  \begin{block}{Further reading}
    \begin{itemize}
      \item Documentation: \url{http://www.scheme.com/tspl3/syntax.html}
      \item Scheme vs. CL macros: \url{http://www.hobbit-hole.org/?p=151}
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}{Macros, example}
  A postfixed Scheme using pattern-matching macros
  \lstinputlisting{postscheme.scm}
\end{frame}

\begin{frame}{Object-oriented programming}
  Not the preferred way to use Scheme
  \begin{block}{Pick one object system}
    \begin{columns}[onlytextwidth,t]
      \column{0.3\textwidth}
	\begin{enumerate}
	  \item Tiny-CLOS
	  \item Swindle
	  \item GOOPS
	  \item STklos
	  \item Meroon
	  \item YASOS
	  \item TinyTalk
	\end{enumerate}
      \column{0.3\textwidth}
        \begin{enumerate}
	  \setcounter{enumi}{7}
	  \item OakLisp
	  \item BOS
	  \item SCOOPS
	  \item SOS
	  \item Gauche's
	  \item Protobj
          \item Prometheus
	\end{enumerate}
      \column{0.3\textwidth}
        \begin{enumerate}
	  \setcounter{enumi}{14}
	  \item ClosureTalk
	  \item LispMeObjects
	\end{enumerate}
    \end{columns}
  \end{block}
  \begin{block}{Rough overview}
    \url{http://community.schemewiki.org/?object-systems}
  \end{block}
\end{frame}

\begin{frame}{Functional programming}
  My preciousss!
  \begin{block}{Toolbox}
    \begin{itemize}
      \item anonymous functions
      \item first-class functions
      \item tail-call optimization
      \item map/filter/fold (in many variants)
      \item currying
      \item immutable types
    \end{itemize}
  \end{block}
  \begin{block}{Community}
    Cares about functional solutions to problems.
  \end{block}
\end{frame}

\begin{frame}{Not everything is golden, though}
  \begin{block}{The cons}
    \begin{itemize}
      \item Incompatibility
      \item Lack of libraries
      \item Divided community (R\textsuperscript{6}RS haters,
        PLT community, R\textsuperscript{4}RS lovers)
      \item Extensive but complex documentation
      \item Virtually unknown
      \item Many prejudices about Lisp in general
      \item Few free software projects that are something
        other than implementations \smiley
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}{Finally}
  \begin{block}{Scheme ressources}
    \begin{itemize}
      \item \url{http://schemers.org/} - lists books, documents,
        implementations, SRFIs, user groups (us too!)
      \item \url{http://community.schemewiki.org/} - the Scheme community wiki
      \item \url{http://schemecookbook.org/} - recipes for real-world problems
      \item \url{http://docs.plt-scheme.org} - PLT documentation
      \item \#scheme on freenode
    \end{itemize}
  \end{block}
  \begin{block}{Thanks for listening!}
    If you liked the slides, send them to friends, co-workers,
    to let them know about Lisp in general. I tried to keep them
    mostly understandable without the audio.
  \end{block}
\end{frame}

\end{document}

