Talk:Multiplicative order: Difference between revisions

response
No edit summary
(response)
Line 24:
: There's no need to upload any image - it just takes a few sentences to describe the algorithm. And this algorithm has NOTHING, absolutely '''NOTHING''' that makes it in any way "natural" to J - I could write a C version as easily as the Haskell version, even for large numbers. Just a matter of using the right libraries (for example ''gmp'', in the C case). Sorry to shout, but I am really angry I head to spend several hours learning enough J to figure out the algorithm, for what you could have done in five minutes. And I '''hate''' wasting my time. And I hate even more playing silly hide-and-seek games just because people want to show off "their" language.
: J, like APL, has lots of interesting features. The maybe two most prominent are IMHO that you can use HOFs to combine existing functions (in J terminology, ''adverbs'' and ''conjunctions''), and that the nearly only data structure are arbitrary-rank tensors, so you have to organize the program around that. I'd love to see simple examples that illustrate this in comparison to other languages. But IMHO implementing each of the zillion algorithms of moderate difficulty from number theory or other maths fields is just a waste of time, because it tells you '''NOTHING''' about the language whatsoever. Again, sorry for shouting, but I am still quite angry. [[User:Dirkt|Dirkt]] 07:40, 9 December 2007 (MST)
 
I accept your apologies for being angry and for shouting.
Nothing happened here that merited it.
 
You asked for a description of the algorithm.
I provided a reference to a well-known text.
Then you asked the description in the text.
I promised to provide a reproduction of the text,
but before I was able to do so (and within less than 12 hours)
you spent a few hours learning enough J to derive an English
description from the J program. That is a testament to your skill,
to how well the J program is written, and to J itself.
Fine. But then you complained and shouted that you
wasted a few hours. Well, how you spend or waste your
time is your choice.
 
The main reason I did not simply describe what the J
program did (as you did) is that the solutions in the
other languages should not be influenced by the J solution.
(Unless their authors choose to be so influenced.)
I have now typed in the description from Bach & Shallit
and will replace your description with theirs.
I was not playing hide-and-seek games. If I were,
I would not have provided a reference, nor provided
a solution in a notation as clear as J,
nor written the best J program that I could.
 
I disagree with your comment that "implementing
each of the zillion algorithms ... from number theory
or other math fields is just a waste of time".
The presence of the "Prime number" and "Sieve of Eratosenes"
programming tasks too argue against your position.
Examples that compare and contrast J against other
languages can be found by following the links in
[[J|the J page]] (17 articles so far). [[User:Roger Hui|Roger Hui]] 23:26, 9 December 2007 (MST)
 
=== Java solution ===
Anonymous user