Message from discussion
Weak references. Does node-weak and other simliar libraries, add significant overhead?
Received: by 10.66.72.42 with SMTP id a10mr4521251pav.34.1351104967273;
Wed, 24 Oct 2012 11:56:07 -0700 (PDT)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.68.236.33 with SMTP id ur1ls8308266pbc.2.gmail; Wed, 24 Oct
2012 11:55:54 -0700 (PDT)
Received: by 10.68.242.74 with SMTP id wo10mr5269822pbc.9.1351104954061;
Wed, 24 Oct 2012 11:55:54 -0700 (PDT)
Date: Wed, 24 Oct 2012 11:55:53 -0700 (PDT)
From: Bradley Meck <bradley.m...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <32cf9a35-a729-4065-9b2b-9c38ec6e0bb0@googlegroups.com>
In-Reply-To: <e24130cb-a83d-4404-962e-fd92022b8fd3@googlegroups.com>
References: <0707b882-ef28-4f54-ad36-e9eaf03651f0@googlegroups.com>
<4D68974870B54DB382F907695BE70046@thinkdigital.pt>
<CAN5MXofucy7fWOBbCmQH-w-Tq0OKWr3FUmEeftm-FdBB2QHFKw@mail.gmail.com>
<cb8bfce0-db08-48dd-9838-197d20d1e060@googlegroups.com>
<2DAF423944F64939A68CBF473E64C87B@gmail.com>
<a599948b-302a-42e4-894a-12c4be283017@googlegroups.com>
<e24130cb-a83d-4404-962e-fd92022b8fd3@googlegroups.com>
Subject: Re: [nodejs] Weak references. Does node-weak and other simliar
libraries, add significant overhead?
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_461_4007093.1351104953609"
------=_Part_461_4007093.1351104953609
Content-Type: multipart/alternative;
boundary="----=_Part_462_3477562.1351104953609"
------=_Part_462_3477562.1351104953609
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Take it to a different topic if it becomes unrelated also.
On Wednesday, October 24, 2012 1:15:49 PM UTC-5, Marco Rogers wrote:
>
> Can you elaborate on "domains just feel wrong". I'm interested in how the
> domains api comes across. I've expressed my concerns with it in the past.
>
> :Marco
>
> On Wednesday, October 24, 2012 7:28:06 AM UTC-7, Fredrik O wrote:
>>
>> Thank you Rick, it was good to know.
>>
>> Just for curiosity, what do you people thought, to emulate RAII within
>> JavaScript for those object which need some clean up? Am I doing it
>> completely wrong? I mean, an exception can easily get thrown in JavaScript
>> and try..catch cannot catch error within callbacks. And domains just feel
>> wrong. For those who does not know what RAII is, it is an automatic way to
>> invoke a destructor when the object get out of reach, by normal control
>> flow or an exception get thrown. See wikipedia:
>> http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization
>>
>> And Nathan (or if there is someone else which can do a serious guess),
>> because you have not answered I assume it will be fine to use your library
>> heavily. With heavily do I mean having around 10 000 concurrent weak
>> objects alive. If you believe it would not be case, please let me know.
>>
>> Thanks in advance.
>>
>> Den tisdagen den 23:e oktober 2012 kl. 01:20:19 UTC+2 skrev Rick Waldron:
>>>
>>>
>>> On Monday, October 22, 2012 at 5:22 PM, Fredrik O wrote:
>>>
>>>
>>>
>>> PS. How would weak maps be used to call a custom function on garbage
>>> collection?
>>>
>>>
>>> I think you've misunderstood, WeakMaps don't facilitate this
>>>
>>> Rick
>>>
>>>
>>>
>>>
>>>
>>> What are your thoughts?
>>>
>>> Thanks in advance!
>>>
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to nod...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+un...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>>
>>>
------=_Part_462_3477562.1351104953609
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Take it to a different topic if it becomes unrelated also.<br><br>On Wednes=
day, October 24, 2012 1:15:49 PM UTC-5, Marco Rogers wrote:<blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c=
cc solid;padding-left: 1ex;">Can you elaborate on "domains just feel wrong"=
. I'm interested in how the domains api comes across. I've expressed my con=
cerns with it in the past.<div><br></div><div>:Marco<br><br>On Wednesday, O=
ctober 24, 2012 7:28:06 AM UTC-7, Fredrik O wrote:<blockquote class=3D"gmai=
l_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">Thank you Rick, it was good to know.<br><br>Just for curiosi=
ty, what do you people thought, to emulate RAII within JavaScript for those=
object which need some clean up? Am I doing it completely wrong? I mean, a=
n exception can easily get thrown in JavaScript and try..catch cannot catch=
error within callbacks. And domains just feel wrong. For those who does no=
t know what RAII is, it is an automatic way to invoke a destructor when the=
object get out of reach, by normal control flow or an exception get thrown=
. See wikipedia: <a href=3D"http://en.wikipedia.org/wiki/Resource_Acquisiti=
on_Is_Initialization" target=3D"_blank">http://en.wikipedia.org/wiki/<wbr>R=
esource_Acquisition_Is_<wbr>Initialization</a><br><br>And Nathan (or if the=
re is someone else which can do a serious guess), because you have not answ=
ered I assume it will be fine to use your library heavily. With heavily do =
I mean having around 10 000 concurrent weak objects alive. If you believe i=
t would not be case, please let me know.<br><br>Thanks in advance.<br><br>D=
en tisdagen den 23:e oktober 2012 kl. 01:20:19 UTC+2 skrev Rick Waldron:<bl=
ockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">
<div><br></div>
=20
<p style=3D"color:#a0a0a8">On Monday, October 22, 2012 at 5:22 PM, Fred=
rik O wrote:</p>
<blockquote type=3D"cite" style=3D"border-left-style:solid;border-width=
:1px;margin-left:0px;padding-left:10px">
<div><div><br><br>PS. How would weak maps be used to call a custom =
function on garbage collection?</div></div></blockquote><div><br></div><div=
>I think you've misunderstood, WeakMaps don't facilitate this</div><div><br=
></div><div>Rick</div><div> </div><blockquote type=3D"cite" style=3D"b=
order-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">=
<div><div><span style=3D"font-size:16.5px"> </span></div></div></block=
quote><blockquote type=3D"cite" style=3D"border-left-style:solid;border-wid=
th:1px;margin-left:0px;padding-left:10px"><div><div><br>What are your thoug=
hts?<br><br>Thanks in advance!<br><br>
<p></p>
-- <br>
Job Board: <a href=3D"http://jobs.nodejs.org/" target=3D"_blank">http://job=
s.nodejs.org/</a><br>
Posting guidelines: <a href=3D"https://github.com/joyent/node/wiki/Mailing-=
List-Posting-Guidelines" target=3D"_blank">https://github.com/joyent/<wbr>n=
ode/wiki/Mailing-List-<wbr>Posting-Guidelines</a><br>
You received this message because you are subscribed to the Google<br>
Groups "nodejs" group.<br>
To post to this group, send email to <a>nod...@googlegroups.com</a><br>
To unsubscribe from this group, send email to<br>
<a>nodejs+un...@googlegroups.com</a><br>
For more options, visit this group at<br>
<a href=3D"http://groups.google.com/group/nodejs?hl=3Den?hl=3Den" target=3D=
"_blank">http://groups.google.com/<wbr>group/nodejs?hl=3Den?hl=3Den</a><br>
</div></div>
=20
=20
=20
=20
</blockquote>
=20
<div>
<br>
</div>
</blockquote></blockquote></div></blockquote>
------=_Part_462_3477562.1351104953609--
------=_Part_461_4007093.1351104953609--