APL on Android

Let it all hang out

APL on Android

PostPosted by mohrsnh » Wed Jan 25, 2012 4:21 pm

Many years ago I learned APL as one of my first languages at IBM and I was then also able to use it with clients and could contribute to the move from Mainframes to PCs with APL. These days I am no longer programming but in IT management but as the hair gets more grey and thin and may be retirement gets closer (in a few years) I am thinking if I could perhaps do some programming with APL again on devices of today, e.g. a smart phone or a Tablet. Searching a little bit on Google and Wikipedia I could not really find something but found this Forum, so I registered and started posting...

Anybody there who likes the idea of having APL or APL2 on a tablet? Or even knows where something like this exists?

Regards, Karlheinz

Posts: 1
Joined: Wed Jan 25, 2012 4:10 pm

Re: APL on Android

PostPosted by FDA OSInet » Thu Nov 05, 2015 2:28 am

The (very) old IBM's TRYAPL2 has been ported to Android, can be loaded through Google Playstore, and looks indeed familiar when launched. However, because the lack of cursor keys, I have not been able to go further yet. The fixed-pitch fonts are however a bit unattractive today.

https://play.google.com/store/apps/deta ... id.tryapl2

However TRYAPL2, as far as I remember, came with a couple of very interesting workspaces, a goodie that :

1) would be welcome in NARS2000 (just to start with APL, or for simple things as reading/writing/sorting a file containing non-English characters

2) Would be a thing all of us could help to contribute, or try to.

3) Would a real plus as well for NARS2000, helping many more potential users to start. IBM had done something similar with its "APL handbook of techniques workspace" in the 1980's or so. Ref : Notice G320-6153, PDOM SH20-2170, The APL Handbook of Techniques S320-5996. and also :


This IUP provides users of VS APL with a machine-readable equivalent
of the publication: The APL Handbook of Techniques (S320-5996). It
may be installed on VS APL systems running with VSPC, VM/370-
CMS, and TSO. (Note: The APL interface to TSO is provided by the
IUP VS APL for TSO, 5796-ALB). With this IUP, users of the APL
Handbook of Techniques may develop new APL applications quickly
and efficiently. With the use of English-like expressions such as
"Costdata Beside Years", application development time may be
reduced appreciably.
Posts: 29
Joined: Sun Aug 30, 2015 5:07 am

Re: APL on Android

PostPosted by Robert Wallick » Mon Nov 16, 2015 5:03 am

re: APL on Android:

I downloaded both TryAPL2 and WatCom APL from Gemesys via Google's Play Store apps - about a year ago - onto an Android, fully functional S5 smart phone. Both Android APL programs by Gemesys use a highly antiquated function keys interface, circa 1965-1995. After about 1 year of multiple attempts now, I am still unable to get either Android APL program to become functional, including after multiple uninstalls / re-installs. Basically, in order to run either Android program you have to memorize functionality of 4-6 "softkeys" which purport to perform various functions. Both APL implementations lack proper touch screen capability per se and lack voice interfaces, several critically important, key user-interface features of Smart Phones.

Working with TryAPL2 and WatCOM APL on Android has been like chipping away at stone blocks WITH a stone block, almost as bad as a Windows PC complete keyboard+mouse freeze-out or the dreaded PC "blue screen." I've even had to consistently use Android's Application Manager to terminate both APL programs since the APL keyboard does not get auto-recognized / pulled-up, thus )OFF remains totally elusive. Even accessing ANY keyboard in TryAPL2 and WatCOM APL is harder than writing an APL System Function in NARS, which I can now do in "NARS" thanks to assistance from Bob Smith and some persistance. By the way, I understand the technical genius it required just to port a program from PC to Android, whether that program(s) operates easily or not for its intended user-base.

I've been looking around for some old or any papers on how to write an APL Interpreter. Some non-APL articles indicate Java is the best language for Android Apps. Probably just being able to verbalize an APL symbol and have it appear in an Android window might be a good starting point, as well as loading the APL symbol set into a program. Who wants to re-invent the wheel, but no as yet viable freeware APL interpreter for Android is available - which is unfathomable, unthinkable.

I am open to suggestions. This would have to be a long-term, part-time development project on my part. Collaboration would probably be preferred. I am not necessarily open to having NARS own the eventual software, since the collaborator(s) should own the eventual software rights.

Given the unfortunate clumsy, in my view, interface of TryAPL2 and WatCom APL on Android, and among other reasons: APL is being relegated to historical antiquity, much as hieroglyphics of the ancient Egyptian Pharaohs has been. The monuments visibly remain, the symbolics/icon-driven language of the ancients in active use does not remain...

Again, I am looking for "how to develop an APL interpreter" for an Android-based smart phone. I found something in French from the mid-1970's (by Jean-Jacques Girardot and Francois Mireaux), but nothing in English yet and obviously nothing in Java or C/C++/C#. I have found a Freeware Android C++ Compiler called CppDroid - have not yet worked with it extensively. Again, I am open to suggestions, including what the initial starting point(s) should be, initial steps, etc. Not to throw a damper on the "theoretical implementation process," but NARS has close to a third of a million lines of C code. Talk about landing on another habitable planet with only a stone ax, some matches and an encyclopedia - humor intended, but it's not an entirely inaccurate analogy either...

Stay in touch and after all - software is communication.

Best wishes to all,
Robert Wallick
Robert Wallick
Posts: 22
Joined: Thu Feb 05, 2015 5:35 pm

Re: APL on Android

PostPosted by FDA OSInet » Thu Nov 19, 2015 7:40 am

By a funny coincidence, I happened to be one of the folks involved in the very early stage of APL\1600 (the APL interpreter by JJ Girardot and F Mireaux), together with Gerald Chandler and Robert Mahl. The language used was PL/1600, one of those PL languages loosely inspired by IBM's PL/360, not very far away from C.

About how to write an APL interpreter (a simple one, not a sophisticated one like Phil Abrams using concepts like beating and drag-along), Rodney Zaks' Ph.D. thesis (1972?) may be useful because it separates the main functionalities of the interpreter quite well (probably amazed himself by how clearly he could describe complex things, Zaks later founded Sybex). At the time, writing an APL (NOT APL2!) interpreter was considered to be a 3 man-years project. Might be slightly less with existing tools and libraries (dynamic memory management and the like). I wonder if using the Go language, which has such facilities imbedded, would not be a good choice. Let us not that the main promoter of Go seems to be himself an APL fan, so he may know people already interested in the subject of a simple APL interpreter in Go :


Here are the slides : http://go-talks.appspot.com/github.com/ ... vy.slide#1

If one is allowed to write the APL interpreter in APL, a way to begin would be to write ⍎⍞ (works in a number of cases ;) ), then make it evolve step by step to treat other cases, like function edition. :D

More seriously there are perhaps ideas too to be found here : http://www.apl2c.de/home/Links/links.html

Just my two cents (from Cameroon, right now)
Posts: 29
Joined: Sun Aug 30, 2015 5:07 am

Re: APL on Android

PostPosted by Robert Wallick » Thu Nov 19, 2015 4:50 pm


Since U.S. 2-cent coins are no longer minted in the U.S., they are worth anywhere from about $17.00 to as much as $9,000 or more, for a rare minting. Thanks for putting in your "2-cents worth," and ditto valuation re your advice. Aren't you a great find in the lost forest that surrounds/blinds APL/APL2 development these days...

The APL keyboard app (gkeyboard) generated by Gemesys for Android, available via PlayStore, looks to be a useful keyboard visualization/virtualization tool. If one goes to Android Settings, Input, Keyboard, after installing Gemesys's gKeyboard app and makes that keyboard the default Android keyboard; voila, instant APL symbols on the keyboard every time a keyboard appears on Android's screen, including text input via C++ programs using Android's CppDroid program. The gKeyboard does NOT however GENERATE APL symbols; it merely briefly virtually "shows" them on the displayed "virtual and touch-sensitive" keyboard - again, it is a touch sensitive keyboard, but it does NOT send APL symbols through some low-level virtual keyboard scanner routine, by / in-and-of itself. ASCII chars still get sent to the display/C++ program.

Again, I give Gemesys, a Canadian company and Mark Langdon in particular - beaucoup/muchos credit. On the other hand, pulling up that keyboard in TryAPL2/WatCOM APL remains, per this user's Samsung Galaxy S5 (larger display than a Galaxy S4) smart phone, next to IMPOSSIBLE.

Also, I found a PC download at https://developer.qualcomm.com/software/snapdragon-debugger-visual-studio that has a PC add-on debugger which is supposed to simulate Android on a PC while developing C++ applications inside Visual Studio 20nn(e.g. 2013) on a Windows-based PC. Unfortunately, there seem to be 2 problems with the Visual Studio add-in, re QualComm's Snapdragon chips "cross-over" add-in program:
1) It requires an Intel hardware accelerator software program HAXM to be installed on your PC to speed up virtual simulation of an Android device - because users have been complaining the PC-Android simulator is too slow - and I am unable to install that software (PC's bios here will not support over-clocking), and
2) It (VS 20xx simulator program) requires correct 32-bit installation of a number of freeware programs including Java SDK, NDK, ... which, even after multiple installs-testing-deinstalls-reinstalls - will not correct compile in VS 2013 - at 32-bits which Android Galaxy S5 and prior smart phones support (not 64-bits); hence VS Studio 2013 compiler generated errors...

At the moment therefore, I am unable to use PC VS2013 as an Android virtual machine program development environment(IDE).

On the plus side of things, CppDroid on the Android itself does correctly compile and run C++ programs. It's primitive and simplified, but it works and it's free.

Thanks for the Execute, QuoteQuad perspective - I had noticed that previously in my APL/APL2 usage background, but you crystallized it's usefulness as a major APL developmental pivot, Interpreter, and program execution force-majeure focus point.

Back at the "rugged, ultra-primitive" APL/APL2 C++ basecamp established on Android, a next step will be to bring in a Unicode table for use with that "stone-age C++ rock grinder program" to display APL's symbol set, again 32-bits only and a Unicode table with either unicode-8 or unicode-16, utf-8 or utf-16 symbols/char-set.

There is a certain joie de vivre in creating something new from scratch, even if it means 3 potential staff years of future horrendously challenging development. I'm 100% aggravated with IBM and Dyalog forever attempting to milk APL2 as cash cow, thereby exterminating widespread APL usage in the process. I respect their corporate technical and professional competence; I entirely disagree with their APL/2 pricing methodology, designed by extenuation to milk corporate IT departments.

Again, Android/APL/2 development of an Interpreter is refreshing and currently constraint-unbounded, albeit highly primitive. It is never too late in life to learn new things including:
1) the whole new Operating System that is Android,
2) an entirely different and emergent hardware chip-set and
3) a different set of I/O constraints such as screen size, touch-sensitive/on-screen keyboard, screen resolution, etc.

Stay in touch, best of luck in Cameroon (a la French Republique du Cameroun en Afrique),
Robert Wallick
Posts: 22
Joined: Thu Feb 05, 2015 5:35 pm

Re: APL on Android

PostPosted by Robert Wallick » Sat Nov 21, 2015 11:56 am

re APL on Android

Postscript to my 11/19/15 message:
If anyone wants to develop [APL/2 or other] applications for Android, I currently recommend Droid4X 0.8.5 Beta - the Simulator, downloadable for Windows PC's at http://www.droid4x.com/. The program will set up a free Virtual Android device right on your Windows PC - you can even actually download items from Google's Play Store right onto your Android emulator on your PC. Droid4X, the simulator, is reminiscent of Microsoft's Flight Simulator, terminal emulators and even virtual modems. Again, Droid4X sets up a Virtual Android emulation within Windows! Touch screen emulation uses the PC's mouse and mouse dragging emulates "swiping" on an Android. Several nice features about Droid4X:
1) Uses PC's keyboard so the on-screen keyboard is not needed, which results in more functional work area.
2) You do not need to buy an actual Android
3) Completely free

I am not entirely satisfied with CppDroid since it randomly crashes, fairly frequently on the actual Android, the S5.

Recommended free APL downloads for your PC Droid:
1) gKeyboard by Gemesys (virtual keyboard) - although not as important for the PC Droid since the PC's keyboard gets used, not the on-screen emulated keyboard
2) TryAPL2 by Gemesys
3) WatCom APL by Gemesys

I am still very dissatisfied with the APL keyboard for Android, both actual Android(Samsung Galaxy S5) and Droid4X simulator. I was unable to satisfactorily work with TryAPL2 on either the Galaxy S5 or the PC Droid simulation. Again, I give Gemesys high marks for managing to get anything even remotely resembling APL2 onto the Android platform, say a rating of 10(10 out of max of 10) for technical excellence. On the other hand, I give TryAPL2 only about a zero to three in "usability" or ease-of-use. If you happen to try-out TryAPL2, just remember that the double quote key (PC keyboard) represents the hook symbol ")" in TryAPL2 - so at least you can perform some basic system commands like )LOAD )LIB )CLEAR )FNS )VARS etc. in TryAPL2 - I never did find the lamp or APL comment symbol on the PC keyboard using TryAPL2.

Android somewhat reminds me of the 60's 70's and 80's - with new hardware, new Operating Systems, new emulators, new file systems, etc. - I remain on my vertical-climb quest to develop a much more user-friendly APL/APL2 for Android.

Onward and upward...
Robert Wallick
Posts: 22
Joined: Thu Feb 05, 2015 5:35 pm

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 0 guests