[gambit-list] Gambit-C cross-platform framework

Petersen, Chris CPetersen at cw.bc.ca
Sat Aug 3 11:15:01 EDT 2013


Thanks for reporting your progress. I was not aware of the 32bit linux requirement, we can probably relax that.

As for documentation, we are in the process of refactoring everything for the LambdaNative wiki:
https://github.com/part-cw/lambdanative/wiki
There are more than 450 api calls, so it will take us a little while to complete this. A tutorial that expands on the material in the slideshow is also in the works.

We are aware of the other Android targets, but have yet to come across a non-arm Android phone or tablet. We have tested a very wide range of Android devices over the years, from minimal models from the African and Indian markets, over popular North American models, to super-charged Japanese ones. The arm-based uSquish supports 3395 models of a total of 3492 devices reported on the google developer console. That's more than 97% penetration. That said, we are happy to add the other targets once we have appropriate hardware to test against.

One of the benefits of the LambdaNative framework is very easy development, although I attribute that as much to Gambit itself as to the framework. It's possible to prototype a simple app in hours. uSquish was completed in a day and a half, and most of that time was spent on the textures. It's just 300 lines of code.. though admittedly not a juggernaut of complex game play either.

Anecdotally, uSquish was written on the heels of discussions about how to improve pain scores in children. The convention is self-reporting, and this works poorly in small children. The notion behind uSquish was that reaction time changes with pain level (more pain should give faster reaction). Right after completion a small spontaneous internal squish-fest broke loose, were we played the game with and without a transcutaneous nerve stimulator hooked to ourselves. Pain does indeed change your score :) but the results were inconclusive, and uSquish never made it to a clinical trial. Instead another LambdaNative app, Panda, was developed as a more conventional digital version of current pain scales. Panda went on to undergo successful trials in children. 

Chris

________________________________________
From: gambit-list-bounces at iro.umontreal.ca [gambit-list-bounces at iro.umontreal.ca] On Behalf Of tcl super dude [tcleval at gmail.com]
Sent: Friday, August 02, 2013 6:09 PM
To: gambit-list at iro.umontreal.ca
Subject: Re: [gambit-list] Gambit-C cross-platform framework

I successfully compiled and tested usquish on linux and android. The only minimal problem I had was I didn't know I needed a 32 bit compiler. So on my linux box (archlinux 64bits) I installed multilib-dev for 32 bit support. Also I changed the PROFILE file to point to where I installed android-sdk and android-ndk.

Are there any more documentation or examples floating around besides https://github.com/part-cw/lambdanative ?

I am able to understand by now 90% of usquish code. That is nice, considering that there was no documentation on the app, and I am kind of a new guy on scheme. It means the framework must be really easy to code/read. I really liked the way the modules are written. Very very clean code. I didn't notice gambit compiler annotations (for optimization). I can't tell if they are necessary, as usquish runs pretty fast on my cheap LG android phone.

Android supports arm, mips and x86. Please correct me if I am wrong, but lambdanative only supports arm. If that is true, maybe I could give my two cents:

https://github.com/dmalves/compile-gambit-for-android

this small script can build libgambit.a without any errors for arm, mips and x86. I tested with a small hello world app that I ll soon post to github.

To port that for lambdanative there could be 3 directories on lambdanative-cache/android/lib/
for example:

 lambdanative-cache/android/lib/arm/
 lambdanative-cache/android/lib/mips/
 lambdanative-cache/android/lib/x86/

with each libgambit.a for each architecture on its own directory. Of course, there is need to change Android.mk so it finds the approprieate file for each archicteture. I guess gambit library is not the only library or module that needs refactoring to make this work, but I am still investigating that.

Anyway, I am happy to know about lambdanative.


2013/8/1 Ralph Möritz <ralph.moeritz at outlook.com<mailto:ralph.moeritz at outlook.com>>
*face palm* Just realized you're from Canada; you're just working on a project for South African clinics. Duh.

Do you have a link to the ICFP13 paper describing LambdaNative?


--
Chess is in its essence a game, in its form an art, and in its execution a science.

> From: CPetersen at cw.bc.ca<mailto:CPetersen at cw.bc.ca>
> To: feeley at iro.umontreal.ca<mailto:feeley at iro.umontreal.ca>
> Date: Wed, 31 Jul 2013 14:51:59 -0700
> CC: gambit-list at iro.umontreal.ca<mailto:gambit-list at iro.umontreal.ca>

> Subject: Re: [gambit-list] Gambit-C cross-platform framework
>
>
> Hi Marc,
>
> Thanks for the positive feedback. And yes, LambdaNative was originally developed for the phone oximeter suite of applications, which have now evolved into full mobile diagnostic tools. As an example, we've developed a pre-eclampsia (a dangerous condition during pregnancy) diagnostic app running on iOS devices. This has been used in three usability studies and is an ongoing blinded hospital-based clinical trial in South Africa. Here is the original Grand Challenge pledge for that:
> http://savinglivesatbirth.net/summaries/37
> And some of the related design work:
> http://www.sfu.ca/~pbernal/OP2/projects/piers.html
> We are currently working on a simplified version to be used for home visitations, with clinical trials in Pakistan, Nigeria, Mozambique and India starting later this year, on cheap Android devices.
>
> We've been successful in deploying our Gambit based applications on a wide range of devices without any issues, which is really a great testimony to the portability and usefulness of Gambit.
>
> Chris
>
> ________________________________________
> From: Marc Feeley [feeley at iro.umontreal.ca<mailto:feeley at iro.umontreal.ca>]
> Sent: Wednesday, July 31, 2013 2:03 PM
> To: Petersen, Chris
> Cc: gambit-list at iro.umontreal.ca<mailto:gambit-list at iro.umontreal.ca>
> Subject: Re: [gambit-list] Gambit-C cross-platform framework
>
> I really like your ICFP13 paper. It shows off very eloquently one of the main advantages of using Gambit: cross-platform portability. It is hard to imagine a more "real-world" use of Gambit than this.
>
> Thanks for sharing your work with the rest of the Gambit community!
>
> Marc
>
> On 2013-07-31, at 3:00 PM, "Petersen, Chris" <CPetersen at cw.bc.ca<mailto:CPetersen at cw.bc.ca>> wrote:
>
> >
> > It may be of interest to some on the list that we have
> > open-sourced (BSD licenced) our core Gambit-C based
> > development framework for producing cross-platform
> > applications on Android, iOS, OS X, Linux, Windows and OpenBSD.
> > The GUI is OpenGL based with a widget system
> > written in Scheme. The framework can also be used
> > for cross-platform console/embedded applications.
> >
> > The source code, including examples, is here:
> >
> > https://github.com/part-cw/lambdanative
> >
> > A paper describing the framework and its use for
> > various medical applications on smartphones and embedded
> > devices will be presented at ICFP'13 in Boston in September.
> >
> > Chris
> > _______________________________________________
> > Gambit-list mailing list
> > Gambit-list at iro.umontreal.ca<mailto:Gambit-list at iro.umontreal.ca>
> > https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca<mailto:Gambit-list at iro.umontreal.ca>
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list

_______________________________________________
Gambit-list mailing list
Gambit-list at iro.umontreal.ca<mailto:Gambit-list at iro.umontreal.ca>
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list





More information about the Gambit-list mailing list