Greetings all,
I downloaded and compiled the reference SRFI-1 implementation, http://srfi.schemers.org/srfi-1/srfi-1-reference.scm. I load the compiled version into gambit (after loading syntax case), but everytime it starts up I recieve these errors:
lewis@1710:~$ gsc *** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "start" used in module "1-list-library.o1" is undefined.
The only reference in the SRFI itself I can find is this
;;; The code has only these non-R4RS dependencies: ;;; A few calls to an ERROR procedure; ;;; Uses of the R5RS multiple-value procedure VALUES and the m-v binding ;;; RECEIVE macro (which isn't R5RS, but is a trivial macro). ;;; Many calls to a parameter-checking procedure check-arg: ;;; (define (check-arg pred val caller) ;;; (let lp ((val val)) ;;; (if (pred val) val (lp (error "Bad argument" val pred caller))))) ;;; A few uses of the LET-OPTIONAL and :OPTIONAL macros for parsing ;;; optional arguments.
Does anyone know how I can get these macros in gambit? (all the list procedures i want appear to work, but the error messages are annoying.)
Thanks, Lewis
Afficher les réponses par date
Please check the Gambit dumping grounds (http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds). I've just put Guillaume Germain's SRFI-pack which contains several SRFIs for Gambit, including SRFI-1.
Marc
On 2011-02-02, at 3:33 AM, Lewis wrote:
Greetings all,
I downloaded and compiled the reference SRFI-1 implementation, http://srfi.schemers.org/srfi-1/srfi-1-reference.scm. I load the compiled version into gambit (after loading syntax case), but everytime it starts up I recieve these errors:
lewis@1710:~$ gsc *** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "start" used in module "1-list-library.o1" is undefined.
The only reference in the SRFI itself I can find is this
;;; The code has only these non-R4RS dependencies: ;;; A few calls to an ERROR procedure; ;;; Uses of the R5RS multiple-value procedure VALUES and the m-v binding ;;; RECEIVE macro (which isn't R5RS, but is a trivial macro). ;;; Many calls to a parameter-checking procedure check-arg: ;;; (define (check-arg pred val caller) ;;; (let lp ((val val)) ;;; (if (pred val) val (lp (error "Bad argument" val pred caller))))) ;;; A few uses of the LET-OPTIONAL and :OPTIONAL macros for parsing ;;; optional arguments.
Does anyone know how I can get these macros in gambit? (all the list procedures i want appear to work, but the error messages are annoying.)
Thanks, Lewis _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Also you have it in the Black Hole module system, just type (import (std srfi/1)) . Latest ver of B.H. and "BHLibs" or sth at github.com/pereckerdal, docs in Gambit's wiki. Mikael
2011/2/2 Marc Feeley feeley@iro.umontreal.ca
Please check the Gambit dumping grounds ( http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds). I've just put Guillaume Germain's SRFI-pack which contains several SRFIs for Gambit, including SRFI-1.
Marc
On 2011-02-02, at 3:33 AM, Lewis wrote:
Greetings all,
I downloaded and compiled the reference SRFI-1 implementation, http://srfi.schemers.org/srfi-1/srfi-1-reference.scm. I load the compiled version into gambit (after loading syntax case), but everytime it starts up I recieve these errors:
lewis@1710:~$ gsc *** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "start" used in module "1-list-library.o1" is
undefined.
The only reference in the SRFI itself I can find is this
;;; The code has only these non-R4RS dependencies: ;;; A few calls to an ERROR procedure; ;;; Uses of the R5RS multiple-value procedure VALUES and the m-v
binding
;;; RECEIVE macro (which isn't R5RS, but is a trivial macro). ;;; Many calls to a parameter-checking procedure check-arg: ;;; (define (check-arg pred val caller) ;;; (let lp ((val val)) ;;; (if (pred val) val (lp (error "Bad argument" val pred
caller)))))
;;; A few uses of the LET-OPTIONAL and :OPTIONAL macros for parsing ;;; optional arguments.
Does anyone know how I can get these macros in gambit? (all the list procedures i want appear to work, but the error messages are annoying.)
Thanks, Lewis _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Thanks Marc,
Unfortunately compiling that srf-1.scm contained therein resulted in the exact same errors. I used
gsc -dynamic srfi-1.scm
as specificied by the compile script.
I have also tried BlackHole, Snow, and Slib, and could get nothing working with either of them. If you all recommend BlackHole though then perhaps I'd better try again and direct my questions there.
On 03/02/2011, Marc Feeley feeley@iro.umontreal.ca wrote:
Please check the Gambit dumping grounds (http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds). I've just put Guillaume Germain's SRFI-pack which contains several SRFIs for Gambit, including SRFI-1.
Marc
On 2011-02-02, at 3:33 AM, Lewis wrote:
Greetings all,
I downloaded and compiled the reference SRFI-1 implementation, http://srfi.schemers.org/srfi-1/srfi-1-reference.scm. I load the compiled version into gambit (after loading syntax case), but everytime it starts up I recieve these errors:
lewis@1710:~$ gsc *** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "start" used in module "1-list-library.o1" is undefined.
The only reference in the SRFI itself I can find is this
;;; The code has only these non-R4RS dependencies: ;;; A few calls to an ERROR procedure; ;;; Uses of the R5RS multiple-value procedure VALUES and the m-v binding ;;; RECEIVE macro (which isn't R5RS, but is a trivial macro). ;;; Many calls to a parameter-checking procedure check-arg: ;;; (define (check-arg pred val caller) ;;; (let lp ((val val)) ;;; (if (pred val) val (lp (error "Bad argument" val pred caller))))) ;;; A few uses of the LET-OPTIONAL and :OPTIONAL macros for parsing ;;; optional arguments.
Does anyone know how I can get these macros in gambit? (all the list procedures i want appear to work, but the error messages are annoying.)
Thanks, Lewis _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
2011/2/3 Lewis lewis1711@gmail.com:
Thanks Marc, Unfortunately compiling that srf-1.scm contained therein resulted in the exact same errors. I used gsc -dynamic srfi-1.scm as specificied by the compile script.
The readme says it only works well with the interpreter.
*** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined
They are indeed undefined. Did you try to define them yourself? If you don't understand the code, a little googling should tell you what they do…
It's just two very simple macros. Here's the first (not tried, not guaranteed):
(define-macro (:optional foo bar) `(let ((x ,foo)) (if (pair? x) (car x) bar)))
For what the second is and does, google is your friend. I think found it immediately.
P!
Adrien,
No I did not try and define them myself. I am obviously a scheme novice.
Googling revealed to me that these are two very well known macros. It failed to bring up an implementation or a SRFI-number.
If you know where one should look, perhaps you could share a link.
On 03/02/2011, Adrien Piérard pierarda@iro.umontreal.ca wrote:
2011/2/3 Lewis lewis1711@gmail.com:
Thanks Marc, Unfortunately compiling that srf-1.scm contained therein resulted in the exact same errors. I used gsc -dynamic srfi-1.scm as specificied by the compile script.
The readme says it only works well with the interpreter.
*** WARNING -- Variable ":optional" used in module "1-list-library.o1" is undefined *** WARNING -- Variable "let-optionals" used in module "1-list-library.o1" is undefined
They are indeed undefined. Did you try to define them yourself? If you don't understand the code, a little googling should tell you what they do…
It's just two very simple macros. Here's the first (not tried, not guaranteed):
(define-macro (:optional foo bar) `(let ((x ,foo)) (if (pair? x) (car x) bar)))
For what the second is and does, google is your friend. I think found it immediately.
P!
-- Français, English, 日本語, 한국어
Try
http://www.math.purdue.edu/~lucier/gambit-srfis/srfi1.scm
It compiled and loaded without complaint, but I can't say I've tested it at all.
Brad
Thankyou Bradley, works great :) And even includes iota.
I might put this on the wiki, if that's fine with you.
On 04/02/2011, Bradley Lucier lucier@math.purdue.edu wrote:
Try
http://www.math.purdue.edu/~lucier/gambit-srfis/srfi1.scm
It compiled and loaded without complaint, but I can't say I've tested it at all.
Brad