[plt-scheme] How to use (load path) in plt-scheme?
Oops, I forgot a #lang scheme for foo.scm
On Jul 8, 2008, at 5:44 PM, Matthias Felleisen wrote:
>
> This is a weird script. Why not
>
>> #!/usr/bin/scheme
>> #!scheme
>> (require scheme/system)
>> (define bar "hello world")
>> (display bar)
>
> and be done?
>
> ;; ---
>
> I used to have the following:
>
> bar.scm; dynamically generated via scripts and by-hand:
> (define bar "hello")
>
> foo.scm
> (load "bar.scm")
> (display (string-append bar " world"))
>
> and I ran this for years.
>
> For PLT v4.0, I changed it to
>
> bar.scm; dynamically generated via scripts and by-hand:
> #lang scheme/base
> (provide bar)
> (define bar "hello")
>
> foo.scm
> (require (file "bar.scm"))
> (display (string-append bar " world"))
>
> Works like a charm. -- Matthias
>
>
>
>
> On Jul 8, 2008, at 3:06 AM, david wrote:
>
>> I use plt-scheme as my shell scripts language. I will run some other
>> tools to generate some variables dynamically, and load them into
>> scheme. But my scripts fails.
>>
>> My script looks like this:
>>
>> foo.scm :
>> #!/usr/bin/scheme
>> #!scheme
>> (require scheme/system)
>> (system "echo (define bar \"Hello world\n\") > variables.scm")
>> (load "variables.scm")
>> (display bar)
>> _________________________________________________
>> 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