Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kunt

#1
newLISP in the real world / Re: (save) + arrays
October 11, 2012, 06:17:18 AM
i initialize 3-dimensional array w/ only one element, as follows:

(define world-root (array 1 1 1 (list world-new-entry)))

the number of elements is being increased during the program execution. every element is a list.

and even this simple situation does not work.



for now i switched to lists entirely, they perform much better, after serialization i get:



(set 'world-root '(
  (((nil 1 "data/maps/start.lisp")))))
#2
newLISP in the real world / (save) + arrays
October 10, 2012, 06:47:32 AM
hello.



it looks like (save) does not handle arrays correctly.

i have a 3-dimensional array and want to save it to a file for further re-initialization, but it fails.



what i get after (save) in a file:



(set 'world-root (array 1 1 1 (flat '(
  (((nil 1 "data/maps/start.lisp")))))))


and if we eval this we get:



> (set 'world-root (array 1 1 1 (flat '((((nil 1 "data/maps/start.lisp")))))))

(((nil)))





which is not correct.

any suggestions?



ps: newlisp-10.4.3