Questions tagged [j]

J is a high-level, general-purpose, high-performance array programming language.

J is a high-level, general-purpose, high-performance array programming language.

J is particularly strong in the mathematical, statistical, and logical analysis of data.

J systems have:

  • an integrated development environment
  • standard libraries, utilities, and packages
  • a form designer for your application forms
  • an event-driven graphical user interface to your application
  • interfaces with other programming languages and applications
  • integrated 2d and 3d graphics
  • memory mapped files for high performance data applications
  • network sockets support (TCP, UDP)

J is portable and runs on Windows, Unix, Mac, and PocketPC handhelds, both as a GUI and in a console. True 64-bit J systems are available for XP64 or Linux64, on AMD64 or Intel EM64T platforms. J systems can be installed and distributed for free. J source code is available under GPL 3.

J permits point-free style and function composition. Thus, its programs can be very terse and are considered difficult to read by some programmers.

Data types and structures

J supports four simple types:

  • Numeric
  • Literal (Character)
  • Boxed
  • Symbol (efficient atomic representation of character strings)

Of these, numeric has the most variants, and symbol sees the least use in practice.

One of J's numeric types is the bit. There are two bit values: 0, and 1. Additionally, bits can be formed into lists. For example, 1 0 1 0 1 1 0 0 is a list of eight bits. Syntactically, the J parser treats that as a single word. (The space character is recognized as a word-forming character between what would otherwise be numeric words.) Lists of arbitrary length are supported.

Find more at jsoftware.com.

431 questions
92
votes
7 answers

APL versus A versus J versus K?

The array-language landscape, while fascinating, is confusing to no end. Is there a reason to pick one of J or K or APL or A? None of these options seem to be open-sourced -- are there open sourced versions? I would love the expand my mind, but I…
fogus
  • 6,126
  • 5
  • 36
  • 42
25
votes
2 answers

Have J style adverbs, forks etc been emulated via libraries in mainstream functional languages?

Has an emulation of J style of super condensed tacit programming via verbs, adverbs, forks, etc., ever been attempted via libraries for mainstream functional languages? If so, how successful was the result? If not, is there a technical issue that…
RD1
  • 3,305
  • 19
  • 28
23
votes
4 answers

How to filter a list in J?

I'm currently learning the fascinating J programming language, but one thing I have not been able to figure out is how to filter a list. Suppose I have the arbitrary list 3 2 2 7 7 2 9 and I want to remove the 2s but leave everything else unchanged,…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
22
votes
4 answers

Writing a large project using J programming language

Disclosure This is a "general" question, perhaps without a specific answer, but it is not intended as a flame war. I would really like some information before embarking on my project. I have to implement a particular project which would really…
Shredderroy
  • 2,860
  • 2
  • 29
  • 53
20
votes
2 answers

How are J/K/APL classified in terms of common paradigms?

I've just started learning J, which is very interesting, but I was wondering what kind of language it is exactly, in relation to common paradigms and classifications. For example, you could say that F# is a strongly typed, mainly functional (it…
17
votes
4 answers

Does the term "monadic" in J have anything to do with its Haskell use?

(Sorry, I'm stupid and uneducated, so this is probably a ridiculous question.) I just started looking at J, and they use the terms "monadic" and "dyadic" for what seems (to me) to be unary and binary operators. Why is this done, and how does it…
J Cooper
  • 16,891
  • 12
  • 65
  • 110
14
votes
3 answers

What does typedef A (*AF)() mean?

My primary programming language, j, was recently open-sourced. In order to improve it, I'm studying the source, which is written in C. But it's been a long (!) time since I've read or written C, and I wasn't even good at it then. And the way this…
Dan Bron
  • 2,313
  • 1
  • 22
  • 35
14
votes
5 answers

Best strategies for reading J code

I've been using J for a few months now, and I find that reading unfamiliar code (e.g. that I didn't write myself) is one of the most challenging aspects of the language, particularly when it's in tacit. After a while, I came up with this…
estanford
  • 1,302
  • 1
  • 13
  • 23
10
votes
7 answers

How to count the frequency of a element in APL or J without loops

Assume I have two lists, one is the text t, one is a list of characters c. I want to count how many times each character appears in the text. This can be done easily with the following APL code. +⌿t∘.=c However it is slow. It take the outer…
Chao Xu
  • 2,156
  • 2
  • 22
  • 31
10
votes
1 answer

How should I selectively sum multiple axes of an array?

What is the preferred approach in J for selectively summing multiple axes of an array? For instance, suppose that a is the following rank 3 array: ]a =: i. 2 3 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 My goal is…
Alex Riley
  • 169,130
  • 45
  • 262
  • 238
8
votes
6 answers

Learning J/K/APL

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…
Ashton K
  • 875
  • 1
  • 8
  • 18
7
votes
4 answers

Any other ways to emulate `tr` in J?

I picked up J a few weeks ago, about the same time the CodeGolf.SE beta opened to the public. A recurrent issue (of mine) when using J over there is reformatting input and output to fit the problem specifications. So I tend to use code like this: (…
JB.
  • 40,344
  • 12
  • 79
  • 106
7
votes
2 answers

Fiddling with point-free code?

I have been learning the Factor and J languages to experiment with point-free programming. The basic mechanics of the languages seem clear, but getting a feeling for how to approach algorithm design is a challenge. A particular source of confusion…
7
votes
1 answer

Multi-core J -- Parallelisation

Is there a way to get J to use multiple cores ? I thought part of the benefit of APL/J was that the language constructs lent themselves well to parallel solutions. Looking at my CPU usage (I'm on OSX) there's clearly only a single processor in…
user1202733
  • 623
  • 4
  • 10
7
votes
2 answers

J: Tacit adverb of Newton's method

I've found in 'addons/math/misc/brent.ijs' implementation of Brent's method as an adverb. I would like to build a Newton's method as an adverb too but it's much harder than building tacit verbs. Here is a explicit version of Newton's iteration: …
Dan Oak
  • 704
  • 1
  • 7
  • 26
1
2 3
28 29