Category:J
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Interpreted |
---|---|
Type safety: | Safe |
Type strength: | Strong |
Type checking: | Dynamic |
Lang tag(s): | j |
See Also: |
the J language
J is a notational programming language designed for interactive use.
It is an array language; data is universally structured as rectangular arrays.
It is a functional language; creation and composition of functions is emphasized.
Object-module and imperative techniques are supported, but not required.
The J programming language was designed and developed by Ken Iverson and Roger Hui. It is a closely related successor to APL, also by Iverson which itself was a successor to the notation Ken Iverson used to teach his classes about computers in the 1950s.
Reading J
J is meant to be read with the aid of a computer. J sentences are single lines and trying variations and simplifications of an expression is common practice. The first step in understanding any J sentence is to understand the data you started with and the data which resulted. When learning how a J sentence works, you can also try simpler sentences which the same data or perhaps related data.
Unless you attend an institution which has made a J interpreter available to you through your web browser, if you want to see how J works you should probably install a copy of J. If you want to understand how to experiment with alternative expressions you should probably study some of its documentation.
For example, the phrase (+/ % #)
finds the average of a list of numbers.
<lang J> (+/ % #) 1 2 3 2</lang>
To understand how this works, you might try working with simpler sentences and their variations.
<lang J> +/ 1 2 3 6
+/4 5 6
15
# 1 2 3
3
# 2 3 4
3
6 % 3
2
15 % 3
5
(+/ % #) 4 5 6
15</lang>
By themselves, these experiments mean nothing, but if you know that +/ was finding the sum of a list and # was finding the length of a list and that % was dividing the two quantities (and looks almost like one of the classical division symbols) then these experiments might help confirm that you have understood things properly.
J on RosettaCode
Discussion of the goals of the J community on RC and general guidelines for presenting J solutions takes place at House Style.
Jers on RosettaCode
- Roger Hui: contributions, J wiki
- Tracy Harms: contributions, J wiki
- Dan Bron: contributions, J wiki
- Arie Groeneveld: contributions
- Raul Miller: contributions, J wiki
- Jose Quintana: contributions, J wiki
- Ric Sherlock: contributions, J wiki
- Avmich: contributions
- VZC: contributions
- Alex 'bathala' Rufon: contributions, J wiki
try me
Want to try one of those cryptic J lines you see peppered through RC? Try pasting it into the online single-line J interpeter or the web interface for buubot (a Perl IRC bot which has a J evaluation mode: just prefix your line with jeval).
If you want to be a bit more interactive, and get some guidance from J gurus, you can join the actual J IRC channel on Freenode, #jsoftware. Buubot and several other J eval bots run there. If you don't have an IRC client you can try freenode's web interface (or just give it a quick spin). More details about the J IRC community is available.
If any of that piques your interest, and you want to explore a little more, you can download J and join the J forums.
Subcategories
This category has the following 3 subcategories, out of 3 total.
@
- J examples needing attention (1 P)
- J Implementations (empty)
- J User (39 P)
Pages in category "J"
The following 200 pages are in this category, out of 1,413 total.
(previous page) (next page)C
- Colour bars/Display
- Colour pinstripe/Display
- Combinations
- Combinations and permutations
- Combinations with repetitions
- Comma quibbling
- Command-line arguments
- Commatizing numbers
- Comments
- Common list elements
- Common sorted list
- Compare a list of strings
- Compare length of two strings
- Compare sorting algorithms' performance
- Compile-time calculation
- Compiler/AST interpreter
- Compiler/code generator
- Compiler/lexical analyzer
- Compiler/Simple file inclusion pre processor
- Compiler/syntax analyzer
- Compiler/virtual machine interpreter
- Composite numbers k with no single digit factors whose factors are all substrings of k
- Compound data type
- Concatenate two primes is also prime
- Concurrent computing
- Conditional structures
- Conjugate transpose
- Consecutive primes with ascending or descending differences
- Constrained genericity
- Constrained random points on a circle
- Continued fraction
- Continued fraction/Arithmetic/Construct from rational number
- Continued fraction/Arithmetic/G(matrix ng, continued fraction n)
- Convert CSV records to TSV
- Convert decimal number to rational
- Convert seconds to compound duration
- Convex hull
- Conway's Game of Life
- Coprimes
- Copy a string
- CORDIC
- Count how many vowels and consonants occur in a string
- Count in factors
- Count in octal
- Count occurrences of a substring
- Count the coins
- Count the coins/0-1
- Countdown
- Cousin primes
- Cramer's rule
- CRC-32
- Create a file
- Create a two-dimensional array at runtime
- Create an executable for a program in an interpreted language
- Create an HTML table
- Create an object at a given address
- Create an object/Native demonstration
- CSV data manipulation
- CSV to HTML translation
- Cuban primes
- Cubic special primes
- Cullen and Woodall numbers
- Cumulative standard deviation
- Currency
- Currying
- Curve that touches three points
- Curzon numbers
- CUSIP
- Cut a rectangle
- Cycle detection
- Cyclops numbers
- Cyclotomic polynomial
D
- Damm algorithm
- Date format
- Date manipulation
- Day of the week
- Day of the week of Christmas and New Year
- Days between dates
- De Bruijn sequences
- De Polignac numbers
- Deal cards for FreeCell
- Death Star
- Deceptive numbers
- Decimal floating point number to binary
- Decision tables
- Deconvolution/1D
- Deconvolution/2D+
- Decorate-sort-undecorate idiom
- Deepcopy
- Define a primitive data type
- Delegates
- Delete a file
- Deming's funnel
- Department numbers
- Descending primes
- Detect division by zero
- Determinant and permanent
- Determine if a string has all the same characters
- Determine if a string has all unique characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Dice game probabilities
- Digit fifth powers
- Digital root
- Digital root/Multiplicative digital root
- Dijkstra's algorithm
- Dinesman's multiple-dwelling problem
- Dining philosophers
- Disarium numbers
- Discordian date
- Discrete Fourier transform
- Display a linear combination
- Display an outline as a nested table
- Distance and Bearing
- Distinct power numbers
- Diversity prediction theorem
- DNS query
- Documentation
- Doomsday rule
- Dot product
- Double Twin Primes
- Doubly-linked list/Definition
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Doubly-linked list/Traversal
- Dragon curve
- Draw a clock
- Draw a cuboid
- Draw a pixel
- Draw a rotating cube
- Draw a sphere
- Draw pixel 2
- Duffinian numbers
- Dutch national flag problem
- Dynamic variable names
E
- Earliest difference between prime gaps
- Eban numbers
- Egyptian division
- Eisenstein primes
- EKG sequence convergence
- Element-wise operations
- Elementary cellular automaton
- Elementary cellular automaton/Infinite length
- Elementary cellular automaton/Random number generator
- Elliptic curve arithmetic
- Emirp primes
- Empty directory
- Empty program
- Empty string
- Enforced immutability
- Engel expansion
- English cardinal anagrams
- Entropy
- Entropy/Narcissist
- Enumerations
- Environment variables
- Equal prime and composite sums
- Equilibrium index
- Erdös-Selfridge categorization of primes
- Erdős-Nicolas numbers
- Erdős-primes
- Esthetic numbers
- Ethiopian multiplication
- Euclid-Mullin sequence
- Euler method
- Euler's constant 0.5772...
- Euler's identity
- Euler's sum of powers conjecture
- Evaluate binomial coefficients
- Even numbers which cannot be expressed as the sum of two twin primes
- Even or odd
- Evolutionary algorithm
- Exactly three adjacent 3 in lists
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Executable library
- Execute a Markov algorithm
- Execute a system command
- Execute Brain****
- Execute Computer/Zero
- Execute HQ9+
- Execute SNUSP
- Exponentiation operator
- Exponentiation order
- Exponentiation with infix operators in (or operating on) the base
- Extend your language
- Extensible prime generator
- External sort
- Extra primes
- Extract file extension
- Extreme floating point values
- Extreme primes