I'm very new to gambit and a bit confused by this behavior. I'm not sure if it's a Spheres specific issue or if I'm missing something more obvious. Any help pointing me in the right direction would be greatly appreciated.
I've installed gambit v4.7.1 and Scheme Spheres v0.4 just as the quick start guide recommends.
Everything seems to be working, for example I can create a new project with 'sfusion new -g minimal foo' and 'sake host:run' works as expected.
What confuses me is that from the repl I can enter '(##import core: testing)' and then '(check 42 => 42)' and everything works as expected.
But if I create a file:
; test.scm (##import core: testing) (check 42=> 42)
Then run 'gsi test.scm' I get '***ERROR -- Unbound variable: Check'.
I don't understand why there's a difference in behavior between the repl and batch mode when using gsi?
Afficher les réponses par date
Hi Michael,
Spheres is designed to work as projects with a structure and a config.scm file. The tasks will handle all that dependencies for you in different situations. Using gsi directly is not supported currently. The reason is that you are not supposed to write ##import code in your source files, but rather use the config.scm files to define direct dependencies and let the different tasks to do the work for you. Maybe future releases address that usecase, for individual source files without config.scm.
If you want to run interpreted code you need to: "sake host:run" inside a project. Otherwise, to compile use: "sake host:compile"
So, if you want to run code as gsi, just use the "minimal" skeleton and place the code in the main.scm file.
Cheers!
Álvaro Castro-Castilla -- a@fourthbit.com Fourthbit: Turning Ideas into Reality. -- Visit the Bloghttp://blog.fourthbit.com
On Fri, Jan 3, 2014 at 3:33 PM, Michael Greenly < michaelgreenly@logic-refinery.com> wrote:
I'm very new to gambit and a bit confused by this behavior. I'm not sure if it's a Spheres specific issue or if I'm missing something more obvious. Any help pointing me in the right direction would be greatly appreciated.
I've installed gambit v4.7.1 and Scheme Spheres v0.4 just as the quick start guide recommends.
Everything seems to be working, for example I can create a new project with 'sfusion new -g minimal foo' and 'sake host:run' works as expected.
What confuses me is that from the repl I can enter '(##import core: testing)' and then '(check 42 => 42)' and everything works as expected.
But if I create a file:
; test.scm (##import core: testing) (check 42=> 42)
Then run 'gsi test.scm' I get '***ERROR -- Unbound variable: Check'.
I don't understand why there's a difference in behavior between the repl and batch mode when using gsi?
-- Michael Greenly http://logic-refinery.com
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list