This is great! Thanks for improving this so much.
Noah
On Thu, Mar 1, 2012 at 6:40 PM, Mark H Weaver wrote:
> I wrote:
>> Here's a significantly refactored version of my 'tree-il->scheme'
>> improvements.
>
> and here are the actual patches, with the psyntax-pp.scm portions
> removed. "make -C
Hello,
> Sure, but things like gensym and make-prompt-tag (and (list '()) for
> creating an eq?-unique object) are artificial hygiene coming at a cost
> in symbol table and symbol generation time rather than "lexical"
> hygiene. They need _extra_ work, whereas the
> call-with-current-continuation
Noah Lavine writes:
> Oh yes, you're right. I'm sorry I missed it.
>
> I believe you can do it hygienically though. With prompts, you can use
> (make-prompt-tag) to generate a new, unique tag. With catch and throw,
> you could use (gensym) to do the same thing. You first example would
> become so
Hello,
> IIRC, the stack copying in Guile's continuation implementation is
> inevitable. Though it's inefficient, the consideration is to cooperate with
> other languages such as C.
It's inevitable in the general case, where the continuation might
return multiple times.
However, in this situatio
On Fri, Mar 2, 2012 at 8:00 AM, David Kastrup wrote:
>
> Hi,
>
> I am just meddling around with coding and have come up with the
> following:
>
> (define-public (find-child music predicate)
> "Find the first node in @var{music} that satisfies @var{predicate}."
> (catch 'music-found
> (l
Oh yes, you're right. I'm sorry I missed it.
I believe you can do it hygienically though. With prompts, you can use
(make-prompt-tag) to generate a new, unique tag. With catch and throw,
you could use (gensym) to do the same thing. You first example would
become something like
(define-public (fin
Noah Lavine writes:
> On Thu, Mar 1, 2012 at 7:00 PM, David Kastrup wrote:
>>
>> Hi,
>>
>> I am just meddling around with coding and have come up with the
>> following:
>>
>> (define-public (find-child music predicate)
>> "Find the first node in @var{music} that satisfies @var{predicate}."
>>
If I understand correctly, you only need to call the continuation
once. Is that right?
In that case, I think you could use either catch and throw or prompts.
(And catch and throw are implemented with prompts, so really, you can
just choose how you want to use prompts.)
Noah
On Thu, Mar 1, 2012 a
Hi,
I am just meddling around with coding and have come up with the
following:
(define-public (find-child music predicate)
"Find the first node in @var{music} that satisfies @var{predicate}."
(catch 'music-found
(lambda ()
(fold-some-music predicate
I wrote:
> Here's a significantly refactored version of my 'tree-il->scheme'
> improvements.
and here are the actual patches, with the psyntax-pp.scm portions
removed. "make -C module ice-9/psyntax-pp.scm.gen" to regenerate.
Mark
>From bcd0547d8ab602b6d94f3cba29982e037a6b7505 Mon Sep 17 0
Hello all,
Here's a significantly refactored version of my 'tree-il->scheme'
improvements. In addition the previous features, it can now produce
'case' statements, named-let, internal defines, procedure documentation
strings, and various other improvements. It now works mostly in a
bottom-up fas
Hi,
Andy Wingo skribis:
> On Sun 26 Feb 2012 23:03, l...@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo skribis:
>>
>>> + if (scm_ilength (scm_all_threads ()) != 1)
>>> +/* Other threads may be holding on to resources that Guile needs --
>>> + it is not safe to permit
Hi!
Andy Wingo skribis:
> On Sun 26 Feb 2012 23:00, l...@gnu.org (Ludovic Courtès) writes:
[...]
>> When the only threads are the main thread
>> and the signal thread, everything’s alright. For example, this works
>> fine on GNU/Linux:
>>
>> (let ((p (primitive-fork)))
>> (case p
>> ((0
Hi!
Andy Wingo skribis:
> The solution is, besides just avoiding fork() and threads, to take locks
> on all interesting data structures when you fork(). Fortunately there
> are not too many, and most locks are not nested, so it seems to be a
> doable thing. In wip-threads-and-fork, I added a s
Hello!
Mark H Weaver skribis:
> Andy Wingo writes:
>> On Fri 17 Feb 2012 12:00, l...@gnu.org (Ludovic Courtès) writes:
>>
>>> Commit f9685f437312ea790981373ddc375b2a26ba9c4f changes
>>> ‘build-lexical-var’ like this:
>>>
>>> (define-syntax-rule (build-lexical-var src id)
>>> - (gensym
15 matches
Mail list logo