Re: [Chicken-users] Chicken Scheme for mobile devices?
Hi Arne, That's a great idea. I'll be there, and I'm looking forward to the discussion! In the mean time, I've played around with a template-based build system for Android: https://github.com/Adellica/chicken-mobile It isn't complete yet, but I though I'd put it out there so you can have a look and see how I'm thinking of easing the build-phase. K. On Tue, Nov 20, 2012 at 2:20 PM, Arne Eilermann eilerm...@lavabit.comwrote: Hey chicken users! On Thursday, 15. November 2012 at 19:56, Mario Domenech Goulart wrote: It looks that there are other people interested in getting Chicken running on mobile platforms. So, I think there are good chances we'll soon see some nice projects on that area. This is really great! I'd like to invite everybody who is interested to join a little discussion on this topic. We want to meet at monday (26th) at 17:30 UTC in #mobile-chicken on irc.f0o.de. The target is to coordinate our efforts. I'm looking forward. Greetings, Arne ___ 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
Re: [Chicken-users] Chicken Scheme for mobile devices?
Hey chicken users! On Thursday, 15. November 2012 at 19:56, Mario Domenech Goulart wrote: It looks that there are other people interested in getting Chicken running on mobile platforms. So, I think there are good chances we'll soon see some nice projects on that area. This is really great! I'd like to invite everybody who is interested to join a little discussion on this topic. We want to meet at monday (26th) at 17:30 UTC in #mobile-chicken on irc.f0o.de. The target is to coordinate our efforts. I'm looking forward. Greetings, Arne ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken Scheme for mobile devices?
Hi there, first of all I'd like to introduce myself, because this is my first posting on this list and it's kinda not mine at all. :-) The last years ruby was my everyday programming language and it still is. But my new job at bevuta and a few people around this company brought me to chicken, which I'm now learning. My company just chose me to be some kind of a chicken communication minion, so the rest of this mail is more like bevuta speaking to you. A few words on the company: The bevuta IT GmbH is a software company based in cologne, Germany. We are like 10 Geeks in an office to which Moritz Heidkamp – you may know him – in 2010 brought chicken. We did a few smaller project in chicken but now the first bigger one knocks on our door. This project involves the development of a framework to create cross platform GUI applications in chicken on Android and iOS. The bindings for JNI to access Android's API is mostly done. The next step will be doing something like that for iOS. With this bindings we want to create an abstraction layer to get a common interface. All of this is part of a bigger commercial and proprietary contract work, but the emerging framework shall be released to the community. We already got some experiences with chicken on mobile devices. In 2011 we did some OpenGL stuff on Android and iOS. Moritz was significantly involved in this. It was mostly experimenting, but it did quite well. If anybody of you is interested to join, feel free. We would be glad. Kind regards, Arne ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken Scheme for mobile devices?
Helllo mobile Chickeners! I'm so glad there is interest in running Chicken on mobile platforms. This is what I've been working on for the past few months, starting chicken-android https://github.com/kristianlm/chicken-android and cocoscheme https://github.com/Adellica/cocoscheme. I only have experience with Android, so I can't speak for other platforms. My chicken-android project is intended to help embedding Chicken into your Android app. It does this by providing GNU Makefiles so that you can easily add Chicken as a dependency to your exisiting NDK module, like thishttps://github.com/Adellica/cocoscheme/blob/master/proj.android/jni/Android.mk#L20. I say easily because it's still a pain with paths and you'll never get a sensible error message with the NDK build chain (e.g. you'll get cannot find chicken.h instead of cannot find module path for chicken). It also has an extra find-extensionhttps://github.com/kristianlm/chicken-android/blob/master/jni/find-extension.scmunit which allows you to load other chicken modules like (use matchable) by prefixing lib as is mandatory with the NDK. But to answer your question Stephen, the NDK handles chicken-generated .c files well. I've essentially done exactly what you did for iOS: add those .c files to the build-sourceshttps://github.com/kristianlm/chicken-android/blob/master/chicken.mk. But I too want something prettier! The cocoscheme project is a playable demo with a network repl available on Google Play, I brought it up on this mailing list herehttp://lists.nongnu.org/archive/html/chicken-users/2012-11/msg8.html. I'm using Cocos2Dx http://www.cocos2d-x.org/. All my projects so far have exclusively relied on OpenGL ES and other game-like frameworks to deal with user-interaction, so I don't know about using Chicken for more general apps. I have a few thoughts on problem (1) in Kevin's terminology: making it build/run on a mobile platform. Problem (2), to create bindings, I think should be a completely isolated (and bigger) project. I think Stephen makes a very valid point: A separate csc for building mobile components would be very tricky. It would have to hook up to NDK's gcc and that's not pretty, nor officially supported (I think). However, a csc-like tool that generates buildfiles for the different architectures is something I think would work well like Stephen explains. In my cocoscheme project, for example, I'm using a few eggs. There a lot of copy-paste like you can see herehttps://github.com/Adellica/cocoscheme/blob/master/proj.android/jni/Android.mk. It should be possible to generate makefiles for this automatically, at least for the most basic eggs. Maybe we could even look at the .setup file for an egg and make a .mk file based on that. I suspect this could be handled in a similar manner on iOS? I would love to have a project.scm file describing dependencies etc and have template- and build-files automatically built based on that. .c files would be re-generated automatically when they are older than their .scm owners so the ndk wouldn't recompile everything every time like it does now. And it should place all messy build-files into a single directory (maybe hidden) so I'm not constantly confused as to what to commit and what to not. Here's my dream: $ chicken-mobile new hello-world $ cd hello-world $ chicken-mobile build android ant debug adb install bin/hello-world-debug.apk $ chicken-mobile build ios xcode-magically-install bin/hello-world.ipa K. On Thu, Nov 15, 2012 at 3:11 PM, Arne Eilermann eilerm...@lavabit.comwrote: Hi there, first of all I'd like to introduce myself, because this is my first posting on this list and it's kinda not mine at all. :-) The last years ruby was my everyday programming language and it still is. But my new job at bevuta and a few people around this company brought me to chicken, which I'm now learning. My company just chose me to be some kind of a chicken communication minion, so the rest of this mail is more like bevuta speaking to you. A few words on the company: The bevuta IT GmbH is a software company based in cologne, Germany. We are like 10 Geeks in an office to which Moritz Heidkamp – you may know him – in 2010 brought chicken. We did a few smaller project in chicken but now the first bigger one knocks on our door. This project involves the development of a framework to create cross platform GUI applications in chicken on Android and iOS. The bindings for JNI to access Android's API is mostly done. The next step will be doing something like that for iOS. With this bindings we want to create an abstraction layer to get a common interface. All of this is part of a bigger commercial and proprietary contract work, but the emerging framework shall be released to the community. We already got some experiences with chicken on mobile devices. In 2011 we did some OpenGL stuff on Android and iOS. Moritz was significantly involved in this. It was mostly experimenting, but it
Re: [Chicken-users] Chicken Scheme for mobile devices?
On 15 November 2012 15:11, Arne Eilermann eilerm...@lavabit.com wrote: A few words on the company: The bevuta IT GmbH is a software company based in cologne, Germany. We are like 10 Geeks in an office to which Moritz Heidkamp – you may know him – in 2010 brought chicken. We did a few smaller project in chicken but now the first bigger one knocks on our door. This project involves the development of a framework to create cross platform GUI applications in chicken on Android and iOS. The bindings for JNI to access Android's API is mostly done. The next step will be doing something like that for iOS. With this bindings we want to create an abstraction layer to get a common interface. All of this is part of a bigger commercial and proprietary contract work, but the emerging framework shall be released to the community. We already got some experiences with chicken on mobile devices. In 2011 we did some OpenGL stuff on Android and iOS. Moritz was significantly involved in this. It was mostly experimenting, but it did quite well. If anybody of you is interested to join, feel free. We would be glad. That sounds quite interesting, and similar to what I have tried to do in my spare time, but there's never enough of that. It took me too long to realize that I really needed to use OpenGL, with which I didn't have enough experience yet (and only the last couple of years have I had hardware which could support Linux and ES 2.0, anyway); and it's a big change compared to just painting stuff. The concept of a scene graph is a funny thing in a way, because OpenGL is fundamentally procedural: you make API calls in the right order, and the shaders are procedural code too; but the scene graph is a declarative abstraction for that: it exists statically in memory (except when changes are made to it, during animations and such). (The only items which can exist statically in graphics memory are pixmaps and vertices, or other types of data disguised as those, which can be manipulated in the shaders; so parts of the scene graph can be converted into a form which does not need to be regenerated for each frame, but not the whole thing.) Then you have to write more procedural code to manage the scene graph. And then you probably have another declarative abstraction or collection of some sort of model objects, for the GUI or the game objects or whatever. My gut feeling is that's too many layers, even though I understand why it is that way right now. I don't like the lack of transparency; it takes too long to understand all the layers. And I think OpenGL is still too primitive: the scene graph cannot be transferred wholesale into graphics memory; and there is no way to generate geometry on the GPU from more-compact representations, unless you have geometry shader and tesselation shader suport, which has not trickled down to ES yet. Even rendering text is still a big deal. AFAICT the scene graph concept exists to facilitate fast traversal for the purpose of generating the per-frame OpenGL calls. If a Scheme implementation was fast enough, maybe we could go back to just doing the rendering in an expose callback (like the opengl egg makes possible); but it's not necessarily fast enough, depending on the complexity of what you draw and the frame rates you expect; so having a scene graph encapsulates the optimizations necessary to get good frame rates, at the cost of being limited to the kinds of primitives that the scene graph supports. If you use a per-frame callback then you have to write optimal frame-generating code yourself, and that's hard work, especially if you have to do it for every application. I'm thinking maybe a scene graph could be made of Scheme objects though. Just the code to traverse it and generate the OpenGL calls would need to be optimized. Kristian decided to use Chipmunk, which is a scene graph with an integrated physics engine, right? That's maybe a different optimization than you need for doing basic 2D GUI applications, but I do wonder if it could work for that purpose too. FWIW Qt is in process of getting fully-supported Android and iOS ports. So maybe Chicken could make use of that. At one point I thought maybe the Qt egg was going to be the way to go for GUIs, but nowadays widgets are being deemphasized in favor of QML. Of course the official scripting language for that is Javascript. Personally I'd like Scheme to be an alternative. I like the declarative QML syntax itself, but it has to be augmented with some kind of procedural language. QML is based on a custom scene graph which has been used mostly for 2D purposes (GUIs and 2D games). The text rendering is probably unmatched compared to any other OpenGL implementation: fast, scalable, antialiased and with full Unicode support. So since everybody who uses a scene graph writes his own, I guess that means we don't really have a standard or a known-best all-purpose one. It's hard to see at this time what is the
Re: [Chicken-users] Chicken Scheme for mobile devices?
Hi Arne, On Thu, 15 Nov 2012 15:11:01 +0100 Arne Eilermann eilerm...@lavabit.com wrote: first of all I'd like to introduce myself, because this is my first posting on this list and it's kinda not mine at all. :-) Welcome! The last years ruby was my everyday programming language and it still is. But my new job at bevuta and a few people around this company brought me to chicken, which I'm now learning. I hope you are enjoying Chicken. My company just chose me to be some kind of a chicken communication minion, so the rest of this mail is more like bevuta speaking to you. A few words on the company: The bevuta IT GmbH is a software company based in cologne, Germany. We are like 10 Geeks in an office to which Moritz Heidkamp – you may know him – in 2010 brought chicken. We did a few smaller project in chicken but now the first bigger one knocks on our door. I should add that bevuta has been generously funding our call-cc.org server, and we are truly grateful for that. This project involves the development of a framework to create cross platform GUI applications in chicken on Android and iOS. The bindings for JNI to access Android's API is mostly done. The next step will be doing something like that for iOS. With this bindings we want to create an abstraction layer to get a common interface. All of this is part of a bigger commercial and proprietary contract work, but the emerging framework shall be released to the community. That sounds really interesting. We already got some experiences with chicken on mobile devices. In 2011 we did some OpenGL stuff on Android and iOS. Moritz was significantly involved in this. It was mostly experimenting, but it did quite well. If anybody of you is interested to join, feel free. We would be glad. It looks that there are other people interested in getting Chicken running on mobile platforms. So, I think there are good chances we'll soon see some nice projects on that area. Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken Scheme for mobile devices?
Hi Shawn, Kristian decided to use Chipmunk, which is a scene graph with an integrated physics engine, right? That's maybe a different optimization than you need for doing basic 2D GUI applications, but I do wonder if it could work for that purpose too. Actually, Chipmunk only provides the physics-engine aspect. I'm using Cocos2Dx for the scene-graph-like features. But it is, like you say, game-oriented and probably wouldn't work for general UI. Would it be possible to look into the bbhttp://wiki.call-cc.org/eggref/4/bbegg, which uses FLTK http://www.fltk.org/? IIRC FLTK has an OpenGL backend. K. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken Scheme for mobile devices?
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
Re: [Chicken-users] Chicken Scheme for mobile devices?
I am interested in this as well. I've only investigated Android and iOS and can't speak to other mobile platforms. There are two obstacles, 1) getting Scheme code to run on target platforms, and 2) exposing the APIs for UI, GPS, etc. to the Scheme world. One solution to (1), as Stephen described, is to use csc to compile Scheme to C then compile that C according to the vendor-sanctioned process. C plays nicely with Xcode Objective C projects, and Android provides the NDK environment. So you can get Scheme compiled to good native code. However (2) is a problem since the iOS APIs are Objective C and AFAIK Chicken code cannot currently call into that. On paper the Android NDK looks like it should work, but the docs are quite clear that it's not intended to wrap the entire Android API and so may not be complete or future proof. These problems could be overcome by creating a general purpose Scheme-to-Java FFI and giving the Scheme-to-ObjC FFI some love. But those are big undertakings and may be overgeneralization. Both Android and iOS support OpenGL ES and libsdl, and we already have SDL and OpenGL (non-ES) binding eggs. So the path of least resistance for game-like apps that only need OpenGL and SDL functionality may be to use only those. We could create a build tool that automates the process of building those eggs, their dependencies, and client Scheme code, writes ObjC/Java shims, and integrates everything into the target build environments. A very different approach is to build web apps. We can use Spock to compile Scheme to JavaScript. There are well documented processes for bundling HTML5 pages into redistributable apps. Scheme can call into the HTML5 API, which others have already designed as a thorough and cross-platform API for this sort of thing. This approach seems to be aligned with the interests and wishes of Apple and Google and so may be cleaner and more future proof. However there is a performance penalty from running interpreted JS. And IIRC Spock supports a limited subset of bigchicken and cannot load eggs. So the Scheme environment would be limited. I am most interested in games and game-like apps, so I am willing to make some simplifying assumptions. Is that true for others, or do people want to support cross platform native apps in their full generality? Regards, Kevin Wortman On Wed, Nov 14, 2012 at 6:37 AM, Stephen Eilert spedr...@gmail.com wrote: 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
[Chicken-users] Chicken Scheme for mobile devices?
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