Discussion:
lisp on mobile platforms these days
Attila Lendvai
2014-04-27 04:18:17 UTC
Permalink
dear lispers,

what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?

is mkcl viable to run as a native app both on iOS and android?

if iOS has too many legal constraints and whatnot, then let's forget
it for now.

what are the downsides of connecting to the NDK (android C API)? how
much of android is not available through the NDK?
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
Paralysis through analysis.
Jean-Claude Beaudoin
2014-04-27 04:47:15 UTC
Permalink
On Sun, Apr 27, 2014 at 12:18 AM, Attila Lendvai
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
There was an ECL port attempt but I didn't track it too closely lately
I remember vaguely that a few scheme would be available and I thing CCL
is also in the picture. I'd rather talk for MKCL if you don't mind.
Post by Attila Lendvai
is mkcl viable to run as a native app both on iOS and android?
right now it is not, period. But it is on my list of things to do any month
now.
As soon as I get the ffi to be C99-complete as I say, and that I am done
with the proper interface to the "environment" (that CLTL2 thing, you know)
I will get right to it.
Post by Attila Lendvai
if iOS has too many legal constraints and whatnot, then let's forget
it for now.
I worked up a few thing that should be able to accommodate it pretty well I
think.
Basically, MKCL is now layered in at least two levels with the lowest surely
to the taste of the most paranoid, well I hope. I see it as a cheap and
easy tree shaker.
Post by Attila Lendvai
what are the downsides of connecting to the NDK (android C API)? how
much of android is not available through the NDK?
Haven't touched it yet.
Post by Attila Lendvai
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
Paralysis through analysis.
_______________________________________________
pro mailing list
http://common-lisp.net/cgi-bin/mailman/listinfo/pro
Attila Lendvai
2014-04-27 07:11:52 UTC
Permalink
Post by Jean-Claude Beaudoin
There was an ECL port attempt but I didn't track it too closely
lately I remember vaguely that a few scheme would be available and I
thing CCL is also in the picture. I'd rather talk for MKCL if you
don't mind.
not at all, especially if i understand correctly ECL is unmaintained
and MKCL is an alive fork.
Post by Jean-Claude Beaudoin
Post by Attila Lendvai
is mkcl viable to run as a native app both on iOS and android?
right now it is not, period. But it is on my list of things to do
any month now. As soon as I get the ffi to be C99-complete as I
say, and that I am done with the proper interface to the
"environment" (that CLTL2 thing, you know) I will get right to it.
porting to android sounds like a fun project. see you on mkcl-devel... :)

FTR, there's this commercial lisp:

https://wukix.com/mocl

and this thread with some comments of interest:

http://www.reddit.com/r/lisp/comments/1lemlk/best_lisp_repl_for_android_tablet/

and then there's probably the most viable:

http://gambitscheme.org/

especially this project based on gambit. after a very cursory search,
this seems to be the most inviting/interesting without actually trying
it:

http://www.lambdanative.org/

i personally won't touch any non-opensource solution when i'm
venturing into such uncharted territory. in that case being able to
fix stuff myself is priority for me.
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“I will probably be asked why I don't cite the author's name? Because
my philosophy teacher taught me that it sometimes jeopardizes the
effects of the quote.”
— Author's name withheld.
Jean-Claude Beaudoin
2014-04-27 07:33:07 UTC
Permalink
Post by Attila Lendvai
Post by Jean-Claude Beaudoin
There was an ECL port attempt but I didn't track it too closely
lately I remember vaguely that a few scheme would be available and I
thing CCL is also in the picture. I'd rather talk for MKCL if you
don't mind.
not at all, especially if i understand correctly ECL is unmaintained
and MKCL is an alive fork.
You are probably too hard on ECL (at least somewhat).
But you are right that MKCL is alive and I would even add that it
is moving pretty fast under the public surface...
Post by Attila Lendvai
Post by Jean-Claude Beaudoin
Post by Attila Lendvai
is mkcl viable to run as a native app both on iOS and android?
right now it is not, period. But it is on my list of things to do
any month now. As soon as I get the ffi to be C99-complete as I
say, and that I am done with the proper interface to the
"environment" (that CLTL2 thing, you know) I will get right to it.
porting to android sounds like a fun project. see you on mkcl-devel... :)
Well, you may have a few difficulties subscribing to mkcl-devel since
common-lisp.net is currently going through yet another great shake up.
The mailing lists are back under mailman control again but I have not
taken time to update the MKCL web page about it. Here is the link
that I should put back:

http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/mkcl-devel
Post by Attila Lendvai
https://wukix.com/mocl
http://www.reddit.com/r/lisp/comments/1lemlk/best_lisp_repl_for_android_tablet/
http://gambitscheme.org/
Yes, Gambit-C by Marc Feeley is the scheme I had most in mind but
I wasn't sure enough of my memory to spell it out.
Post by Attila Lendvai
especially this project based on gambit. after a very cursory search,
this seems to be the most inviting/interesting without actually trying
http://www.lambdanative.org/
Looks impressive! Thanks for the hint.
Attila Lendvai
2014-04-27 07:45:50 UTC
Permalink
Post by Jean-Claude Beaudoin
Well, you may have a few difficulties subscribing to mkcl-devel since
common-lisp.net is currently going through yet another great shake up.
The mailing lists are back under mailman control again but I have not
taken time to update the MKCL web page about it. Here is the link
http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/mkcl-devel
FYI, subscription works also based on your current description. seems
like mailman has been configured to be compatible with whatever was
used before that.

(i've subscribed by sending a mail to
mkcl-devel+***@common-lisp.net and when i tried to subscribe
again thorugh the mailmain web interface i got an alert that i'm
already subscribed)
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“You tell me what you mean by God, and I'll tell you whether I believe
in him or not!”
— E. O. James
Jean-Claude Beaudoin
2014-04-27 07:49:59 UTC
Permalink
Post by Attila Lendvai
Post by Jean-Claude Beaudoin
Well, you may have a few difficulties subscribing to mkcl-devel since
common-lisp.net is currently going through yet another great shake up.
The mailing lists are back under mailman control again but I have not
taken time to update the MKCL web page about it. Here is the link
http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/mkcl-devel
FYI, subscription works also based on your current description. seems
like mailman has been configured to be compatible with whatever was
used before that.
Pleasant surprise!
Steve Haflich
2014-04-27 07:05:32 UTC
Permalink
Yasuaki Honda has ported Maxima (including it's 3d graphing) to Android.
Maxima is the open source DOE version of the huge and ancient Macsyma
symbolic algebra system, ported to Common Lisp. Honda used Ageneau's ECL
port to Android.

See http://maxima.sourceforge.net then the link to related projects.
Sources should be available there, and a Maxima Android binary is
downloadable directly from the Play store.
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
is mkcl viable to run as a native app both on iOS and android?
if iOS has too many legal constraints and whatnot, then let's forget
it for now.
what are the downsides of connecting to the NDK (android C API)? how
much of android is not available through the NDK?
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
Paralysis through analysis.
_______________________________________________
pro mailing list
http://common-lisp.net/cgi-bin/mailman/listinfo/pro
Daniel Herring
2014-04-27 16:39:34 UTC
Permalink
Post by Attila Lendvai
what are the downsides of connecting to the NDK (android C API)? how
much of android is not available through the NDK?
When I tried using Lisp on Android a couple years ago, the going was rough
to say the least. Today, there are a handful of Scheme implementations,
Maxima, and other Lisps on the Play Store that seem to work pretty well.
Unfortunately, time is short lately.

I did get a bit of experience with Android and the NDK. NDK applications
are quite feasible, but they are discouraged by Google and so the
documentation and tooling is less refined.

Basically, "Android" is a heavily modified Linux distribution with a
Java-based desktop interface. So C/C++ and other NDK programs and
libraries will run much as they do on any other Linux distribution.

Android uses a custom Java VM (Dalvik) to enable application portability
across different architectures. NDK programs must be compiled separately
for each supported architecture, possibly with multiple architectures in
an APK (application package).

https://developer.android.com/tools/sdk/ndk/index.html#Contents


So if you have your own GUI library (say using OpenGL ES), you can write
the whole application as a "Native Activity".

https://developer.android.com/reference/android/app/NativeActivity.html

Or run your apps on the command line using a program like Terminal IDE.


For everything else, you can use JNI bindings. The coding style is
similar to using FFI bindings to talk to C libraries. On desktop systems,
there are often conflicts between the GC mechanisms used by CL and Java,
so this would be something to watch out for on Android as well.

The JFLI and CL+J projects were attempts at CL bindings to the JNI. I
haven't looked whether the JNI offered by Dalvik would require any
modifications to these projects.


CCL has an implementation of JFLI and ARMv7 support, so it might be a
viable solution on some tablets.

http://trac.clozure.com/ccl/browser/trunk/source/examples/jfli
http://trac.clozure.com/ccl/wiki/ReleaseNotes/1.9


- Daniel
Nick Levine
2014-04-27 18:19:51 UTC
Permalink
For everything else, you can use JNI bindings. The coding style is
similar to using FFI bindings to talk to C libraries. On desktop
systems, there are often conflicts between the GC mechanisms used by
CL and Java, so this would be something to watch out for on Android
as well.
In particular, you shouldn't be surprised if JNI's DetachCurrentThread
bites you from behind. (When I was working with Rich Hickey's JFLI a
few years back, this call typically SEGVed in foriegn code or caused
random corruption in Java internals. I ended up recycling threads
myself rather than letting them go altogether.)

- nick
Martin Simmons
2014-04-30 17:30:59 UTC
Permalink
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
is mkcl viable to run as a native app both on iOS and android?
if iOS has too many legal constraints and whatnot, then let's forget
it for now.
We are working on targeting mobile devices and are currently seeking alpha
testers. Please contact us directly if you would like to build a Common Lisp
runtime for iOS or Android.

We're not going to publish further details yet, so please don't ask here.
--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/
Scott McKay
2014-04-30 17:37:03 UTC
Permalink
Martin, do you have LispWorks running in AWS?

--Scott
Post by Martin Simmons
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
is mkcl viable to run as a native app both on iOS and android?
if iOS has too many legal constraints and whatnot, then let's forget
it for now.
We are working on targeting mobile devices and are currently seeking alpha
testers. Please contact us directly if you would like to build a Common Lisp
runtime for iOS or Android.
We're not going to publish further details yet, so please don't ask here.
--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/
_______________________________________________
pro mailing list
http://common-lisp.net/cgi-bin/mailman/listinfo/pro
Martin Simmons
2014-05-01 17:45:59 UTC
Permalink
I've not tried myself, but most programs will run (isn't AWS just another VM)?
--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/
Post by Scott McKay
Martin, do you have LispWorks running in AWS?
--Scott
Post by Martin Simmons
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
is mkcl viable to run as a native app both on iOS and android?
if iOS has too many legal constraints and whatnot, then let's forget
it for now.
We are working on targeting mobile devices and are currently seeking alpha
testers. Please contact us directly if you would like to build a Common Lisp
runtime for iOS or Android.
We're not going to publish further details yet, so please don't ask here.
--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/
_______________________________________________
pro mailing list
http://common-lisp.net/cgi-bin/mailman/listinfo/pro
Matthew Mondor
2014-04-30 18:59:59 UTC
Permalink
On Sun, 27 Apr 2014 10:18:17 +0600
Post by Attila Lendvai
dear lispers,
what is the state of the art in running lisp (not just CL) on mobile
platforms, preferably in a portable way?
As another possibility than ECL-based solutions, with
http://www.robovm.org/ it might be possible to have a fairly portable
Java code base between Android and iOS devices, with the possibility of
using Clojure or ABCL.

I have no personal experience with Clojure or ABCL for Android, but I
assume that it wouldn't be too difficult to make that work.
--
Matt
Loading...