Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Pi Zero

by hippo (Bishop)
on Nov 26, 2015 at 10:22 UTC ( [id://1148654]=perlmeditation: print w/replies, xml ) Need Help??

The Pi Zero is out today. While nobody can predict the future it is certainly a possibility that this could be a huge deal in terms of the next generation of programmers. In order to help them to get the best start possible there ought to be a big effort to allow the installation of perl on this little box of tricks in a way that is as simple and fault-tolerant as possible for the novice.

Is this a realistic goal? I do hope so. With the demise of Java this could represent the best opportunity to avoid another single-language-fits-all monopoly over the next 20 years.

Caveat: I know next to nothing about RaspberryPi so far and the Pi Zero may even come with perl bundled already, in which case feel free to call me a numpty. However, I would rather raise awareness and be thought foolish/ignorant than let this go by without having tried to do something to raise awareness. I will be trying to track down one of these little wonders for my own edification (as no doubt will quite a few of you) and it would be great to be able to flex Perl's muscles on such a potentially ubiquitous platform.

If you have any good links to Perl on the Pi, please reply. Thanks, Hippo.

Replies are listed 'Best First'.
Re: Pi Zero
by marto (Cardinal) on Nov 26, 2015 at 10:47 UTC

    Raspbian is probably the OS most used by Raspberry Pi users. It's Debian based and ships with perl, like most Linux distros. The Pi Zero is similar to the Raspberry Pi V1, single core (1GHz), some connectors replaced for their mini counterparts, no onboard networking. The Pi Zero is bundled along with the magazine "MagPi" issue 40, which retails at £5.99. It's in the shops now in the UK. As far as tweaking the base install to get more bang for your buck, here are some notes I made while tweaking a v1 Pi. Regards networking it'd be trivial to use a ESP8266 ($1-2 USD) to add WiFi to the Pi zero.

    Update:

    Regarding the next generation of programmers, there are many Pi based meet ups all around the UK, in schools, universities and libraries, not just hacker spaces. At these events people of all ages are introduced to programming by those with experience. This part is already happening. If your thoughts are that the lower price tag may accelerate this or increase the number of people using the devices for such things, I'd think it's likely.

      Yeah, I am using Perl on Rasbian on a Raspberry Pi 2. Perl is there (v5.20) out of the box.
Re: Pi Zero
by grondilu (Friar) on Nov 26, 2015 at 16:34 UTC

    As explained by marto, the official port of debian on the Pi, raspbian, ships perl like most debian systems. The Pi zero does not seem to differ much in terms of hardware, so my guess is that raspbian and thus perl runs on it.

    FWIW, I'm the happy owner of a Raspberry Pi 2. It's a great little computer that I use through SSH via my chromebook. It's not the fastest CPU in the world, but it's absolutely quiet and doesn't take much room. I use it mostly as a web server and a irc client. I also do my Perl 6 experiments with it.

    .
Re: Pi Zero
by shmem (Chancellor) on Nov 26, 2015 at 20:38 UTC

    There's more out there (to come) than Raspberry PI variants. Have a look at e.g. snickerdoodle. It runs Ubuntu Linux, ROS, FreeRTOS - it definitely runs perl ;-)

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re: Pi Zero
by Laurent_R (Canon) on Nov 29, 2015 at 23:09 UTC
    I have been thinking a bit more about your post while doing a few things to complete the setup (Wifi install and Internet setup, OS upgrade, etc.) of my Raspberry Pi 2 today.

    Two things came to my mind.

    First, it seems that the cpan utility fails on some at least of the older Raspberries (not enough memory? missing libraries? Hum, not clear to me), leading people to use cpanm. Since the Pi Zero is on the lower end, there might also be some trouble. Using core Perl on a Pi is easy and works well, but if there are difficulties with module installation, it would make Perl much less useful. Well, let me stress that I don't know much about what I am talking at this point, but there may be a few things to investigate about.

    The second thing is the main programming tool for Raspberry is currently Python, with some special Pi libraries geared toward Python. While I have nothing against Python (which I have happily used for a couple of years until I discovered Perl), except that I am no longer really able to use Python (last time I used it seriously was at least 11 years ago, it's too old in my mind and the language has changed to a certain extent), it might make sense to try to port some of these libraries to Perl modules.

    I got my Pi 2 only a couple of weeks ago (and, as I said already, was able to set up Wifi and Internet only today), so my knowledge on the subject is still extremely limited, actually next to nothing, but it seems to me that we might want to think about making it possible (and easy) for Perl to become more mainstream on these platforms. Well, perhaps some people have already taken steps in this direction, but I haven't seem much information about it, except for this: http://raspberrypi.citrusperl.com/.

    Well, just some food for thought, hoping it might be useful.

Re: Pi Zero (appropriately named)
by Anonymous Monk on Nov 26, 2015 at 20:47 UTC

    could be a huge deal in terms of the next generation of programmers

    Maybe in Africa?

      No, not in Africa. You see, "nobody" there has a computer, everybody does have mobile phones. So payment through mobile phones is already common, whereas places in Europe still are implementing it (note: payments with phone for parking is implemented, but bank (micro) payments are not).
      So African programmers target those mobile platforms. Now, sl4a is alive. perldroid is a bit dead. As for using the pi itself: Android can be build on the normal raspberry, but you still need keyboards, touchscreen, etc to really be able to do something. Nice idea though. example: http://raspberrypi.citrusperl.com/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1148654]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found