Commit be5ede3a authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Split the com.informatimago.common-lisp library into various sublibraries.

Created asd files for each of them.
parent 6f4b0182
......@@ -49,7 +49,7 @@ TARGET := $(shell uname)
PREFIX := /usr/local
MAKEDIR := $(HOME)/src/public/common/makedir
MODULES = common-lisp clext clmisc sbcl clisp susv3
MODULES = common-lisp clext clmisc sbcl clisp susv3
LINE = ";;;;;;====================================================================\n"
......
major=1
minor=0
compilation=217
compilation=224
......@@ -57,7 +57,8 @@
(LOAD "init.lisp")
;; package.lisp is loaded by init.lisp.
(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
#+(or allegro ccl ecl) (load (compile-file #P"PACKAGES:net;sourceforge;cclan;asdf;asdf.lisp"))
#-(or allegro ccl ecl) (load (compile-file #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"))
(PUSH (FUNCTION PACKAGE:PACKAGE-SYSTEM-DEFINITION)
ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*)
......
......@@ -2,5 +2,5 @@
(ASDF:DEFSYSTEM :COM.INFORMATIMAGO.CLEXT :DESCRIPTION
"This ASDF system gathers all the COM.INFORMATIMAGO.CLEXT packages." :VERSION
"1.0.217" :AUTHOR "<PJB> Pascal Bourguignon <pjb@informatimago.com>" :LICENCE
"1.0.224" :AUTHOR "<PJB> Pascal Bourguignon <pjb@informatimago.com>" :LICENCE
"GPL" :DEPENDS-ON NIL :COMPONENTS ((:CL-SOURCE-FILE "closer-weak")))
......@@ -58,7 +58,8 @@
(load "init.lisp")
;; package.lisp is loaded by init.lisp.
(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
#+(or allegro ccl ecl) (load (compile-file #P"PACKAGES:net;sourceforge;cclan;asdf;asdf.lisp"))
#-(or allegro ccl ecl) (load (compile-file #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"))
(push (function package:PACKAGE-SYSTEM-DEFINITION)
ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*)
(asdf:operate 'asdf:load-op :com.informatimago.common-lisp)
......
major=1
minor=0
compilation=221
compilation=228
......@@ -58,8 +58,8 @@
(LOAD "init.lisp")
;; package.lisp is loaded by init.lisp.
(LOAD (#+sbcl translate-logical-pathname #-sbcl identity
#P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"))
#+(or allegro ccl ecl) (load (compile-file #P"PACKAGES:net;sourceforge;cclan;asdf;asdf.lisp"))
#-(or allegro ccl ecl) (load (compile-file #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"))
(PUSH (FUNCTION PACKAGE:PACKAGE-SYSTEM-DEFINITION)
ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*)
(asdf:oos 'asdf:load-op :com.informatimago.common-lisp)
......
......@@ -2,5 +2,5 @@
(ASDF:DEFSYSTEM :COM.INFORMATIMAGO.CLMISC :DESCRIPTION
"This ASDF system gathers all the COM.INFORMATIMAGO.CLMISC packages." :VERSION
"1.0.221" :AUTHOR "<PJB> Pascal Bourguignon <pjb@informatimago.com>" :LICENCE
"1.0.228" :AUTHOR "<PJB> Pascal Bourguignon <pjb@informatimago.com>" :LICENCE
"GPL" :DEPENDS-ON NIL :COMPONENTS ((:CL-SOURCE-FILE "resource-utilization")))
......@@ -43,15 +43,36 @@ PACKAGE_PATH=com/informatimago/common-lisp
include ../implementations.mk
all:: $(COMPILERS)
COMPILES = '(load "compile-with-asdf.lisp")'
all:: $(COMPILERS) documents
help::
@echo "make iana-character-sets.data # downloads the IANA character sets data file."
install::
-mkdir -p $(PACKAGES)/$(PACKAGE_PATH)
tar --exclude \*~ -cf - . | tar -C $(PACKAGES)/$(PACKAGE_PATH)/ -xvf -
help::
@echo "make iana-character-sets.data # downloads the IANA character sets data file."
iana-character-sets.data:
wget http://www.iana.org/assignments/character-sets -O $@
system-graph.ps:system-graph.dot
dot -Tps -o system-graph.ps system-graph.dot
system-graph.eps:system-graph.ps
ps2epsi system-graph.ps system-graph.eps
lc -u system-graph.eps
README.pdf:README system-graph.eps
rst2pdf < README > README.pdf
documents: README.pdf
compile:
./compile.sh
#### THE END ####
-*- coding:utf-8 -*-
TODO:
Rename SOURCE package SOURCE-FORM.
Make a SOURCE-TEXT package.
- text sources
uses:
- common lisp reader
uses:
- form sources
Implement SOURCE-TEXT:
- write classes for source objects (symbols, packages, feature tests, etc).
- write reader macros.
- write (port from emacs lisp) the "source" walker WALK-FORMS (walk-sexp), etc.
(with-input-from-string (in "
:directory '(:relative :wild-inferiors)
#-cmu *load-pathname*
#+(and cmu unix)
(let ((dir (pathname-directory *load-pathname*)))
(if (and dir (eq :absolute (first dir)))
*load-pathname*
(merge-pathnames
*load-pathname*
(nth-value 1 (UNIX:UNIX-CURRENT-DIRECTORY)) nil)))
#+(and cmu (not unix)) (error \"Cannot compile here.\")
abcd
")
(let ((start (file-position in)))
(loop
:with result = '()
:while (peek-char t in nil nil t)
:do (let* ((form (print (read in nil nil t))))
(push (list form) result))
:finally (return (nreverse result)))
(file-position in start))
(loop
:with result = '()
:while (peek-char t in nil nil t)
:do (let* ((start (file-position in))
(form (read in nil in t))
(end (file-position in)))
(when (eq form in) (loop-finish))
(file-position in start)
(push (list form
(let ((text (make-string (- end start))))
(read-sequence text in)
text)
start end)
result))
:do (print result)
:finally (return (nreverse result)))
(read in nil nil))
(setf (text-file-contents "/tmp/data"
:external-format (ext:make-encoding
:charset charset:utf-8
:line-terminator :dos))
" ; Hello éтави ламбда λαμβδα World!
howdy doo")
(with-open-file (in "/tmp/data")
(list (peek-char t in)
(read-char in)
(SOURCE-READER-MACRO-LINE-COMMENT in #\;)))
========================================================================
The packages in this directory are PURE Common-Lisp packages.
They should compile and run in all Common-Lisp compliant implementation.
[inside brackets: status and issues].
Miscellaneous:
--------------
init Environment used by the Makefile to compile these packages.
Note: if your implementation needs to be brought to
compliance to Common-Lisp, this is the place where
to put the needed forms.
Utility Packages:
-----------------
package Exports a DEFINE-PACKAGE macro that encapsulates DEFPACKAGE.
[functional]
[nicknames handling is not local to a package, leading
to potential nicknames collision when using :USE/:AS].
utility Miscellaneous utility functions and macro.
list List utility functions.
string String utility functions.
Abstract Data Types:
--------------------
avl Adelson-Velskii & Landis Balanced Trees.
[not-debugged]
bset Set of small positive integer (bitmap based).
[not-debugged]
brelation Binary Relation of small positive integer (bset based).
[not-debugged]
dictionary A Dictionary class.
[bad old implemented, list based]
graf A Directed Graph class
[old, scheme based implementation using lists]
graph A Graph class (using lists).
Directed/Unidirected.
Weighted/Not Weighted edges.
[functional (used in cvs version graph)]
graph-dot Methods to generate a graph in dot(1) format.
[functional (used in cvs version graph)]
graph-diagram Methods to generate a graph in Diagram! 2 format.
[Not complete]
queue A queue data structure (LIFO, FIFO).
[functional]
Other Packages:
---------------
activity A scheduler to call functions periodically.
[functional]
picture ASCII-ART primitives.
[functional]
tree-to-ascii Draws a cons-based tree as an ASCII-ART picture.
[functional]
tree-to-diagram Draws a cons-based tree as a Diagram! picture.
[unknown status]
regexp Regular Expressions
[uncomplete; a new version is in the works in regexp/]
float-binio Encodes and decodes vectors of float into vectors
of signed-byte 32 to do binary I/O.
[functional]
HTML & Web:
-----------
html Generation of HTML.
[functional]
html401 The HTML 4.01 DTD expressed in Lisp.
[functional]
html-iso8879-1 The HTML 3.2 ISO8859-1 entities.
[functional; we should check HTML 4.01 entities!]
htrans A transaction manager for web applications.
[functional; limited to simple CGI;
we need a mod_lisp based version]
iso3166 ISO3166 country codes.
[functional; beware that the definition of
country codes it time depend...]
iso639a ISO639a language codes.
[functional]
database A database access layer.
[uncomplete]
aliases Reading and parsing a unix aliases file.
[functional]
primes Eratostene crible, and naive factorization.
[functional]
Applications:
-------------
ed An ed(1) lookalike (& an implementation of COMMON-LISP:ED).
[uncomplete; not debugged]
make-depends Parse lisp source for DEFINE-PACKAGE and builds Makefile
dependencies.
[functional; (used to compile these packages)].
========================================================================
\ No newline at end of file
You'll need to add:
(load ".../common-lisp/package")
(push (function package:PACKAGE-SYSTEM-DEFINITION)
ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*)
(asdf:oos 'asdf:load-op :com.informatimago.common-lisp)
.. comment: -*- mode:rst; coding:utf-8 -*-
may be more. See ~/.common.lisp
`com.informatimago.common-lisp` version 1.2
===========================================
The packages provided by this library should be PURE conformant
Common Lisp packages.
They should compile and run in all Common Lisp compliant
implementations, and should have make use of no external package
(eg. compatibility library) and no other (implementation dependant)
package than COMMON-LISP. They should not use #+/#- to activate or
disable implementation specific code. [There remains some packages
using #+/#- with implementations specific variants, we're working on
removing these forms].
This new version of the `com.informatimago.common-lisp` library has been
restructured into various sub-libraries, each with its own ASD file.
This should help managing the dependencies between the individual
sub-libraries, and promote the use of the most interesting of them.
`com.informatimago.common-lisp.lisp-sexp` and
`com.informatimago.common-lisp.cesarum` are the two base sublibraries,
almost all of the others use them.
Compilation
-----------
Starting with version 1.2 of this library, ASDF systems are provided
to allow for an easy and modular compilation.
`compile.lisp` should not be used anymore (until upgraded).
`make-depends.lisp` needs an upgrade too.
Compilation with the `compile-with-asdf.lisp` script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On implementations that don't provide (yet) ASDF, you need to indicate
what asdf.lisp file must be loaded, by setting the
`cl-user::*asdf-source*` variable.
The path to the asdf-binary-locations directory (where the .asd file
lies) must be set to the `cl-user::*asdf-binary-locations-directory*`
variable.
Then the compile-with-asdf.lisp script can be loaded: ::
(in-package :cl-user)
(defvar *asdf-source*
#P"/data/lisp/packages/net/common-lisp/projects/asdf/asdf/asdf.lisp")
(defvar *asdf-binary-locations-directory*
#P"/data/lisp/packages/net/common-lisp/projects/asdf-binary-locations/asdf-binary-locations/")
(load "compile-with-asdf.lisp")
It will add to `asdf:*central-registry*` the current directory and its
subdirectories containing .asd files, and asdf:load-op the
`:com.informatimago.common-lisp` system, which depends on all the
sublibrary systems.
If the variables are set correctly in `compile-with-asdf.lisp`, then the
`compile.sh` script can be used to compile it with ccl, clisp, ecl and
sbcl, which are the four implementations tested so far.
Compilation directly with ASDF
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can compile directly with ASDF, either by setting up symbolic
links of the .asd files to a site-systems directory, or adding the
directories where these .asd files lie to the `asdf:*central-registry*.`
It is advised to used asdf-binary-locations or ASDF-2 to have the
objects placed in a good location.
Description of the sublibraries
-------------------------------
Here is a short description of each sublibrary. See inside for
details about the packages provided. The file system-graph.ps gives
the dependencies between these sublibraries.
lisp-sexp/
com.informatimago.common-lisp.lisp-sexp.source-form
Functions to parse and manipulate Common Lisp sources as lisp
forms (such as in macros).
lisp-reader/
com.informatimago.common-lisp.lisp-reader.reader
A Common Lisp reader, with some extensions (hooks to parse tokens).
lisp-text/
com.informatimago.common-lisp.lisp-text.source-text
This package exports functions to read and manipulate Common Lisp
sources. Most of the text source properties are kept (file
position, line number, comments, feature tests, etc), while no
package is created and no symbol is interned.
lisp/
com.informatimago.common-lisp.lisp.generic-cl
This system provides various lisp packages or implementations.
generic-cl provides a package with the same symbols as
COMMON-LISP, but whose functions are replaced by equivalent
generic functions.
cesarum/
com.informatimago.common-lisp.cesarum.utility et al.
This sytem provies various utilities and extensions to Common
Lisp. There are set of packages corresponding to Common Lisp
chapters (package, list, string, array, etc), extending the Common
Lisp types with useful functions. And there are additionnal
abstract data types or data structures (dictionary, graph,
left-leaning red-black trees).
file/
com.informatimago.common-lisp.file.file
Various utility to deal with files and streams.
arithmetic/
com.informatimago.common-lisp.aritmethic.primes
Various arithmetic utilities. For now, we have a package to
compute primes (Eratostene sieve) and factorize integers.
data-encoding/
com.informatimago.common-lisp.data-encoding.data-encoding
A serializer/deserializer for lisp data.
heap/
A garbage collector for a heap of lisp data. (The purpose is to
be used to share lisp data amongst different processes using
shared memory).
csv/
com.informatimago.common-lisp.csv.csv
The CSV file format.
bank/
com.informatimago.common-lisp.bank.iban
A package to deal with IBAN (Internationnal Bank Account Numbers)
and another to deal with RIB (Relevé d'Identité Bancaire) which
are the French account numbers.
picture/
A ASCII-art picture package, with packages to draw lisp lists and trees.
rfc2822/
Utilities to deal with RFC-2822 message formats.
rfc3548/
This packages exports functions to encode an decode text blocks
according to the encoding described in:
RFC3548: The Base16, Base32, and Base64 Data Encodings
unix/
Packages to read unix administration files /etc/group /etc/passwd and /etc/aliases.
html-base/
Some common HTML packages.
html-generator/
An HTML generator.
html-parser/
An HTML parser.
http/
Some utilities for HTTP processing.
diagram/
Some packages generating Diagram! 2.0 files (ancestor to OmniGrafle).
graphviz/
Generates GraphViz .dot files from
com.informatimago.common-lisp.cesarum.graph objects.
interactive/
Interactive commands (to be used at the REPL).
invoice/
Process and generate invoices. (I don't use it anymore. There's a
Devise datatype with a reader macro that should be extracted to be
reused).
regexp/
An implementation of POSIX regexps and of EMACS regexps (both incomplete).
ed/
An implementation of ed(1) (lacks only regular expressions, to be
provided eventually by the regexp sublibrary).
cxx/
Partial C++ parser and call graph builder.
make-depends/
Script to generate the dependencies (asd files) from the sources,
and to generate summary.html files.
Dependencies of the sub-libraries
=================================
.. figure:: system-graph.eps
:align: center
:alt: A dependency diagram of the com.informatimago.common-lisp sub-libraries
:figwidth: 100%
A dependency diagram of the com.informatimago.common-lisp sub-libraries
.. comment:
-------------------------------------------------
---------------
-
.
This diff is collapsed.
major=1
minor=1
compilation=390
compilation=397
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: com.informatimago.common-lisp.arithmetic.asd
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; ASD file to load the com.informatimago.common-lisp.arithmetic library.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2010-10-31 <PJB> Created this .asd file.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal J. Bourguignon 2010 - 2010
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;**************************************************************************
(asdf:defsystem :com.informatimago.common-lisp.arithmetic
:name "com.informatimago.common-lisp.arithmetic"
:description "This ASDF system gathers various Common Lisp library packages."
:author "<PJB> Pascal J. Bourguignon <pjb@informatimago.com>"
:version "1.2.0"
:licence "GPL"
:properties ((#:author-email . "pjb@informatimago.com")
(#:date . "Automn 2010")
((#:albert #:output-dir) . "../documentation/com.informatimago.common-lisp.arithmetic/")
((#:albert #:formats) . ("docbook"))
((#:albert #:docbook #:template) . "book")
((#:albert #:docbook #:bgcolor) . "white")
((#:albert #:docbook #:textcolor) . "black"))
:depends-on (:com.informatimago.common-lisp.cesarum)
:components ((:file "primes" :depends-on ())))
;;;; THE END ;;;;