Re: [Chicken-users] basic Scheme question

2008-10-28 Thread Elf
erm, have you looked at the remote-repl egg? fwiw, i don't see why this is an issue at all... just send quoted lists (stringified, of course), and eval it on whichever end is desired. -elf On Fri, 24 Oct 2008, Shawn Rutledge wrote: On Fri, Oct 24, 2008 at 1:00 AM, Drake Wilson [EMAIL

Re: [Chicken-users] basic Scheme question

2008-10-27 Thread Elf
On Thu, 23 Oct 2008, Shawn Rutledge wrote: #;10 (begin (define update #f) (let ([v 'foo]) (set! update (lambda (d s) (printf ~s was ~s~% d (eval d)) (set! d s) #;11 (update 'v 'bar) Error: unbound variable: v What I'm trying to do is pass the name of a let-bound variable in to a lambda

Re: [Chicken-users] basic Scheme question

2008-10-26 Thread Shawn Rutledge
On Fri, Oct 24, 2008 at 12:31 PM, John Cowan [EMAIL PROTECTED] wrote: Shawn Rutledge scripsit: [W]hy should I have to re-create functionality which is one of the most basic features of Scheme (being able to look up symbols and get values bound to them) Actually, it isn't: Scheme has no such

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Peter Bex
On Thu, Oct 23, 2008 at 10:27:18PM -0700, Shawn Rutledge wrote: #;10 (begin (define update #f) (let ([v 'foo]) (set! update (lambda (d s) (printf ~s was ~s~% d (eval d)) (set! d s) #;11 (update 'v 'bar) Error: unbound variable: v What I'm trying to do is pass the name of a let-bound

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Shawn Rutledge
On Thu, Oct 23, 2008 at 11:44 PM, Peter Bex [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 10:27:18PM -0700, Shawn Rutledge wrote: #;10 (begin (define update #f) (let ([v 'foo]) (set! update (lambda (d s) (printf ~s was ~s~% d (eval d)) (set! d s) #;11 (update 'v 'bar) Error: unbound

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Drake Wilson
Quoth Shawn Rutledge [EMAIL PROTECTED], on 2008-10-23 23:54:03 -0700: Eval only sees the top-level environment. It may be possible to use the environments egg to construct your own environment containing v. I thought of that, but also thought there must be a generic Scheme way to do this.

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Shawn Rutledge
On Fri, Oct 24, 2008 at 1:00 AM, Drake Wilson [EMAIL PROTECTED] wrote: Quoth Shawn Rutledge [EMAIL PROTECTED], on 2008-10-23 23:54:03 -0700: Eval only sees the top-level environment. It may be possible to use the environments egg to construct your own environment containing v. I thought of

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Drake Wilson
Quoth Shawn Rutledge [EMAIL PROTECTED], on 2008-10-24 10:20:12 -0700: Right that's the usual pattern. But I'm trying to call it remotely. A client REPL opens an SSH connection to a server and starts a server REPL. Each of them evaluates what the other sends. So if the server sends (let

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Shawn Rutledge
On Fri, Oct 24, 2008 at 10:48 AM, Drake Wilson [EMAIL PROTECTED] wrote: If you mean later as in after the let, the v doesn't exist anymore. Well it's not going to be garbage-collected if an accessor is created inside the let, which can do destructive operations on it later. Here's a way to make

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread John Cowan
Shawn Rutledge scripsit: A client REPL opens an SSH connection to a server and starts a server REPL. Each of them evaluates what the other sends. So if the server sends (let ([v (make-thing)]) ...) and the client evaluates it, then later the server wants to ask the client to do any

Re: [Chicken-users] basic Scheme question

2008-10-24 Thread Drake Wilson
Quoth Shawn Rutledge [EMAIL PROTECTED], on 2008-10-24 12:02:52 -0700: Oh, maybe you are right though: maybe the symbol 'v doesn't exist anymore, because in the counter example, the accessor only needs to access the number to which 'v was bound. So it can replace the symbol with a reference to

[Chicken-users] basic Scheme question

2008-10-23 Thread Shawn Rutledge
#;10 (begin (define update #f) (let ([v 'foo]) (set! update (lambda (d s) (printf ~s was ~s~% d (eval d)) (set! d s) #;11 (update 'v 'bar) Error: unbound variable: v What I'm trying to do is pass the name of a let-bound variable in to a lambda defined within the let context, in order to tell