Drop in for a chat and a cup of tea

11 posts
by RMW5 » Thu Mar 08, 2012 2:22 pm
Would anybody be interested in a port of APL?

Leaving aside the issue of "funny" character set it has the advantage of being highly interactive, procedure driven and extremely powerful handling multi-dimensional arrays, surprisingly useful when applied to school maths problems.  It also requires only a console type interface.

I first used APL 35 years ago on an IBM 5100 (came out 7 years before the IBM PC), and if IBM could get an APL interpreter to work on a  machine with an average instruction time of 1.75 microseconds and 64k of memory, then it should run very well in an R-PI.
Posts: 47
Joined: Fri Dec 23, 2011 4:31 pm
by jamesh » Thu Mar 08, 2012 4:27 pm
Try here, might be somethign already available.

Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by RMW5 » Thu Mar 08, 2012 5:03 pm
I think there is something already available if you run a derivative of APL over WINE, but I was thinking of taking the NARS 2000 source code which is a superset of classic APL and cutting it down to the original and porting it to Linux.
Posts: 47
Joined: Fri Dec 23, 2011 4:31 pm
by andyl » Thu Mar 08, 2012 5:16 pm
J and OpenAPL should just need compiling on the target machine.

But generally I would guess there will be plenty of people who would welcome a new port of an APL implementation, independently of whether it is for the PI or not.
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am
by RMW5 » Thu Mar 08, 2012 7:44 pm
J is probably not a good place to start for beginners and OpenAPL has a few bugs / kludges that you can spot in the source code.  Also I thought some custom system variables to interface to the PIO and other devices might be neat: []PIO <- 1 0 1 0 1 0 0 0 etc.
Posts: 47
Joined: Fri Dec 23, 2011 4:31 pm
by Bakul Shah » Thu Mar 08, 2012 9:25 pm
I did see one post about the "Pi on comp.lang.apl! And I thought I read about APL on iPad but can"t find anything on it right now.

If nothing else I will get `kona" (opensource `k") running on the "Pi for sure since I often use it for scripts or as a desk calculator.

Here is an excellent tutorial on K: http://www.cs.nyu.edu/courses/.....intro.html — It was written for K from kx.com (and this commercial K is no longer available) but I think the tutorial should work fine with kona.

Check out map/reduce in K:

Posts: 297
Joined: Sun Sep 25, 2011 1:25 am
by SN » Fri Mar 09, 2012 12:06 am
I have in my past working life written code in Cobol, Lisp, Prolog, Fortran and even x86 Assembler but I don't think I'd be wanting to do that again so I won't be looking for interpreters or compilers in any of these for the raspi.

Prolog was a real headscratcher, but very very clever at problem solving ;-)
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?
User avatar
Posts: 1012
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
by RMW5 » Fri Mar 09, 2012 11:14 am
"I have in my past working life written code in Cobol, Lisp, Prolog, Fortran and even x86 Assembler..."

Been there done that (plus various versions of Algol, C and variants, more assemblers than I can remember, something called RTL/2 and all the modern webby stuff), and I wouldn't want to go back to those, but APL is different. It is half way between a procedural programming language and MATLAB, highly interactive and in its original form, console based.

When it first came out APL would have been ideal for schools but most schools wouldn't have had the budget for the several million pounds it would have required for an IBM mainframe to host it.
Posts: 47
Joined: Fri Dec 23, 2011 4:31 pm
by APLfan » Sat Nov 03, 2012 11:09 am
I think that Dyalog APL has been ported to Raspberry Pi.
Something was reported at their conference "Dyalog '12"
held in Elsinore, Denmark in October, 2012.
Posts: 1
Joined: Fri Nov 02, 2012 10:19 pm
by Bakul Shah » Sun Nov 04, 2012 6:28 am
Kona is an open-source implementation of the K programming language. If you don't know APL, then this is the place to start. K is an ASCII-based APL. To build it on the Raspi:
Code: Select all
$ git clone  https://github.com/kevinlawler/kona.git
$ cd kona
$ make

To use:
Code: Select all
$ rlwrap ./k  # rlwrap for history and command line editing
K Console - Enter \ for help
  3 3 # !9
(0 1 2
 3 4 5
 6 7 8)
  +/3 3 #!9
9 12 15
Posts: 297
Joined: Sun Sep 25, 2011 1:25 am
by maurjor » Fri Jun 14, 2013 11:40 am
Dyalog APL is now available on the RPi. See their website.

If any of the other APL fans on here have projects to excite primary school age (up to 11) children, I'd be delighted to hear from them.

Best Regards,

Maurice Jordan
Posts: 2
Joined: Thu Jun 13, 2013 5:49 pm