Category:J
![Language](http://static.miraheze.org/rosettacodewiki/thumb/2/27/Rcode-button-language-crushed.png/64px-Rcode-button-language-crushed.png)
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 (but regular) |
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 with 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 (or preinstalled on your machine), if you want to see how J works you should probably install a copy of J -- or you can try one of the "try me" links, below. 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
5</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
- David Lambert:contributions
try me
Want to try one of those cryptic J lines you see peppered through RC? Try pasting it into the web interface for buubot (broken link) (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)J
K
- K-d tree
- K-means++ clustering
- Kahan summation
- Kaprekar numbers
- Kernighans large earthquake problem
- Keyboard input/Keypress check
- Klarner-Rado sequence
- Knapsack problem/0-1
- Knapsack problem/Bounded
- Knapsack problem/Continuous
- Knapsack problem/Unbounded
- Knight's tour
- Knuth shuffle
- Knuth's algorithm S
- Knuth's power tree
- Knuth-Morris-Pratt string search
- Koch curve
- Kolakoski sequence
- Kosaraju
- Kronecker product
- Kronecker product based fractals
L
- Lagrange Interpolation
- Lah numbers
- Langton's ant
- Largest difference between adjacent primes
- Largest five adjacent number
- Largest int from concatenated ints
- Largest number divisible by its digits
- Largest prime factor
- Largest product in a grid
- Largest proper divisor of n
- Last Friday of each month
- Last letter-first letter
- Last list item
- Latin Squares in reduced form
- Law of cosines - triples
- Leap year
- Least common multiple
- Least m such that n! + m is prime
- Left factorials
- Legendre prime counting function
- Length of an arc between two angles
- Leonardo numbers
- Letter frequency
- Levenshtein distance
- Levenshtein distance/Alignment
- Linear congruential generator
- Linux CPU utilization
- List comprehensions
- List rooted trees
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- Long literals, with continuations
- Long multiplication
- Long primes
- Long stairs
- Long year
- Longest common prefix
- Longest common subsequence
- Longest common substring
- Longest common suffix
- Longest increasing subsequence
- Longest string challenge
- Longest substrings without repeating characters
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Increment loop index within loop body
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Loops/With multiple ranges
- Loops/Wrong ranges
- LU decomposition
- Lucas-Lehmer test
- Lucky and even lucky numbers
- Ludic numbers
- Luhn test of credit card numbers
- Lychrel numbers
- LZW compression
M
- MAC vendor lookup
- Mad Libs
- Magic 8-ball
- Magic constant
- Magic numbers
- Magic squares of doubly even order
- Magic squares of odd order
- Magic squares of singly even order
- Magnanimous numbers
- Make directory path
- Man or boy test
- Mandelbrot set
- Map range
- Marching squares
- Markov chain text generator
- Matrix chain multiplication
- Matrix digital rain
- Matrix multiplication
- Matrix transposition
- Matrix with two diagonals
- Matrix-exponentiation operator
- Maximum difference between adjacent elements of list
- Maximum triangle path sum
- Mayan calendar
- Mayan numerals
- Maze generation
- Maze solving
- McNuggets problem
- MD4
- MD5
- MD5/Implementation
- Median filter
- Meissel–Mertens constant
- Memory allocation
- Memory layout of a data structure
- Menu
- Merge and aggregate datasets
- Mersenne primes
- Mertens function
- Metallic ratios
- Metaprogramming
- Metered concurrency
- Metronome
- Mian-Chowla sequence
- Middle three digits
- Miller–Rabin primality test
- Mind boggling card trick
- Minesweeper game
- Minimal steps down to 1
- Minimum multiple of m where digital sum equals m
- Minimum number of cells after, before, above and below NxN squares
- Minimum numbers of three lists
- Minimum positive multiple in base 10 using only 0 and 1
- Minimum primes
- Minkowski question-mark function
- Modified random distribution
- Modular arithmetic
- Modular exponentiation
- Modular inverse
- Modulinos
- Monads/List monad
- Monads/Maybe monad
- Monads/Writer monad
- Monte Carlo methods
- Monty Hall problem
- Morpion solitaire
- Morse code
- Mosaic matrix
- Most frequent k chars distance
- Motzkin numbers
- Move-to-front algorithm
- Multi-dimensional array
- Multifactorial
- Multiline shebang
- Multiple distinct objects
- Multiple regression
- Multiplication tables
- Multiplicative order
- Multiplicatively perfect numbers
- Multisplit
- Munchausen numbers
- Munching squares
- Musical scale
- Mutex
- Mutual recursion
- Möbius function
- Pages using duplicate arguments in template calls
- Execution method/Interpreted
- Typing/Safe
- Typing/Strong (but regular)
- Typing/Checking/Dynamic
- Programming Languages
- Programming paradigm/Dynamic
- Programming paradigm/Functional
- Programming paradigm/Imperative
- Programming paradigm/Procedural
- Programming paradigm/Reflective
- Programming paradigm/Tacit