Running Golo on a Raspberry Pi
The latest cool thing to have for a conference talk demo is a Raspberry Pi. It is indeed funnier to show that your demo works on a cheap device of the size of a credit card, than say, a dumb server in the cloud.
More seriously we at DynaMid are very interested in such devices for our research needs. The JVM works there, so having our programming language Golo running fine on a Raspberry Pi is important beyond being just cool.
We recommend ArchLinux for ARM.
The nice thing with the ArchLinux image for Raspberry Pi
is that it boots
OpenSSH by default with a
You don’t have to mess with a screen display, a keyboard and a mouse. Huge win!
We suggest that you update your fresh ArchLinux as soon as you managed to boot it:
Get a JDK8 test version from http://jdk8.java.net/fxarmpreview/. It has JavaFX, too.
Extract it to a nice place such as
Once this is done, it is a good idea to modify you
~/.bash_profile to have
JAVA_HOME and the JDK
binaries added to your path:
[root@alarmpi ~]# cat .bash_profile export JAVA_HOME=/opt/jdk1.8.0 export PATH=$PATH:$JAVA_HOME/bin
All good! Now with a shell you can check that Java works:
[root@alarmpi ~]# java -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b36e) Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode)
Download a fresh version of Golo from SourceForge (change the version according to the latest Golo release):
[root@alarmpi ~]# wget -O golo-0-preview1-distribution.tar.gz http://sourceforge.net/projects/golo-lang/files/0-preview1/golo-0-preview1-distribution.tar.gz/download (...) [root@alarmpi ~]# tar zxvf golo-0-preview1-distribution.tar.gz (...) [root@alarmpi ~]# cd golo-0-preview1 [root@alarmpi golo-0-preview1]#
The scripts in
bin/ have JVM-specific tuning flags that are good on a desktop or server, but much less on a Raspberry Pi.
You will thus need to modifiy all the
bin/golo* scripts to remove them.
Here is a diff for
bin/gologolo, and you can apply the same trivial changes to all of them.
You may leave
-XX:-TieredCompilation if you like. The memory settings are obviously too high for such a device, and the
server mode is not available on ARMv6.
You should now be all set, and the following should work:
[root@alarmpi golo-0-preview1]# bin/gologolo samples/helloworld.golo Hello world!
If it runs Java, it runs Golo!
Looking forward to discovering what kind of experiments you will make using Golo on such cheap and fun devices!