[plt-scheme] Re: Collection not found error - porting old scripts

From: jacmoe (jacmoe at mail.dk)
Date: Sat Feb 20 18:03:15 EST 2010

Solved:
	scheme_set_collects_path(scheme_make_path("D:\\mzscheme\\plt\
\collects"));
	scheme_init_collection_paths(m_Scheme, scheme_null);

	scheme_namespace_require(scheme_intern_symbol("scheme"));

Ie, it works when not embedding the collections through base.c. I can
live with that. ;)

On Feb 20, 10:49 pm, jacmoe <jac... at mail.dk> wrote:
> Now I embedded all scheme into the base.c and is still unable to use
> anything outside of scheme/base.
>
> I do this now:
>         declare_modules(m_Scheme);
>         scheme_namespace_require(scheme_intern_symbol("scheme"));
>
> But it's no different from doing this:
>         declare_modules(m_Scheme);
>         scheme_namespace_require(scheme_intern_symbol("scheme/base"));
>
> Also tried to add an extra line:
>         scheme_namespace_require(scheme_intern_symbol("scheme/lang"));
>
> But then the app crashes.
>
> I'll stop spamming you now, and let it lie for a while - maybe the
> solution appears sometime.
>
> On Feb 20, 10:24 pm, jacmoe <jac... at mail.dk> wrote:
>
> > Just a small question:
> > I can't use this if I embed sceme/base in my application?
> > Tried the script with the simple repl sample, and got the same error.
> > This time using a simple script with a lang tag and a printf.
>
> > I will figure out how to load it from the collects path instead and
> > report back..
>
> > On Feb 20, 10:00 pm, jacmoe <jac... at mail.dk> wrote:
>
> > > Thanks for the tips. :)
>
> > > I changed it to:
> > > #lang scheme/base
>
> > > (require (prefix-in vge: "base-low.ss")
> > >          "kw.ss")
>
> > > The error I get is:
>
> > > > standard-module-name-resolver: collection not found: #<path: scheme\base\lang> in any f: ()
>
> > > My embedding program has this code in the init:
> > >         m_Scheme=scheme_basic_env();
> > >         declare_modules(m_Scheme);
> > >         scheme_namespace_require(scheme_intern_symbol("scheme/base"));
> > > Base.c is generated and seems to work.
>
> > > How can I check if scheme/base is actually loaded?
>
> > > <edit>
> > > I'll triple-check everything.
> > > Thanks for the upgrade notes.
>
> > > On Feb 20, 9:24 pm, Eli Barzilay <e... at barzilay.org> wrote:
>
> > > > On Feb 20, Ryan Culpepper wrote:
>
> > > > > jacmoe wrote:
> > > > > > This is probably pre-PLT 4 scripts, so any help is appreciated
> > > > > > regarding how to port this.
>
> > > > > The scheme and scheme/base languages have built-in support for keywords,
> > > > > so unless you're doing something really fancy you can drop (lib "kw.ss")
> > > > > and use the new syntax. Go tohttp://docs.plt-scheme.org/guide/andread
> > > > > 4.3 through 4.5.
>
> > > > See also:
>
> > > >  http://docs.plt-scheme.org/release-notes/mzscheme/MzScheme_4.txt
>
> > > > --
> > > >           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
> > > >                    http://barzilay.org/                 Maze is Life!
> > > > _________________________________________________
> > > >   For list-related administrative tasks:
> > > >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> > > _________________________________________________
> > >   For list-related administrative tasks:
> > >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> > _________________________________________________
> >   For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.