chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Problems with run-time evals involving srfi-17..


From: Daniel B. Faken
Subject: [Chicken-users] Problems with run-time evals involving srfi-17..
Date: Fri, 21 May 2004 13:11:33 -0400 (EDT)

Hello,

  (this is with chicken 1.51)

  A lot of my code uses run-time evals (I'm passing code around a 
network) and srfi-17 (generalized set!).
  The right combination of features to use in chicken has always been a 
little obscure to me, but I've bumbled along by requiring almost 
everything almost everywhere.. but now, I can't get this simple code to 
run:
-------------------------------------------------
(declare (uses extras srfi-1 srfi-4
               eval syntax-case) (run-time-macros))
(require-extension chicken-more-macros)

;(install-highlevel-macro-system 'r5rs 'srfi-0 'extensions)
(require-extension srfi-17)

(define node-var-table (make-hash-table))
(define node-var
  (getter-with-setter
   [lambda (name) (hash-table-ref node-var-table name)]
   [lambda (name val) (hash-table-set! node-var-table name val)]) )

(set! (node-var 'tracker-node?) #t)
(set! (node-var 'gui-tracker-node?) #t)
(set! (node-var 'vrpn-node?) #t)

(eval `(set! (node-var 'vmd-node?) #t))
----------------------------------------------------

  ... at least, when compiled: I get (also with various modifications)
Error: invalid syntax: (set! (node-var (quote vmd-node?)) #t)

(even if I use -H2 and/or -run-time-macros for csc (which shouldn't
be necessary anyway))

 It works in csi unless I uncomment that
(install-highlevel-macro-system..), which causes this mysterious error:
; loading /home/dfaken/.csirc ...
; loading /home/dfaken/lib/chicken/readline.so ...
; loading htcam/tst.scm ...
; loading /home/dfaken/lib/chicken/share/chicken/chicken-more-macros.scm 
...
Error: unbound variable: srfi-17


  I looked at csi, but wasn't able to figure out why things should be 
different here..

  Is (require-extension ..) valid during eval-time?  I've used (require..)
in the past with no problems.  Are there any other gotcha's for using 
macros at run-time vs. compile-time?  (I think I've seen all the sections 
in the manual) 

  Does anyone else do a lot of run-time macro-needing evals? :)

cheers,
Daniel Faken








reply via email to

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