guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transient environment with standard functions


From: Basa Centro
Subject: Re: Transient environment with standard functions
Date: Sat, 11 Jun 2016 23:07:47 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Yes, the graph is equivalent to an s-expr (with subgraphs being nested scopes).

The reason that I’m not just representing the graph as a single expression is
for
efficiency – I’m doing incremental updates and change tracking, so you can
update
one of the node's expressions and have the changes propagate through the graph
with a minimum number of re-evaluations.

A similar Python engine is documented here:
http://www.mattkeeter.com/projects/graph/
Matt [and List],

Sorry if your reply bounced, I was having email issues today. :(

Wow, I think I finally comprehend what you are doing. I seem to remember looking at the code for a 3D scene graph in Scheme--where escapes me right now. I think they used Scheme "promises" to cache values, again a lambda technique.

In any event, if you are translating from Python, I would encourage you to rethink what you are doing in light of Scheme's facilities. A constraint solver might be straight-forward, as well. Scheme is really good at what you are trying to do, built-in.

[
And if anyone else has ideas on this topic of optimizing the update of an S-exp as Matt has explained--I would be interested too. It would be awesome to have something like Matt's Antimony done in Guile, trust me:

http://www.mattkeeter.com/projects/antimony/3/
]

Have fun,

(Basa)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]