- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a program that reads some data into a complicated nested list, and I would like to be able to access that data across multiple runs of a Lisp rather than having it cleared when the Lisp ends or the drawing (or even AutoCAD) is closed.
I see a couple possibilities:
- Print the nested list to a file in a way that preserves the hierarchy, something like this. Then, when it needs to be accessed later, use the reverse of Lee's program to read from the file into a nested list.
- Access a memory location directly to store the binary data that represents the nested list. Then, when it needs to be accessed later, tell my program that there is a nested list stored at that memory location and whatever is in memory there can now be accessed through a list variable in the current Lisp session. This behavior would be reminiscent of a pointer in C.
I would definitely prefer to do option 2, since I think it's a more elegant solution and doesn't require transcribing and reverse-transcribing to a text file. The list I am storing will be very large, so if I have to do option 1, it could result in a pretty sizable text file.
Is option 2 even possible? I wasn't able to find any reference to direct memory access with Lisp, but I am still fairly new. I see vl-registry-read and vl-registry-write, but I would like to be able to store my data in a less-delicate folder.
If not option 2, is anybody aware of an existing program that reads a text file into a nested list?
Solved! Go to Solution.