Re: [Chicken-users] tinyclos

2009-07-24 Thread Shawn Rutledge
On Tue, May 26, 2009 at 4:04 AM, felix winkelmann wrote:
> I have imported an initial try at porting tinyclos to chicken 4 in
> release/3/tinyclos/trunk. Running tinyclos-examples.scm gives
> me an error though, so I think something is not working
> correctly.

BTW the module declaration omits the class-name procedure.  For my
usage of tinyclos in the dscm project, it basically seems to work now
(after fixing class-name).  The error with tinyclos-examples.scm is
still there, but at least I don't run into it in other contexts.  :-)


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Multiple units into a shared object in Chicken 3.4

2009-07-24 Thread Thomas Bushnell BSG
I'm using Chicken 3.4.  My units are written in the following style:

(define-extension foo)
(declare (uses bar baz qux)
 (export this that the-other))

If I compile them all statically, all is good.  For interpreted code, I
just load them.  Of course that doesn't work for units which use the
FFI.  Those I build into shared objects with
  csc -o foo.so -s foo.scm

Suddenly, for the first time, I have a unit which has a uses clause, and
which uses the FFI.  If I just do the usual thing, then when the
compiled unit is loaded, I get "undefined symbol:
C_other_unit_toplevel".  So I'm willing to compile the other unit too,
but no good.  If I make it a .so and load it into the interpreter first,
it doesn't work, because shared .so's don't contain C_UNITNAME_toplevel;
they contain plain C_toplevel, of course.

Ok, maybe I want to compile the two units together.  But if I give -s to
each, then I get C_toplevel in each, and they can't be linked together.
If I compile the using unit with -s, I can't find any way to
successfully link it to the used unit.

Indeed, it seems that the C_toplevel -in-place-of- C_UNITNAME_toplevel
difference is always tied to whether the C compiler gets -fPIC options,
and so of course there will be no way to link things together (both
files must be compiled with PIC, of course, but then both will get a
C_toplevel).

So how about if the using unit doesn't say "uses"?  Well then, how will
the top-level forms in the used unit get evaluated?  

(Especially because these files are also linked into regular
[non-shared] programs, which rely on the uses declarations!)

So basically, rather than diagnose everything--which I mostly
understand--I'm more interested in "what is the best practice" here.

I have a bunch of "library" files, used by a number of distinct
executables.  Normally, my programs are all compiled normally, and I
want each file to be its own unit.

Some of the "library" files also need to be able to be loaded into the
interpreter.  For most code, that's no problem.  But some of them must
be compiled, because they use the FFI.

What is the right preamble to stick on my files, and how should they be
compiled?!

Thomas




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Egg example

2009-07-24 Thread Jim Ursetto
Hi Bill,

I just checked out release 4 eggs as the anonymous user with the following:

svn co https://galinha.ucpel.tche.br/svn/chicken-eggs/release/4 chicken-eggs4

Maybe there was a transitory error?  Please post the error you get.

Jim

On Tue, Jul 21, 2009 at 2:37 PM, bill wrote:
> Christian,
>
> I tried release 4 and it did not work.   I then tried 3 and it did.   I'm
> fine now, but there may be a problem with release 4.
>
> Thanks for the help.
>
> Bill
>
> Christian Kellermann wrote:
>>
>> * bill  [090721 13:43]:
>>
>>>
>>> Hi all,
>>>
>>> I've decided to try my hand a writing an egg.  I'm one of those people
>>>  who learn best by example.   But when I try to  download the mpeg3  example
>>> fromk SVN I'm told the URL does not exist.   Am I doing  something wrong or
>>> is the tutorial wrong?    I have not yet started  writing an egg - I just
>>> want to see an example of how it's done.
>>>
>>>
>>
>> Maybe you are using an URL from outdated documentation?
>> The url that works for me is:
>>  https://galinha.ucpel.tche.br/svn/chicken-eggs/release/3/mpeg3
>>
>> Replace 3 by 4 if you want the eggs for chicken4.
>>
>> The username is anonymous, the password is empty.
>>
>> Cheers,
>>
>> Christian
>>
>>
>
>
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users