J for C programmers

Free Download

Authors:

Size: 2 MB (1791354 bytes)

Pages: 270/270

File format:

Language:

Publishing Year:

Category:

Henry Rich

An introduction and reference for the J programming language, an array language of extraordinary productivity. The reader learns the elements of J in terms familiar to a C or Java programmer, and then goes on to learn how to think about problems J-style, working with whole-array operations rather than loops.

Table of contents :
J For C Programmers……Page 1
Foreword……Page 2
1. Introduction……Page 12
2. Culture Shock……Page 13
Terminology……Page 17
Word Formation (tokenizing rules)……Page 18
Numbers……Page 19
Valence of Verbs (Binary and Unary Operators)……Page 20
Order of Evaluation……Page 21
How Names Are Substituted……Page 22
What a verb (function) looks like……Page 23
Running a J program……Page 24
The Execution Window; Script Windows……Page 25
Step-By-Step Learning: Labs……Page 26
Getting Help……Page 27
Average Daily Balance……Page 28
Calculating Chebyshev Coefficients……Page 31
Arrays……Page 33
Cells……Page 34
Array-creating Verbs……Page 36
Examples of Implicit Loops……Page 43
Verb Execution—How Rank Is Used (Monads)……Page 45
Controlling Verb Execution By Specifying a Rank……Page 47
Examples Of Verb Rank……Page 48
A Utility for Understanding Evaluation……Page 51
Negative Verb Rank……Page 52
Verb Execution—How Rank Is Used (Dyads)……Page 53
When Dyad Frames Differ: Operand Agreement……Page 56
A Mistake To Avoid……Page 60
7. Starting To Write In J……Page 62
Arithmetic Dyads……Page 65
Boolean Monad……Page 66
Operations on Arrays……Page 67
The Adverb Monad u/……Page 77
The adverb ~……Page 79
10. Continuing to Write in J……Page 81
11. Boxing (structures)……Page 87
Terminology……Page 89
Boxing As an Equivalent For Structures In C……Page 90
Verb Sequences—u@:v and u@v……Page 91
Making a Monad Into a Dyad: The Verbs [ and ]……Page 95
Making a Dyad Into a Monad: u&n and m&v……Page 96
Execution On a Cell Of Fills……Page 98
If Fill-Cells Are Not Enough……Page 100
14. Loopless Code III—Adverbs and …….Page 101
Dyads……Page 104
Monads (all rank 0)……Page 105
A Few J Tricks……Page 106
Power/If/DoWhile Conjunction u^:n and u^:v……Page 107
Tie and Agenda (switch)……Page 110
Dyad ; (Link) And Monad ; (Raze)……Page 112
Dyad { Revisited: the Full Story……Page 115
Fetch From Structure: Dyad {::……Page 118
Report Boxing Level: Monad L…….Page 119
What really happens during m :n and verb define……Page 121
Compound Verbs Can Be Assigned……Page 122
The Suicide Verb [:……Page 123
Final Reminder……Page 124
Apply Under Transformation: u&.v and u&.:v……Page 125
u&:v and u&v……Page 127
An observation about dyadic verbs……Page 128
Timing Individual Sentences……Page 129
Compounds Recognized by the Interpreter……Page 131
Use Large Verb-Ranks! and Integrated Rank Support……Page 132
Shining a Light: The J Performance Monitor……Page 133
File Operations 1!:n; Error Handling……Page 136
Treating a File as a Noun: Mapped Files……Page 137
Format Data For Printing: Monad And Dyad “:……Page 138
Format an Array: 8!:n……Page 140
Format binary data: 3!:n……Page 141
Convert Character To Numeric: Dyad “…….Page 142
22. Calling a DLL Under Windows……Page 144
Memory Management……Page 145
Aliasing of Variables……Page 146
Asynchronous Sockets and socket_handler……Page 149
Names and IP Addresses……Page 150
Listening……Page 151
Other Socket Verbs……Page 152
Apply On Subsets: Dyad u/…….Page 154
Apply On Partitions: Monad u;.1 and u;.2……Page 156
Apply On Specified Partitions: Dyad u;.1 and u;.2……Page 157
Apply On Subarray: Dyad u;.0……Page 159
Apply On All Subarrays: Dyad u;.3 and u;._3……Page 160
Extracting Variable-Length Fields Using ^: and ;.1……Page 161
Example: Combining Adjacent Boxes……Page 162
Using the Argument To a Modifier……Page 164
Invoking a Gerund: m`:6……Page 165
Passing the Definition Of a Verb: 128!:2 (Apply)……Page 166
Passing an Executable Sentence: Monad “. and 5!:5……Page 167
26. Loopless Code VI……Page 168
27. Loopless Code VII—Sequential Machines……Page 172
28. Modifying an array: m}……Page 175
Modification In Place……Page 176
if./do./else./end., if./do./elseif./do./end…….Page 178
select./case./fcase./end……Page 179
assert…….Page 180
Assignment……Page 181
Name Lookup……Page 182
Changing The Current Locale……Page 183
Using Locales……Page 186
Modifiers That Do Not Refer To x. Or y…….Page 188
Modifiers That Refer To x. Or y…….Page 192
Polynomials: p…….Page 195
Calculus: d., D., D:, and p……..Page 197
Hypergeometric Function with H…….Page 198
Random Numbers: ?……Page 199
Useful Scripts Supplied With J……Page 200
Extended Integers, Rational Numbers, and x:……Page 201
Permutations: A. and C…….Page 202
Plot Package……Page 204
2D Graphics: the gl2 Library……Page 210
3D Graphics: OpenGL……Page 217
Choose From Lists Item-By-Item: monad m}……Page 218
Make a Table: Adverb dyad u/……Page 219
Cartesian Product: Monad {……Page 220
Boolean Functions: Dyad m b…….Page 221
Operations Inside Boxes: u L: n, u S: n……Page 222
Right Shift: Monad |.!.f……Page 224
Monad i: and Dyad i:……Page 225
Fast String Searching: s: (Symbols)……Page 226
Window Driver And Form Editor……Page 227
Tacit Programming……Page 228
36. Tacit Programs……Page 229
37. First Look At Forks……Page 231
38. Parsing and Execution I……Page 233
The Parsing Table……Page 236
Examples Of Parsing And Execution……Page 237
Undefined Words……Page 241
40. Forks, Hooks, and Compound Adverbs……Page 242
Tacit and Compound Adverbs……Page 245
Referring To a Noun In a Tacit Verb……Page 246
Flatten a Verb: Adverb f…….Page 247
42. Explicit-To-Tacit Converter……Page 250
Special Verb-Forms Used in Tacit Definitions……Page 251
Mechanics……Page 252
Programming Errors……Page 253
44. Valedictory……Page 256
45. Glossary……Page 257
46. Error Messages……Page 261
47. Index……Page 263

Reviews

There are no reviews yet.

Be the first to review “J for C programmers”
Shopping Cart
Scroll to Top