Hello all,
Here's the third version of my simple `local-eval' patch.
Notable changes from last time:
* Pattern variables are now captured properly.
* `the-environment' now works as advertised within macro definitions.
* Added doc strings for `local-eval' and `local-compile'.
I am open to reimple
Hello!
Mark H Weaver skribis:
> Andy Wingo writes:
>
>> On Wed 16 Nov 2011 04:58, Mark H Weaver writes:
>>
>>> I think there are better ways to address this problem. I will explore
>>> these in another email.
>>
>> I look forward to this. Please be sure to address the following issues:
>>
>>
Mark H Weaver wrote:
> There's another option: we could properly track the compile-time
> dependencies of each module, and automatically consider a .go file stale
> if _any_ of its compile-time dependencies are newer than it.
>
> To be more specific: I think we need to record, in every syn
Andy Wingo writes:
> Then in your script you would (add-relative-load-path ".").
>
> Maybe we need an `add-to-load-path' form that handles the eval-when,
> actually, so it would be
>
> (add-to-load-path (dirname (current-source-filename)))
>
> or something like that. (We'd have to define curre
David Kastrup writes:
> Mark H Weaver writes:
>
>> Furthermore, we could provide distros with the necessary
>> infrastructure to automatically recompile guile modules as needed
>> after package upgrades.
>>
>> I know of at least one precedent for this behavior: the emacs packages
>> in Debian.
Mark H Weaver writes:
> Furthermore, we could provide distros with the necessary
> infrastructure to automatically recompile guile modules as needed
> after package upgrades.
>
> I know of at least one precedent for this behavior: the emacs packages
> in Debian. Last I checked, Debian had an ela
Andy Wingo writes:
> On Wed 16 Nov 2011 04:58, Mark H Weaver writes:
>
>> I think there are better ways to address this problem. I will explore
>> these in another email.
>
> I look forward to this. Please be sure to address the following issues:
>
> * Debian upgrading guile to a newer versi
David Kastrup writes:
> Mark H Weaver writes:
>
>> Indeed, (local-eval '(set! x 5) ) is _not_ equivalent to
>> (module-set! (current-module) 'x 5).
>
> To clarify: I was thinking about
>
> (local-eval '(set! x 5) ) vs
> (local-eval '(module-set! (current-module) 'x 5) )
Unless `module-set!' or
David Kastrup writes:
> Mark H Weaver writes:
>
>> Indeed, (local-eval '(set! x 5) ) is _not_ equivalent to
>> (module-set! (current-module) 'x 5).
>
> To clarify: I was thinking about
>
> (local-eval '(set! x 5) ) vs
> (local-eval '(module-set! (current-module) 'x 5) )
>
>> Assuming that `x' is
Mark H Weaver writes:
> Indeed, (local-eval '(set! x 5) ) is _not_ equivalent to
> (module-set! (current-module) 'x 5).
To clarify: I was thinking about
(local-eval '(set! x 5) ) vs
(local-eval '(module-set! (current-module) 'x 5) )
> Assuming that `x' is not locally bound within the captured
> David Kastrup writes:
>> within local-eval, what is the return value of calling
>> (current-module)? I would expect that it is the same as outside of
>> local-eval
I wrote:
> Actually, this is not true. Within `local-eval', (current-module) is
> temporarily restored (using dynamic-wind) to th
Mark H Weaver writes:
> David Kastrup writes:
>> within local-eval, what is the return value of calling
>> (current-module)? I would expect that it is the same as outside of
>> local-eval
>
> Actually, this is not true. Within `local-eval', (current-module) is
> temporarily restored (using dyn
Ok, I have tried follow your suggestion,
here is what I could make,
(with-fluids ((*macro-lookup*
(lambda (e)
(cond
((number? e)
(pk w))
((symbol? e)
Hi Mark,
On Sun 08 Jan 2012 21:39, Mark H Weaver writes:
Are there some short primitives that psyntax could export that
would make it possible to implement `the-environment' in a module?
>
>>> * The list of ordinary variables (these need to be boxed)
>>> * The list of simulated variabl
David Kastrup writes:
> within local-eval, what is the return value of calling
> (current-module)? I would expect that it is the same as outside of
> local-eval
Actually, this is not true. Within `local-eval', (current-module) is
temporarily restored (using dynamic-wind) to the module saved in
Hi Mark,
On Sun 08 Jan 2012 21:39, Mark H Weaver writes:
> Andy Wingo writes:
>> I guess it's not clear to me why you would want to force expression
>> context.
>
> If we allow definitions, then your nice equivalence
>
>== (local-eval ' (the-environment))
>
> no longer holds. Also, the use
Hi,
Sorry, forgot to respond to another bit on this subtopic:
On Sat 14 Jan 2012 16:28, Andy Wingo writes:
> On Sun 08 Jan 2012 21:39, Mark H Weaver writes:
>
> >> More importantly, is there any guarantee that mutable lexicals will
> >> continue to be represented as variable objects in future
On Sat 14 Jan 2012 16:16, David Kastrup writes:
> Andy Wingo writes:
>
>> On Sat 14 Jan 2012 09:59, David Kastrup writes:
>>
>>> so that (define x 5) inside of local-eval would _not_ be equivalent to
>>> (module-define! (current-module) 'x 5) as the first one would take the
>>> current module a
Hi Mark,
On Sun 08 Jan 2012 21:39, Mark H Weaver writes:
> Andy Wingo writes:
>>> We could change that, but I'm reluctant to make the evaluator any
>>> slower than it already is.
>>
>> Using variable objects has the possibility to make the evaluator faster,
>> actually, if at the same time we m
Hi Mark,
Thanks again for working on local-eval. I didn't like it at first, but
you did an admirable job handling all of the semantic, implementation,
and social nitty-gritties in order to solve the problem nicely.
Excellent!
If it is the case that it gets in for 2.0.4, then great. We should tr
Andy Wingo writes:
> On Sat 14 Jan 2012 09:59, David Kastrup writes:
>
>> so that (define x 5) inside of local-eval would _not_ be equivalent to
>> (module-define! (current-module) 'x 5) as the first one would take the
>> current module at the-environment time, and the second one would take
>> i
On Sat 14 Jan 2012 10:15, David Kastrup writes:
> Is there any recommended way to do the equivalent of (or (pair? x)
> (null? x))?
Not currently, no. (Interesting predicate, btw.)
Andy
--
http://wingolog.org/
On Sat 14 Jan 2012 09:59, David Kastrup writes:
> In Guilev1, the module is probably recorded as part of the
> procedure-environment. In Guilev2, a variable reference is compiled?
> How does that work when there is no such variable? It gets created
> with an undefined binding?
Guile 2.0.x reco
Mark H Weaver writes:
> FYI, bipt mentioned this bug on IRC:
>
> (compile '(cdr '(5 . #nil)) #:to 'value) => ()
> (cdr '(5 . #nil)) => #nil
>
> and I pushed the attached fix to stable-2.0.
Oh, by the way: the Lisp predicate listp (at least Elisp) is
listp is a built-in function in `C source cod
Mark H Weaver writes:
> Probably the easiest way to think about it is that (the-environment)
> acts like (list (lambda () ) ...), with one `lambda' for each
> expression that you will later pass to `local-eval'. Calling
> `local-eval' simply calls the appropriate procedure in that list.
Well, I
FYI, bipt mentioned this bug on IRC:
(compile '(cdr '(5 . #nil)) #:to 'value) => ()
(cdr '(5 . #nil)) => #nil
and I pushed the attached fix to
26 matches
Mail list logo