Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.lisp

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2008, 12:22 PM
chanwoo.yoo@gmail.com
Guest
 
Posts: n/a
Default Is it possble to develop ipod touch application by using lisp whichgenerate c libraries?

Hello.

Nowadays, I'm trying to make ipod touch toy applications. When I write
object-c or c code, I can't help miss macro and repl of lisp. As the
subject, I hope that I develop core functions with lisp (e.g. In game
application, they will be artificial intelligence parts), and make
them into c dynamic or static libraries. If cocoa touch application
can use shared libraries, object-c will be need in only GUI and
controller parts. Is it possible?

If it is possible, is there implementation which generate c libraries?
I looked around ECL, bigloo, and some other lisps, but I couldn't find
how to export symbols of var and function to external C and generate a
library rather than make standalone executable. Would you recommend a
good implementation(generate small binaries as possible, good
documentation...) for it?

Regards.
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 11-14-2008, 05:43 PM
Juanjo
Guest
 
Posts: n/a
Default Re: Is it possble to develop ipod touch application by using lispwhich generate c libraries?

On Nov 13, 2:22*pm, "chanwoo....@gmail.com" <chanwoo....@gmail.com>
wrote:
> If it is possible, is there implementation which generate c libraries?
> I looked aroundECL, bigloo, and some other lisps, but I couldn't find
> how to export symbols of var and function to external C and generate a
> library rather than make standalone executable. Would you recommend a
> good implementation(generate small binaries as possible, good
> documentation...) for it?


I do not know about other implementations. The problem with generating
static code is that it can violate the semantics of the original lisp.
ECL allows you to export certain lisp functions with C names, and we
use this in the core library. That makes it easy to call functions
from the core Common Lisp language from C. See
http://ecls.wiki.sourceforge.net/Simple+embedded+usage

For doing the same with your own functions you have to use an ECL
extension which is
(proclaim '(si::c-export-fname my-package:my-function))
If this is invoked prior to compiling a file, then the compiler will
generate a public functino with the name and signature
my_package_my_function(int narg, ...)
which takes a variable number of arguments.

However, as you said, the nice thing about lisp is the dynamic nature.
I would rather recommend using a more dynamical approach which is
based on directly funcalling the lisp symbols, not the C functions.
This way you can redefine the lisp functions whenever you want,
replacing them with interpreted versions, recompiling them, etc. You
will find some examples in the mailing list, as
http://sourceforge.net/mailarchive/m...%40names.co.uk
but I should write up some more.

Juanjo
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 06:03 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.