source: project/promotional/flyer/flyer.tex @ 21168

Last change on this file since 21168 was 21168, checked in by sjamaan, 9 years ago

Flyer: Add to the "what's it used for" that Spiffy's used for our wiki and hyde for our Gazette as a prime example of "dogfooding". Also fix the "fac" example so it actually works... Fix spelling mistake: "enthousiastic" => "enthusiastic". TODO: shorten some parts

File size: 7.9 KB
Line 
1%%
2%% A flyer for promoting Chicken Scheme!
3%%
4
5%% Add 'notumble' to preview in xdvi or preview in pdf without having to
6%% stand on your head to read page 2
7\documentclass[10pt,a4paper,notumble]{leaflet}
8%\documentclass[10pt,a4paper]{leaflet}
9
10\usepackage{slatex-chicken}
11\usepackage{graphics}
12\usepackage{color}
13
14\definecolor{maroon}{rgb}{0.5,0,0}
15\definecolor{darkgreen}{rgb}{0,0.3,0}
16\definecolor{darkblue}{rgb}{0,0,0.4}
17
18% TeX2page-like coloring for SLaTeX
19\def\keywordfont#1{\textbf{\textcolor{maroon}{#1}}}
20\def\variablefont#1{\textcolor{darkblue}{#1}}
21\def\constantfont#1{\textcolor{darkgreen}{#1}}
22
23\makeatletter
24\renewcommand{\section}{\@startsection
25  % Name, sectioning level, indent from margin, beforeskip, afterskip, style
26  {section}{1}{0mm}{\baselineskip}{\baselineskip}
27  {\centering\large\sffamily\bfseries}
28}
29
30\renewcommand{\subsection}{\@startsection
31  {subsection}{2}{0mm}{0.5\baselineskip}{0.5\baselineskip}
32  {\centering\small\sffamily\bfseries}
33}
34\makeatother
35
36%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
38\begin{document}
39
40\begin{center}
41  \Huge\textbf{Chicken Scheme}\\
42  \normalsize\textsc{``A practical and portable Scheme system''}
43  \vskip 0pt plus 1fill
44  \includegraphics[height=0.8\textwidth]{chicken-colored-no-text}
45  {\large \bf http://www.call-cc.org}
46  \vskip 0pt plus 1fill
47\end{center}
48
49
50\section{What is Chicken Scheme?}
51
52Chicken is a \emph{robust} and \emph{mature} compiler for the
53programming language \emph{Scheme}. Chicken has been around for over
5410 years now, and has a growing group of dedicated users.
55
56The system compiles to \emph{C}, which allows it to generate
57\emph{fast, portable code}. For easy development it also includes a
58powerful interpreter!
59
60Chicken is above all a \emph{practical} system; there are literally
61\emph{hundreds} of extension libraries (known as ``eggs'') available
62to help you get some real work done!  There are extensions for web
63development, concurrency and parallelism, cryptography, scientific
64computing and much, much more.
65
66All of the major platforms are supported, including GNU/Linux, the
67BSDs, MacOS X and Windows.
68
69\section{What is Scheme?}
70
71Scheme is a truly \emph{elegant and minimal} programming language
72which directly descends from Lisp, the \emph{second oldest}
73high level programming language still in use. But don't be fooled
74by that: It's still as fresh today as when it was first created!
75
76\begin{center}
77\includegraphics[angle=-90,width=8cm]{different}
78\end{center}
79
80It has very simple syntax so it is \emph{easy to learn}. This also
81makes it a very powerful tool: writing extensions to the language can
82be done right from \emph{within} the language, allowing you to
83\emph{mold the language} to better fit your program's
84domain. User-added functionality is treated no different from
85``built-in'' functionality.
86
87Scheme is well-known as a \emph{functional} programming language, but
88it's more accurately described as a \emph{multi-paradigm} language.
89Sure, you can program in a functional style, but also in all flavors
90of object-oriented, logical, distributed and even imperative styles.
91If tomorrow a new cool style of programming is invented, Schemers
92won't need to switch languages. Instead, they can just add it to their
93favorite language!
94
95\pagebreak
96\section{So, why Chicken and not {\mdseries\itshape$<$insert~Scheme~here$>$?}}
97
98Scheme is such a minimalist and easy to parse language that there are
99\emph{thousands} of implementations. However, implementing a
100\emph{good} Scheme is nontrivial. Of the implementations that are not
101toys, we prefer Chicken because it:
102
103\begin{itemize}
104\item sticks to the original minimalist spirit of Scheme
105\item produces \emph{fast} code
106\item has a growing number of useful libraries for real-world tasks
107\item integrates very easily with C
108\item has been actively maintained for more than 10 years!
109\item has an energetic and enthusiastic community!
110\end{itemize}
111
112\section{What is Chicken Scheme used for?}
113
114Scheme is a general purpose language, so your imagination is the limit!
115Here are just a few examples:
116
117The ease of integrating C libraries and the rapid turnaround offered
118by the interpreter make Chicken a great prototyping platform!
119
120Many of us automate our sysadmin tasks with Chicken.
121
122It's easy as pie to make web apps with Chicken's web server
123\emph{Spiffy} and the web framework \emph{Awful}. Our wiki is
124a good example of this.
125
126You can also generate static web pages using \emph{Hyde}, which powers
127our weekly ``Gazette'' newsletter.
128
129Data analysis can be done with all the major (open source) databases
130supported. You can visualize your data using the \emph{GNU Octave}
131extension, an easy \emph{X11} interface, or more portably though the
132\emph{IUP, SDL, OpenGL} or \emph{PDF} extensions.
133
134This very flyer was produced with {S\LaTeX}, a {\LaTeX} preprocessor
135which typesets Scheme code blocks with syntax-highlighting. Written in
136Scheme, of course!
137
138
139\section{Show me some examples!}
140
141\subsection{Hello world}
142
143How boring can it be?
144
145\begin{schemedisplay}
146(print "Hello, world!")
147\end{schemedisplay}
148
149\subsection{Obligatory factorial program}
150
151Slightly less boring than the hello world program:
152
153\begin{schemedisplay}
154(define fac
155  (lambda (n)
156    (if (= n 0)
157        1
158        (* n (fac (- n 1))))))
159
160(define number
161  (string->number (car (command-line-arguments))))
162(print "The factorial of " number " is " (fac number))
163\end{schemedisplay}
164
165\subsection{Integrating Scheme with C}
166
167\begin{schemedisplay}
168(define log10
169  (lambda (x)
170    (/ (log x) (log 10))))
171
172;; The same using log10 from C:
173(foreign-declare "#include <math.h>")
174
175(define log10-from-c
176  (foreign-lambda* double ((double x))
177    "double y;"
178    "y = log10(x);"
179    "C_return(y);"))
180
181;; Shorter versions:
182(define (log10 x) (/ (log x) (log 10)))
183(define log10-from-c
184  (foreign-lambda double "log10" double))
185\end{schemedisplay}
186
187% The example is a little contrived and maybe not too convincing
188
189As you can see, calling C functions is quite easy.  If you have longer
190C code, you can also write your functions in a separate C file and
191compile those against your Chicken program. You can just call those
192functions from Chicken.
193
194\section{Cool, I want to get started!}
195
196Great to have you on board! Chances are your operating system already
197packages Chicken Scheme. Try that first. Once you have it installed,
198you can try some code with the \textbf{C}hicken \textbf{S}cheme
199\textbf{i}nterpreter \emph{csi}.
200
201\begin{verbatim}
202$ csi
203
204CHICKEN
205(c)2008-2010 The Chicken Team
206(c)2000-2007 Felix L. Winkelmann
207Version 4.6.2 
208openbsd-unix-gnu-x86 [ manyargs dload ptables ]
209compiled 2010-10-18 on athene.my.domain (OpenBSD)
210
211#;1> (print "Welcome to Chicken Scheme!")
212Welcome to Chicken Scheme!
213#;2> (* 3 (+ 3 4) (/ 4 2))
21442
215#;3> ,q ; quits
216\end{verbatim}
217
218If you aren't familiar with Scheme yet, you can check out the
219extensive list of books at {\tt http://www.schemers.org/}
220
221For Chicken Scheme specific documentation, try our wiki. If you want
222to be kept up to date with developments in chicken you can read a
223weekly summary called the \emph{Chicken Gazette}.
224
225For Chicken Scheme specific questions there is a newbie-friendly
226mailing list \emph{chicken-users@nongnu.org}.
227
228The Chicken Team is also reachable on Freenode's IRC, channel
229\#chicken.
230
231\pagebreak
232
233\section{Chicken Scheme on the net}
234\begin{tabular}{ll}
235Main site:& {\tt http://www.call-cc.org/}\\
236Gazette:& {\tt http://gazette.call-cc.org}\\
237Code:& {\tt http://code.call-cc.org/}\\
238Chat: &{\tt \#chicken at irc.freenode.org}\\
239Documentation:& {\tt http://wiki.call-cc.org/}\\
240About Scheme:& {\tt http://www.schemers.org/}\\
241\end{tabular}
242
243\vskip 5cm
244
245\begin{center}
246\includegraphics[width=4cm]{continuation_guild_fighters}
247\end{center}
248
249
250\vskip 0pt plus 1fill
251{\small The Chicken Logo has been made by Joshua Griffith. The other
252  images are drawn by Conrad Barski, used with his kind
253  permission. Also have a look at his book \emph{``Land of Lisp''} on
254  {\tt http://landoflisp.com}}
255
256{\footnotesize
257\hbox to \hsize{\hss Last updated October 2010\@.}
258\par}
259
260
261\end{document}
Note: See TracBrowser for help on using the repository browser.