[CM] (sub)environments and object->string with :readable
chris.actondev at gmail.com
Wed Jul 29 16:22:02 PDT 2020
thanks for the quick response.
The problem that I'm facing is that write/ format ~S doesn't wrap lists
around (list ..),
thus I cannot use for serialize/deserialize. (my objective is saving/loading
And the example I gave about the namespace is really simple.
In my situation I'm doing things like loading a whole file into a separate
Like this example from the documentation
(load "any-library.scm" (curlet))
How could I "write" something that comes from *lib* that is eval'able like
the object->string :readable does?
(Practically, picture that there is "make-state" function in *lib* that
returns a curlet, like we were discussing in the previous email,
and you need to serialize/deserialize this state object)
I realize that I might be pushing the language limits like this, but I hope
there is a solution.
On Wed, 29 Jul 2020 at 22:28, <bil at ccrma.stanford.edu> wrote:
> "readable" in this context means readable by s7. So, yes, that's about
> what I'd
> expect. You can do this more simply:
> (define *subnamespace* (inlet :nested-curlet (inlet :nested 1)))
> and to print it:
> (display (*subnamespace* :nested-curlet))
> which gives:
> (inlet 'nested 1)
> and similarly with (format #f "~S" (*sub...))
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cmdist