Hi,
I'm testing scheme on the iphone. I'm compiling scheme to c with gsc. And then compiling c with xcode. This binary is then used on the iphone simulator with great success. I can connect with a REPL and change running code. It works like expected.
When doing the same over the wireless network to my real iPod touch(arm6). I can create new functions, verify that I can change them, but the running application is in "read-only"-mode. I looks like the REPL accept the changes, but the running program do not change. It feels like I can't mix compiled with interpreted code anymore. The compiled code lives in it's own world.
1. How to research this problem in the REPL? Or where do I look for a solution.
I have just started looking at scheme. I have no prior experience with gambit. This is my first mail to the mailing-list.
/Mats
Afficher les réponses par date
On 2010-03-12, at 4:06 AM, Mats wrote:
Hi,
I'm testing scheme on the iphone. I'm compiling scheme to c with gsc. And then compiling c with xcode. This binary is then used on the iphone simulator with great success. I can connect with a REPL and change running code. It works like expected.
When doing the same over the wireless network to my real iPod touch(arm6). I can create new functions, verify that I can change them, but the running application is in "read-only"-mode. I looks like the REPL accept the changes, but the running program do not change. It feels like I can't mix compiled with interpreted code anymore. The compiled code lives in it's own world.
- How to research this problem in the REPL? Or where do I look for a solution.
I have just started looking at scheme. I have no prior experience with gambit. This is my first mail to the mailing-list.
Did you use any special declarations in your code? In particular, a (declare (block)) declaration might be to blame. This declaration tells the compiler that it can assume a top level function (or in general a top level definition) will not change if there is no set! to the variable in the file. In other words the compiler will assume that variable is immutable. If you want to debug and/or change definitions at runtime, avoid using (declare (block)). Actually, since this is your first experimentation with Gambit, avoid using any declaration!
If that's not the case, please show us the code!
Marc
Thanks Marc! That did the trick. Sorry for not submitting code.
I removed:
(declare (block) (standard-bindings) (extended-bindings))
This is the project I am playing with: http://github.com/jlongster/gambit-iphone-example/
Thanks again.
/Mats
On Fri, Mar 12, 2010 at 12:58 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
On 2010-03-12, at 4:06 AM, Mats wrote:
Hi,
I'm testing scheme on the iphone. I'm compiling scheme to c with gsc. And then compiling c with xcode. This binary is then used on the iphone simulator with great success. I can connect with a REPL and change running code. It works like expected.
When doing the same over the wireless network to my real iPod touch(arm6). I can create new functions, verify that I can change them, but the running application is in "read-only"-mode. I looks like the REPL accept the changes, but the running program do not change. It feels like I can't mix compiled with interpreted code anymore. The compiled code lives in it's own world.
- How to research this problem in the REPL? Or where do I look for a solution.
I have just started looking at scheme. I have no prior experience with gambit. This is my first mail to the mailing-list.
Did you use any special declarations in your code? In particular, a (declare (block)) declaration might be to blame. This declaration tells the compiler that it can assume a top level function (or in general a top level definition) will not change if there is no set! to the variable in the file. In other words the compiler will assume that variable is immutable. If you want to debug and/or change definitions at runtime, avoid using (declare (block)). Actually, since this is your first experimentation with Gambit, avoid using any declaration!
If that's not the case, please show us the code!
Marc