Alan Manuel Gloria <almkg...@gmail.com>
> In any case, the "correct" way to replace the reader in 1.8 and 2.0
> and later is to use the current-reader fluid, but this isn't
> compatible with 1.6, and for reasons of my own I want compatibility
> with Guile 1.6 1.8 and 2.0.

We definitely want maximum compatibility, especially in the long run.   This 
task is basically simple text processing, nearly all of it should be extremely 
portable!!   I really want configuration/installation to be completely 
automated in the long term (we could use autoconf, cmake, or something else).  
If we have to *pick* a specific target (at least as a default), for the Scheme 
code I think we should start by supporting guile 1.8 and 2.0; guile 1.6 is kind 
of long in the tooth.  But we *should* be able to support guile 1.6 & many 
others without serious problems.

Scheme's "eval" has variants.  I'm planning to pull it out to a separate 
"my-eval" function, so that it can be easily replaced/edited, and switch to 
R5RS's version as a default (see below).

--- David A. Wheeler

=========================================

--- a/sugar.scm
+++ b/sugar.scm
@@ -54,6 +54,10 @@
 ; these only exist in guile
 (define sugar-load-save primitive-load)
 (define sugar-current-load-port-save current-load-port)
+
+(define (my-eval inp)
+  ; Scheme R5RS eval *requires* 2 arguments.
+  (eval inp (interaction-environment)))
 ;----GUILE ENDS

 (define group 'group)
@@ -339,8 +343,7 @@
         (if (eof-object? inp)
             #t
             (begin
-              ; TODO: Scheme R5RS eval *requires* 2 arguments.
-              (eval inp)
+              (my-eval inp)
               (load port)))))
   (load (open-input-file filename)))


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to