Help / JforC / Jforc Contents
>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help J for C Programmers
Contents
Notation Used in This Book. 18
Word Formation (tokenizing rules) 19
Adjacent Numbers Form a Single Word. 20
Adjacent Named Nouns Do NOT Form a Single Word. 21
Valence of Verbs (Binary and Unary Operators) 21
How Names (Identifiers) Get Assigned. 22
What a verb (function) looks like. 24
The Execution Window; Script Windows. 27
Step-By-Step Learning: Labs. 28
4. A First Look At J Programs. 30
Calculating Chebyshev Coefficients. 33
Dyad $ ($hape) and monad $ ($hape Of) 39
6. Loopless Code I: Verbs Have Rank. 46
Examples of Implicit Loops. 46
Verb Execution--How Rank Is Used (Monads) 48
Controlling Verb Execution By Specifying a Rank. 50
fndisplay--A Utility for Understanding Evaluation. 54
Rank Makes Verbs Automatically Extensible. 56
Verb Execution--How Rank Is Used (Dyads) 56
Concatenating Lists: Dyad , (Append) 59
When Dyad Frames Differ: Operand Agreement 60
Order of Execution in Implied Loops. 64
9. Loopless Code II: Adverbs / and ~.. 84
What 'Monadic' and 'Dyadic' Mean For Modifiers. 84
The Adverb Monad u/ (Insert) 85
10. Continuing to Write in J. 89
Example: Counting Words and Lines. 93
Boxing As an Equivalent For Structures In C.. 98
Verb Sequences--u@:v and u@v.. 99
The Difference Between u@:v and u@v.. 100
Making a Monad Into a Dyad: The Verbs [ and ] 103
Making a Dyad Into a Monad: u&n and m&v.. 104
The Invisible Modifiers: Hooks and Forks. 105
Execution On a Cell Of Fills. 107
If Fill-Cells Are Not Enough. 109
14. Loopless Code III--Adverbs \ and \... 110
When There Are No Subsets. 112
16. Loopless Code IV: Irregular Operations. 116
Power/If/DoWhile Conjunction u^:n and u^:v.. 118
Applying u Repeatedly (Power) 118
Applying u Optionally (If) 119
Applying u Forever (Converge) 119
Applying u Iteratively (DoWhile) 119
The Tie Conjunction u`v u`n m`v m`n.. 120
The Agenda (switch) conjunction m@.v.. 121
Box and Join: Dyad ; (Link) 123
Unbox and Join: Monad ; (Raze) 124
Dyad , Revisited--the Case of Dissimilar Items. 125
Verbs With Many Operands--Multiple Assignment 125
Dyad { Revisited: The Full Story. 126
Simplification 1: Remove Inner Boxing If Selectors Are Scalars. 128
Simplification 2: Remove All Boxing To Select Full Items. 129
Split String Into J Words: Monad ;:.. 129
Fetch From Structure: Dyad {::.. 130
Report Boxing Level: Monad L... 131
18. Verb-Definition Revisited. 133
What really happens during m :n and verb define.. 133
Compound Verbs Can Be Assigned. 134
Dual-Valence verbs: u :v.. 135
Multi-Line Comments Using 0 :0.. 136
19. u^:_1, u&.v, u&.:v, and u :.v.. 137
Apply Under Transformation: u&.v and u&.:v.. 137
In dyadic verbs, x is control and y is data. 140
File Operations 1!:n; Error Handling. 141
Error Handling: u ::v, 13!:11, and 9!:8.. 142
Treating a File as a Noun: Mapped Files. 142
Format Data For Printing: Monad And Dyad ":.. 143
Format binary data: 3!:n.. 146
printf, sprintf, and qprintf.. 147
Convert Character To Numeric: Dyad "... 147
21. Calling External Programs. 149
Describing the Operands and Result 150
Supplying the Operand Data. 150
Filling a Structure: Conversions. 152
Asynchronous Sockets and socket_handler.. 155
23. Loopless Code V: Partitions. 160
Find Unique Items: Monad ~. and Monad ~:.. 160
Apply On Subsets: Dyad u/... 160
Apply On Partitions: Monad u;.1 and u;.2.. 162
Creating An Array Using 0 :0 And ;._2.. 163
Apply On Specified Partitions: Dyad u;.1 and u;.2.. 164
Find Sequence Of Items: Dyad E... 164
Multidimensional Partitions. 165
Apply On Subarray: Dyad u;.0.. 165
Apply On All Subarrays: Dyad u;.3 and u;._3.. 167
Extracting Variable-Length Fields Using ^:a: and ;.1.. 168
Example: Combining Adjacent Boxes. 169
24. When Programs Are Data. 171
Using the Argument To a Modifier 171
Passing the Definition Of a Verb: 128!:2 (Apply) 173
Passing an Executable Sentence: Monad ". and 5!:5.. 174
25. Loopless Code VI: Temporary Variables. 175
26. Loopless Code VII: Sequential Machines. 179
27. Modifying an array: m}.. 183
Monad I.--Indexes of the 1s in a Boolean Vector 184
for./do./end. and for_x./do./end... 186
while./do./end. and whilst./do./end... 186
if./do./else./end., if./do./elseif./do./end... 186
try./catch./catcht./end. and throw... 187
select./case./fcase./end... 187
Referencing a Name: Scope. 190
Referencing a Public Name: The Search Path. 191
Changing The Current Locale. 192
True Globals--The Shared Locale 'z'.. 194
Using Locales--Object-Oriented Programming. 194
Object-Oriented Programming in J: Base Classes. 194
Object-Oriented Programming in J: Derived Classes. 196
Object-Oriented Programming in J: Objects. 196
Good Object-Oriented Design in J. 199
Other Uses of Locales in J. 199
30. Writing Your Own Modifiers. 201
Modifiers That Do Not Refer To x Or y.. 201
Example: Creating an Operating-System-Dependent Verb. 202
Example: The LoopWithInitial Conjunction. 203
Example: A Conjunction that Analyzes u and v.. 204
An Exception: Modifiers that Do Not Refer to u or v.. 205
Modifiers That Refer To x Or y.. 206
31. Applied Mathematics in J. 208
Radix Notation For Numbers. 208
Calculus: d., D., D:, and p.... 210
Taylor Series: t., t:, and T... 212
Hypergeometric Function with H... 212
Sparse Arrays: Monad and Dyad $... 212
Useful Scripts Supplied With J. 213
32. Elementary Mathematics in J. 214
Exact Arithmetic: Extended and Rational Numbers. 214
Changing Precision: Monad and Dyad x:.. 215
Factors and Primes: p: and q:.. 216
Data; Constructing a Plot with pd.. 221
Generating Plots of Functions. 223
Assembling a Multipart Plot with pd.. 224
Examples of Plots with Multiple Sets of Points. 225
Plots of Parametric Functions. 225
2D Graphics: the gl2 Library. 225
Creating an isigraph Graphics Control 226
Selecting an isigraph Control for Output 227
Screen Resizing: The paint Event 228
Partial List of glxxx Drawing Commands. 228
High Performance: Blocks of glxxx Commands Using glcmds.. 231
Displaying Tabular Data: the Grid Control 232
Startup and Configuration. 233
Seeing What Scripts Have Been Loaded. 235
Boxed words to string: Monad ;:^:_1.. 236
Choose From Lists Item-By-Item: monad m}.. 236
Recursion with $: and Memoization with M... 236
Make a Table: Adverb dyad u/.. 237
Cartesian Product: Monad {.. 238
Boolean Functions: Dyad m b... 239
Functions on Boolean operands. 239
Bitwise Boolean Operations on Integers and Characters. 239
Operations Inside Boxes: u L: n, u S: n.. 240
Comparison Tolerance !.f.. 242
Right Shift: Monad |.!.f.. 243
Generalized Transpose: Dyad |:.. 243
Fast String Searching: s: (Symbols) 244
Window Driver And Form Editor 246
35. Performance: Measurement & Tips. 247
Timing Individual Sentences. 247
Use Large Verb-Ranks! and Integrated Rank Support 249
Avoid Boxing, Especially Small Boxes. 251
Use the Dyad i. Family: Dyad i. i: e. -., Monad ~. ~: u/... 251
Use u&.> (u each) To Operate Inside Boxes. 251
Use Compounds Recognized by the Interpreter 251
Shining a Light: The J Performance Monitor 253
37. Introduction to Forks. 258
38. Parsing and Execution I. 260
Definitions That Refer To x or y.. 262
39. Parsing and Execution II. 263
Examples Of Parsing And Execution. 265
40. Forks, Hooks, and Compound Adverbs. 270
Tacit and Compound Adverbs. 273
Referring To a Noun In a Tacit Verb. 274
41. Readable Tacit Definitions. 275
Flatten a Verb: Adverb f... 275
Using f. to improve performance. 276
42. Explicit-To-Tacit Converter 278
Assignments in 13 : Tacit Definitions. 279
Special Verb-Forms Used in Tacit Definitions. 279
47. Index. 292
>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help J for C Programmers