Welcome to J

From J Wiki
Jump to navigation Jump to search

Welcome

  | ⇑wel | ←top | ↑prv | ↓skp | +exm | ∇exp | ↔rel | ⇔adv | →top | ⇒are |

Welcome to the functional programming language J! You are invited to learn J, a compactly defined programming language of relatively simple and uniform rules, offering great flexibility and power. It includes a desk-calculator facility and a rich operation set. Using it on multi-dimensional arrays of values trains you to focus on high levels of data description and processing. Practicing its principles of functional-program form helps you to see how to break a large task into useful smaller units.

J is a high-level, general-purpose programming language that is particularly suited to the mathematical, statistical, and logical analysis of data. It is a powerful tool for developing algorithms and exploring problems that are not already well understood.

J departs from many older programming languages in being modeled almost entirely on mathematical notations for monadic and dyadic functions. Despite that strict format, it gains flexibility by working with arbitrarily structured array values, of variable dimension or level of nesting, from zero on up. It also gains conciseness by indicating various forms of repetitious computation through modifiers which can replace looping sequences, thus specifying many steps of processing in a very few sentences.

J is implemented in interactive interpreters freely downloadable for several types of devices. Single sentences, which may call on stored programs, can be entered for almost immediate results. The base language includes nearly all frequently used mathematical and data-processing operations, and an extensive library of addons provides more. There are also debugging features for step-by-step analysis.

J's intellectual attractions include a thoroughgoing uniformity of syntax, equal status of user-defined functions with system-defined functions, uniform treatment of all data values, and the option of designing functions which can be strung together in nearly natural linguistic sequences. These features help a programmer focus more readily on the bigger picture of how sets of values combine, with less concern for the details of when individual items are processed. They can also encourage viewing of data as flowing through successive processing stations, with splits and joins along the way, giving a more intuitive meaning to the term "flowchart".

J does require a beginner to learn some new ideas and new terminology, and some revised practices--as with almost any language--but they do not all have to be acquired at once. One may begin using it immediately as a powerful desktop calculator, then progress from there as convenient or needed. As one example--Euler, using J, could have written:
  (^. o. 0j1) = _1   or perhaps   _1 = Exp PiTimes 0j1

Full documentation online begins at https://code.jsoftware.com/wiki/Main_Page . Without downloading your own copy of the J interpreter, you may practice evaluating various J sentences (expressions, formulas) on the web sites riju[1] or j-playground[2].

[Historical note: 2022 sees the 60th anniversary of Dr. Kenneth Iverson's book, A Programming Language, describing a new mathematical notation for data processing; it was soon adapted by Adin Falkoff and Larry Breed into a machine-executable version named APL, from the book's title. Since then there have come APL2, Nial, A+, K, Q, and other array-oriented languages. In the late 1980s, Iverson (1920-2004) teamed with Roger Hui (1953-2021) to create a more powerful successor to APL, tersely named J.]

User Comments

  | ⇑wel | ←top | ↑prv | ↓skp | +exm | ∇exp | ↔rel | ⇔adv | →top | ⇒are |

J can give you immediate results--and a lifetime of exploration.

J is clearly the work of an insane genius. The fetish for brevity combined with the brilliantly thought out meta-operations is frightening.

I feel like I spend a lot of my time rehashing the same things with small variations. So the emphasis on brevity isn't for the sake of laughs here. It's to elevate your thinking to a more abstract level. If I'm going to spend another 20–30 years programming, spending one year really learning a powerful tool like J doesn't seem like a bad investment. It would be weird to take knives away from chefs because kids cut themselves when they're beginning.

I find it kind of alluring that there are a few languages that are intended for experts and have left the sharp tools exposed. It has made me want to be better at mathematics, even more than [the array language] Haskell did.

I am learning J because I am interested in thinking different thoughts. There are a number of ways that programming culture could have gone. APL and J represent a different path. Maybe things that seem like chronic conditions in the main culture (huge reams of code, programming as performance art, faddishness, etc.) may just be symptoms of ingrained thoughts unexamined too long.

It certainly takes more effort to learn J. But I kind of consider that a feature. It really is different from other things.

End

  | ⇑wel | ←top | ↑prv | ↓skp | +exm | ∇exp | ↔rel | ⇔adv | →top | ⇒are |