cinvoke-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cinvoke-dev] Kite support for C/Invoke and other things


From: Mooneer Salem
Subject: [cinvoke-dev] Kite support for C/Invoke and other things
Date: Mon, 28 Jul 2008 01:11:22 -0700

Hello everyone,

First thing's first: I've added C/Invoke bindings to Kite, the
programming language I'm working on. The bindings consist of Kite
classes written in C that export a similar API to the one C/Invoke
exports, along with a wrapper to make it easier to use. Here is the
code that's currently in SVN and will be part of the 1.0b4 release:

http://www.kite-language.org/trac/browser/interpreter/trunk/modules/interface/language/c.kt
(wrapper)
http://www.kite-language.org/trac/browser/interpreter/trunk/modules/__internal/_cinvoke_callback.c
http://www.kite-language.org/trac/browser/interpreter/trunk/modules/__internal/_cinvoke_context.c
http://www.kite-language.org/trac/browser/interpreter/trunk/modules/__internal/_cinvoke_function.c
http://www.kite-language.org/trac/browser/interpreter/trunk/modules/__internal/_cinvoke_library.c
http://www.kite-language.org/trac/browser/interpreter/trunk/modules/__internal/_cinvoke_structure.c

(I also have a copy of C/Invoke itself in my SVN with the below patch
applied and some extra stuff to facilitate autoconf/automake
integration with the rest of the Kite build).

And a usage example:

import "interface.language.c";

libr = make interface.language.c("libm.so");
libr|add_method(
        "cos",
        interface.language.c.param_types.double,
        [interface.language.c.param_types.double]
);
libr|cos(0.0)|print;

Also, as part of Kite's efforts to run on Windows, I've added a
gcc_x86_win architecture to facilitate compilation on MingW and Cygwin
(only tested for compilation on MingW so far). It should run normally,
since gcc_x86_win is simply cl_x86_win but with the assembly code
converted to AT&T syntax for gcc. Here is a patch against 1.0 to
support this: http://www.kite-language.org/files/cinvoke-gccwindows.patch.

Finally, I was trying to access the C/Invoke SVN repository, and it
seems to be down:

harry:Desktop mooneer$ svn co svn://pleep.com/trunk/cinvoke
svn: Can't connect to host 'pleep.com': Connection refused
harry:Desktop mooneer$

Thanks,

-Mooneer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]