Re: s48_extract_string?

Donald Allen <[email protected]>
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
On Mon, Mar 2, 2009 at 10:02 AM, Michael Sperber
<[email protected]> wrote:
>
> Donald Allen <[email protected]> writes:
>
>>> ,exec ,load "test.scm"
>>
>> Error: undefined variable
>>        unquote
>>        (package exec)
>> 1 exec>
>>
>> Looks like there is confusion between the command processor ","
>> construct and quasiquote?
>
> Yes - the "exec language" you enter via ,exec is not literally what you
> type into the REPL.  Rather, it's essentially a Scheme-ified version of
> what you might type into the REPL.  The file scheme/vm/load-vm.scm
> should give you an idea of what it looks like.  If you could send what
> you're trying to do, I'd be happy to help put it in the right form.

I am simply trying to load the file "test.scm", whose contents were

,open external-calls
,open load-dynamic-externals
(load-dynamic-externals
"/home/dca/Finances/Invest/Options/Scheme48/postgresql.so" #f #f #f)
(import-lambda-definition pg_open_connection (dbname))

After your message, and reading between the lines in the manual, I changed it to

(open 'external-calls)
(open 'load-dynamic-externals)
(load-dynamic-externals
"/home/dca/Finances/Invest/Options/Scheme48/postgresql.so" #f #f #f)
(import-lambda-definition pg_open_connection (dbname))

Now I get

> ,exec ,load "test.scm"
Newly accessible in exec: (import-lambda-definition)
Newly accessible in exec: (load-dynamic-externals)

Error: undefined variable
       pg_open_connection
       (package exec)
1 exec> pg_open_connection

Error: undefined variable
       pg_open_connection
       (package exec)
2 exec>

Which is progress, but I'm still puzzled, because if I pop up a level
and then enter

1 exec> (import-lambda-definition pg_open_connection (dbname))
; no values returned
1 exec> pg_open_connection
#{Procedure 8942 pg_open_connection}

So pg_open_connection is defined correctly in the shared library. Why
didn't the import-lambda-definition in test.scm have its intended
effect?

I would like to make a general comment: in addition to the errors,
I've already reported, the documentation is awfully cryptic. I'm an
experienced Scheme programmer, have used MIT Scheme for many years and
have worked together with old friends Jerry Sussman and Chris Hanson
at MIT off and on over a period of 30 years. So if *I* can't
understand the manual, I'd suggest that it's just not saying what it
needs to say (this was never an issue with the MIT Scheme
documentation). If I continue to use Scheme48 (the attraction is the
FFI, which MIT Scheme doesn't have), I'll be happy to provide feedback
on the documentation (and the system itself, if appropriate) to try to
help improve it.

/Don


>
> --
> Cheers =8-} M.
> Friede, Völkerverständigung und überhaupt blabla
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.