Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Running out of memory when using loop/recur and destructuring
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rich Hickey  
View profile  
 More options Nov 10 2009, 7:21 am
From: Rich Hickey <richhic...@gmail.com>
Date: Tue, 10 Nov 2009 07:21:42 -0500
Local: Tues, Nov 10 2009 7:21 am
Subject: Re: Running out of memory when using loop/recur and destructuring

On Wed, Nov 4, 2009 at 8:47 AM, Christophe Grand <christo...@cgrand.net> wrote:

> On Tue, Nov 3, 2009 at 7:27 PM, Paul  Mooser <taron...@gmail.com> wrote:

>> Ah -- I hadn't understood that when using destructuring, that
>> subsequent bindings could refer to the destructured elements. I should
>> have, since clojure "only" has let*, and this behavior seems
>> consistent with that, for binding.

>> Eeww. It seems like quite a thorny issue to solve, even if simple to
>> describe.

> Well, in truth, there's a way to fix the loop macro but it is too
> ugly: the idea is to wrap the outer let in a closure and replace the
> loop by a function, thus we could benefit from the locals clearing on
> tail call.

> The real solution would be pervasive locals clearing but I seem to
> remember Rich saying he'd like to delay such work until clojure in
> clojure.

Right - pervasive locals clearing will definitely do the trick here.
Interestingly, when I was at Microsoft and asked them about handling
this issue for the CLR they stated plainly it wasn't an issue at all -
their system can fully detect that any such references are in fact
unreachable and are subject to GC. So, in a sense, all locals clearing
on my part is a workaround for a JVM weakness in this area.

>> What's the procedure for creating a ticket for this? Is it at least
>> acknowledged that this IS a bug?

> It's better to wait for Rich's opinion on this problem before creating a ticket.

No ticket, please. This issue is well understood and has been
discussed at length.

Thanks,

Rich


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.