Message from discussion
Customization of evaluation for a specific custom type of object
Path: g2news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From: Vassilis Radis <rad...@gmail.com>
Newsgroups: comp.lang.lisp
Subject: Customization of evaluation for a specific custom type of object
Date: Thu, 2 Jun 2011 04:57:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <daf42286-d866-48f6-a231-458c02423b47@glegroupsg2000goo.googlegroups.com>
Reply-To: comp.lang.lisp@googlegroups.com
NNTP-Posting-Host: 62.103.74.7
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1307015854 20382 127.0.0.1 (2 Jun 2011 11:57:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 2 Jun 2011 11:57:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=62.103.74.7; posting-account=szDLMAkAAABpODCJdqzkX8M_NAMzaC3F
User-Agent: G2/1.0
I want to implement a kind of reference system like this:
Suppose that I have:
(defclass reference () ((host) (port) (file)))
and also I have:
(defun fetch-remote-value (reference) ...) which fetches and deserializes a=
lisp object.
How could I intervene in the evaluation process so as whenever a reference =
object is being evaluated, the remote value gets fetched and re-evaluated a=
gain to produce the final result?
A more elaborate description of what I want to accomplish:
Using cl-store I serialize lisp objects and send them to a remote file(or d=
b or anything) to be saved. Upon successful storage I keep the host,port an=
d file in a reference object. I would like, whenever eval gets called on a =
reference object, to first retrieve the object, and then call eval on the r=
etrieved value. Since a reference can be also serialized in other (parent) =
objects or aggregate types, I can get free on-demand recursive remote refer=
ence resolution by modyfing eval so i dont have to traverse and resolve the=
loaded object's child references myself which I suppose is a real PITA. An=
d Of course there is the option of whether , after resolution, we should r=
eplace the value or not, thus having to resolve it once or every time respe=
ctively, but if we made it an option in the reference, it would be sweeet.