Re: Running small scripts

"Diogo F. S. Ramos" <[email protected]> Fri, 29 Apr 2011 04:43:56 -0300
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Michael Sperber <[email protected]> writes:

> "Diogo F. S. Ramos" <[email protected]> writes:
>
>> I'm trying to make small scripts to be run from a unix shell.
>>
>> Looking through the manual I found that scheme48 implements srfi-22, but
>> I'm having troubles shebanging source files. Is it possible? What do I
>> need to write at the shebang line?
>
> Exactly what SRFI 22 says.  For example:
>
> #! /usr/bin/env scheme-r5rs

Well, I can use 'scheme-r5rs', but then another scheme implementation,
not scheme48, will be called.

Can't I explicit specify scheme48 in there?

Something like: #!/usr/bin/env scheme48

>> Also, how would I ,open structures
>> from the script, as I guess I wouldn't be able to use ,open from it.
>
> Yes, you wouldn't: None of the dialects of SRFI 22 supports ,open.

So how would I load a specific structure?

I see that structures' definitions can use (open foo) to specify
dependencies, but I also see that I can't use (open foo) in the REPL.

>> What I am actually doing to make it work is creating an image with
>> ,build and then using a shell script to run the virtual machine with the
>> image as the -i argument.
>
> That is something completely different.  Where exactly are you having
> trouble?

No problems in this particular scenario. Everything works great but I'm
wondering if there is a simple way to create small scripts other than
building images.

-- 
Diogo F. S. Ramos