Debian Codegraph @

src/doc/old-manual/preface.xmlf

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE preface [
3 <!ENTITY % eclent SYSTEM "ecl.ent">
4 %eclent;
5 ]>
6 <book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
7 <preface xml:id="preface">
8 <title>Preface</title>
9
10 <section xml:id="preface.words">
11 <title>About this book</title>
12
13 <para>This manual is part of the &ECL; software system. It documents
14 deviations of &ECL; from various standards (&ANSI;, &AMOP;,...), extensions,
15 daily working process (compiling files, loading sources, creating programs,
16 etc) and the internals of this implementation.</para>
17
18 <para>This book is not intended as a source to learn &CommonLisp;. There are
19 other tutorials and textbooks available in the Net which serve this
20 purpose. The homepage of the <ulink url="http://www.lisp.org">Association of
21 Lisp Users</ulink> contains a good list of links of such teaching and
22 learning material.</para>
23
24 <para>This book is structured into three parts. We begin with <xref
25 linkend="part.standards"/> which documents all parts of the standard which
26 are left as <emphasis>implementation specific</emphasis>. For instance,
27 precision of floating point numbers, available character sets, actual
28 input/output protocols, etc.</para>
29
30 <para><xref linkend="part.extensions"/> introduces all features which are
31 specific to &ECL; and which lay outside the standard. This includes
32 configuring, building and installing &ECL; multiprocessing capabilities,
33 graphics libraries, interfacing with the operating system, etc.</para>
34
35 <para><xref linkend="part.internals"/> deals with the internals of the
36 implementation. This part is only intended for experienced programmers that
37 want to learn how &ECL; does its work and wish to extend it, customize it or
38 port it to new architectures. This part of the documentation is the most
39 fragile one and prone to change.</para>
40 </section>
41
42 <section xml:id="preface.what.is.ecl">
43 <title>What is &ECL;?</title>
44
45 <para>&CommonLisp; is a general purpose programming language. It lays its
46 roots in the <acronym>LISP</acronym> programming language <xref
47 linkend="bib.LISP1.5"/> developed by John McCarthy in the 80s. &CommonLisp;
48 as we know it &ANSI; is the result of an standarization process aimed at
49 unifying the multiple lisp dialects that were born from that language.</para>
50
51 <para>&ECL; is an implementation of the Common-Lisp language. As such it
52 derives from the implementation of the same name developed by Giuseppe
53 Attardi, which itself was built using code from the Kyoto Common-Lisp <xref
54 linkend="bib.KCL"/>. See <xref linkend="preface.history"></xref> for the
55 history of the code you are about to use.</para>
56
57 <para>&ECL; (ECL for short) uses standard C calling conventions for Lisp
58 compiled functions, which allows C programs to easily call Lisp functions
59 and vice versa. No foreign function interface is required: data can be
60 exchanged between C and Lisp with no need for conversion.</para>
61
62 <para>&ECL; is based on a Common Runtime Support (CRS) which provides basic
63 facilities for memory management, dynamic loading and dumping of binary
64 images, support for multiple threads of execution. The CRS is built into a
65 library that can be linked with the code of the application. &ECL; is
66 modular: main modules are the program development tools (top level, debugger,
67 trace, stepper), the compiler, and CLOS. A native implementation of CLOS is
68 available in &ECL;. A runtime version of &ECL; can be built with just the
69 modules which are required by the application.</para>
70
71 <para>The &ECL; compiler compiles from Lisp to C, and then invokes
72 the GNU C compiler to produce binaries. While former releases of ECL
73 adhere to the the reference of the language given in &Steele84;, the
74 aim of &ECL; is now to achieve maximum compliance with ANSI
75 Common-Lisp, the most up to date standard for Common-Lisp.</para>
76
77 </section>
78
79 <section xml:id="preface.history">
80 <title>History</title>
81
82 <para><figure float="1" xml:id="fig.family-tree">
83 <title>ECL's family tree</title>
84 <mediaobject>
85 <imageobject>
86 <imagedata align="center" fileref="figures/hierarchy.png"
87 format="PNG" width="300px"/>
88 </imageobject>
89 </mediaobject>
90 </figure>
91
92 The &ECL; project is an implementation of the Common-Lisp language inherits
93 from many other previous projects, as shown in <xref
94 linkend="fig.family-tree"/>. The oldest ancestor is the Kyoto Common Lisp, an
95 implementation developed at the the Research Institute for Mathematical
96 Sciences, Kyoto University <xref linkend="bib.KCL"/>. This
97 implementation was developed partially in C and partially in Common Lisp
98 itself and featured a lisp to C translator.</para>
99
100 <para>The <acronym>KCL</acronym> implementation remained a propietary project
101 for some time. During this time, William F. Schelter improved
102 <acronym>KCL</acronym> in several areas and developed Austin Kyoto
103 Common-Lisp (<acronym>AKCL</acronym>). However, those changes had to be
104 distributed as patches over the propietary <acronym>KCL</acronym>
105 implementation and it was not until much later that both
106 <acronym>KCL</acronym> and <acronym>AKCL</acronym> became freely available
107 and gave rise to the GNU Common Lisp project, <acronym>GCL</acronym>.</para>
108
109 <para>Around the 90's, Giusseppe Attardi worked on the <acronym>KCL</acronym>
110 and <acronym>AKCL</acronym> code basis to produce an implementation of
111 &CommonLisp; that could be embedded in other C programs <xref
112 linkend="bib.ECL"/>. The result was an implementation sometimes known as
113 <acronym>ECL</acronym> and sometimes as <acronym>ECoLisp</acronym>, which
114 achieved rather good compliance to the informal specification of the language
115 in &Steele84;, and which run on a rather big number of platforms.</para>
116
117 <para>The &ECL; project stagnated a little bit in the coming years. In
118 particular, certain dependencies such as object binary formats, word sizes
119 and some C quirks made it difficult to port it to new platforms. Furthermore,
120 &ECL; was not compliant with the <acronym>ANSI</acronym> specification, a
121 goal that other Common Lisps were struggling to achieve.</para>
122
123 <para>This is where the <acronym>ECLS</acronym> or
124 <acronym>ECL</acronym>-Spain project began. Juanjo García-Ripoll took
125 the ECoLisp sources and worked on them, with some immediate goals in mind:
126 increase portability, make the code 64-bit clean, make it able to build
127 itself from scratch, without other implementation of &CommonLisp; and restore
128 the ability to link &ECL; with other C programs.</para>
129
130 <para>Those goals were rather quickly achieved. &ECL; became ported to a
131 number of platforms and with the years also compatibility with the
132 <acronym>ANSI</acronym> specification became a more important goal. At some
133 point the fork <acronym>ECLS</acronym>, with agreement of Prof. Attardi, took
134 over the original <acronym>ECL</acronym> implementation and it became what it
135 is nowadays, a community project.</para>
136
137 <para>In 2013 once again project got unmaintained. In 2015 Daniel Kochmański
138 took position of maintainer with consent of Juanjo García-Ripoll.</para>
139
140 <para>The &ECL; project owes a lot to different people who have contributed
141 in many different aspects, from pointing out bugs and incompatibilities of
142 &ECL; with other programs and specifications, to actually solving these bugs
143 and porting &ECL; to new platforms.</para>
144
145 <para>Current development of &ECL; is still driven by Daniel Kochmański with
146 main focus on improving ANSI compliance and compapibility with &CommonLisp;
147 libraries ecosystem, fixing bugs, improving speed and protability. The
148 project homepage is located at <ulink
149 url="https://common-lisp.net/project/ecl/">
150 <uri>https://common-lisp.net/project/ecl/</uri></ulink>, and there are
151 pointers to all project resources like mailing list and main
152 repository.</para>
153
154 </section>
155
156 <section xml:id="Copyright.ECL">
157 <title>Copyright of ECL</title>
158
159 <para>&ECL; is distributed under the GNU LGPL, which allows for commercial
160 uses of the software. A more precise description is given in the Copyright
161 notice which is shipped with &ECL;.</para>
162
163 <programlisting>
164 ---- BEGINNING OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------
165
166 Copyright (c) 2015, Daniel Kochmański
167 Copyright (c) 2000, Juan Jose Garcia Ripoll
168 Copyright (c) 1990, 1991, 1993 Giuseppe Attardi
169 Copyright (c) 1984 Taiichi Yuasa and Masami Hagiya
170 All Rights Reserved
171
172 ECL is free software; you can redistribute it and/or modify it
173 under the terms of the GNU Library General Public License as published
174 by the Free Software Foundation; either version 2 of the License, or
175 (at your option) any later version; see file 'Copying'.
176
177 This program is distributed in the hope that it will be useful,
178 but WITHOUT ANY WARRANTY; without even the implied warranty of
179 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180 GNU Library General Public License for more details.
181
182 You should have received a copy of the GNU Library General Public License
183 along with this program; if not, write to the Free Software
184 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
185
186 PLEASE NOTE THAT:
187
188 This license covers all of the ECL program except for the files
189 src/lsp/loop.lsp ; Symbolic's LOOP macro
190 src/lsp/pprint.lsp ; CMUCL's pretty printer
191 src/lsp/format.lsp ; CMUCL's format
192 and the directories
193 contrib/ ; User contributed extensions
194 Look the precise copyright of these extensions in the corresponding
195 files.
196
197 Report bugs, comments, suggestions to the ecl mailing list:
198 [email protected].
199
200 ---- END OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------------</programlisting>
201 </section>
202
203 <section xml:id="Copyright.Manual">
204 <title>Copyright of this manual</title>
205
206 <para>Copyright: Daniel Kochmański, 2015.</para>
207 <para>Copyright: Juan José García-Ripoll, 2006.</para>
208
209 <para>Copyright: Kevin M. Rosenberg 2002-2003, (UFFI Reference)</para>
210
211 <itemizedlist>
212 <listitem><para>&ACL; is a registered trademark of Franz Inc.</para></listitem>
213 <listitem><para>&LW; is a registered trademark of Xanalys Inc.</para></listitem>
214 <listitem><para><productname>Microsoft Windows</productname> is a registered
215 trademark of Microsoft Inc.</para></listitem>
216 <listitem><para>Other brand or product names are the registered trademarks
217 or trademarks of their respective holders.</para></listitem>
218 </itemizedlist>
219
220 <para>Permission is granted to copy, distribute and/or modify this document
221 under the terms of the GNU Free Documentation License, Version 1.1 or any
222 later version published by the Free Software Foundation; with no Invariant
223 Sections, with the no Front-Cover Texts, and with no Back-Cover Texts. A
224 copy of the license is shown below.</para>
225
226 <programlisting>
227 &GFDL;</programlisting>
228
229 </section>
230
231 <section xml:id="preface.installation">
232 <title>Installation</title>
233
234 <para>The following sections describe which machines are supported by &ECL;,
235 how to build and install it on them. You should read at least <xref
236 linkend="preface.platforms"/> and in particular <xref linkend="table.ports"/>
237 which details the other sections containing installation instructions for
238 your platform.</para>
239
240 <section xml:id="preface.platforms">
241 <title>Supported platforms</title>
242
243 <table xml:id="table.ports">
244 <title>Supported platforms</title>
245 <tgroup cols="3">
246 <thead>
247 <row>
248 <entry>Architecture</entry>
249 <entry>Operating system</entry>
250 <entry>Toolchain</entry>
251 <entry>Tested<footnote><para>YES means that a dedicated machine regularly builds and tests &ECL; on this platform.</para></footnote></entry>
252 </row>
253 </thead>
254 <tbody>
255 <row>
256 <entry>x86 <footnote xml:id="note.x86"><para>Intel 32 bit processors
257 (Pentium, Pentium II, Pentium 3, Pentium 4) and AMD
258 clones</para></footnote>
259 </entry>
260 <entry>Linux</entry>
261 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
262 <entry>YES</entry>
263 </row>
264 <row>
265 <entry>x86_64<footnote xml:id="note.amd"><para>AMD and Intel processors with
266 64 bit extensions.</para></footnote></entry>
267 <entry>Linux</entry>
268 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
269 <entry>YES</entry>
270 </row>
271 <row>
272 <entry>PPC</entry>
273 <entry>Linux</entry>
274 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
275 <entry>YES</entry>
276 </row>
277 <row>
278 <entry>Itanium</entry>
279 <entry>Linux</entry>
280 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
281 <entry>YES</entry>
282 </row>
283 <row>
284 <entry>x86</entry>
285 <entry>FreeBSD</entry>
286 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
287 <entry>YES</entry>
288 </row>
289 <row>
290 <entry>x86</entry>
291 <entry><link linkend="preface.bsd">OpenBSD</link></entry>
292 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
293 <entry>YES</entry>
294 </row>
295 <row>
296 <entry>x86</entry>
297 <entry><link linkend="preface.bsd">NetBSD</link></entry>
298 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
299 <entry>YES</entry>
300 </row>
301 <row>
302 <entry>x86</entry>
303 <entry>Windows XP, Vista, 7</entry>
304 <entry><link linkend="preface.msvc">Microsoft compilers</link></entry>
305 <entry>YES</entry>
306 </row>
307 <row>
308 <entry>x86</entry>
309 <entry>Windows XP, Vista, 7</entry>
310 <entry><link linkend="preface.autoconf">&cygwin;</link></entry>
311 <entry>YES</entry>
312 </row>
313 <row>
314 <entry>x86</entry>
315 <entry>Windows XP, Vista, 7, 8</entry>
316 <entry><link linkend="preface.autoconf">&mingw; and Msys tools</link></entry>
317 <entry>YES</entry>
318 </row>
319 <row>
320 <entry>x86</entry>
321 <entry>OS X Tiger</entry>
322 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
323 <entry>YES</entry>
324 </row>
325 <row>
326 <entry>x86_64</entry>
327 <entry>OS X Tiger</entry>
328 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
329 <entry>YES</entry>
330 </row>
331 <row>
332 <entry>x86</entry>
333 <entry>Solaris</entry>
334 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
335 <entry>YES</entry>
336 </row>
337 <row>
338 <entry>x86_64</entry>
339 <entry>Solaris</entry>
340 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
341 <entry>YES</entry>
342 </row>
343 <row>
344 <entry>Sparc</entry>
345 <entry>Solaris</entry>
346 <entry><link linkend="preface.autoconf">Autoconf</link></entry>
347 <entry>YES</entry>
348 </row>
349 </tbody>
350 </tgroup>
351 </table>
352
353 <para>In <xref linkend="table.ports"/> we show the operating systems in
354 which ECL is known to run and where it is regularly tested. Note that ECL
355 might successfully build on other platforms, and that porting is relatively
356 easy. We regularly get reports on ECL being built on other platforms (ARM,
357 Motorola 68x, Sparc, etc), so the best thing is to try yourself.</para>
358
359 </section>
360
361 <section xml:id="preface.autoconf">
362 <title>Autoconf based configuration</title>
363
364 <para>&ECL;, like many other free programs, can be built and installed a GNU
365 tool called Autoconf. This is a set of automatically generated scripts that
366 detect the features of your machine, such as the compiler type, existing
367 libraries, desired installation path, and configures &ECL; accordingly. The
368 following procedure describes how to build &ECL; using this procedure and it
369 applies to all platforms except for the Windows ports.</para>
370
371 <procedure>
372 <step>
373 <para>Unpack the tar file</para>
374 <screen>$ gunzip -c ecl-16.0.0.tgz | tar xf -</screen>
375 </step>
376 <step><para>Choose a directory in which you will install &ECL;. Following
377 the Unix covention we will use
378 <filename>/usr/local</filename></para></step>
379 <step>
380 <para>Run the configuration file
381 <screen>$ cd ecl-16.0.0
382 $ ./configure --prefix=/usr/local</screen>
383 If you are building under Solaris 9 you should replace the last line with
384 <screen>$ ./configure --enable-slow-config --with-system-gmp=no \
385 --prefix=/usr/local</screen>
386 By now you should have a directory with the name
387 <filename>build</filename> and a bunch of makefiles inside it.</para>
388 </step>
389 <step>
390 <para>Use GNU make to begin building ECL. Normally this amounts to
391 invoking
392 <screen>$ make</screen>
393 from the command line.</para>
394 </step>
395 <step>
396 <para>Install the program using
397 <screen>$ make install</screen>
398 </para>
399 </step>
400 <step>
401 <para>Make sure the program is installed and ready to run
402 <screen>$ /usr/local/bin/ecl
403 ECL (Embeddable Common-Lisp) 16.0.0
404 Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
405 Copyright (C) 1993 Giuseppe Attardi
406 Copyright (C) 2000 Juan J. Garcia-Ripoll
407 Copyright (C) 2015 Daniel Kochmanski
408 ECL is free software, and you are welcome to redistribute it
409 under certain conditions; see file 'Copyright' for details.
410 Type :h for Help.
411 Top level in: #&lt;process TOP-LEVEL&gt;.
412 &gt; </screen>
413 </para>
414 </step>
415 </procedure>
416
417 </section>
418
419 <section xml:id="preface.osdep">
420 <title>Platform specific instructions</title>
421
422 <section xml:id="preface.msvc">
423 <title>Microsoft compilers</title>
424
425 <para>If you have a commercial version of Microsoft Visual Studio, the
426 steps are simple:</para>
427 <procedure>
428 <step><para>Change to the <code>msvc</code> directory.</para></step>
429
430 <step><para>Run <code>nmake</code> to build ECL.</para></step>
431
432 <step><para>Run <code>nmake install prefix=d:\Software\ECL</code>
433 where the <code>prefix</code> is the directory where you want to install
434 ECL.</para></step>
435
436 <step><para>Optionally, if you want to build a self-installing
437 executable, you can install <ulink
438 url="http://nsis.sourceforge.net">NSIS</ulink> and run <code>nmake
439 windows-nsi</code>.</para></step>
440 </procedure>
441
442 <para>If you want to build ECL using the free Microsoft Visual Studio
443 Express 2010 or better, you should follow these before building ECL as
444 sketched before:</para>
445 <procedure>
446 <step><para>Download and install <ulink
447 url="http://www.microsoft.com/express/">Microsoft Visual Studio
448 C++ Compiler</ulink>.</para></step>
449
450 <step><para>Download and install the <ulink
451 url="http://msdn.microsoft.com/en-us/windows/bb980924">Windows
452 SDK</ulink></para></step>
453
454 <step><para>Open the Windows SDK terminal, which will set up the
455 appropriate paths and environment variables.</para>
456 </step>
457 </procedure>
458 </section>
459
460 <section xml:id="preface.bsd">
461 <title>OpenBSD and NetBSD</title>
462
463 <para>Before following the instructions in <xref linkend="preface.autoconf"/> you should install the following packages: <application>boehm-gc</application> and <application>gmp-4.1</application> or better. Another component, <application>libffi</application> will be needed if you want to use the <link linkend="ext.ffi">dynamic foreign interface</link>.</para>
464 </section>
465
466 </section>
467 </section>
468 </preface>
469 </book>
470 <!-- Keep this comment at the end of the file
471 Local variables:
472 mode: nxml
473 sgml-parent-document: "ecl.xml"
474 sgml-indent-step: 1
475 nxml-child-indent: 1
476 nxml-outline-child-indent:1
477 fill-column: 79
478 End:
479 -->