guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `include' relative to current file


From: Jay Sulzberger
Subject: Re: `include' relative to current file
Date: Mon, 21 Jan 2013 01:08:05 -0500 (EST)



On Sun, 20 Jan 2013, Jay Sulzberger wrote:



On Sun, 20 Jan 2013, Andy Wingo <address@hidden> wrote:

Thoughts on this patch?  It fixes SLIB in CVS, which now does an
(include "guile-2.init") in the Guile 2.x case.

To test, check out Slib from CVS, then (load
"/path/to/slib/guile.init").

Andy

Thank you for getting SLIB to work with Guile 2.x!

oo--JS.

I run Debian testing.  My main box returns this, given uname -a:

  Linux jaysbox 2.6.39-2-686-pae #1 SMP Tue Jul 5 03:48:49 UTC 2011 i686 
GNU/Linux

and we have:

  address@hidden:~/Downloads$ guile-2.0 --version
  guile (GNU Guile) 2.0.5-deb+1-3
  Copyright (C) 2011 Free Software Foundation, Inc.

  License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

I applied the recent patch to

  /usr/share/guile/2.0/ice-9/psyntax.scm

and also placed the most recent official guile-2.init in my
standard slib directory like so

  /usr/share/slib/guile-2.init

and made a symlink from /usr/share/slib/guile.init pointing to above file.

My slib is version 3b3.

I still was not able to just start up guile-2.0 and do

  (use-modules (ice-9 slib))

and have slib working.  The problem seemed to be that the guile
module system could not find guile.init.  Even adding
/usr/share/slib to the %load-path seemed not to help.  I could
load various parts of the slib system, and get some stuff
working, but not everything.

I now have what I think is a working slib system for guile-2.0.
I modified one line in

  /usr/share/guile/2.0/ice-9/slib.scm

The original file had this line:

  (load-from-path "slib/guile.init")

I changed the line to:

  (load "/usr/share/slib/guile.init")

Now slib and guile-2.0 seem to work together.  I have not run any
test suite.

Likely this hard coding of the path to slib's guile.init is not
the right way to repair the guile-slib system.

Below is the record of a guile-2 session in which slib is loaded,
and a couple of slib things are run.

oo--JS.


GNU Guile 2.0.5-deb+1-3
Copyright (C) 1995-2012 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (ice-9 slib))
;;; note: source file /usr/share/guile/2.0/ice-9/slib.scm
;;;       newer than compiled /usr/lib/guile/2.0/ccache/ice-9/slib.go
;;; note: source file /usr/share/guile/2.0/ice-9/slib.scm
;;;       newer than compiled 
/home/jays/.cache/guile/ccache/2.0-LE-4-2.0/usr/share/guile/2.0/ice-9/slib.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/share/guile/2.0/ice-9/slib.scm
;;; compiled 
/home/jays/.cache/guile/ccache/2.0-LE-4-2.0/usr/share/guile/2.0/ice-9/slib.scm.go
scheme@(guile-user)> (slib:report #t)
SLIB "3b3" on guile "2.0.5-deb+1-3" on unix (IMPLEMENTATION-VICINITY) is "/usr/share/guile/site/2.0" (LIBRARY-VICINITY) is "/usr/share/slib/" (SCHEME-FILE-SUFFIX) is ".scm" guile #{2.0.5-deb+1-3}# SLIB:FEATURES :
        srfi-61 srfi-55 srfi-39 srfi-23
        srfi-14 srfi-13 srfi-6 srfi-4
        bignum complex real rational
        inexact source compiled vicinity
        srfi-59 srfi-96 r5rs eval
        values dynamic-wind macro delay
        multiarg-apply char-ready? rev4-optional-procedures multiarg/and-
        rationalize with-file rev2-procedures hash
        full-continuation ieee-floating-point srfi-0 defmacro
        string-port line-i/o system getenv
        program-arguments current-time logical random
        array array-for-each
guile #{2.0.5-deb+1-3}# *CATALOG* :
        (prelude . "/home/jays/TEST/SIMULATOR/006/simroot/etc/prelude.0.006")
        (pregexp . "/home/jays/OPT/PREGEXP/pregexp/pregexp")
        (jrproj-options . "/home/jays/.jlogstat.d/jrproj-options")
        (rcp . "/home/jays/TEST/SIMULATOR/006/simroot/lib/sgen/rcp.006")
        (spl . "/home/jays/TEST/SIMULATOR/006/simroot/lib/spl/spl.006")
        (spl-r-run . "/home/jays/TEST/SIMULATOR/006/simroot/lib/spl/r-run.006")
        (simconf . "/home/jays/TEST/SIMULATOR/006/simroot/etc/simulation.conf")
        (adjuster . 
"/home/jays/TEST/SIMULATOR/006/simroot/lib/sgen/adjuster.006")
        (create-instances . 
"/home/jays/TEST/SIMULATOR/006/simroot/lib/sgen/create-instances.006")
        (get-specs . "/home/jays/TEST/SIMULATOR/006/simroot/lib/sgen/get-specs")
        (ticks . "/home/jays/TEST/SIMULATOR/006/simroot/lib/sgen/ticks")
        (jays-lists-as-sets . "/home/jays/LISP/SCM/JAYSLIB/jays-lists-as-sets")
        (jays-probability . 
"/home/jays/WORK/DATA/PRODUCTION-CODE/VERSION-0.2/probability.engine.cut.0")
        (jays-lines-and-files . 
"/home/jays/WORK/DATA/PRODUCTION-CODE/VERSION-0.2/lines-and-files")
        (jays-read-write-summaries . 
"/home/jays/WORK/DATA/PRODUCTION-CODE/VERSION-0.2/read-write-summaries-version-0.3")
        (jays-database . 
"/home/jays/WORK/DATA/PRODUCTION-CODE/VERSION-0.2/jays-database-version-0.2")
        (jays-ob-utilities . 
"/home/jays/WORK/DATA/PRODUCTION-CODE/VERSION-0.2/ob-utilities-version-0.1")
        (schelog . "/usr/share/slib/schelog/schelog")
        (portable-scheme-debugger . "/usr/share/slib/psd/psd-slib")
        (jfilter . "/usr/share/slib/jfilter/jfilter")
        (null source "/usr/share/slib/null")
        (aggregate source "/usr/share/slib/null")
        (r2rs aggregate rev3-procedures rev2-procedures)
        (r3rs aggregate rev3-procedures)
        (r4rs aggregate rev4-optional-procedures)
        (r5rs aggregate values macro eval)
        (rev4-optional-procedures source "/usr/share/slib/sc4opt")
        (rev3-procedures source "/usr/share/slib/null")
        (rev2-procedures source "/usr/share/slib/sc2")
        (multiarg/and- source "/usr/share/slib/mularg")
        (multiarg-apply source "/usr/share/slib/mulapply")
        (rationalize source "/usr/share/slib/ratize")
        (transcript source "/usr/share/slib/trnscrpt")
        (with-file source "/usr/share/slib/withfile")
        (dynamic-wind source "/usr/share/slib/dynwind")
        (dynamic source "/usr/share/slib/dynamic")
        (fluid-let defmacro "/usr/share/slib/fluidlet")
        (alist source "/usr/share/slib/alist")
        (hash source "/usr/share/slib/hash")
        (sierpinski source "/usr/share/slib/sierpinski")
        (hilbert-fill source "/usr/share/slib/phil-spc")
        (peano-fill source "/usr/share/slib/peanosfc")
        (soundex source "/usr/share/slib/soundex")
        (hash-table source "/usr/share/slib/hashtab")
        (logical source "/usr/share/slib/logical")
        (random source "/usr/share/slib/random")
        (random-inexact source "/usr/share/slib/randinex")
        (modular source "/usr/share/slib/modular")
        (factor source "/usr/share/slib/factor")
        (primes . factor)
        (limit source "/usr/share/slib/limit")
        (eps-graph source "/usr/share/slib/grapheps")
        (charplot source "/usr/share/slib/charplot")
        (sort source "/usr/share/slib/sort")
        (srfi-95 . sort)
        (tsort . topological-sort)
        (topological-sort source "/usr/share/slib/tsort")
        (common-list-functions source "/usr/share/slib/comlist")
        (tree source "/usr/share/slib/tree")
        (coerce source "/usr/share/slib/coerce")
        (format source "/usr/share/slib/format")
        (generic-write source "/usr/share/slib/genwrite")
        (pretty-print source "/usr/share/slib/pp")
        (pprint-file source "/usr/share/slib/ppfile")
        (object->string source "/usr/share/slib/obj2str")
        (string-case source "/usr/share/slib/strcase")
        (line-i/o source "/usr/share/slib/lineio")
        (string-port source "/usr/share/slib/strport")
        (getopt source "/usr/share/slib/getopt")
        (qp source "/usr/share/slib/qp")
        (eval source "/usr/share/slib/eval")
        (record source "/usr/share/slib/record")
        (synchk source "/usr/share/slib/synchk")
        (defmacroexpand source "/usr/share/slib/defmacex")
        (printf source "/usr/share/slib/printf")
        (scanf defmacro "/usr/share/slib/scanf")
        (stdio-ports source "/usr/share/slib/stdio")
        (stdio aggregate scanf printf stdio-ports)
        (break defmacro "/usr/share/slib/break")
        (trace defmacro "/usr/share/slib/trace")
        (debugf source "/usr/share/slib/debug")
        (debug aggregate trace break debugf)
        (delay . promise)
        (promise macro "/usr/share/slib/promise")
        (macro-by-example defmacro "/usr/share/slib/mbe")
        (syntax-case source "/usr/share/slib/scainit")
        (syntactic-closures source "/usr/share/slib/scmacro")
        (macros-that-work source "/usr/share/slib/macwork")
        (macro . macro-by-example)
        (object source "/usr/share/slib/object")
        (yasos macro "/usr/share/slib/yasyn")
        (oop . yasos)
        (collect source "/usr/share/slib/collectx")
        (structure syntax-case "/usr/share/slib/structure")
        (values source "/usr/share/slib/values")
        (queue source "/usr/share/slib/queue")
        (priority-queue source "/usr/share/slib/priorque")
        (array source "/usr/share/slib/array")
        (subarray source "/usr/share/slib/subarray")
        (array-for-each source "/usr/share/slib/arraymap")
        (array-interpolate source "/usr/share/slib/linterp")
        (repl source "/usr/share/slib/repl")
        (process source "/usr/share/slib/process")
        (chapter-order source "/usr/share/slib/chap")
        (posix-time source "/usr/share/slib/psxtime")
        (common-lisp-time source "/usr/share/slib/cltime")
        (time-core source "/usr/share/slib/timecore")
        (time-zone defmacro "/usr/share/slib/timezone")
        (relational-database source "/usr/share/slib/rdms")
        (databases source "/usr/share/slib/dbutil")
        (database-utilities . databases)
        (database-commands source "/usr/share/slib/dbcom")
        (database-browse source "/usr/share/slib/dbrowse")
        (database-interpolate source "/usr/share/slib/dbinterp")
        (within-database macro "/usr/share/slib/dbsyn")
        (html-form source "/usr/share/slib/htmlform")
        (alist-table source "/usr/share/slib/alistab")
        (parameters source "/usr/share/slib/paramlst")
        (getopt-parameters source "/usr/share/slib/getparam")
        (read-command source "/usr/share/slib/comparse")
        (batch source "/usr/share/slib/batch")
        (glob source "/usr/share/slib/glob")
        (filename . glob)
        (crc source "/usr/share/slib/crc")
        (dft source "/usr/share/slib/dft")
        (fft . dft)
        (Fourier-transform . dft)
        (wt-tree source "/usr/share/slib/wttree")
        (string-search source "/usr/share/slib/strsrch")
        (root source "/usr/share/slib/root")
        (minimize source "/usr/share/slib/minimize")
        (precedence-parse defmacro "/usr/share/slib/prec")
        (parse . precedence-parse)
        (commutative-ring source "/usr/share/slib/cring")
        (self-set source "/usr/share/slib/selfset")
        (determinant source "/usr/share/slib/determ")
        (byte source "/usr/share/slib/byte")
        (byte-number source "/usr/share/slib/bytenumb")
        (tzfile source "/usr/share/slib/tzfile")
        (schmooz source "/usr/share/slib/schmooz")
        (transact defmacro "/usr/share/slib/transact")
        (net-clients . transact)
        (db->html source "/usr/share/slib/db2html")
        (http defmacro "/usr/share/slib/http-cgi")
        (cgi . http)
        (uri defmacro "/usr/share/slib/uri")
        (uniform-resource-identifier . uri)
        (pnm source "/usr/share/slib/pnm")
        (metric-units source "/usr/share/slib/simetrix")
        (diff source "/usr/share/slib/differ")
        (solid source "/usr/share/slib/solid")
        (vrml97 . solid)
        (vrml . vrml97)
        (color defmacro "/usr/share/slib/color")
        (color-space source "/usr/share/slib/colorspc")
        (cie . color-space)
        (color-names source "/usr/share/slib/colornam")
        (color-database defmacro "/usr/share/slib/mkclrnam")
        (resene color-names "/usr/share/slib/clrnamdb.scm")
        (saturate color-names "/usr/share/slib/clrnamdb.scm")
        (nbs-iscc color-names "/usr/share/slib/clrnamdb.scm")
        (daylight source "/usr/share/slib/daylight")
        (matfile source "/usr/share/slib/matfile")
        (mat-file . matfile)
        (spectral-tristimulus-values . color-space)
        (cie1964 spectral-tristimulus-values "/usr/share/slib/cie1964.xyz")
        (cie1931 spectral-tristimulus-values "/usr/share/slib/cie1931.xyz")
        (ciexyz . cie1931)
        (cvs defmacro "/usr/share/slib/cvs")
        (html-for-each defmacro "/usr/share/slib/html4each")
        (directory source "/usr/share/slib/dirs")
        (ncbi-dna defmacro "/usr/share/slib/ncbi-dna")
        (manifest source "/usr/share/slib/manifest")
        (top-refs source "/usr/share/slib/top-refs")
        (vet source "/usr/share/slib/vet")
        (srfi . srfi-0)
        (srfi-0 defmacro "/usr/share/slib/srfi")
        (srfi-1 source "/usr/share/slib/srfi-1")
        (and-let* . srfi-2)
        (srfi-2 defmacro "/usr/share/slib/srfi-2")
        (receive . srfi-8)
        (srfi-8 macro "/usr/share/slib/srfi-8")
        (define-record-type . srfi-9)
        (srfi-9 macro "/usr/share/slib/srfi-9")
        (let-values . srfi-11)
        (srfi-11 macro "/usr/share/slib/srfi-11")
        (srfi-28 . format)
        (srfi-47 . array)
        (srfi-63 . array)
        (srfi-60 . logical)
        (guarded-cond-clause . srfi-61)
        (srfi-61 macro "/usr/share/slib/srfi-61")
        (srfi-23 source "/usr/share/slib/srfi-23")
        (math-integer source "/usr/share/slib/math-integer")
        (math-real source "/usr/share/slib/math-real")
        (srfi-94 aggregate math-integer math-real)
        (ssax . xml-parse)
        (xml-parse source "/usr/share/slib/xml-parse")
        (new-catalog source "/usr/share/slib/mklibcat")
        (*slib-version* . "3b3")

scheme@(guile-user)> (require 'determinant)
scheme@(guile-user)> (determinant '((0 17) (1 0)))
$1 = -17
scheme@(guile-user)> (quit)

Process scheme finished




reply via email to

[Prev in Thread] Current Thread [Next in Thread]