(load “http://…”)
which is neat but dangerous… I added a whitelist to guard loading untrusted code
,help
...
##inverse-eval
and ##inverse-eval-in-env
are used by the REPL for that purpose, but they are rather basic:> (##inverse-eval 123)
123
> (##inverse-eval (list 1 2 3))
'(1 2 3)
(##set-debug-settings! 15 3)
/dev/null
and/or is overwritten in buffers?
Here is a stripped down example of behavior that really tripped me:
":" ; ( echo -e 'INTERPRETED' ; gsi letrec-star-reordered.scm; echo -e '\nCOMPILED' ; gsc letrec-star-reordered.scm && gsi -e '(load "letrec-star-reordered")' ) 2>&1 | less
(define (displayln . a) (for-each display a) (newline))
(define (reordered)
(letrec* ((x (begin (displayln 100) 42))
(_200 (displayln 200))
(_300 (displayln 300 (list x)))
(_400 (displayln 400))
(y (begin (displayln 500) 23)))
(displayln 600 (list y))))
(reordered)
Note how, when compiling, line 300 is moved below line 500.
letrec*
or in my understanding of its spec as "evaluate left to right" ?
lib/_eval.scm
function ##comp-let-like-form
but the code is lacking in comments, so it is hard to understand both what is going on and what should be going on.
letrec*
but forms that expand to it, so perhaps, yes, yes I am :)
let
and begin
statements (with the nest
macro) until this matter is resolved. I wasted too many hours on this. I'd like to fix Gambit, but understanding that code would require serious archaeology to unearth the intent of the code, so I can fix it.
let
and friends to get over that. (define (ordered)
(letrec* ((displayln (lambda a (for-each display a) (newline)))
(x (begin (displayln 100) 42))
(_200 (displayln 200))
(_300 (displayln 300 (list x)))
(_400 (displayln 400))
(y (begin (displayln 500) 23)))
(displayln 600 (list y))))
(ordered)
letrec
works, but not how letrec*
should work.
gambiteer on master
Speed up implementation of SRFI… (compare)
feeley on master
Universal backend: add URL whit… (compare)