Jump to content

Talk:Kaprekar numbers: Difference between revisions

Line 183:
:YOUR version is not CORRECT. Anyone can view the history, try the examples above, and see this is true. I left untouched a slower version that solved the 'Extra extra credit' task, which you seem to be obsessed with for some reason. Why you would expect anyone to fix an incorrect, slower, less readable, and less lispy version of your software, when better versions already existed, is way beyond me. --[[User:Lhignight|Larry Hignight]] 01:17, 30 September 2012 (UTC)
Now with +SCARY CAPITALS+! I dont't expect anyone to do anything, it was merely a suggestion that you 'put up or shut up'. I modified your solution so that it worked, with sample output provided. If it didn't work for large numbers (ouside the scope of the task) it is probably because your log algorithms are inaccurate. You changed it back to your solution, which doesn't solve the task. Your situation is that ledrug didn't like your solution and has replaced it with his. If you have nothing to put up on the task page then all this is just hot air. None of your comments and insults have indicated that which you wish me to do about your situation. As I said I have a better idea, which I have placed on the task page.--[[User:Nigel Galloway|Nigel Galloway]] 11:38, 1 October 2012 (UTC)
 
Well, joining the fray. First, the message left on my user talk page by one genius:
:Please leave [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this code] alone until you can demonstrate an understanding of this problem. Your second attempt at this is an improvement over your first naive attempt, but still not as interesting as [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this]. Maybe I shall seperate the [http://rosettacode.org/wiki/Casting_out_nines Casting_out_nines] from the Kaprecar part: <lang clisp>(let ((kk (* N N))) (do ((B Base (* B Base))) ()(let (( nr (/ (* N (- B N)) (- B 1)))) (if (< 0 nr) (let ((q (floor (- N nr)))) (if (= kk (+ nr (* q B)))</lang> (unsigned, left by [[User:Nigel Galloway]])
I'll make a few comments, but won't discuss it any more after that, since that would be obviously futile.
# I don't know what kind of antique lisp machine you have installed in your basement, but your code does not compile on either SBCL or Clisp. Maybe geniuses shan't be bothered by such trifles.
# Your code, once made compile with SBCL (change that <code>do (...) ()</code> to <code>do (...) (nil)</code>, does exactly the samething mathematically: raise a power of a base repeately, until either it splits the square of n with the right sum, or it's too large. Except you are doing it in a convoluted way, using non-integer methods on integers, and ends up with something literally 100 times slower then my edit you reverted (on SBCL that is, I don't know about your antique lisp machine).
# You had one good idea of checking congruence, and a whole lot of terrible ones: being thoughtless in dealing with datatypes (<code>pow</code> and <code>log</code> on integers in C++, <code>/</code> and <code>floor</code> in Lisp); being sloppy in performance tuning (your "v.fast" C++ code isn't all that fast); being vengeful (<code>paddy_cnt</code>?); being narcissistic (own name as variable?); being inconsiderate to code readers (what kind of person posts unindented Lisp?); and generally being an all-around dick.
# Your sarcasm in the lisp code was neither subtle nor funny. You give British humor a bad name.
 
You are probably not stupid, but it's safe to say you are not the smartest person on RC, by a long shot. And smart people around here tend to have good manners, unlike you or I. Stop treating yourself like you are the one true genius, and try to do something that's helpful to people instead of showing off, OK? (my guess: probably not. Oh well.) --[[User:Ledrug|Ledrug]] 00:10, 4 October 2012 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.