I was thinking about getmemloc to return the real memory address and not<div>finding the conses in the expr</div><div><br></div><div>I am thinking about something like C pointers</div><div><br></div><div>Taoufik<br><div><div>
<br><div class="gmail_quote">On Sun, Sep 30, 2012 at 11:38 AM, Pascal J. Bourguignon <span dir="ltr"><<a href="mailto:pjb@informatimago.com" target="_blank">pjb@informatimago.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Taoufik Dachraoui <<a href="mailto:dachraoui.taoufik@gmail.com">dachraoui.taoufik@gmail.com</a>> writes:<br>
<br>
> is it possible to have something like this:<br>
><br>
> (let ((a '(#1=expr #1#))<br>
> (setmemloc (getmemloc (car a)) (eval (car a))))<br>
<br>
</div>So it's Sunday, brains are sleeping…<br>
<br>
What do you think<br>
<div class="im"><br>
> (let* ((form '#1=(+ 1 2))<br>
> (nv (eval form))<br>
> (sexp '(#1# 3 #1# #(4 #1# #(5 #1# 6) #1#))))<br>
> (values (mapcar (lambda (g.s) (funcall (cdr g.s) nv))<br>
> (find-all-places sexp form))<br>
> sexp))<br>
<br>
</div>is?<br>
<br>
(defun getmemloc (sexp form)<br>
(find-all-places sexp form))<br>
<br>
(defun setmemloc (places new-value)<br>
(mapcar (lambda (g.s) (funcall (cdr g.s) new-value)) places))<br>
<br>
(let ((a '(#1=(+ 1 2) 3 #1# #(4 #1# #(5 #1# 6) #1#))))<br>
(setmemloc (getmemloc a (car a)) (eval (car a)))<br>
<div class="im HOEnZb"> a)<br>
--> (3 3 3 #(4 3 #(5 3 6) 3))<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
__Pascal Bourguignon__ <a href="http://www.informatimago.com/" target="_blank">http://www.informatimago.com/</a><br>
A bad day in () is better than a good day in {}.<br>
<br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" target="_blank">http://clozure.com/mailman/listinfo/openmcl-devel</a><br>
</div></div></blockquote></div><br></div></div></div>