Re: help with serializing/deserializing structs

2010-01-26 Thread jleehurt
file %s:\n%s fname e) When writing it first writes to a temporary file and then renames so that if the power cuts in the middle that you won't be left with a half file :) On Tue, Jan 26, 2010 at 7:22 AM, jleehurt jleeh...@gmail.com wrote: Hi all, I am writing a distributed program

Re: help with serializing/deserializing structs

2010-01-26 Thread jleehurt
is to serialize the structmaps as hashmaps when writing them, and then deserialize the hashmap into a new structmap when reading them. On Jan 26, 9:01 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Jan 26, 11:40 am, jleehurt jleeh...@gmail.com wrote: Thanks Anders. I'm not sure why

help with serializing/deserializing structs

2010-01-25 Thread jleehurt
Hi all, I am writing a distributed program using Clojure. I am trying to write some code to pass structs around to different nodes on the network by serializing and deserializing strings. I do not fully understand how to use *print-dup* and read to do this. The last line of the following gives

Re: StackOverflowError Question

2009-04-22 Thread jleehurt
matrixMultiply [matrixA matrixB]   (doall     (map      (fn [row]        (apply map             (fn [ column]               (apply + (map * row column)))             matrixB))     matrixA))) hth, Christophe jleehurt a écrit : Hi Dimiter, Thank you! I'm still a bit confused as to why

Re: StackOverflowError Question

2009-04-21 Thread jleehurt
. ;; Actually not stack overflow, but HEAP overflow (it took a while though) user Thanks, Dimiter malkia Stanev. On Apr 20, 10:01 pm, jleehurt jleeh...@gmail.com wrote: Hi David, Those two are not recursive, but they call into other functions that are. Do I need to make sure that all recursive

StackOverflowError Question

2009-04-20 Thread jleehurt
Hi all, I have the following code that trains a perceptron with the given inputs and corresponding desired inputs. For input/output vectors, when the size gets to about 2000, I am getting a java.lang.StackOverflowError in the following function: (defn trainPerceptron [beginningWeightVector

Re: StackOverflowError Question

2009-04-20 Thread jleehurt
two other function calls getAdaptedWeightVector computeActualResponse Are these recursive as well? On Sun, Apr 19, 2009 at 11:26 PM, jleehurt jleeh...@gmail.com wrote: Hi all, I have the following code that trains a perceptron with the given inputs and corresponding desired inputs

Re: StackOverflowError Question

2009-04-20 Thread jleehurt
getAdaptedWeightVector computeActualResponse Are these recursive as well? On Sun, Apr 19, 2009 at 11:26 PM, jleehurt jleeh...@gmail.com wrote: Hi all, I have the following code that trains a perceptron with the given inputs and corresponding desired inputs. For input/output vectors, when