unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: Transient environment with standard functions
@ 2016-06-12  0:51 Basa Centro
  2016-06-26 21:29 ` Amirouche Boubekki
  0 siblings, 1 reply; 16+ messages in thread
From: Basa Centro @ 2016-06-12  0:51 UTC (permalink / raw)
  To: matt.j.keeter; +Cc: guile-user

I did think of one project that uses a Lisp (CL) to let you do CAD in an 
Emacs REPL, rather than a GUI, which is Gendl:

Demo:
https://www.youtube.com/watch?v=yTcxNaBKTOc

Repo:
https://gitlab.common-lisp.net/gendl/gendl

If you haven't seen it, it uses a declarative syntax to avoid some of 
the sandboxing issues needed for public model "commons", and I think it 
does have a constraint solver to do something similar to your graph.  It 
has web based tool to display models in X3DOM/WebGL.   It doesn't get 
enough attention, IMO.  Again it is something I wish we had in Guile or 
at least Scheme.

I myself have contemplated using an implicit modeling backend with 
Sussman et al's. propagator concept to do the constraint solving, but 
that is a ways off I am afraid.

(Basa)



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Transient environment with standard functions
@ 2016-07-03 21:20 Blanka Herono
  0 siblings, 0 replies; 16+ messages in thread
From: Blanka Herono @ 2016-07-03 21:20 UTC (permalink / raw)
  To: amirouche, guile-user

> Why do you think Sussman et al's. propagator don't solve OP problem?

I don't think Basa was saying this, exactly.

I think Basa meant using something like Matt Keeter's project:

https://www.mattkeeter.com/projects/ao/
https://www.mattkeeter.com/projects/ao/screencast.html [video]

(which is a functional CAD modeling system using C++/Guile) as a backend (graphical kernel) for a
propagator network which solves engineering constraints.

The reason Basa said it was a ways off is that the propagator code is in MIT Scheme.  That would
mean either the code for the propagator would have to be ported or the code for Ao would be.

Ao itself is a nice project done in Guile, like OpenSCAD using Guile as a language.  Another
valid issue Basa revisited is that there would probably need to be sandboxing or a declarative
language layer to use Ao for security with shared models.  This issue was discussed a while back
on this mailing list.






^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Transient environment with standard functions
@ 2016-06-11 23:07 Basa Centro
  0 siblings, 0 replies; 16+ messages in thread
From: Basa Centro @ 2016-06-11 23:07 UTC (permalink / raw)
  To: matt.j.keeter; +Cc: guile-user

> 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)



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Transient environment with standard functions
@ 2016-05-28 20:16 Matthew Keeter
  2016-06-10 18:18 ` Basa Centro
  0 siblings, 1 reply; 16+ messages in thread
From: Matthew Keeter @ 2016-05-28 20:16 UTC (permalink / raw)
  To: guile-user

I’m trying to generate a temporary, transient environment that a useful set of functions in it.

The use case is eval’ing a set of small code strings.  Each environment needs to be
independent, so previous eval’s don’t leave anything in the environment.

I can make a dummy environment with (null-environment 5), but it’s missing everything
useful.  Calling (scheme-report-environment 5) gives me a useful environment, but the
environment is shared (so effects from one eval can carry over, which is undesirable).

Any pointers?  (resolve-module) seems like it could be useful, but the #:version argument
doesn’t seem to work.

Thanks,
Matt


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-07-03 21:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-12  0:51 Transient environment with standard functions Basa Centro
2016-06-26 21:29 ` Amirouche Boubekki
  -- strict thread matches above, loose matches on Subject: below --
2016-07-03 21:20 Blanka Herono
2016-06-11 23:07 Basa Centro
2016-05-28 20:16 Matthew Keeter
2016-06-10 18:18 ` Basa Centro
2016-06-10 18:44   ` Matthew Keeter
2016-06-10 20:39     ` Basa Centro
2016-06-10 21:11       ` Taylan Ulrich Bayırlı/Kammer
2016-06-10 22:11         ` Basa Centro
2016-06-10 22:31           ` Matthew Keeter
2016-06-10 22:49             ` Mike Gran
2016-06-10 23:08             ` Taylan Ulrich Bayırlı/Kammer
2016-06-11 15:15             ` Basa Centro
2016-06-11 19:44               ` Matthew Keeter
2016-06-10 22:35     ` Chris Vine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).