[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile-scsh autoloading
From: |
Thien-Thi Nguyen |
Subject: |
Re: guile-scsh autoloading |
Date: |
Sun, 22 Jul 2001 04:32:22 -0700 |
From: "Dale P. Smith" <address@hidden>
Date: Sun, 22 Jul 2001 07:08:18 -0400
Sorry for being lazy, I found it right away:
ftp://ftp-swiss.ai.mit.edu/pub/scsh/contrib/pgscsh-0.2.tar.gz
i see this package gets around. :->
well, now i've hit the "constants" problem, which is somewhat surprising
since it seems `(scsh netconst)' is being loaded. hmm. time for bed...
i've appended also demo-guile.scm and pg-guile.scm immediately after the
run log for anyone interested in pushing this further.
thi
_____________________________________________________
cd /home/ttn/local/src/.ttn/build/pgscsh-0.2/
guile -e main -s demo-guile.scm
;;; loading ./pg-guile.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/optargs.scm
;;; loading ./pg.scm
;;; loading /usr/local/share/guile/site/scsh/defrec.scm
;;; loading /usr/local/share/guile/site/scsh/alt-syntax.scm
;;; loading /usr/local/share/guile/site/scsh/signals.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/receive.scm
;;; loading /usr/local/share/guile/site/scsh/utilities.scm
;;; loading /usr/local/share/guile/site/scsh/loophole.scm
;;; loading /usr/local/share/guile/site/scsh/bitwise.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/syncase.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/debug.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/psyntax.pp
;;; loading /usr/local/share/guile/site/scsh/network.scm
;;; loading /usr/local/share/guile/site/scsh/define-foreign-syntax.scm
;;; loading /usr/local/share/guile/site/scsh/netconst.scm
;;; loading /usr/local/share/guile/site/scsh/let-opt.scm
;;; loading /usr/local/share/guile/site/scsh/module-system.scm
;;; loading /usr/local/share/guile/site/scsh/errno.scm
;;; loading /usr/local/share/guile/site/scsh/rw.scm
;;; loading /usr/local/share/guile/1.5.0/ice-9/rw.scm
ERROR: Unbound variable: protocol-family/internet
Compilation exited abnormally with code 2 at Sun Jul 22 04:21:46
__________________________________________
[demo-guile.scm]
;;; various glue
(set! %load-verbosely #t)
(load-from-path "pg-guile.scm")
(load-from-path "pg.scm")
;;; from here on, rippped off of demo.scm
(define (test-general)
(let* ((conn (pg:connect "test" "postgres" "postgres"))
(r1 (pg:exec conn "CREATE TABLE pgscmtest (a int, b VARCHAR(4))"))
(r2 (pg:exec conn "INSERT INTO pgscmtest VALUES (3, 'zae')"))
(r3 (pg:exec conn "INSERT INTO pgscmtest VALUES (66, 'poiu')"))
(r4 (pg:exec conn "SELECT * FROM pgscmtest"))
(r5 (pg:exec conn "DROP TABLE pgscmtest")))
(format #t "~%==============================================~%")
(format #t "status of CREATE is ~s~%" (pg:result r1 'status))
(format #t "status of INSERT is ~s~%" (pg:result r2 'status))
(format #t "oid of INSERT is ~s~%" (pg:result r2 'oid))
(format #t "status of SELECT is ~s~%" (pg:result r4 'status))
(format #t "attributes of SELECT are ~s~%" (pg:result r4 'attributes))
(format #t "tuples of SELECT are ~s~%" (pg:result r4 'tuples))
(format #t "second tuple of SELECT is ~s~%" (pg:result r4 'tuple 1))
(format #t "status of DROP is ~s~%" (pg:result r5 'status))
(format #t "==============================================~%")
(pg:disconnect conn)))
(define (test-metadata)
(let* ((conn (pg:connect "test" "postgres" "postgres"))
(dbs (pg:databases conn))
(tables (pg:tables conn)))
(format #t "List of databases: ~s~%" dbs)
(format #t "List of tables in test database: ~s~%" tables)
(format #t "List of columns in the table ~s: ~s~%"
(car tables) (pg:columns conn (car tables)))
(pg:disconnect conn)))
(define (test-date)
(let* ((conn (pg:connect "test" "postgres" "postgres")))
(pg:exec conn "CREATE TABLE pgscshtest (a timestamp, b abstime, c time)")
(pg:exec conn "INSERT INTO pgscshtest VALUES "
"(current_timestamp, 'now', 'now')")
(let* ((res (pg:exec conn "SELECT * FROM pgscshtest"))
(parsed (car (pg:result res 'tuples))))
(format #t "Timestamp = ~s~%abstime = ~s~%time = ~s~%"
(date->string (car parsed))
(date->string (cadr parsed))
(caddr parsed)))
(pg:exec conn "DROP TABLE pgscshtest")
(pg:disconnect conn)))
;; test of large-object interface
(define (test-lo-read)
(let* ((conn (pg:connect "test" "postgres" "postgres"))
(oid (pg:lo-create conn "rw"))
(fd (pg:lo-open conn oid "rw")))
(format #t "==================================================~%")
(pg:lo-write conn fd "Hi there mate")
(pg:lo-lseek conn fd 0 0) ; SEEK_SET = 0
(if (not (zero? (pg:lo-tell conn fd)))
(format #t "lo-tell test failed!~%"))
(format #t "Read ~s from lo~%" (pg:lo-read conn fd 7))
(format #t "==================================================~%~%")
(pg:lo-close conn fd)
(pg:lo-unlink conn oid)
(pg:disconnect conn)))
(define (test-lo-import)
(let* ((conn (pg:connect "test" "postgres" "postgres"))
(oid (pg:lo-import conn "/etc/group")))
(pg:lo-export conn oid "/tmp/group")
(cond ((zero? (run (diff /tmp/group /etc/group)))
(format #t "lo-import test succeeded~%")
(delete-file "/tmp/group"))
(t
(format #t "lo-import test failed: check differences~%")
(format #t "between /etc/group and /tmp/group~%")))
(pg:lo-unlink conn oid)
(pg:disconnect conn)))
(define (main . args)
(test-general)
(test-metadata)
(test-date)
(test-lo-read)
(test-lo-import))
________________________________________________
[pg-guile.scm]
;;; do not edit --- generated 2001-07-22 04:12:41
(define-module (guile-user)
:autoload (ice-9 and-let-star) (and-let*)
:autoload (ice-9 calling) (let-with-configuration-getter-and-setter
with-delegating-configuration-getter-and-setter
with-configuration-getter-and-setter with-excursion-getter-and-setter
with-delegating-getter-and-setter with-getter with-getter-and-setter
with-excursion-function)
:autoload (ice-9 channel) (channel-print-token channel-print-value
channel-open make-object-channel)
:autoload (ice-9 common-list) (uniq pick-mappings pick has-duplicates?
butlast delete-if-not! delete-if! remove-if-not remove-if member-if find-if
count-if reduce reduce-init set-difference intersection union adjoin)
:autoload (ice-9 debug) (untrace-stack trace-stack)
:autoload (ice-9 debugger) (debug)
:autoload (ice-9 documentation) (file-commentary documentation-files
search-documentation-files object-documentation)
:autoload (ice-9 expect) (expect-regexec expect-select expect-strings
expect-strings-exec-flags expect-strings-compile-flags expect expect-char-proc
expect-eof-proc expect-timeout-proc expect-timeout expect-port)
:autoload (ice-9 format) (format format:symbol-case-conv
format:iobj-case-conv format:expch)
:autoload (ice-9 getopt-long) (getopt-long option-ref)
:autoload (ice-9 hcons) (make-gc-buffer hashq-conser hashq-cons
hashq-cons-set! hashq-cons-ref hashq-cons-create-handle! hashq-cons-get-handle
hashq-cons-assoc hashq-cons-hash)
:autoload (ice-9 include) (include)
:autoload (ice-9 lineio) (make-line-buffering-input-port lineio-port?
read-string unread-string)
:autoload (ice-9 ls) (recursive-local-define definitions-in
local-definitions-in)
:autoload (ice-9 mapping) (make-hash-table-mapping hash-table-mapping-hooks
mapping-set! mapping-remove! mapping-get-handle set-mapping-data!
set-mapping-hooks! mapping-data mapping-hooks mapping? make-mapping
mapping-type mapping-hooks-remove mapping-hooks-create-handle
mapping-hooks-get-handle mapping-hooks? make-mapping-hooks mapping-hooks-type)
:autoload (ice-9 match) (match match-lambda match-lambda* match-define
match-let match-let* match-letrec define-structure define-const-structure
match:error match:set-error match:error-control match:set-error-control
match:structure-control match:set-structure-control match:runtime-structures
match:set-runtime-structures)
:autoload (ice-9 optargs) (defmacro*-public defmacro* define*-public define*
lambda* let-keywords* let-keywords let-optional* let-optional)
:autoload (ice-9 poe) (perfect-funcq pure-funcq)
:autoload (ice-9 popen) (open-output-pipe open-input-pipe close-pipe
open-pipe port/pid-table)
:autoload (ice-9 pretty-print) (pretty-print)
:autoload (ice-9 q) (q-length deq! q-pop! enq! q-push! q-remove! q-rear
q-front q-empty-check q-empty? q? make-q sync-q!)
:autoload (ice-9 r5rs) (scheme-report-environment)
:autoload (ice-9 rdelim) (%read-delimited! %read-line write-line read-line
read-line! read-delimited read-delimited!)
:autoload (ice-9 receive) (receive)
:autoload (ice-9 regex) (regexp-quote regexp-match? match:suffix match:prefix
match:string match:count)
:autoload (ice-9 runq) (make-subordinate-runq-to make-exclusive-runq
make-fair-runq make-void-runq)
:autoload (ice-9 rw) (read-string!/partial write-string/partial)
:autoload (ice-9 safe-r5rs) (null-environment)
:autoload (ice-9 safe) (make-safe-module safe-environment)
:autoload (ice-9 session) (system-module arity source apropos-fold-all
apropos-fold-exported apropos-fold-accessible apropos-fold apropos-internal
help)
:autoload (ice-9 slib) (require scheme-implementation-version
scheme-implementation-type home-vicinity library-vicinity
implementation-vicinity slib:load)
:autoload (ice-9 stack-catch) (stack-catch)
:autoload (ice-9 streams) (make-stream stream-car stream-cdr stream-null?
list->stream vector->stream port->stream stream->list stream->reversed-list
stream->list&length stream->reversed-list&length stream->vector stream-fold
stream-for-each stream-map)
:autoload (ice-9 string-fun) (has-trailing-newline? sans-final-newline
sans-leading-whitespace sans-trailing-whitespace sans-surrounding-whitespace
string-prefix=? separate-fields-before-char separate-fields-after-char
separate-fields-discarding-char split-discarding-predicate
split-after-predicate split-before-predicate split-discarding-char-last
split-before-char-last split-after-char-last split-discarding-char
split-before-char split-after-char)
:autoload (ice-9 syncase) (syncase eval void include with-syntax syntax-rules
syntax-object->datum syntax-case syntax letrec-syntax let-syntax
identifier-syntax identifier? generate-temporaries free-identifier=?
fluid-let-syntax eval-when define-syntax datum->syntax-object
bound-identifier=? syntax-error syntax-dispatch install-global-transformer
sc-expand3 sc-expand sc-macro)
:autoload (ice-9 threads) (make-thread begin-thread with-mutex monitor
%thread-handler)
:autoload (ice-9 time) (time))
;;; 243 symbols in 37 modules
(define let-optionals let-optional) ;; weird
(define let-optionals* let-optional*) ;; weird*
;;; do not edit --- generated 2001-07-22 03:03:21
(define-module (guile-user)
:autoload (scsh ascii) (ascii->char char->ascii)
:autoload (scsh awk) (awk)
:autoload (scsh bitwise) (arithmetic-shift bitwise-not bitwise-and
bitwise-ior bitwise-xor)
:autoload (scsh char-set) (char:newline char:tab char:page char:return
char:space char:vtab char-ascii? char-set? char-set-copy char-set= char-set<=
char-set-size char-set-adjoin char-set-delete char-set-adjoin! char-set-delete!
char-set-for-each char-set-fold reduce-char-set char-set chars->char-set
string->char-set ascii-range->char-set predicate->char-set ->char-set
char-set-members char-set-contains? char-set-every? char-set-any
char-set-invert char-set-union char-set-intersection char-set-difference
char-set-invert! char-set-union! char-set-intersection! char-set-difference!
char-set:lower-case char-set:upper-case char-set:alphabetic char-set:numeric
char-set:alphanumeric char-set:graphic char-set:printing char-set:whitespace
char-set:blank char-set:control char-set:punctuation char-set:hex-digit
char-set:ascii char-set:empty char-set:full char-lower-case? char-upper-case?
char-alphabetic? char-numeric? char-alphanumeric? char-graphic? char-printing?
char-whitespace? char-blank? char-control? char-punctuation? char-hex-digit?
char-ascii? char-set:s)
:autoload (scsh define-foreign-syntax) (foreign-source define-foreign)
:autoload (scsh defrec) (define-record-discloser define-record)
:autoload (scsh fdports) (open/create+trunc open/write+append+create
shell-open)
:autoload (scsh features) (immutable? make-immutable!)
:autoload (scsh fileinfo) (file-not-readable? file-not-writable?
file-not-executable? file-readable? file-writable? file-executable?
file-not-exists? file-exists? file-type file-group file-inode file-last-access
file-last-mod file-last-status-change file-mode file-nlinks file-owner
file-size file-directory? file-fifo? file-regular? file-socket? file-special?
file-symlink?)
:autoload (scsh filesys) (delete-filesys-object create-directory create-fifo
create-hard-link create-symlink rename-file)
:autoload (scsh fluid) (make-fluid set-fluid! fluid let-fluid)
:autoload (scsh fname) (file-name-as-directory file-name-directory?
file-name-non-directory? directory-as-file-name
ensure-file-name-is-nondirectory file-name-absolute? file-name-directory
file-name-nondirectory split-file-name path-list->file-name file-name-extension
file-name-sans-extension replace-extension parse-file-name expand-file-name
simplify-file-name resolve-tilde-file-name resolve-file-name absolute-file-name
home-dir home-file)
:autoload (scsh fr) (field-splitter infix-splitter suffix-splitter
sloppy-suffix-splitter record-reader field-reader)
:autoload (scsh glob) (glob glob-quote maybe-directory-files)
:autoload (scsh jar-defrecord) (define-record-type define-accessor
define-accessors)
;; :autoload (scsh let-opt) (let-optionals let-optionals* #{:optional}#)
:autoload (scsh loophole) (loophole)
:autoload (scsh module-system) (define-structure structure-ref)
:autoload (scsh netconst) (options/boolean options/value options/linger
shutdown/receives shutdown/sends shutdown/sends+receives)
:autoload (scsh network) (socket-connect bind-listen-accept-loop socket?
socket:family socket:inport socket:outport socket-address?
socket-address:address socket-address:family internet-address->socket-address
socket-address->internet-address create-socket close-socket bind-socket
connect-socket listen-socket accept-connection socket-remote-address
socket-local-address shutdown-socket create-socket-pair receive-message
receive-message! receive-message/partial receive-message!/partial send-message
send-message/partial socket-option set-socket-option host-info host-info?
host-info:name host-info:aliases host-info:addresses network-info network-info?
network-info:name network-info:aliases network-info:net service-info
service-info? service-info:name service-info:aliases service-info:port
service-info:protocol protocol-info protocol-info? protocol-info:name
protocol-info:aliases protocol-info:number)
:autoload (scsh newports) (fdport? set-port-buffering bufpol/block
bufpol/line bufpol/none call/fdes close-after with-current-input-port*
with-current-output-port* with-current-error-port* with-current-input-port
with-current-output-port with-current-error-port set-current-input-port!
set-current-output-port! set-current-error-port!)
:autoload (scsh population) (make-population add-to-population!
population-reduce population->list walk-population)
:autoload (scsh primitives) (unspecific)
:autoload (scsh procobj) (proc:pid proc? pid->proc autoreap-policy
reap-zombies new-child-proc wait/poll wait/stopped-children wait wait-any
wait-process-group reaped-procs)
:autoload (scsh rdelim) (read-line read-paragraph read-delimited
read-delimited! skip-char-set)
:autoload (scsh reading) (reading-error)
:autoload (scsh rw) (bogus-substring-spec? read-string/partial read-string!
read-string write-string)
:autoload (scsh scsh-condition) (with-errno-handler errno-error
with-errno-handler*)
:autoload (scsh scsh-version) (scsh-major-version scsh-minor-version
scsh-version-string)
:autoload (scsh scsh) (with-cwd with-umask with-env with-total-env
with-stdio-ports call-terminally fork/pipe %fork/pipe tail-pipe tail-pipe+
alist-update alist-compress add-before add-after with-env* with-total-env*
with-cwd* with-umask* create-temp-file temp-file-channel run/collecting*
run/port+proc* run/port* run/file* run/string* run/strings* run/sexp*
run/sexps* port->string port->string-list port->sexp-list port->list port-fold
char-filter string-filter y-or-n? stdio->stdports with-stdio-ports*
stdports->stdio command-line-arguments arg* arg argv home-directory
exec-path-list suspend exec/env exec-path/env exec-path exec fork %fork
stringify)
:autoload (scsh sighandlers) (signal->interrupt with-enabled-interrupts
enabled-interrupts set-enabled-interrupts set-interrupt-handler
interrupt-handler)
:autoload (scsh signals) (syntax-error)
:autoload (scsh stringcoll) (make-string-collector collect-string!
clear-string-collector! string-collector->string)
:autoload (scsh syntax-helpers) (transcribe-process-form
transcribe-extended-process-form)
:autoload (scsh syntax) (define-simple-syntax exec-epf & run || &&
run-collecting run/port+proc run/port run/strings run/file run/string run/sexp
run/sexps)
:autoload (scsh syscalls) (%exec %%fork cwd user-gid user-effective-gid
set-gid user-supplementary-gids user-uid user-effective-uid set-uid
user-login-name pid parent-pid set-process-group become-session-leader
set-umask process-times cpu-ticks/sec set-file-mode set-file-owner
set-file-group read-symlink delete-directory set-file-times file-info
file-info:type file-info:gid file-info:inode file-info:atime file-info:mtime
file-info:ctime file-info:mode file-info:nlinks file-info:uid file-info:size
sync-file sync-file-system seek/set seek/delta seek/end tell pipe
signal-process signal-process-group pause-until-interrupt user-info
user-info:name user-info:uid user-info:gid user-info:home-dir user-info:shell
name->user-info uid->user-info ->uid ->username %homedir group-info
group-info:name group-info:gid group-info:members ->gid ->groupname
directory-files env->alist alist->env fdes-flags set-fdes-flags fdes-status
set-fdes-status open/read open/write open/read+write open/non-blocking
open/append open/exclusive open/create open/truncate open/no-control-tty
fdflags/close-on-exec sleep sleep-until system-name)
:autoload (scsh time) (make-date date? date:seconds date:minute date:hour
date:month-day date:month date:year date:tz-name date:tz-secs date:summer?
date:week-day date:year-day set-date:seconds set-date:minute set-date:hour
set-date:month-day set-date:month set-date:year set-date:tz-name
set-date:tz-secs set-date:summer? set-date:week-day set-date:year-day
modify-date:seconds modify-date:minute modify-date:hour modify-date:month-day
modify-date:month modify-date:year modify-date:tz-name modify-date:tz-secs
modify-date:summer? modify-date:week-day modify-date:year-day time+ticks
ticks/sec time date date->string format-date)
:autoload (scsh utilities) (del delete filter first first? nth fold
fold-right any every mapv mapv! vector-every? copy-vector initialize-vector
vector-append vfold vfold-right check-arg conjoin disjoin negate compose
call/cc deprecated-proc deposit-bit-field real->exact-integer)
:autoload (scsh weak) (make-weak-pointer weak-pointer-ref weak-pointer?))
;;; 496 symbols in 39 modules
Re: guile-scsh autoloading, Thien-Thi Nguyen, 2001/07/22
Re: guile-scsh autoloading, Marius Vollmer, 2001/07/22