Commit | Line | Data |
---|---|---|
2da09c3f MV |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Guile Reference Manual. | |
3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 | |
4 | @c Free Software Foundation, Inc. | |
5 | @c See the file guile.texi for copying conditions. | |
6 | ||
a0e07ba4 NJ |
7 | @page |
8 | @node SLIB | |
9 | @chapter SLIB | |
a60cb893 | 10 | @cindex SLIB |
a0e07ba4 | 11 | |
c936bede NJ |
12 | Before the SLIB facilities can be used, the following Scheme expression |
13 | must be executed: | |
a0e07ba4 NJ |
14 | |
15 | @smalllisp | |
16 | (use-modules (ice-9 slib)) | |
17 | @end smalllisp | |
18 | ||
8418f0c7 | 19 | @findex require |
de5eb619 KR |
20 | @code{require} can then be used in the usual way (@pxref{Requesting |
21 | Features,,, slib, The SLIB Manual}). For example, | |
a0e07ba4 | 22 | |
de5eb619 KR |
23 | @example |
24 | (use-modules (ice-9 slib)) | |
25 | (require 'primes) | |
26 | (probably-prime? 13) | |
27 | @result{} #t | |
28 | @end example | |
a0e07ba4 | 29 | |
8418f0c7 | 30 | @findex system |
de5eb619 KR |
31 | Note that @code{(ice-9 slib)} provides a new definition of |
32 | @code{system}, one giving a plain exit code return value, as per the | |
33 | SLIB specification (@pxref{System Interface,,, slib, The SLIB | |
34 | Manual}). | |
a0e07ba4 NJ |
35 | |
36 | @menu | |
37 | * SLIB installation:: | |
38 | * JACAL:: | |
39 | @end menu | |
40 | ||
41 | @node SLIB installation | |
42 | @section SLIB installation | |
43 | ||
c2c67382 | 44 | The following seems to work (e.g., with slib versions 2c7 and 2d2): |
a0e07ba4 NJ |
45 | |
46 | @enumerate | |
47 | @item | |
a60cb893 | 48 | Unpack slib somewhere, e.g., @file{/usr/local/share/slib}. |
a0e07ba4 NJ |
49 | |
50 | @item | |
51 | Create a symlink in the Guile site directory to slib, e.g.,: | |
52 | ||
53 | @example | |
c2c67382 | 54 | ln -s /usr/local/share/slib /usr/local/share/guile/site/slib |
a0e07ba4 NJ |
55 | @end example |
56 | ||
57 | @item | |
85a9b4ed | 58 | Use Guile to create the catalog file, e.g.,: |
a0e07ba4 NJ |
59 | |
60 | @example | |
61 | # guile | |
62 | guile> (use-modules (ice-9 slib)) | |
c2c67382 | 63 | guile> (load "/usr/local/share/slib/mklibcat.scm") |
a0e07ba4 NJ |
64 | guile> (quit) |
65 | @end example | |
66 | ||
85a9b4ed | 67 | The catalog data should now be in |
a60cb893 | 68 | @file{/usr/local/share/guile/site/slibcat}. |
a0e07ba4 NJ |
69 | |
70 | If instead you get an error such as: | |
71 | ||
72 | @example | |
73 | Unbound variable: scheme-implementation-type | |
74 | @end example | |
75 | ||
76 | then a solution is to get a newer version of Guile, | |
a60cb893 | 77 | or to modify @file{ice-9/slib.scm} to use @code{define-public} for the |
a0e07ba4 NJ |
78 | offending variables. |
79 | ||
80 | @item | |
81 | Install the documentation: | |
82 | ||
83 | @example | |
c2c67382 | 84 | cd /usr/local/share/slib |
a0e07ba4 NJ |
85 | rm /usr/local/info/slib.info* |
86 | cp slib.info /usr/local/info | |
87 | install-info slib.info /usr/local/info/dir | |
88 | @end example | |
89 | @end enumerate | |
90 | ||
91 | @node JACAL | |
92 | @section JACAL | |
a60cb893 | 93 | @cindex JACAL |
a0e07ba4 NJ |
94 | |
95 | @cindex Jaffer, Aubrey | |
96 | @cindex symbolic math | |
97 | @cindex math -- symbolic | |
98 | Jacal is a symbolic math package written in Scheme by Aubrey Jaffer. It | |
99 | is usually installed as an extra package in SLIB (@pxref{Packages not | |
100 | shipped with Guile}). | |
101 | ||
102 | You can use Guile's interface to SLIB to invoke Jacal: | |
103 | ||
104 | @smalllisp | |
105 | (use-modules (ice-9 slib)) | |
106 | (slib:load "math") | |
107 | (math) | |
108 | @end smalllisp | |
109 | ||
110 | @noindent | |
111 | For complete documentation on Jacal, please read the Jacal manual. If | |
112 | it has been installed on line, you can look at @ref{Top, , Jacal, jacal, | |
a60cb893 | 113 | JACAL Symbolic Mathematics System}. Otherwise you can find it on the web at |
a0e07ba4 NJ |
114 | @url{http://www-swiss.ai.mit.edu/~jaffer/JACAL.html} |
115 | ||
116 | ||
117 | @c Local Variables: | |
118 | @c TeX-master: "guile.texi" | |
119 | @c End: |