[gambit-list] "Number of arguments exceeds implementation

Christian christian at pflanze.mine.nu
Tue Sep 5 09:40:51 EDT 2006


At 13:01 Uhr -0500 04.09.2006, Bill Richter wrote:
>Thanks, Christian.  Looks pretty similar to Anton's fix: I need to
>understand this fold biz.  I have before: it's nicely discussed in
>HtDP.  My program ran (using my simpler & less elegant fix) for over
>12 hours before dying without any output.  I need to improve the
>code.  See if you have a suggestion:
>
>I'm coding up a Sudoku technique that involves chains going from one
>of the 81 cells to another one, beginning & ending on different
>numbers.  There's thousands, maybe tens of thousands of such chains.
>OK.  There are rules to glue two chains together, and make new ones,
>which then go on this large list of chains.  Etc. What's a good speed
>implementation for this?

Well, I don't know Sudoku and don't have the time to learn about it. 
So I can't follow what programming technique you're using and what 
you might be missing. It's only a guess when I suspect that you're 
building too much data at once in memory, and might profit from lazy 
evaluation (streams). I did suggest that to you in a different 
occasion once. You seem to think mathematically, so my guess is that 
you're programming in a rather descriptive way and do not care nor 
think about how memory is being used during processing; using lazy 
evaluation in the right places makes memory being used only on 
demand, without changing the program much.

Christian.



More information about the Gambit-list mailing list