\documentclass[a4paper,landscape,titlepage]{slides}

% PDF-specific settings.
\pdfpagewidth=297mm
\pdfpageheight=210mm

\usepackage[latin1]{inputenc}
\usepackage{pifont}
\usepackage{url}

\newcommand{\theding}{\ding{43}}

\title{Introduction to Scripting \\
  {\normalsize Canterbury Linux Users Group}}
\author{Carey Evans}
\date{10 August 1998}

\begin{document}

\maketitle

\begin{slide}
  \begin{center}
    {\Large Introduction}
  \end{center}

  \begin{center}
    \begin{tabular}{l@{\hspace{3cm}}l}
        \theding{} What? & \theding{} Why? \vspace{2cm}\\
        \theding{} Which? & \theding{} How? \vspace{2cm}\\
        \theding{} Who? & \theding{} Where?
    \end{tabular}
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries What is a Script?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large What is a script?
  \end{center}

  \begin{dinglist}{43}
  \item Short program
  \item Not compiled
  \item Buzzword compliant:
    \begin{dinglist}{51}
    \item (Very) High Level Language
    \item Rapid Application Development (RAD)
    \end{dinglist}
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large What are scripts used for?
  \end{center}

  \begin{dinglist}{43}
  \item Automating tedious, complex or repetitive tasks
  \item Text processing
  \item Saving ten minutes work by spending an hour writing a script
    to do it for you
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries Why script?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Why use a script, instead of C, C++, etc.?
  \end{center}

  \begin{dinglist}{43}
  \item Shallower learning curve
  \item Faster development
  \item Easier debugging
  \item Better string, list and hash support
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Why learn to script at all?
  \end{center}

  \begin{dinglist}{43}
  \item Make things easier for yourself
  \item Customise your environment
  \item Impress friends/co-workers/boss
  \item Wake up one day and discover you're a computer programmer
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries Which scripting languages exist?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large From tools to real languages
  \end{center}

  \begin{dinglist}{43}
  \item POSIX /bin/sh, textutils, shellutils, sed and awk
  \item Tcl/Tk
  \item Perl
  \item Python
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Common features
  \end{center}

  \begin{dinglist}{51}
  \item String data type and operations, including regular expressions
  \item Arithmetic operations
  \item Powerful control structures, including user defined functions
  \item Extensible
  \item Free with every modern Linux distribution!
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Other embedded languages
  \end{center}

  \begin{dinglist}{43}
  \item Emacs Lisp
  \item Guile --- GIMP and Gnome
  \item MUD and IRC scripting languages
  \item Java applets and Javascript --- WWW browsers
  \end{dinglist}

  Not covered in this introduction.
\end{slide}

\begin{slide}
  \begin{center}
    \Large Other platforms
  \end{center}

  \begin{dinglist}{42}
  \item DOS batch files --- aren't very good at \emph{anything}
  \item REXX --- Part of OS/2, Amiga and OS/400, available for PC-DOS
    and Unix
  \item AppleScript, DCL (VMS), CL (OS/400)
  \item LotusScript (Notes/Domino), VBA (MS Office)
  \item Many, many others...
  \end{dinglist}
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries How do they compare?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large /bin/sh
  \end{center}
  
  \ding{51} A POSIX shell is quite powerful, especially for things
  involving other programs, and it should be available on any Unix.
  There are lots of tools available.  The install process for Debian
  1.3 was written for ash.

  \ding{55} However, larger scripts get hard to maintain, and only
  simple data types are available.  The quoting of strings containing
  whitespace is not intuitive.  It's not very fast.  There is very
  limited graphics.
\end{slide}

\begin{slide}
  \begin{center}
    \Large Tcl/Tk
  \end{center}
  
  \ding{51} The GUI integration (with Tk) is very good.  Everything is 
  a string.  It's possible to extend Tcl with C, or embed Tcl in C,
  without too much trouble.
  
  \ding{55} Everything is a string.  Quoting is bizarre.  Larger
  scripts can become hard to maintain.  It was slow, but this is
  improving.
\end{slide}

\begin{slide}
  \begin{center}
    \Large Perl
  \end{center}
  
  \ding{51} \emph{Excellent} text processing support.  Lots of
  contributed modules.  Very widely used.  Object orientation, module
  and name-space support.  Supports Tk.  It's possible to embed Perl
  in C (e.g.  Apache) or extend Perl with C (many of the modules).
  There's more than one way to do it.
  
  \ding{55} Overuse of punctuation.  Many traps for the unwary.
  There's more than one way to do it.
\end{slide}

\begin{slide}
  \begin{center}
    \Large Python
  \end{center}
  
  \ding{51} More design than accumulation.  Control flow is based on
  indentation, and punctuation is used sparingly, making Python
  programs look cleaner.  Real object orientation.  Scalable to large
  projects.  Supports Tk, and Perl regular expressions. Can be
  embedded and extended.  Good use of exceptions.
  
  \ding{55} Control flow is based on indentation, which can be strange
  for new users.  Reference based variables can have unexpected
  consequences.
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries Who wants to see some examples?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Simple examples
  \end{center}

  \begin{itemize}
  \item Ask someone their name and if it's their birthday.  If it is,
    `sing' happy birthday to them.

  \item Sort the lines in a text file, where the fields are separated
    by colons, by the number in the third field, and output the lines
    where this number is 1000 or greater.
  \end{itemize}
\end{slide}

\begin{slide}
  \begin{center}
    \Large Less simple examples
  \end{center}

  \begin{itemize}
  \item Ask someone their name and if it's their birthday, but this
    time do it graphically.

  \item Check whether a web page has been updated.
  \end{itemize}
\end{slide}

\begin{slide}
  \begin{center}
    \Large\bfseries Where can I find out more?
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    {\Large Home pages}

    Python: \url+http://www.python.org/+

    Perl: \url+http://language.perl.com/+

    Tcl: \url+http://www.scriptics.com/resource/+
  \end{center}
\end{slide}

\begin{slide}
  \begin{center}
    {\Large Newsgroups}

    Python: \verb+comp.lang.python+

    Perl: \url+comp.lang.perl.*+

    Tcl: \url+comp.lang.tcl.*+
  \end{center}
\end{slide}




\begin{slide}
  \begin{center}
    Colophon
  \end{center}

  These slides were produced with pdf\TeX{} from te\TeX{} 0.9 on
  Debian GNU/Linux 2.0, using the slides document class, with the help 
  of \emph{The \LaTeX{} Companion} and AUC-\TeX.
  
  References included \emph{Programming Perl}, \emph{Programming
    Python}, many Info files and man pages, the Perl and Python
  language comparisons on their respective web sites, and a variety of 
  other web pages.
  
  The slides were written with the help of Garbage, Catatonia,
  Meredith Brooks, Savage Garden, Republica, and some excellent
  built-in monitor speakers.
\end{slide}


\pdfinfo{
  /Author (Carey Evans)
  /Title (Introduction to Scripting)
  /Subject (Scripting)
  /Keywords (scripting, perl, tcl, python)
}

\end{document}

% Local Variables:
% TeX-parse-self: t
% TeX-auto-save: t
% End:

