Talk:Kaprekar numbers: Difference between revisions

Line 215:
 
:I wrote a list of reasons concerning when I think it is appropriate to change existing code and why I changed Nigel's version (his 7/9/2012 submission) to which he responded with "A lot of hot air for somthing that doesn't exist!" ignoring ALL of my points and implying that I should have fixed his version: "I was going to restore my version and let you change it". I feel that the criteria that I previously listed are still valid, and despite what Nigel might claim, there are major issues with his version (in terms of Lisp constructs, idioms and formatting) which is why I removed his version, and not because I was being vengeful, as he stated below. His submission is badly written and should be removed. It is that simple. If Nigel would like to change the version written by Ledrug, I feel that he should write a list of valid reasons which can be debated. If the reasons are sound and agreeable, then he be allowed to modify Ledrug's version with one caveat: All of Nigel's Common Lisp submissions have been extremely poorly written and indicative of someone who does not care to either learn or write proper Lisp code, so the submission should be vetted here, on the talk page, before he is allowed to post it on the task page. --[[User:Lhignight|Larry Hignight]] 03:49, 8 October 2012 (UTC)
 
=== Testing Common Lisp Contributions ===
Just to confirm my suspicions about the quality of Nigel's CL submissions, I decided to test both Ledrug and Nigel's current versions:
* Ledrug's version:
** Compiled on both CLISP and LispWorks without requiring any changes
** Was extremely fast; In fact, it was faster than Nigel's 'vfast' C++ version for n = 1 million (.85s vs 1.20s)
*** The C++ compilation done with MinGW. The CL compilation with LispWorks. I did not set the compiler to optimize in either case.
* Nigel's version:
** Does not compile on CLISP: exit clause in DO must be a list
** Does not compile on LispWorks: NIL does not match (SYSTEM::END-TEST-FORM &REST SYSTEM::RESULT-FORMS)
 
I'm sure that Nigel will respond to these results in his usual manner: "that is hot air", "all of your implementations are flawed; Mine is the only true Common Lisp", "Surely, you must have my version and Ledrug's version mixed up", or even the classic "Why didn't you just fix my code!" Who knows... I'm sure that it will be amusing though. Therefore, I encourage everyone with a working CL implementation to attempt to compile both versions and post your results. --[[User:Lhignight|Larry Hignight]] 07:45, 8 October 2012 (UTC)
 
I can identify three issues, none requiring any particular Lisp knowledge to resolve:
Line 271 ⟶ 259:
::Larry, how old are you? You have accepted that "Ledrug submitted a single version, which he later updated with the mod filter, that was faster than mine, well-written, and worked for all number bases." You have agreed that he replaced your version to "reduce code; simplify; speed up; conform to task and extra". Does this not imply that your code needed improving? I am not interested in your critisism of me, though when it degenerates to "Well said. He is clearly more interested in being a pompous dick then contributing quality code to RC" I don't think it is acceptable.--[[User:Nigel Galloway|Nigel Galloway]] 13:05, 8 October 2012 (UTC)
 
==== Issue the third ====
I have identified 3 approaches to this task:
1) a naive approach which loops over all numbers testing each fully for Kaprekarness;
Line 279 ⟶ 267:
ledrug's solution was of the first ilk, my better idea was to implemented a solution of the third. ledrug responded by upgrading his solution to type 2 and overwrote my solution with his. I recovered my solution and left ledrug's second solution in tact. He says's "then my edit you reverted" (sic), perhaps he didn't check the changes and thought I had deleted his - I had not. I may work further on this solution. I have noticed that the first 2 Kaprekars are in ran and that the test is simpler when it only needs to identify Kaprekars larger than Base. I have asked ledrug to leave this solution in place. I think he will comply even though he thinks saying please is bad manners. Larry didn't leave it, but I just put that down to vengence, the only reason he supplied is that ledrug has taught him to swear. I have supplied two good C++ solutions, but have not deleted the origional rather slow version. Ledrug has now implemented a fourth method, without deleting any one elses. Is that not better?
--[[User:Nigel Galloway|Nigel Galloway]] 13:15, 7 October 2012 (UTC)
=== Testing Common Lisp Contributions ===
Just to confirm my suspicions about the quality of Nigel's CL submissions, I decided to test both Ledrug and Nigel's current versions:
* Ledrug's version:
** Compiled on both CLISP and LispWorks without requiring any changes
** Was extremely fast; In fact, it was faster than Nigel's 'vfast' C++ version for n = 1 million (.85s vs 1.20s)
*** The C++ compilation done with MinGW. The CL compilation with LispWorks. I did not set the compiler to optimize in either case.
* Nigel's version:
** Does not compile on CLISP: exit clause in DO must be a list
** Does not compile on LispWorks: NIL does not match (SYSTEM::END-TEST-FORM &REST SYSTEM::RESULT-FORMS)
 
I'm sure that Nigel will respond to these results in his usual manner: "that is hot air", "all of your implementations are flawed; Mine is the only true Common Lisp", "Surely, you must have my version and Ledrug's version mixed up", or even the classic "Why didn't you just fix my code!" Who knows... I'm sure that it will be amusing though. Therefore, I encourage everyone with a working CL implementation to attempt to compile both versions and post your results. --[[User:Lhignight|Larry Hignight]] 07:45, 8 October 2012 (UTC)
2,171

edits