JNI (was Re: [Chicken-users] Chicken 2.2

2005-09-27 Thread Daishi Kato
At Tue, 27 Sep 2005 07:45:37 +0200,
felix winkelmann wrote:
> BTW, I had some trouble with JNI the other day. Somehoe
> the Java runtime system didn't like Chicken, or it's stack
> popping, or whatever. Can you report any problems with it,
> or is it my setup that's broken?

Lots of problems were caused mainly by
my lack of understanding in chicken.
Other than that it's fairly working,
but I only passes strings and integers.
Passing non-premitive type such as string
seems troublesome, and my way of doing is
very limited.

It's clear, but fair threads in chicken does not work...

Daishi


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


Re: [Chicken-users] Chicken 2.2

2005-09-26 Thread felix winkelmann
On 9/27/05, Daishi Kato <[EMAIL PROTECTED]> wrote:
> Thanks, Felix and Daniel.
>
> This is what I did and it seems OK.
>
> 1. Remove (include "chicken-entry-points.scm")
> 2. replace define-embedded with define-external
> 3. add (return-to-host) at the bottom of scheme code
> 4. add CHICKEN_run(C_toplevel) at the beginning of C code
>(which is actually called from Java through JNI)
>
> I have also changed hash-table stuffs to follow SRFI-69.
>

That's just right.

BTW, I had some trouble with JNI the other day. Somehoe
the Java runtime system didn't like Chicken, or it's stack
popping, or whatever. Can you report any problems with it,
or is it my setup that's broken?


cheers,
felix


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


Re: [Chicken-users] Chicken 2.2

2005-09-26 Thread Daishi Kato
Thanks, Felix and Daniel.

This is what I did and it seems OK.

1. Remove (include "chicken-entry-points.scm")
2. replace define-embedded with define-external
3. add (return-to-host) at the bottom of scheme code
4. add CHICKEN_run(C_toplevel) at the beginning of C code
   (which is actually called from Java through JNI)

I have also changed hash-table stuffs to follow SRFI-69.

Daishi

At Mon, 26 Sep 2005 10:54:19 -0400 (EDT),
Daniel B. Faken wrote:
> 
> Hi,
> 
>   Just FYI, the chicken.html packaged with 2.2 is out-of-date.  'make 
> chicken.html' or make install will fix this.
> 
> Daniel
> 
> On Mon, 26 Sep 2005, Daishi Kato wrote:
> > At Sun, 25 Sep 2005 17:00:20 +0200,
> > felix winkelmann wrote:
> > > - Embedding:
> > >   * All the `entry-point' related things have been removed, as has
> > > been `define-embedded',
> > > calling Scheme from C is now exclusively done with callbacks
> > 
> > Hi,
> > Sorry for a silly question, but I don't quite understand
> > the new FFI system. Is there any documentations available?
> > I have some code that uses chicken-entry-points.scm.
> > How would I change it to work with chicken-2.2?
> > Should I use define-external?
> > 
> > Thanks for any advices.
> > Daishi
> > 
> > 
> > ___
> > 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


Re: [Chicken-users] Chicken 2.2

2005-09-26 Thread Daniel B. Faken
Hi,

  Just FYI, the chicken.html packaged with 2.2 is out-of-date.  'make 
chicken.html' or make install will fix this.

Daniel

On Mon, 26 Sep 2005, Daishi Kato wrote:
> At Sun, 25 Sep 2005 17:00:20 +0200,
> felix winkelmann wrote:
> > - Embedding:
> >   * All the `entry-point' related things have been removed, as has
> > been `define-embedded',
> > calling Scheme from C is now exclusively done with callbacks
> 
> Hi,
> Sorry for a silly question, but I don't quite understand
> the new FFI system. Is there any documentations available?
> I have some code that uses chicken-entry-points.scm.
> How would I change it to work with chicken-2.2?
> Should I use define-external?
> 
> Thanks for any advices.
> Daishi
> 
> 
> ___
> 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


Re: [Chicken-users] Chicken 2.2

2005-09-25 Thread felix winkelmann
On 9/26/05, Daishi Kato <[EMAIL PROTECTED]> wrote:
> At Sun, 25 Sep 2005 17:00:20 +0200,
> felix winkelmann wrote:
> > - Embedding:
> >   * All the `entry-point' related things have been removed, as has
> > been `define-embedded',
> > calling Scheme from C is now exclusively done with callbacks
>
> Hi,
> Sorry for a silly question, but I don't quite understand
> the new FFI system. Is there any documentations available?
> I have some code that uses chicken-entry-points.scm.
> How would I change it to work with chicken-2.2?
> Should I use define-external?
>

You can use define-external, or the CHICKEN_eval(),... functions.
This change is only for embedding Chicken into applications.

See also:

http://www.call-with-current-continuation.org/manual/Callbacks.html


cheers,
felix


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


Re: [Chicken-users] Chicken 2.2

2005-09-25 Thread Daishi Kato
At Sun, 25 Sep 2005 17:00:20 +0200,
felix winkelmann wrote:
> - Embedding:
>   * All the `entry-point' related things have been removed, as has
> been `define-embedded',
> calling Scheme from C is now exclusively done with callbacks

Hi,
Sorry for a silly question, but I don't quite understand
the new FFI system. Is there any documentations available?
I have some code that uses chicken-entry-points.scm.
How would I change it to work with chicken-2.2?
Should I use define-external?

Thanks for any advices.
Daishi


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


[Chicken-users] Chicken 2.2

2005-09-25 Thread felix winkelmann
Hello!


The CHICKEN Scheme-to-C compiler, Version 2.2 is now
available at .


Things changed since the last release (2.0):

- Many bugfixes
- The read-syntax `#+X Y' is provided as a shorthand for `(cond-expand
(X Y) (else))'
- `foreign-parse' and `foreign-parse/spec' have been removed
- lolevel: Executable byte-vector stuff has been removed
- SRFIs 28, 31, 62 and 69 are now officially supported
- New compiler option `-extension' simplifies static compilation of eggs
- Embedding:
  * All the `entry-point' related things have been removed, as has
been `define-embedded',
calling Scheme from C is now exclusively done with callbacks
  * Integrated boilerplate embedding API into the `eval' unit
  * Added `CHICKEN_continue' API function
  * Default "stub" toplevel (`CHICKEN_default_toplevel') allows
embedding without a
separate Scheme file
  * Different stack-levels during invocation of CHICKEN_run or
callbacks could result
in crashes - this is now detected (or can be checked manually)
- Added extension-specifier `(version ...)'
- New FFI macros `foreign-declare', `foreign-parse' and
`foreign-parse/declare' replace
  the declaration-specifiers of the same name (which still work, but
are deprecated)
- Hash-table resizing was ridiculously slow, and should now be much faster
- `define-foreign-record' handles recursive structures
- `require-extension' is now available by default, and so can be used with the
  plain Scheme evaluator
- Procedures now contain some basic debug information, unless a file
was compiled
  with `-no-lambda-info'
- compiler: `-debug-level 2' is now the default (enables trace- and lambda-info)
- chicken-setup:
  * handles direct downloads from arbitrary URLs
  * HTML documentation for eggs can now be included into the egg and
will be installed
in the repository (using the `documentation' info-property)
  * `chicken-setup -docindex' shows path of generated documentation
index for all
installed eggs
- extras:
  * SRFI-69 is now fully supported, note that THIS WILL BREAK EXISTING
CODE, since
the API is not completely compatible to the previous one
  * `clear-hash-table!', `get' and `put!' are gone
  * `read-file' accepts optional reader procedure and max count
  * `read-lines' accepts filename instead of port
- library:
  * `signum' is now exactness-preserving
  * `procedure-information' returns some basic debug info for a given procedure
  * (warning MESSAGE ARGUMENTS ...)
  * (promise? X)
- posix:
  * (current-directory DIR) is equivalent to (change-directory DIR)
- regex:
  * `pattern->regexp' has been renamed to `glob->regexp'
- The `format' library unit has been removed from the base system and
is now available
  separately
- SRFI-17 (Generalized set!), on the other hand has been moved into
the base system
- String literals and the print-names of symbol literals are now
allocated in static
  (non-GC'd) memory
- If static or shared build is disabled, no `...-static' executables
will be generated


Many thanks to Ashley Bone, Thomas Chust, John Cowan, Alejandro Forero
Cuervo, Daniel Faken, Sven
Hartrumpf, Daishi Kato, Sergey Khorev, Kon Lovett, Gene Pavlovsky,
Reed Sheridan and Ed Watkeys for
their helpful contributions, suggestions and bug reports!


cheers,
felix


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