Yes, please. I've been toying with this idea for quite a while now.

Chicken already works without modification on iOS. However, since you
cannot link to third party libraries dynamically, you'd have to compile two
versions (x86 one for the simulator, ARM version for the device) and
statically link to the correct version.

What I have done previously (successfully), was to grab the generated C
Chicken (runtime.c, srfi-1.c, ports.c, etc) and added to the XCode project.
Then, I compiled my program and asked csc to just dump the .c files. I then
added it to the project as well. Also added a Makefile so that they would
get recompiled as necessary.

That worked, I was even able to open a remote REPL and make changes and
have them displayed in the device (the OpenGLES drawing code was written in
Scheme). The advantage of this approach was that one doesn't need to care
what the target device is. However, it is too 'hackish' for my tastes. Not
to mention that it would be a pain to add eggs. But it proved that Chicken
works fine on iOS.

Since one can call Scheme functions from C, it is trivial to do so using
Objective-C. The other way around should be possible too, but I haven't
poked too much into Objective-C's internals yet. If all else fails, we
could always write 'foreign code'.

Building a cross compiler (and using the correct one in the iOS build
system) is rather tedious, as is statically linking the correct eggs. If we
had a tool to generate a 'template' project and maintain it, we'd have a
winner. Actually building it could be accomplished by xcodebuild, as long
as we add a build step that calls csc.

I'm talking about iOS since that's what I am used to, but this could be
even better under, say, Android. Anyone knows what the state of the NDK
nowadays? Would we be able to create apps in mostly Scheme?


-- Stephen

*"Kids these days.*
*Whatever happened to hard work?"*

       -- Joel Spolsky, The perils of javaschools



On Tue, Nov 13, 2012 at 4:09 PM, Andrew Pennebaker <
andrew.penneba...@gmail.com> wrote:

> I see the beginnings of a Chicken Scheme port for Android:
>
> https://github.com/kristianlm/chicken-android
>
> I'd like to see ports for other mobile platforms (iOS, Windows Phone,
> Windows Surface). I'd prefer to write my mobile apps all in one FPL, and
> Chicken Scheme would be a fantastic choice.
>
> I'd also like to see more effort put into simplifying the
> build-to-mobile-app process. csi/csc are incredibly easy and intuitive, and
> I'd like to see a similar tool for one-step building runnable mobile apps
> from Chicken Scheme code. Maybe call it csm (Chicken Scheme Mobile)?
>
> Anyone interested?
>
> --
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> _______________________________________________
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to