Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BRexx (was: Re: ANN: 4tH runs on Android)

57 views
Skip to first unread message

Rugxulo

unread,
Apr 19, 2012, 2:45:28 PM4/19/12
to
Hi, (sorry in advance for bumping this a month later)

On Mar 20, 3:13 pm, Bernd Paysan <bernd.pay...@gmx.de> wrote:
> Hans Bezemer wrote:
> > I'm happy to announce that the up and coming v3.61.4 release of 4tH
> > will include an Android version. It is the first native Forth-like
> > compiler that runs on an UNROOTED Android. Testing is in progress on
> > 3.x and 2.3 will follow.
>
> Cool. Gforth also runs on an unrooted Android (using Kevin Boone's
> Kbox), though it's still difficult to install - but I'm working on that.
> Kbox supports Debian packages.

Earlier this week, I (surprisingly) gained access to an Android 3.x
tablet. I actually have not installed nor tested 4tH (yet, as I'm not
very skilled), but I thought I'd mention a few things anyways, so
please indulge me:

Mainly I just wanted to mention that I installed Google's SL4A and
BRexx.apk (REXX), and it mostly works fine. (The biggest difficulty
was trying to find the full path to my own files. It seems they keep
apps very segregated from the environment. I'm not sure, but they may
even keep them .ZIP'd up when not in use!) All this talk of rooting
and manual installing seems a bit unnecessary (though I know you guys
seriously know 10x more than I ever will).

In other words, with SL4A, you can already by default install Shell,
Python, JRuby, BeanShell, Lua, Perl, Rhino (Javascript). Once you
start up the SL4A app, you can run a script by clicking on it,
assuming it has the right file extension (e.g. ".r" for BRexx). It has
icons for run, edit, etc.

To be honest, the whole idea of a tablet / touchpad seems to avoid
menus and lots of keyboard input, so things are designed a little
differently, which is slightly confusing. Overall they seem to make it
where you don't need to go to cmdline for much of anything. If you
want to compress or edit or move or rename, the default way seems to
be using the File Manager app or whatever. Feels klunky and weird, but
I'm old-fashioned.

I'm not majorly interested in learning all the ins and outs, esp. the
Android stuff, but it is vaguely documented, and there are wrappers
(facades?) to most things, and BRexx does have android.r if you want
to use some fancy things (makeToast ?). Me, I'm just happy running a
silly trivial app in the terminal (stdout). Honestly, I forget if
ConnectBot (ssh ?) is what they use by default or if I had to install
that too. I think it's default, but I can't remember.

So far, I only have installed Shell, Lua (why? heh, I don't grok it,
but it's small and cool), and BRexx. I didn't install the others
because I have little interest in them right now, and it was too much
to focus on. It was hard enough trying to figure out why BRexx
couldn't find my file (despite being in same dir as script). So "say
linein('myfile.txt')" wouldn't work, I had to use the full path "/mnt/
sdcard/sl4a/scripts/brexx/myfile.txt" instead.

It's clear that Java, HTML, and Javascript are the first class
citizens there. For C/C++, they seem to imply that the NDK is the best
(native speed) solution, but I can't help but wonder if EiC (C
interpreter) would be a better choice for simplicity, esp. considering
all the C code out in the wild. I'm a little surprised that something
like Python or Perl or Awk isn't installed by default.

Anyways, for developers they overcomplicate preparing the installer,
making you produce an .APK file (.ZIP similar to .JAR, I guess) with a
bunch of goobledegook. I didn't bother trying to understand how to
bundle that as I don't have anything to deploy, but if you can handle
that, there should be less of a need to make a .DEB (unless you really
really wanted to). It does seem to unpack the binary into /data/data/
brexx/data/rexx or something like that, which is not in the $PATH, so
you can only (easily) run it via the SL4A app via their GUI menu. In
other words, if you expect to run it from under Shell, it's not
(easily) going to work. This may be because even that is run under
what they call a "virtual machine" (native code but protected??). I
don't know, it's complex.

EDIT: I forgot, it seems the .APK (e.g. brexx.apk is 33 kb) is just a
wrapper download that (now) further automatically downloads the real
files: brexx.zip, brexx_extras.zip, brexx_scripts.zip (total ~ 300
kb). EDIT #2: Okay, it seems that the .apk has a bunch of boring
stuff: icon, xml, manifest, certificate, classes.dex (whatever that
does, for Dalvik) while the main .zip itself has the binary (rexx)
and .so shared libs (librxunix.so, librxjson.so, liblstring.so). And
thus extras.zip has extra interfaces (dates.r, htmllib.r, android*.r)
and manpages (*.html, README, NEWS) and scripts.zip has demo (*.r)
examples. Oops, extras.zip also has the same *.so as above, for some
odd reason.

So my suggestion is for you guys to integrate (or comply or whatever)
with SL4A, as it's official and easy to deploy and doesn't require
rooting. I'm sure you've heard of it. You probably have your own
reasons for not relying on it. Or maybe you're too busy, but you
clearly know more than I do. Just wanted to mention my (weak) noob
experience for clarity. :-)

P.S. Almost forgot, I often stumbled upon some weird crashing bug in
their editor, so I ended up using TouchQode (3rd party, from Market,
freeware) instead.

http://code.google.com/p/android-scripting/
http://pceet075.cern.ch/bnv/brexx/

Hans Bezemer

unread,
Apr 19, 2012, 4:02:37 PM4/19/12
to
Rugxulo wrote:

> Hi, (sorry in advance for bumping this a month later)
>
> On Mar 20, 3:13 pm, Bernd Paysan <bernd.pay...@gmx.de> wrote:
>> Hans Bezemer wrote:
>> > I'm happy to announce that the up and coming v3.61.4 release of 4tH
>> > will include an Android version. It is the first native Forth-like
>> > compiler that runs on an UNROOTED Android. Testing is in progress on
>> > 3.x and 2.3 will follow.
>>
>> Cool. Gforth also runs on an unrooted Android (using Kevin Boone's
>> Kbox), though it's still difficult to install - but I'm working on that.
>> Kbox supports Debian packages.
>
> Earlier this week, I (surprisingly) gained access to an Android 3.x
> tablet. I actually have not installed nor tested 4tH (yet, as I'm not
> very skilled), but I thought I'd mention a few things anyways, so
> please indulge me:
A couple of things:
(1) I'm aware that SL4A exists. The developers still call it alpha code and
therfore, it's not available in Android market. Not quite the thing you
want to join, maybe later when it's more mature. It doesn't offer much
advantages yet.

(2) Note I support a massive amount of *native* ports. Having a cross
compiler for each one of them is already a burden, but installing Eclipse,
SDK just to package three files is a bit of an overkill. For porting 4tH I
just need the NDK.

(3) I have no trouble running 4tH in Jack Palevich ATE. It runs just fine.

So unless the project becomes production, some lightweight packager pops up
and I could get access to the Android Market it would be advantageous for
me to join up. Need a much better tutorial as well.

Note I myself have no intention to run any of the languages you listed,
since I'm not particularly fond of any of them.

Hans Bezemer


0 new messages