Studio/Gallery of J
Basic Examples
J is similar in many ways to other programming languages, but it can also be very different. Here are a few examples.
Simple Examples of J in action.
Rank specifies the behaviour of a verb on certain subarrays of its arguments, which for a rank-k verb are referred to as the k-cells. Each verb is assigned a rank, and a rank may be otherwise specified with the rank conjunction.
Order of Execution in J, unlike most other programming languages, has no precedence between verbs. Like other languages, parentheses can be used to specify the sequence of execution.
Indexing is effected using the verb { (from), and indexed replacement using the adverb } (amend). From and amend are symmetric. These are described in entries in the Dictionary.
Lab Examples
J systems contain many Labs covering a wide range of topics. A Lab is an interactive tutorial. When you run a Lab it displays a descriptive section in your J programming window along with actual executions of expressions and their results. You can then study these and try your own experiments before continuing on to the next step.
It is far more interesting and useful to download (~4Mb) and install (dead easy) a J system and then run the labs live on your system. However, we include a few lab sessions here:
- A Taste of J (part 1)
- A Taste of J (part 2)
- An Idiosyncratic Introduction to J
- Application Distribution - Installer
- Building Applications
- Iterating with Class Verbs
- LAPACK Linear Algebra Package
- Locales
- Fractals, Visualization & J
- Mapped Files
- Regular Expressions
- ODBC Basics
- ODBC Simple Application
- Sockets and the Internet
- Socket Driver