public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: mikel evins <mevins@me.com>
To: Per Bothner <per@bothner.com>
Cc: mikel evins <mevins@me.com>, kawa@sourceware.org
Subject: Re: the right way to compile and load modules
Date: Tue, 13 May 2014 08:02:00 -0000	[thread overview]
Message-ID: <7D1A5D60-5997-4B7A-9176-8F6FA315F016@me.com> (raw)
In-Reply-To: <5371CFD0.7070708@bothner.com>


On May 13, 2014, at 2:54 AM, Per Bothner <per@bothner.com> wrote:

> On 05/12/2014 09:09 PM, mikel evins wrote:
>> Okay, so I add a module-export form to bar.scm and recompile.
>> Now foo.class runs as expected, but there's a new problem: if I load bar.scm, kawa complains that bar is exported but never defined.
> 
> A possible problem is that load is line-by-line, which is fundamentally
> incompatible with modules as a unit - and thus with export.  If you use
> load, leave off the exports.

If I leave off the exports I cannot compile.

I can try requiring or importing from the repl and see how that works.

> Better to always use require (or r7rs import).  You can use require to
> import a source file (though you can't yet use import for that).
> I don't have an example - it late, I'm tired, and my initial experiment
> is doing something weird. :-(

Another point: I was using parameters for certain things, but getting null pointer exceptions when referencing them in compiled code. I'm guessing that the compiled modules did not execute the toplevel defines that should have defined the parameters. I suppose that might reasonbly be an expected result, though it's a little inconvenient.


  reply	other threads:[~2014-05-13  8:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  4:09 mikel evins
2014-05-13  7:29 ` Charles Turner
2014-05-13  7:45   ` mikel evins
2014-05-13  7:49   ` Per Bothner
2014-05-13  7:55 ` Per Bothner
2014-05-13  8:02   ` mikel evins [this message]
2014-05-13  8:40     ` mikel evins
2014-05-13 10:23       ` mikel evins
2014-05-14  1:13       ` mikel evins
2014-05-14  1:19         ` parameters not working? mikel evins
2014-05-14  1:31           ` Per Bothner
2014-05-14  1:41             ` mikel evins
2014-05-14  2:12             ` mikel evins
2014-05-14  2:19               ` mikel evins
2014-05-14  9:32             ` mikel evins
2014-05-14 16:07               ` Per Bothner
2014-05-14  1:43         ` the right way to compile and load modules Per Bothner
2014-05-14  1:50           ` mikel evins
2014-05-14  2:05           ` mikel evins
2014-05-14  3:52             ` Per Bothner
2014-05-14  3:59               ` mikel evins
2014-05-14  6:29                 ` Per Bothner
2014-05-14  6:52                   ` mikel evins
2014-05-14 18:59                     ` Kawa experience [was: the right way to compile and load modules] Per Bothner
2014-05-14 20:06                       ` Charles Turner
2014-05-15  2:16                       ` mikel evins
2014-05-14  7:26                   ` the right way to compile and load modules mikel evins
2014-05-14  7:33               ` Per Bothner
2014-05-14  7:35                 ` mikel evins
2014-05-14 18:46                 ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D1A5D60-5997-4B7A-9176-8F6FA315F016@me.com \
    --to=mevins@me.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).