J Essentials

At any time you may be given a pop quiz on anything in this document that we have gone over in class.

Definitions

  1. Adverb  One of the primary parts of speech.  An adverb modifies the word or phrase to its left to produce a derived entity that can be any of the four primary parts of speech.
  2. Atom  Any single number, single character, or single box.  Also called a scalar.  An atom is a noun with rank 0 .
  3. Array  A noun comprising atoms arranged along 1 or more axes.  Each atom is identified by its index list.  J arrays are rectangular, meaning that all 1‑cells contain an identical number of 0‑cells, and all 2‑cells contain an identical number of 1‑cells, and so on.
  4. Axis  One of the dimensions along which the atoms of an array are arranged.  The atoms of every noun are arranged along zero or more axes where each axis has a corresponding length and each unique list of nonnegative integers in which each integer is less than the length of the corresponding axis designates a unique atom of the noun.
  5. Boolean  Having a numeric value restricted to the values 0 and 1 .
  6. Cell  A subarray of a noun consisting of all the atoms of the noun whose index lists have a given prefix.  For positive k, each k‑cell of a noun whose shape is s has the shape ((‑ k <. #s) {. s) and together they can be assembled to reconstruct the noun.  For negative k, the k‑cells are defined to be the (0 >. k + #s)‑cells.
  7. Conjunction  One of the primary parts of speech.  A conjunction modifies the words or phrases to its left and right to produce a derived entity that can be any of the four primary parts of speech.
  8. Copula  One of the parts of speech, signifying an assignment of a value to a name.  The copulas are =. and =: .
  9. Derived Entity  The result of executing an adverb or conjunction.  If the part of speech of a derived entity is known, it may be called, for example, a derived verb.
  10. Dyad (dyadic)  A verb with left and right operands (which must be nouns).  Any verb may be used as a monad or dyad, depending on whether it has a left noun operand when it is executed.
  11. Fill  An atom appended to a noun to extend the length of the noun to a required length, especially when the noun must be extended because it is being made a cell in an array whose cells are bigger than the noun.
  12. Frame  The k‑frame of a noun, or frame of a noun with respect to k‑cells, is the shape of the noun with the last r items removed, where r is the rank of a k-cell of the noun.  When a noun is viewed as an array of k‑cells, the frame with respect to k‑cells is the shape of the array of k‑cells.
  13. Index  In an array, an integer indicating position along an axis.  The index of the first atom along an axis is 0 .
  14. Index List  A list of integers with the same length as the shape of a noun, designating an atom of the noun by giving its position along each axis.
  15. Inflection  Adding one or more of the characters . and : to a primitive to create a new primitive. Inflected primitives have entirely different meaning from uninflected ones. - means 'minus', but -: means 'take half of'.
  16. Item  A _1‑cell of a noun.  An array is a vector of its items.  An atom has one item, itself.
  17. List  An array of rank 1 .
  18. List of  An array whose items are; as in 'list of 3-item lists'.
  19. Monad (monadic)  A verb with no left operand.  Any verb may be used as a monad or dyad, depending on whether it has a left noun operand when it is executed.
  20. Name  Either a simple name or a locative, to which an entity can be assigned.
  21. Noun  One of the primary parts of speech.  An atom or array of atoms.  Nouns hold the data that verbs operate on.
  22. Part of Speech  One of the six categories into which words are classified; or, the word or entity so classified.  Every word has a part of speech: for primitives, the part of speech is defined by the language; for names, the part of speech is that of the entity assigned to the name.  The parts of speech are: noun, verb, conjunction, adverb, punctuation, and copula.  The primary parts of speech are noun, verb, conjunction, and adverb.
  23. Primitive  A word with a built-in definition. Examples are verbs + and i. .
  24. Punctuation  A part of speech.  Punctuation is not executed but it affects the execution of other words.  Punctuation in J comprises (, ), NB., and control words like if. and while. .
  25. Rank  Of a noun, the number of axes along which the atoms of the noun are arranged; the number of items in the shape.  Of a verb, the highest rank of the noun operands that the verb can operate on.
  26. Result  What a verb produces when it is executed.
  27. Right-to-left  The order of execution in J. In the absence of parentheses, the rightmost verb in a sentence is executed first.  This may give a different result from standard mathematical usage. -3 - 4 is 1, not _7.
  28. Scalar  See atom.
  29. Sentence  A line that you give Roger to execute
  30. Shape  The list of the lengths of the axes of a noun.
  31. Type  An attribute of a noun: numeric, literal (also called string), boxed, or symbol.
  32. Valence  Of a verb definition, an indication of the number of noun operands that the definition can accept: monadic if 1, dyadic if 2, dual-valence if either 1 or 2.
  33. Vector  A sequence of cells arranged with a leading axis.  A non-scalar array can be construed as a vector of its items.  Synonymous with List or List of.
  34. Verb  One of the primary parts of speech.  A verb operates on the noun to its right (and its left, if a noun is to its left) to produce a noun result.
  35. Word  The fundamental unit of a sentence. Words can be names, numbers, primitives, punctuation, or copulas. To see the words in a sentence, use apply the ;: verb to the text of the sentence:

    ;: 'a =: b + 2 3'
    +-+--+-+-+---+
    |a|=:|b|+|2 3|
    +-+--+-+-+---+


    Note that 2 3 is a single word.

 

Summary of Terms

Summary of Terminology for Nouns in J

 

Atom

Non-Atomic Array

Rank

0

1

2

higher n

Name

Atom
(or
Scalar)

List
(or
Vector)

Table

Rank-n Array

Shape (always a list)

(empty list)

1-item list ,l
where l is the length of the list

2-item list r,c for an rxc table with r rows and c columns

n‑item list

Items

The atom itself

atoms

lists (each with shape ,c)

(n‑1)‑cells

Name/Shape if
there are no items

impossible

empty list

empty table

empty array

,0

0,c

0,...

 

Verbs We Have Covered