Tutorial :Learning J/K/APL [closed]



Question:

I know all 3 are related, and I've seen quite a few answers for problems in Project Euler written in J, and a few written K. What I'm wondering is, which would you suggest learning, and where would you suggest going about getting the materials to learn it?


Solution:1

APL

Created by Kenneth Iverson as the original array programming language. Uses a non-ASCII character set as there are no reserved words. The British APL Association keeps an up-to-date list of interpreters (both free and commercial) as well as information on the APL-inspired languages covered below.

A+

Created by Arthur Whitney as a follow-up to APL. The source code is available under GPL and there is an included XEmacs extension. Download from the website.

J

Created by Kenneth Iverson and Roger Hui, this only requires ASCII characters. The source used to cost money, though recently was released under GPL. Download from the website.

K

Another Arthur Whitney language, this also uses ASCII characters. The company behind it has since decommissioned the language, but there is the open-source Kona.

Q

Built on top of K to include SQL-like query/join capabilities (tables are a built-in container), this language is built on handling lots of data. A non-commercial licensed version can be downloaded from the website.


As for what's actively used, Q is fairly popular in finance, whereas J has some support from academia and hobbyists. Those two are your best bet for array programming these days.


Solution:2

Given the natures of the individual languages, and the availability of material, I'm going to go with J.

The current J interpreter is not open source, but the language spec is. So should the official J interpreter no longer be free, an open source project could implement it.

K appears to be dead, and replaced by Q. All licenses on it appear to be proprietary, and the interpreter appears to be harder to find (as they are trying to sell kdb, not Q).

I can't find a version of APL to use.


Solution:3

Take a look at the APL faq under the section: Where can I find APL for machine X?

There's also a wiki that has info at http://aplwiki.com/Frontpage


Solution:4

You could always try A+. Free from http://www.aplusdev.org/

This APL language evolved into J and Q


Solution:5

J is now open-source: http://www.jsoftware.com/source.htm


Solution:6

There is a free APL interpreter called NAS2000, but I find that it is only useful for proof of concept. Sometimes I get incorrect results (I programmed in APL years ago on everything from an 8K IBM 1130 to a PC/XT and sometimes I think the results are wrong) while other times they are just horribly slow. Best case in J it runs as fast as anything does. I have never used K, I have attempted doing about 100 Euler problems in J, and I am just starting to really understand rank. (About 10 of those, I have done in D, one in Lisp with supporting calculations in J, and one in an integer linear programming package which I then abandoned for D when I found that it would not give me the correct answer despite what I believed to be properly coded constraints.

J is, at its heart, a mathematical language, and it is well suited to most of the Euler problems, so just hunkering down and doing them, searching the jsoftware.com site when you need to, is the best thing you can do.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »