Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Perl on Android

by CountZero (Bishop)
on Jul 17, 2012 at 14:43 UTC ( #982252=perlquestion: print w/ replies, xml ) Need Help??
CountZero has asked for the wisdom of the Perl Monks concerning the following question:

Brothers and Sisters in Perl,

Recently I saw in a shop a tablet running Android4.

I was wondering if one could run and develop perl applications on such a tablet.

I googled and there are indeed a number of references on using Perl on Android, but they are either many years old and not updated (and therefore likely to be abandoned) or they are how to embed Perl applications into Android (by "cross compiling" them on another computer).

My intention is however to have Perl with me wherever I take the tablet, so it should be able to compile modules, preferably straight off CPAN.

Did anyone of you already venture into that unknown territory? And if you did, are there lions or dragons to watch out for?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Comment on Perl on Android
Re: Perl on Android
by marto (Bishop) on Jul 17, 2012 at 14:49 UTC
      I had a look at those projects but they are either running under Ubuntu under Android (which will be rather slow I guess?) or it is about cross-compiling Perl scripts to Android and then run them on the tablet as an applet.

      My idea was to have a Perl applet and then run scripts written on the tablet against that Perl applet.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

        "Instead, I'm working with the perl-android-apk project to provide a recent and full perl interpreter with a procedure to build almost any CPAN module."

        The way I read this they're actually working on something else, though I could be misinterpreting it.

        With the spec of these small/portable devices (for example Google Nexus 7) improving at such a rate running a Linux distro such as Debian which performs reasonably shouldn't be out of the question. I've seen people dual boot Android and Linux on devices (see: Dual Booting Android 3.2 and Ubuntu 11.04 on an Asus Transformer for example), this has been going on since the first generation of Android phones. Of course, your mileage may vary.

        Wither this is enough to meet your requirements is another issue. As Corion mentions the process is fairly resource intensive, that said the Nexus 7 seems to have a decent spec (though I'd prefer more RAM in these things if it were going to be a development system).

Re: Perl on Android
by Corion (Pope) on Jul 17, 2012 at 14:54 UTC

    I would look at both, Perl on SL4A (which is mostly dead, I think) and Jess Robinsons efforts of cross-compiling Perl so it runs on Android.

    Your hope of compiling on the tablet will likely not hold true, as ARM machines are somewhat slow, at least when running CPU-intensive tasks. Maybe that is different for the top-end ARM CPUs that are used on tablets though.

    Personally, I hope that there will be a tablet with good enough Android support (enough RAM, enough access) and a port of Perl to Android (that is, native toolchan and modules to access the OS features). I think in the near future, the low-priced tablets like the Google Nexus 7 will enable more hacking in that direction. If you don't need access to the OS features, you can already run Ubuntu or Debian binaries on the Android kernel (I think), which should enable you to run a recent Perl and some recent toolchain on your tablet.

      I guess I'll have to wait a little longer and see what the future brings

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
Re: Perl on Android
by CardinalNumber (Prior) on Jul 17, 2012 at 15:24 UTC

    Kinda beyond the scope of your request but give me about a week to refocus on it and I should have perl building on the device itself again. I had it up and running in '11 and planned on using that phone as a smoker (for perl and/or CPAN) but got distracted. There are a few things that needed to be done manually IIRC (a compile that was missing a flag, etc.)

    In case someone else wants to give it a shot, I based the process on building R on Android.

      Wow, I am impressed!

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
Re: Perl on Android
by moritz (Cardinal) on Jul 17, 2012 at 15:42 UTC
      Indeed, but then it is not really running on Android and I already have a tablet that runs under Linux.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
Re: Perl on Android
by cavac (Chaplain) on Jul 17, 2012 at 17:36 UTC

    Ok, this is probably not exactly what you are looking for, but i have to ask: Is it really important to run your software on Android based tablets? If you, say, develop a fullscreen application for use in your company, there are alternatives.

    For example, i recently saw an article about an upcoming ARM based linux tablet: "$270 Spark Linux tablet is powered by (and generates funds for) KDE Active Plasma". An here is an updated article about it.

    Of course, if you got the money, there a quite a lot of rugged Windows based tablets for industrial use out there (most of them also run Linux without problems).

    "I know what i'm doing! Look, what could possibly go wrong? All i have to pull this lever like so, and then press this button here like ArghhhhhaaAaAAAaaagraaaAAaa!!!"
      It is not important at all. I already have a Linux based tablet (WeTab) on which Perl runs quite well. It is just that my eye caught this new Android4 tablet and I wondered if I could run Perl on it. If I cannot use Perl to tinker with the machine, it does not really interest me.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

        If I cannot use Perl to tinker with the machine, it does not really interest me.

        Agreed. I don't really see the point of some closed-down hardware that let's you only program "apps" in a crippled down jailed version of java. If i wanted to deal with something that has no use, does not do what i want and has no good way of reprogramming, i could just talk to a user...

        SCNR

        "I know what i'm doing! Look, what could possibly go wrong? All i have to pull this lever like so, and then press this button here like ArghhhhhaaAaAAAaaagraaaAAaa!!!"
Re: Perl on Android
by tobyink (Abbot) on Jul 17, 2012 at 19:09 UTC

    For now you're probably better off getting a good SSH client.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://982252]
Approved by Corion
Front-paged by tospo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-12-27 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls