J
From MathWeb
J is a functional programming language. It is an array-oriented, fast, interpreted tool-of-thought with an extremely regular and well thought-out grammar. J is particularly suitable for mathematical exploration as it is a regularized, executable, mathematical notation. The language also excels as a tool for rapidly solving a wide variety of problems in data-processing and analysis.
Contents |
A Sample of J Code
A simple example of J's terseness and power is shown by this plot which is generated by the following two lines of code.
load 'plot' 'surface' plot +/~1 o. i:3j99
Brief Explanation of this Code
The first line loads a package of plotting functions into their own namespaces. The second line uses the function "plot" with a left argument specifying that this is a "surface" (or 3-D) plot and a right argument specifying a simple J expression which generates a table of numbers.
Breaking down the expression
+/~ 1 o. i:3j99
into three components, first consider "+/~" which adds (+) arrays orthogonally (/), using its right argument also as its left argument(~). This right argument is generated by the expression "1 o.", which is the first "circle" function (sine), applied to the vector generated by "i:3j99". This uses the function "i:" with the complex argument "3j99" to give (99+1) evenly-spaced numbers from negative three to positive three.
Essentially this is a surface created by adding all points in a sine wave segment to each other.
Resources
- homepage
- J Wiki: http://www.jsoftware.com/jwiki/FrontPage
- Oleg's code: http://olegykj.sourceforge.net/
- Vector magazine: http://www.vector.org.uk/
- J on Unix: http://juggle.gaertner.de/
- Miscellaneous essays: http://www.jsoftware.com/jwiki/Essays
Introductions
- FAQs: http://www.jsoftware.com/jwiki/Guides#faqs
- Ewart Shaw's introduction to J: http://www.warwick.ac.uk/statsdept/staff/JEHS/jehj.htm
- System documentation: http://www.jsoftware.com/jwiki/System/Documentation
- Various articles: http://www.jsoftware.com/jwiki/Articles
Examples of Graphics
- Cliff Reiter's Fractal Gallery - generated in J: http://ww2.lafayette.edu/~reiterc/gallery.html
- Graphics gallery: http://www.jsoftware.com/jwiki/Studio/Gallery

