IRC channel logs

2019-08-11.log

back to list of logs

<artup>Hello all, Guile newb here. I'm stuck on a Scheme tutorial. It has a code generation example where generated code is stored in mycode as ((define a 0) (define b 0) (define c 0)), then evaluated in (for-each eval mycode), which doesn't work for me. I tried using (interaction-environment) to satisfy eval to no avail. Any ideas?
<nly>you may be able to use (eval mycode (interaction-environment))
<nly>(for-each proc list), where 'proc' should take 1 argument but eval takes 2
<nly>you could define a new eval to your spec (define (myeval lst) (eval lst (interaction-environment))), this myeval should take only one argument and thus work with for-each
***scs is now known as Guest49074
<artup>(eval mycode (interaction-environment)) didn't work, however defining a new eval did the trick. Thank you!
***scs is now known as Guest92488
***scs is now known as Guest67683
<lispmacs>hi, I am using guile-2.2.3, which doesn't seems to have the pointer->bytevector proc advertised in 2.2.6. What was previously used for this need?
<lispmacs>weird, it is listed in the documentation under rnrs bytevectors module. Why can't i see it as a binding?
<daviid>lispmacs: don't you need to import the module
<lispmacs>I've been trying. Maybe I'm doing something wrong
<lispmacs>,m (rnrs bytevectors) gets me access to many bytevector functions, but the pointer-> ones aren't showing up
<lispmacs>also (import (rnrs bytevectors)) and (use-modules (rnrs bytevectors))
<lispmacs>I can see like bytevector->unit-list, but no pointer->bytevector
<lispmacs>daviid: do you know correct command? are you able to call the pointer->bytevector procedure?
<lispmacs>maybe it isn't in that module
<lispmacs>but then which is it, I can't figure it out
<lispmacs>ah ha, (system foreign)
<lispmacs>had to grep the source code to figure that one out
***scs is now known as Guest24351
***scs is now known as Guest96831
***scs is now known as Guest81298
***scs is now known as Guest55595
***scs is now known as Guest54076
***scs is now known as Guest98825
***scs is now known as Guest76012