/
/introduction.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <chapter id="introduction">
5 <title>Introduction</title>
6 <para>
7 CL-Smoke provides CLOS bindings for the Qt and KDE libraries.
8 </para>
9 <section><title>Related</title>
10 <itemizedlist>
11 <listitem><para><ulink url="http://common-lisp.net/project/commonqt/">
12 CommonQt</ulink> (No CLOS, no startup overhead)</para></listitem>
13 <listitem><para><ulink url="http://sourceforge.net/projects/lisp-cffi-qt4">
14 Lisp-CFFI-Qt4</ulink> (dead)</para></listitem>
15 </itemizedlist>
16 </section>
17 <section id="limitations"><title>Limitations</title>
18 <itemizedlist>
19 <listitem><para>Ownership transfer to / from C++ of non QObject objects is seldom known to cl-smoke.
20 E.g.: cl-smoke might delete an instance even though it is still needed by C++.
21 (One that is known is <ulink url="http://doc.qtsoftware.com/4.5-snapshot/qundostack.html#push">QUndoStack::push()</ulink>.)
22 </para></listitem>
23 <listitem><para>Limited conversions to and from C++. You will get an NO-APPLICABLE-CXX-METHOD error
24 when a Lisp to C++ conversion is missing and a pointer will be returned when there is no C++ to Lisp
25 conversion.
26 </para></listitem>
27 <listitem><para>6 seconds startup time<footnote>
28 <para>
29 Using a core image it is around 1 second.
30 (see <xref linkend="core-image"/>)
31 </para></footnote>
32 (for <package>qt.examples</package>) on a
33 Pentium M 1.7GHz. </para></listitem>
34 <listitem><para>Needs to be recompiled when the Smoke library is updated.</para></listitem>
35 <listitem><para>Could be faster</para></listitem>
36 </itemizedlist>
37 <section><title>Performance</title>
38 <para>
39 Method calling is near 3000 times slower than native C++. The overhead is mainly in the overload
40 resolution and to/from foreign object translation. Some measurements by
41 <code><ulink url="http://tobias.rautenkranz.ch/darcsweb/darcsweb.cgi?r=cl-smoke/benchmark;a=summary">:cl-smoke.benchmark</ulink></code>
42 are in
43 <filename><ulink url="../benchmark.pdf">benchmark.pdf</ulink></filename>.
44 </para>
45 </section>
46 </section>
47 <section id="installation"><title>Installation</title>
48 <section><title>Dependencies</title>
49 <itemizedlist>
50 <listitem><para><ulink
51 url="http://techbase.kde.org/Development/Languages/Smoke">Smoke2</ulink>
52 bindings from svn.
53 <footnote><para>
54 The new smokegenerator is needed (developed by Arno Rehn for the GSOC 09).
55 </para></footnote>
56 </para></listitem>
57 <listitem><para><ulink url="http://qtsoftware.com">Qt</ulink>
58 (development package)</para></listitem>
59 <listitem><para>
60 <ulink url="http://cmake.org">CMake</ulink> 2.6
61 </para></listitem>
62 <listitem><para>a C++ compiler (GCC)</para></listitem>
63 </itemizedlist>
64 <para>
65 <itemizedlist>
66 <listitem><para><ulink url="http://common-lisp.net/project/alexandria/">alexandria</ulink></para></listitem>
67 <listitem><para><ulink url="http://common-lisp.net/project/bordeaux-threads/">bordeaux-threads</ulink></para></listitem>
68 <listitem><para><ulink url="http://common-lisp.net/project/cffi/">cffi</ulink></para></listitem>
69 <listitem><para><ulink url="http://common-lisp.net/project/closer/closer-mop.html">closer-mop</ulink></para></listitem>
70 <listitem><para><ulink url="http://www.cliki.net/trivial-garbage">trivial-garbage</ulink></para></listitem>
71 </itemizedlist>
72 </para>
73 </section>
74
75 <section><title>Supported Platforms</title>
76 <section><title>Working</title>
77 <itemizedlist>
78 <listitem><para>
79 <ulink url="http://www.sbcl.org">SBCL</ulink> on Linux x86 (and x86_64)
80 </para></listitem>
81 <listitem> <para>
82 <ulink url="http://trac.clozure.com/openmcl">Clozure CL</ulink> on Linux x86.
83 </para></listitem>
84 </itemizedlist>
85 </section>
86 <section><title>Not Working</title>
87 <itemizedlist>
88 <listitem><para>
89 <ulink url="http://www.cons.org/cmucl/">CMUCL</ulink>
90 </para></listitem>
91 <listitem><para>
92 <ulink url="http://clisp.cons.org/">CLISP</ulink>
93 </para></listitem>
94 </itemizedlist>
95 </section>
96 </section>
97 <section><title>Installation</title>
98 <para>
99 You need to checkout the darcs repositories:
100 <programlisting>
101 cd <userinput>SOME_DIR</userinput>
102 for r in smoke qt.core qt.gui qt.network qt.test qt.tests qt.examples qt.uitools qt.webkit qt.phonon; do
103 darcs get "http://tobias.rautenkranz.ch/lisp/cl-smoke/$r"
104 done
105 </programlisting>
106 <note>
107 <para>
108 There are also the following repositories: qt.svg qt.dbus kde.core kde.ui kde.tests kde.examples
109 </para>
110 </note>
111 </para>
112 <para>
113 Build and install the <package>:smoke</package> and <package>:qt.core</package> C wrapper libraries with:
114 <informalexample>
115 <programlisting>cmake ./ &amp;&amp; make &amp;&amp; sudo make install</programlisting>
116 </informalexample>
117 in the <filename>smoke/</filename> and <filename>qt/</filename> directories.
118 </para>
119 <para>
120 When you have symlinked the <filename>.asd</filename> system files, you
121 should be able to load the systems. The system name has a
122 <code>:cl-smoke.</code> prefix. e.g.:
123 <informalexample>
124 <programlisting language="lisp">(asdf:oos 'asdf:load-op :cl-smoke.qt.examples) </programlisting>
125 </informalexample>
126 </para>
127 </section>
128 </section>
129 </chapter>