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>
7 CL-Smoke provides CLOS bindings for the Qt and KDE libraries.
9 <section><title>Related</title>
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>
17 <section id="limitations"><title>Limitations</title>
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>.)
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
27 <listitem><para>6 seconds startup time<footnote>
29 Using a core image it is around 1 second.
30 (see <xref linkend="core-image"/>)
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>
37 <section><title>Performance</title>
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>
43 <filename><ulink url="../benchmark.pdf">benchmark.pdf</ulink></filename>.
47 <section id="installation"><title>Installation</title>
48 <section><title>Dependencies</title>
50 <listitem><para><ulink
51 url="http://techbase.kde.org/Development/Languages/Smoke">Smoke2</ulink>
54 The new smokegenerator is needed (developed by Arno Rehn for the GSOC 09).
57 <listitem><para><ulink url="http://qtsoftware.com">Qt</ulink>
58 (development package)</para></listitem>
60 <ulink url="http://cmake.org">CMake</ulink> 2.6
62 <listitem><para>a C++ compiler (GCC)</para></listitem>
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>
75 <section><title>Supported Platforms</title>
76 <section><title>Working</title>
79 <ulink url="http://www.sbcl.org">SBCL</ulink> on Linux x86 (and x86_64)
82 <ulink url="http://trac.clozure.com/openmcl">Clozure CL</ulink> on Linux x86.
86 <section><title>Not Working</title>
89 <ulink url="http://www.cons.org/cmucl/">CMUCL</ulink>
92 <ulink url="http://clisp.cons.org/">CLISP</ulink>
97 <section><title>Installation</title>
99 You need to checkout the darcs repositories:
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"
108 There are also the following repositories: qt.svg qt.dbus kde.core kde.ui kde.tests kde.examples
113 Build and install the <package>:smoke</package> and <package>:qt.core</package> C wrapper libraries with:
115 <programlisting>cmake ./ && make && sudo make install</programlisting>
117 in the <filename>smoke/</filename> and <filename>qt/</filename> directories.
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.:
124 <programlisting language="lisp">(asdf:oos 'asdf:load-op :cl-smoke.qt.examples) </programlisting>