Re: [Haskell-cafe] Mobile app development?
Can we un-deprecate GHC's ability to compile to C code? C may be the best option to bridge to mobile, as Android, iOS, and Windows RT do support C/C++ apps. On Jan 22, 2013 2:14 PM, "Dan Choi" <dhchoi@gmail.com> wrote:
What about the option of using Haskell's Parsec or AttoParsec to implement a Haskell-ish language that compiles down not to machine code but to Objective C or Android Java? Like how CoffeeScript compiles down to JavaScript.
On Saturday, January 19, 2013 1:58:03 PM UTC-5, Casey Hawthorne wrote:
You would need native compilers for all the platforms and/or virtual machine technology.
Might be easier to have the browser connect to a Haskell app.
On Sat, Jan 19, 2013 at 10:42 AM, Andrew Pennebaker <andrew.p...@gmail.com> wrote:
There are currently very few options, especially free and open source options, when it comes to developing cross-platform mobile applications. It's basically web apps with JavaScript, or C++. If Haskell supported app development on Android, iOS, and Windows RT, that alone would bring in more developers.
Similarly, there are very few languages for mobile development that take advantage of multiple cores and multiple CPUs. Haskell's `parmap` is an amazing selling point. Can we please prioritize mobile support? I'd much rather write everything in ML than PhoneGap.
-- Cheers,
Andrew Pennebaker www.yellosoft.us
______________________________**_________________ Haskell-Cafe mailing list Haskel...@haskell.org http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
-- -- Regards, KC
______________________________**_________________ Haskell-Cafe mailing list Haskel...@haskell.org http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
On Tue, Jan 22, 2013 at 2:40 PM, Andrew Pennebaker < andrew.pennebaker@gmail.com> wrote:
Can we un-deprecate GHC's ability to compile to C code? C may be the best option to bridge to mobile, as Android, iOS, and Windows RT do support C/C++ apps.
The C code generated by GHC, except in unregisterised mode, was not particularly suitable for that use. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
I don't believe that was really the point of the C compiler, and I'd suspect you'd have a hard time with the runtime. By the way, the Android APIs aren't really meant to be used by native code: the only real use for native code in Android is GPU code and math code (think games and DSP-type programs). Wrapping the libraries for use by native code is *possible*, but getting it right will be very hard: it's not like you're going to have a simple C library which lets you touch Android's `View` hierarchy, for example. On top of that, you'd also want to have a "true" functional interface to Android's API: you probably don't want to just use the Java API verbatim. What was your implementation plan for doing this, should you get a runtime up for Haskell code? I'd guess that you can pretty easily get a Haskell program to *run* on the device from the device's command line. But I'd also guess that getting it to play well with Android will be a *lot* of work. I don't really have the time or GHC internals experience to do this, but if someone wanted help on it, I'd be interested. The web interface idea is okay, but obviously you're punting on speed if you do that. You might look into the Boot2Gecko project at Mozilla, it has similar aspirations. Kris On Tue, Jan 22, 2013 at 2:40 PM, Andrew Pennebaker <andrew.pennebaker@gmail.com> wrote:
Can we un-deprecate GHC's ability to compile to C code? C may be the best option to bridge to mobile, as Android, iOS, and Windows RT do support C/C++ apps.
On Jan 22, 2013 2:14 PM, "Dan Choi" <dhchoi@gmail.com> wrote:
What about the option of using Haskell's Parsec or AttoParsec to implement a Haskell-ish language that compiles down not to machine code but to Objective C or Android Java? Like how CoffeeScript compiles down to JavaScript.
On Saturday, January 19, 2013 1:58:03 PM UTC-5, Casey Hawthorne wrote:
You would need native compilers for all the platforms and/or virtual machine technology.
Might be easier to have the browser connect to a Haskell app.
On Sat, Jan 19, 2013 at 10:42 AM, Andrew Pennebaker <andrew.p...@gmail.com> wrote:
There are currently very few options, especially free and open source options, when it comes to developing cross-platform mobile applications. It's basically web apps with JavaScript, or C++. If Haskell supported app development on Android, iOS, and Windows RT, that alone would bring in more developers.
Similarly, there are very few languages for mobile development that take advantage of multiple cores and multiple CPUs. Haskell's `parmap` is an amazing selling point. Can we please prioritize mobile support? I'd much rather write everything in ML than PhoneGap.
-- Cheers,
Andrew Pennebaker www.yellosoft.us
_______________________________________________ Haskell-Cafe mailing list Haskel...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- -- Regards, KC
_______________________________________________ Haskell-Cafe mailing list Haskel...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Jan 22, 2013 at 8:37 PM, Kristopher Micinski <krismicinski@gmail.com
wrote:
By the way, the Android APIs aren't really meant to be used by native code: the only real use for native code in Android is GPU code and math code (think games and DSP-type programs).
They may not be "meant" to be in some sense, but from Android 2.3 on they are exposed for such use --- and I believe language porting like this is one of the intended uses. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
In what way are they exposed for use? I certainly haven't seen any API which lets you touch any of the standard GUI utilities without writing JNI wrappers that communicate to the Java based UI elements. As far as I know there is no way to use the actual Android API: you have to write a wrapper through the JNI to use the Java version. Can you point to a native library which allows you to hook in to the Android SDK? I'd be very interested in seeing it. Kris On Wed, Jan 23, 2013 at 10:54 AM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Tue, Jan 22, 2013 at 8:37 PM, Kristopher Micinski <krismicinski@gmail.com> wrote:
By the way, the Android APIs aren't really meant to be used by native code: the only real use for native code in Android is GPU code and math code (think games and DSP-type programs).
They may not be "meant" to be in some sense, but from Android 2.3 on they are exposed for such use --- and I believe language porting like this is one of the intended uses.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
For reference, the only components provided by the Android platform (listed on the Android website, and what I found digging through the provided NDK) are: libc (C library) headers libm (math library) headers JNI interface headers libz (Zlib compression) headers liblog (Android logging) header OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers libjnigraphics (Pixel buffer access) header (for Android 2.2 and above). A Minimal set of headers for C++ support OpenSL ES native audio libraries Android native application APIS Having these things is a far cry from being able to use any of the typical Android facilities from native code: you can't even implement GUI normally. The one project I've seen which attempts to generate stubs for easy use by native code is: http://code.google.com/p/cle-for-android/ I'm not sure of the current status, but the last I checked it was still a bit premature. Kris On Wed, Jan 23, 2013 at 1:48 PM, Kristopher Micinski <krismicinski@gmail.com> wrote:
In what way are they exposed for use? I certainly haven't seen any API which lets you touch any of the standard GUI utilities without writing JNI wrappers that communicate to the Java based UI elements.
As far as I know there is no way to use the actual Android API: you have to write a wrapper through the JNI to use the Java version.
Can you point to a native library which allows you to hook in to the Android SDK? I'd be very interested in seeing it.
Kris
On Wed, Jan 23, 2013 at 10:54 AM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Tue, Jan 22, 2013 at 8:37 PM, Kristopher Micinski <krismicinski@gmail.com> wrote:
By the way, the Android APIs aren't really meant to be used by native code: the only real use for native code in Android is GPU code and math code (think games and DSP-type programs).
They may not be "meant" to be in some sense, but from Android 2.3 on they are exposed for such use --- and I believe language porting like this is one of the intended uses.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (3)
-
Andrew Pennebaker -
Brandon Allbery -
Kristopher Micinski