Learning J/K/APL [closed]
Asked Answered
D

6

8

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?

Dopp answered 29/9, 2009 at 7:8 Comment(1)
@Mark: Compiled C looked at in a hex viewer doesn't make much sense either, but there's a logic to that mess just the same.Trifid
C
7

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.

Crimpy answered 14/12, 2010 at 6:35 Comment(0)
D
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.

Dopp answered 29/9, 2009 at 16:50 Comment(1)
I find J is the most usable thing out there currently. I too lament the lack of a modern open source solution, especially since J Software are uninterested in supporting one of my platforms of choice, but it seems like the situation might change as there seems to be a renewal of interest in these languages.Zolly
Q
2

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

Questionable answered 4/11, 2009 at 13:21 Comment(0)
P
1

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

This APL language evolved into J and Q

Precedence answered 18/8, 2010 at 10:51 Comment(0)
I
1

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

Infrequent answered 12/10, 2011 at 21:12 Comment(0)
A
1

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.

Adenoid answered 1/11, 2011 at 1:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.