[cl-prevalence-devel] 2D arrays

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 -- X-Real-Email-With-Antispam: krzysdrewniak at gmail dot com pgp key on keyserver.ubuntu.com and maybe some other place too

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 -- X-Real-Email-With-Antispam: krzysdrewniak at gmail dot com pgp key on keyserver.ubuntu.com and maybe some other place too
participants (2)
-
Krzysztof Drewniak
-
Leslie P. Polzer