Is there any major problems with getting 2D arrays (sequences of sequences) serialized? (I'm working on a game and trying to find a serialization libraryt that does what I need)
Krzysztof Drewniak
On Fri, 2010-06-11 at 06:23 -0500, Krzysztof Drewniak wrote:
Is there any major problems with getting 2D arrays (sequences of sequences) serialized? (I'm working on a game and trying to find a serialization libraryt that does what I need)
Krzysztof Drewniak
I don't know enough about the workings of s-serialization, but these two functions might prove useful (thinking: serialize return value of array->vector, and upon deserialization, pass the list to vector->array)
(defun array->vector (array) (let ((dims (array-dimensions array))) (list dims (make-array (array-total-size array) :displaced-to array))))
(defun vector->array (vector) (let ((dims (first vector)) (vector (second vector))) (make-array dims :displaced-to vector)))
Thank you for the library,
Krzysztof
cl-prevalence-devel@common-lisp.net