Re: Transient environment with standard functions

2016-07-03 Thread Blanka Herono
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 f

Re: Transient environment with standard functions

2016-06-26 Thread Amirouche Boubekki
On 2016-06-12 02:51, Basa Centro wrote: 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. Why do you think Sussman et al's. propagator don't solve OP problem?

Re: Transient environment with standard functions

2016-06-11 Thread Basa Centro
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

Re: Transient environment with standard functions

2016-06-11 Thread Basa Centro
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 pr

Re: Transient environment with standard functions

2016-06-11 Thread Matthew Keeter
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 p

Re: Transient environment with standard functions

2016-06-11 Thread Basa Centro
It seems in essence you are building up a Scheme expression using the graph and the code snippets and evaluating that expression. If this is the case, do you even need to use a module system and/or to explicitly create environments? Prima facie, it looks like you are trying to reinvent the wheel.

Re: Transient environment with standard functions

2016-06-10 Thread Taylan Ulrich Bayırlı/Kammer
Matthew Keeter writes: > However, if I make an empty environment with (null-environment), it > doesn’t have useful functions like + and *; looks like (make-module) > has the same issue. Adding the (guile) module to the environment is going to provide a sane base environment. Let's implement som

Re: Transient environment with standard functions

2016-06-10 Thread Mike Gran
> On Friday, June 10, 2016 3:31 PM, Matthew Keeter > wrote: > > The specific use case is for dataflow graphs, where you’re evaluating a > > bunch of > small > snippets of code that can refer to each other by name. > > I’d like to make an environment in which the variables in the same subg

Re: Transient environment with standard functions

2016-06-10 Thread Chris Vine
On Fri, 10 Jun 2016 14:44:43 -0400 Matthew Keeter wrote: > Thanks for the reply! > > You’ll be sad to hear that I’ve solved the problem by switching to > Racket – (make-base-namespace) creates the kind of temporary > environment I needed, and multiple calls produce multiple independent > namespac

Re: Transient environment with standard functions

2016-06-10 Thread Matthew Keeter
The specific use case is for dataflow graphs, where you’re evaluating a bunch of small snippets of code that can refer to each other by name. I’d like to make an environment in which the variables in the same subgraph are exposed as no-argument thunks. For example, let’s say I have one subgraph

Re: Transient environment with standard functions

2016-06-10 Thread Basa Centro
> First of all: is the "sandboxing" aspect of these environment important? Taylan, Thanks, that's exactly what I meant by "motivation" in my first reply. (There was a recent, 6 months ago or so, thread on sandboxing in guile-user by the way.) Was Matt trying to prevent _access_ (inaccessible vs.

Re: Transient environment with standard functions

2016-06-10 Thread Taylan Ulrich Bayırlı/Kammer
Basa Centro writes: > Matt and List, > > As a matter of fact, I've been thinking about defecting to MIT/GNU > Scheme if I don't get better support for scmutils and C++ FFI. :) > > Come on now Guilers, we can't have people defecting to Racket. > > Is there equivalent functionality in Guile to Rack

Re: Transient environment with standard functions

2016-06-10 Thread Basa Centro
Matt and List, As a matter of fact, I've been thinking about defecting to MIT/GNU Scheme if I don't get better support for scmutils and C++ FFI. :) Come on now Guilers, we can't have people defecting to Racket. Is there equivalent functionality in Guile to Racket's make-base-namespace, as Matt n

Re: Transient environment with standard functions

2016-06-10 Thread Matthew Keeter
Thanks for the reply! You’ll be sad to hear that I’ve solved the problem by switching to Racket – (make-base-namespace) creates the kind of temporary environment I needed, and multiple calls produce multiple independent namespaces. -Matt On Jun 10, 2016, at 2:18 PM, Basa Centro wrote: > Hi Mat

Re: Transient environment with standard functions

2016-06-10 Thread Basa Centro
Hi Matthew, [I know this reply is a little delayed. Please let us know how you did it if you have already solved the problem.] Are you using eval-string? https://www.gnu.org/software/guile/manual/html_node/Fly-Evaluation.html#Fly-Evaluation It might help for you to post a minimal code sample o

Transient environment with standard functions

2016-05-28 Thread Matthew Keeter
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-