Category:J: Difference between revisions
m
→The J language: link to some well thought out reflection on implications
(→Todo) |
m (→The J language: link to some well thought out reflection on implications) |
||
(One intermediate revision by one other user not shown) | |||
Line 19:
== The J language ==
A frequent reaction when one first encounters a J program is often something along the lines of "that's cheating". The thought here is that the problem could not possibly be that simple, so
The flip side of this issue is that J is a dialect of APL
See also https://github.com/cratelyn/j for some reflection on some of the linguistic character of J.
== Introduction ==
Line 33 ⟶ 35:
Object-module and imperative techniques are supported, but not required.
The J programming language was designed and developed by [
<br clear="all"/>
Line 49 ⟶ 51:
For example, the phrase <code>(+/ % #)</code> finds the average of a list of numbers.
<syntaxhighlight lang="j">
2
</syntaxhighlight>
To understand how this works, you might try working with simpler sentences and their variations.
<syntaxhighlight lang="j">
6
+/4 5 6
Line 67 ⟶ 72:
5
(+/ % #) 4 5 6
5
</syntaxhighlight>
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 old school division symbols) then these experiments might help confirm that you have understood things properly.
== Some
If you wish to use J you will also have to learn a few grammatical rules (J's parser has [http://www.jsoftware.com/help/dictionary/dicte.htm 9 reduction rules] and "shift" and "accept" - the above examples use four of those rules). J verbs have two definitions - a single argument "monadic" definition and a two argument "dyadic" definition.
Line 97 ⟶ 103:
Discussion of the goals of the J community on RC and general guidelines for presenting J solutions takes place at [[J/HouseStyle|House Style]].
== Jedi on RosettaCode ==
|