Re: [Chicken-users] Building Chicken Scheme for Android

2012-10-02 Thread Kristian Lein-Mathisen
Hi Alan,

That's interesting. I'm not sure I understand though, how useful having an
on-device compiler environment would be.

Whenever you distribute your apps, binaries are all bundled in, so you
don't need it for your end-users. And during development, you're in front
of your computer which cross-compiles significantly faster than your phone.

This is, of course, if you're actually planning on writing an app. If you
wanna just goof around on your command-line and try different system calls
or talk to your phone kernel, maybe you're right.

If you just compile a C file an run it on your phone, you can check out how
the csi binaryhttps://github.com/kristianlm/chicken-android/blob/master/csi.mk
is
built. The building
sectionhttps://github.com/kristianlm/chicken-android#building
describes
how you can place this on your phone and run (I don't recall if this
actually requires root access). This is with the ndk still.

TinyCC for ARM sounds like fun, but for compatibility, I'd stick with the
official NDK!

Cheers,
K.

On Mon, Oct 1, 2012 at 4:15 PM, Alan Post alanp...@sunflowerriver.orgwrote:

 Off topic, but I've played with several mobile devices and none of
 them have ever really 'stuck.'  I wind up back on my laptop happier
 than I was when I wandered away.

 After enough of these experiences, I came to realize that not having
 a C compiler+native development environment was the common
 denominator in my negative experiences.

 Now I've been seeing more and more android stuff, and wondering
 whether one of these devices is going to fall in my lap, so I ask:
 can you get a C compiler and native development environment on these
 devices?

 What does that look like compared to what you've got here?

 Thank you,

 -Alan

 On Mon, Oct 01, 2012 at 03:10:29PM +0200, Kristian Lein-Mathisen wrote:
 Hi guys,
 I just thought I'd point out I've started a build-system for getting
 Chicken Scheme runtime running on Android. You can take a peek
 here:**[1]https://github.com/kristianlm/chicken-android.
 Note that it only builds the runtime system (you generally don't have
 a C
 compiler on your Android device).
 I did not plug into Chicken's existing build system because the
 Android
 NDK build-system is tricky, and the general recommendation is to stick
 with 'ndk-build' rather than patching up existing makefiles.
 Additionally,
 it makes it easier to embedd the Chicken into existing Android
 projects.
 K.
 
  References
 
 Visible links
 1. https://github.com/kristianlm/chicken-android

  ___
  Chicken-users mailing list
  Chicken-users@nongnu.org
  https://lists.nongnu.org/mailman/listinfo/chicken-users


 --
 .i ma'a lo bradi cu penmi gi'e du

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Building Chicken Scheme for Android

2012-10-01 Thread Kristian Lein-Mathisen
Hi guys,

I just thought I'd point out I've started a build-system for getting
Chicken Scheme runtime running on Android. You can take a peek here:
https://github.com/kristianlm/chicken-android.

Note that it only builds the runtime system (you generally don't have a C
compiler on your Android device).

I did not plug into Chicken's existing build system because the Android NDK
build-system is tricky, and the general recommendation is to stick with
'ndk-build' rather than patching up existing makefiles. Additionally, it
makes it easier to embedd the Chicken into existing Android projects.

K.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken Scheme for Android

2012-10-01 Thread Alan Post
Off topic, but I've played with several mobile devices and none of
them have ever really 'stuck.'  I wind up back on my laptop happier
than I was when I wandered away.

After enough of these experiences, I came to realize that not having
a C compiler+native development environment was the common
denominator in my negative experiences.

Now I've been seeing more and more android stuff, and wondering
whether one of these devices is going to fall in my lap, so I ask:
can you get a C compiler and native development environment on these
devices?

What does that look like compared to what you've got here?

Thank you,

-Alan

On Mon, Oct 01, 2012 at 03:10:29PM +0200, Kristian Lein-Mathisen wrote:
Hi guys,
I just thought I'd point out I've started a build-system for getting
Chicken Scheme runtime running on Android. You can take a peek
here:**[1]https://github.com/kristianlm/chicken-android.
Note that it only builds the runtime system (you generally don't have a C
compiler on your Android device).
I did not plug into Chicken's existing build system because the Android
NDK build-system is tricky, and the general recommendation is to stick
with 'ndk-build' rather than patching up existing makefiles. Additionally,
it makes it easier to embedd the Chicken into existing Android projects.
K.
 
 References
 
Visible links
1. https://github.com/kristianlm/chicken-android

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


-- 
.i ma'a lo bradi cu penmi gi'e du

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken Scheme for Android

2012-10-01 Thread Christian Kellermann
Hi Alan,

* Alan Post alanp...@sunflowerriver.org [121001 16:15]:
 Off topic, but I've played with several mobile devices and none of
 them have ever really 'stuck.'  I wind up back on my laptop happier
 than I was when I wandered away.

 After enough of these experiences, I came to realize that not having
 a C compiler+native development environment was the common
 denominator in my negative experiences.

 Now I've been seeing more and more android stuff, and wondering
 whether one of these devices is going to fall in my lap, so I ask:
 can you get a C compiler and native development environment on these
 devices?

That depends on whether you have got fully control over the device. If
you have, there is no reason why you shouldn't install a toolchain on
your phone. Under the hood there is a linux kernel running with a
little odd userland but you can do the same things as on any regular
linux.

If your vendor does not want you to have full access to your device
things look a bit more dim...

 What does that look like compared to what you've got here?

What Kristian has done is integrating chicken scheme with the google
maintained cross compilation toolchain so you can compile chicken for
your phone (and your apps) on your host.

Kind regards,

Christian

--
Be right back -- Godot.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken Scheme for Android

2012-10-01 Thread Shawn Rutledge
On 1 October 2012 16:15, Alan Post alanp...@sunflowerriver.org wrote:
 Off topic, but I've played with several mobile devices and none of
 them have ever really 'stuck.'  I wind up back on my laptop happier
 than I was when I wandered away.

 After enough of these experiences, I came to realize that not having
 a C compiler+native development environment was the common
 denominator in my negative experiences.

 Now I've been seeing more and more android stuff, and wondering
 whether one of these devices is going to fall in my lap, so I ask:
 can you get a C compiler and native development environment on these
 devices?

I was thinking of that too.  In fact, tcc (tiny c compiler) now has an
arm port, and there is cdroid in the app store which apparently
bundles it into some kind of IDE.  It's not free so I didn't try it
yet.  But I've been farting around with android, so maybe could try to
build tcc myself.  After following the process here
http://source.android.com/source/ one not only has a system image
(which I didn't actually flash on my phone, since I like cyanogenmod
well enough) but also the cross-compiler, includes, set of libraries
to link against, etc.  So it should be possible to build anything.
But what you build will not be terribly portable, since the libs can
change between android versions.  If you instead build with NDK
(native development kit), in theory the result will be portable, but
maybe the exposed APIs aren't rich enough for some purposes.

Then I was thinking maybe with an Android version of icecream,
compiling could even be fast, if you have a bunch of other arm
thingies on the same network (phones, raspberry pi's, routers,
gumstix, whatever).  But the compiler would have to be portable
enough.

However I think maybe the future is to have a Scheme which uses llvm
to implement a compiler that works on multiple platforms.  When Java
was new, I thought its main value would end up being a common VM, with
lots of languages being ported to it.  That's true to an extent, but
it's even nicer that LLVM seems to cover intermediate form, a portable
bytecode format, standardized optimizations, and backends to generate
native code for multiple platforms.  So whether you want to run
portable bytecode, JIT it or pre-compile it, there is a way, and it's
not such a black box.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users