As the Mrs. does not allow me to take the laptop on vacation, but we do take the tablet with us, I decided to find out whether Elixir runs on an Android tablet.
I experimented for about an hour or so, and apparently it is quite easy. Here is my proof:
How do you do this
With a lot of unicorns and fairydust… No, actually it is quite simple….
Please note that all these steps should be performed on the tablet
- Make sure your tablet is allowed to install non-verified packages/apk’s (Under
allow unknown sources- I am not sure about the naming, as my tablet is in Dutch.)
- Install ScriptingLayer4Android/SL4A by downloading it from here. I used release 6.
- Install Erlang4Android R16B - download here.
- Download the Elixir precompiled package and unzip it on your device. I used
v0.9.3 and unzipped into
- Fire up
Erlang, and click on the 3 squares on the top right, choose
-pa /mnt/sdcard/elixir/lib/elixir/ebinas a parameter, so your erlang scripting environment will auto-load the elixir lib.
Erlang4Android, open up
SL4A, and click the menu on the bottom,
view, and then choose
- Click on the
Erlanginterpreter, it should fire up an erlang interactive console.
- Type the following code:
For non-erlangers: to quit, type
While this works, it is by no means workable; I tried using
elixir:start_cli(). but that does not work as it closes down the
Erlang shell and ‘SL4A’ assumes it can close the scripting environment. It might be easy to setup a quick REPL script, but the
proper way to do this, would be building a script package.