# User talk:Spoon!

## Welcome[edit]

Welcome to Rosetta Code. And thanks for your contributions. I can count on one hand the number of RC members who've contributed so much in such a short period. I founded RC and maintain the software and (more or less) organization side of things. If you have any suggestions or ideas, feel free to speak up on the Village Pump or in the talk pages, or stop by IRC and discuss them. --Short Circuit 19:34, 3 February 2008 (MST)

## Python Factorial[edit]

Re [this],

:-)

--Paddy3118 17:29, 17 August 2008 (UTC)

## Sequence instead of sequance[edit]

Hi, How do I correct the spelling on this page (and its Talk page too). Thanks, --Paddy3118 13:53, 24 August 2008 (UTC)

## Words Of Equal Characters[edit]

Your Java solution misses out the anagrams of caret for some reason? --Paddy3118 04:24, 27 September 2008 (UTC)

- Oops I missed copying one line of the output. --Spoon! 05:39, 27 September 2008 (UTC)

Ta! --Paddy3118 07:50, 27 September 2008 (UTC)

## About Obj-C / GC on Rational arith[edit]

Yes I knew that, but since it started swapping heavily, I had added some code that in my mind should have forced the GC pool to release memory sooner... anyway it continues to behave the same way (with or without the added wreck-code), at least on my 256Mbyte memory system. I wonder if it also depends on the way I've implemented the class, and if there's a better way that uses less memory. --ShinTakezou 16:07, 15 February 2009 (UTC)

## True/False Values[edit]

I took my time to complete my Python edit, not knowing you had in the meantime added your own. Will you merge, or should I? --Paddy3118 19:14, 10 July 2009 (UTC)

- Oh yeah you should merge it as you see fit. --Spoon! 19:27, 10 July 2009 (UTC)

## Symmetric Difference[edit]

erp...I didn't see your changes before I went and repasted a corrected version of my code. Sorry about that. --Michael Mol 04:50, 3 December 2009 (UTC)

- that's fine. i'll make the changes again. --Spoon! 05:26, 3 December 2009 (UTC)

## Dynamic programming[edit]

It was your submission of a dynamic solution to the 0-1 knapsack problem that set me on the path to learning some more about DP, and ultimately submitting this after many hours of toil. Its your fault! (and thank you :-)

--Paddy3118 03:55, 3 March 2010 (UTC)

## Address of a variable[edit]

Hi Spoon! I made a couple little fixes. The default int isn't big enough to hold the address, but that might not be obvious without the hex formatting. Also, getting the address is only half of the task. I tried setting the address and couldn't figure it out. :( I guess I need to learn more first. —Sonia 11:22, 19 January 2011 (UTC)

## Odd word problem and C++(11)[edit]

I am kind of newbie for C++11 (and for C++ after all too), but your changes at Odd word problem#C++, are they correct? Is it still working? As I would expect, gcc gives error about the shadowing of prev. Then, let us suppose we fix that... but where's the recursion? That code does not work anymore... at least, with gcc 4.5... there's some C++11 special feature gcc-4.5 does not implement correctly that would make that code work?

Moreover, I've used capture by reference, it seemed to me usable in this circumstance, without problems. Is there any reason not to use it? ShinTakezou 22:53, 5 May 2012 (UTC)

- Oops, I removed the parameter but forgot to copy and paste that part. It's fixed now. --Spoon! 01:23, 6 May 2012 (UTC)
- Ok, now I see also why you used capture by copy! I thought at first the part to be eliminated was the var, not the argument, so it seemed like something was missing to make the stuff work. Thank you. -- ShinTakezou 08:30, 6 May 2012 (UTC)

## Twelve statements[edit]

Oops I think I overwrote your Haskell edit in Twelve statements in a conflict. Would you please check it again? Sorry about that.--Ledrug 07:10, 20 September 2012 (UTC)

## Code edition[edit]

Hey Spoon!, you made some changes in my Playfair_cipher C++ code and I really appreciate it, but you did a mistake in one method and the program stopped working properly. See, don't get me wrong here, I really don't care if you edit my code, but in the future, please test it before you post it.

The bug you created was in the method getChar( int a, int b ) -> the method accepts negative number to and for example: -1 % 5 = -1 not 0 - got it?!

--Paulo Jorente (talk) 19:22, 4 June 2013 (UTC)

## Python/Java infinite generator/iterator error[edit]

Spoon!, your Java Sieve of Eratosthenes infinite generator translation to Java (using 32-bit int's) as translated from infinite generator in Python has an overflow problem for finding primes higher than 46,349 as I have noted in the Sieve of Eratosthenes Discussion Page. You should fix this, perhaps by forcing the integer type to long.

A better fix would be to postpone the addition of the prime multiple culling sequences to the queue until needed as was done for the dictionary solution (the faster algorithm), in which case the algorithm will work up to the full numeric range of whatever number type is used, including 32-bit integers (2^31 - 1 or 2,147,483,647) otherwise limited to a rage of 46,349. This has the further advantage of much less memory use (by about the ratio of the square root of the memory used) and faster queue re-insertions (a large fraction of the total operations) as these access times are proportional of the log of the queue size, which would then be smaller by the given square root ratio.--GordonBGood (talk) 10:51, 24 June 2014 (UTC)

- Oh yeah, I hadn't thought about the types of the integer. In Python, integers automatically overflow into arbitrary-precision integers (2.x) or are already arbitrary-precision integers (3.x), so the correct translation would have been to use BigInteger. I'll think about the other solution, but a disadvantage of hash tables is that insertion and lookup are O(n) in the worst-case. Perhaps a binary search tree based dictionary will be good as insertion and lookup is amortized O(log n) in the worst case, the same as insertion and removal in a heap-based priority queue. --Spoon! (talk) 06:02, 25 June 2014 (UTC)

## Snake/Java[edit]

Team work, heheh. Those clunky enums look much better now. Thanks. Fwend (talk) 00:51, 14 April 2016 (UTC)

## Editing of Haskell's Lucky and even lucky numbers[edit]

Hi Spoon, thanks for your help. The Haskell code is now much cleaner and idiomatic. Nevertheless you failed to test your changes and broke the code in a couple of places. I just fixed it.

## Dijkstra's algorithm permission[edit]

I'd like to ask your permission to use your implementation of Dijkstra's algorithm in Haskell as part of a benchmark suite for the pqueue package. Dfeuer (talk) 22:52, 10 December 2021 (UTC)