Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7430 > unrolled thread

Re: Why does Manipulate leak global symbols? (Potential bug here?)

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-12-25 11:35 +0000
Last post2011-12-30 12:10 +0000
Articles 5 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Why does Manipulate leak global symbols?  (Potential bug here?) Bill Rowe <readnews@sbcglobal.net> - 2011-12-25 11:35 +0000
    Re: Why does Manipulate leak global symbols? (Potential bug here?) David Reiss <dbreiss@gmail.com> - 2011-12-28 10:17 +0000
      Re: Why does Manipulate leak global symbols? (Potential bug here?) Szabolcs Horvát <szhorvat@gmail.com> - 2011-12-29 07:55 +0000
        Re: Why does Manipulate leak global symbols? (Potential bug here?) David Reiss <dbreiss@gmail.com> - 2011-12-30 12:10 +0000
        Re: Why does Manipulate leak global symbols? (Potential bug here?) David Reiss <dbreiss@gmail.com> - 2011-12-30 12:10 +0000

#7430 — Re: Why does Manipulate leak global symbols? (Potential bug here?)

FromBill Rowe <readnews@sbcglobal.net>
Date2011-12-25 11:35 +0000
SubjectRe: Why does Manipulate leak global symbols? (Potential bug here?)
Message-ID<jd71p5$140$1@smc.vnet.net>
On 12/24/11 at 7:08 AM, szhorvat@gmail.com (Szabolcs) wrote:

>It appears that in Mathematica 8, using Manipulate will create some
>symbols in the global context.  Let me illustrate:

>First, I use this to monitor the contents of Global` in real time:

>Dynamic@Refresh[Sort@Names["Global`*"], UpdateInterval -> 2]

>Then I evaluate Manipulate[n, {n, 1, 10}]

>Note that the following unexpected symbols have been added to the
>Global` context: BitDepth, FullScreenArea, Resolution, ScreenArea
>
>Why does this happen?  Is it a bug?  Can it cause any problems (e.g.
>if I have defined BitDepth before using Manipulate, in the belief
>that there's no such builtin)?

I can't answer as to why this happens. But I doubt that it is a
bug and it seems to have no conflict with things you define.
That is, if I first do

BitDepth=2;

then execute the code you posted in a fresh session, the value I
assigned to BitDepth is unchanged. Alternatively, if I start a
fresh session, execute the code above then type BitDepth in a
new cell, I see BitDepth is colored consistent as any undefined
symbol would be.

>This makes me feel a bit insecure.  I am not sure if I might
>inadvertently break something by defining those symbols, thinking
>that they're not used by Mathematica (since they're syntax-coloured
>blue).

It seems the best way to ensure no conflicts could occur is to
simply use a lower case letter as the first letter of the name
of anything you create.

[toc] | [next] | [standalone]


#7451 — Re: Why does Manipulate leak global symbols? (Potential bug here?)

FromDavid Reiss <dbreiss@gmail.com>
Date2011-12-28 10:17 +0000
SubjectRe: Why does Manipulate leak global symbols? (Potential bug here?)
Message-ID<jdeqc2$8op$1@smc.vnet.net>
In reply to#7430
This is presumably a bug in that what otherwise should be System
context (or some other Context) symbols are being placed into the
Global Context when they are being defined at the first instance of
the use of a Manipulate.   One also comes across this as one uses
Mathematica -- not all symbols have been properly contextified: given
how many symbols exist, it's amazing that it doesn't happen more
often.

--David




On Dec 25, 6:35 am, Bill Rowe <readn...@sbcglobal.net> wrote:
> On 12/24/11 at 7:08 AM, szhor...@gmail.com (Szabolcs) wrote:
>
> >It appears that in Mathematica 8, using Manipulate will create some
> >symbols in the global context.  Let me illustrate:
> >First, I use this to monitor the contents of Global` in real time:
> >Dynamic@Refresh[Sort@Names["Global`*"], UpdateInterval -> 2]
> >Then I evaluate Manipulate[n, {n, 1, 10}]
> >Note that the following unexpected symbols have been added to the
> >Global` context: BitDepth, FullScreenArea, Resolution, ScreenArea
>
> >Why does this happen?  Is it a bug?  Can it cause any problems (e.g.
> >if I have defined BitDepth before using Manipulate, in the belief
> >that there's no such builtin)?
>
> I can't answer as to why this happens. But I doubt that it is a
> bug and it seems to have no conflict with things you define.
> That is, if I first do
>
> BitDepth=2;
>
> then execute the code you posted in a fresh session, the value I
> assigned to BitDepth is unchanged. Alternatively, if I start a
> fresh session, execute the code above then type BitDepth in a
> new cell, I see BitDepth is colored consistent as any undefined
> symbol would be.
>
> >This makes me feel a bit insecure.  I am not sure if I might
> >inadvertently break something by defining those symbols, thinking
> >that they're not used by Mathematica (since they're syntax-coloured
> >blue).
>
> It seems the best way to ensure no conflicts could occur is to
> simply use a lower case letter as the first letter of the name
> of anything you create.

[toc] | [prev] | [next] | [standalone]


#7458 — Re: Why does Manipulate leak global symbols? (Potential bug here?)

FromSzabolcs Horvát <szhorvat@gmail.com>
Date2011-12-29 07:55 +0000
SubjectRe: Why does Manipulate leak global symbols? (Potential bug here?)
Message-ID<jdh6eb$kln$1@smc.vnet.net>
In reply to#7451
It appears these symbols are created during the formatting (display) of 
the Manipulate object, and not while the Manipulate function runs.

On 2011.12.28. 11:17, David Reiss wrote:
> This is presumably a bug in that what otherwise should be System
> context (or some other Context) symbols are being placed into the
> Global Context when they are being defined at the first instance of
> the use of a Manipulate.   One also comes across this as one uses
> Mathematica -- not all symbols have been properly contextified: given
> how many symbols exist, it's amazing that it doesn't happen more
> often.
>
> --David
>
>
>
>
> On Dec 25, 6:35 am, Bill Rowe<readn...@sbcglobal.net>  wrote:
>> On 12/24/11 at 7:08 AM, szhor...@gmail.com (Szabolcs) wrote:
>>
>>> It appears that in Mathematica 8, using Manipulate will create some
>>> symbols in the global context.  Let me illustrate:
>>> First, I use this to monitor the contents of Global` in real time:
>>> Dynamic@Refresh[Sort@Names["Global`*"], UpdateInterval ->  2]
>>> Then I evaluate Manipulate[n, {n, 1, 10}]
>>> Note that the following unexpected symbols have been added to the
>>> Global` context: BitDepth, FullScreenArea, Resolution, ScreenArea
>>
>>> Why does this happen?  Is it a bug?  Can it cause any problems (e.g.
>>> if I have defined BitDepth before using Manipulate, in the belief
>>> that there's no such builtin)?
>>
>> I can't answer as to why this happens. But I doubt that it is a
>> bug and it seems to have no conflict with things you define.
>> That is, if I first do
>>
>> BitDepth=2;
>>
>> then execute the code you posted in a fresh session, the value I
>> assigned to BitDepth is unchanged. Alternatively, if I start a
>> fresh session, execute the code above then type BitDepth in a
>> new cell, I see BitDepth is colored consistent as any undefined
>> symbol would be.
>>
>>> This makes me feel a bit insecure.  I am not sure if I might
>>> inadvertently break something by defining those symbols, thinking
>>> that they're not used by Mathematica (since they're syntax-coloured
>>> blue).
>>
>> It seems the best way to ensure no conflicts could occur is to
>> simply use a lower case letter as the first letter of the name
>> of anything you create.
>
>


-- 
Szabolcs Horvát
Mathematica QA site proposal: http://area51.stackexchange.com/proposals/37304

[toc] | [prev] | [next] | [standalone]


#7473 — Re: Why does Manipulate leak global symbols? (Potential bug here?)

FromDavid Reiss <dbreiss@gmail.com>
Date2011-12-30 12:10 +0000
SubjectRe: Why does Manipulate leak global symbols? (Potential bug here?)
Message-ID<jdk9n5$8b4$1@smc.vnet.net>
In reply to#7458
Right. My meaning was slightly fluid -- I meant that it was in the
course of the execution of the Manipulate command, but you are narrow
it down to the display of the Manipulate GUI.

Best,
David

On Dec 29, 2:55 am, Szabolcs Horv=E1t <szhor...@gmail.com> wrote:
> It appears these symbols are created during the formatting (display) of
> the Manipulate object, and not while the Manipulate function runs.
>
> On 2011.12.28. 11:17, David Reiss wrote:
>
>
>
>
> > This is presumably a bug in that what otherwise should be System
> > context (or some other Context) symbols are being placed into the
> > Global Context when they are being defined at the first instance of
> > the use of a Manipulate.   One also comes across this as one uses
> > Mathematica -- not all symbols have been properly contextified: given
> > how many symbols exist, it's amazing that it doesn't happen more
> > often.
>
> > --David
>
> > On Dec 25, 6:35 am, Bill Rowe<readn...@sbcglobal.net>  wrote:
> >> On 12/24/11 at 7:08 AM, szhor...@gmail.com (Szabolcs) wrote:
>
> >>> It appears that in Mathematica 8, using Manipulate will create some
> >>> symbols in the global context.  Let me illustrate:
> >>> First, I use this to monitor the contents of Global` in real time:
> >>> Dynamic@Refresh[Sort@Names["Global`*"], UpdateInterval ->  2]
> >>> Then I evaluate Manipulate[n, {n, 1, 10}]
> >>> Note that the following unexpected symbols have been added to the
> >>> Global` context: BitDepth, FullScreenArea, Resolution, ScreenArea
>
> >>> Why does this happen?  Is it a bug?  Can it cause any problems (e=
.g.
> >>> if I have defined BitDepth before using Manipulate, in the belief
> >>> that there's no such builtin)?
>
> >> I can't answer as to why this happens. But I doubt that it is a
> >> bug and it seems to have no conflict with things you define.
> >> That is, if I first do
>
> >> BitDepth=2;
>
> >> then execute the code you posted in a fresh session, the value I
> >> assigned to BitDepth is unchanged. Alternatively, if I start a
> >> fresh session, execute the code above then type BitDepth in a
> >> new cell, I see BitDepth is colored consistent as any undefined
> >> symbol would be.
>
> >>> This makes me feel a bit insecure.  I am not sure if I might
> >>> inadvertently break something by defining those symbols, thinking
> >>> that they're not used by Mathematica (since they're syntax-coloured
> >>> blue).
>
> >> It seems the best way to ensure no conflicts could occur is to
> >> simply use a lower case letter as the first letter of the name
> >> of anything you create.
>
> --
> Szabolcs Horv=E1t
> Mathematica QA site proposal:http://area51.stackexchange.com/proposals/37=
304

[toc] | [prev] | [next] | [standalone]


#7474 — Re: Why does Manipulate leak global symbols? (Potential bug here?)

FromDavid Reiss <dbreiss@gmail.com>
Date2011-12-30 12:10 +0000
SubjectRe: Why does Manipulate leak global symbols? (Potential bug here?)
Message-ID<jdk9o3$8ba$1@smc.vnet.net>
In reply to#7458
P.S.  I submitted this a s a bug report to WRI.

--David

On Dec 29, 2:55 am, Szabolcs Horv=E1t <szhor...@gmail.com> wrote:
> It appears these symbols are created during the formatting (display) of
> the Manipulate object, and not while the Manipulate function runs.
>
> On 2011.12.28. 11:17, David Reiss wrote:
>
>
>
>
>
>
>
>
>
> > This is presumably a bug in that what otherwise should be System
> > context (or some other Context) symbols are being placed into the
> > Global Context when they are being defined at the first instance of
> > the use of a Manipulate.   One also comes across this as one uses
> > Mathematica -- not all symbols have been properly contextified: given
> > how many symbols exist, it's amazing that it doesn't happen more
> > often.
>
> > --David
>
> > On Dec 25, 6:35 am, Bill Rowe<readn...@sbcglobal.net>  wrote:
> >> On 12/24/11 at 7:08 AM, szhor...@gmail.com (Szabolcs) wrote:
>
> >>> It appears that in Mathematica 8, using Manipulate will create some
> >>> symbols in the global context.  Let me illustrate:
> >>> First, I use this to monitor the contents of Global` in real time:
> >>> Dynamic@Refresh[Sort@Names["Global`*"], UpdateInterval ->  2]
> >>> Then I evaluate Manipulate[n, {n, 1, 10}]
> >>> Note that the following unexpected symbols have been added to the
> >>> Global` context: BitDepth, FullScreenArea, Resolution, ScreenArea
>
> >>> Why does this happen?  Is it a bug?  Can it cause any problems (e=
.g.
> >>> if I have defined BitDepth before using Manipulate, in the belief
> >>> that there's no such builtin)?
>
> >> I can't answer as to why this happens. But I doubt that it is a
> >> bug and it seems to have no conflict with things you define.
> >> That is, if I first do
>
> >> BitDepth=2;
>
> >> then execute the code you posted in a fresh session, the value I
> >> assigned to BitDepth is unchanged. Alternatively, if I start a
> >> fresh session, execute the code above then type BitDepth in a
> >> new cell, I see BitDepth is colored consistent as any undefined
> >> symbol would be.
>
> >>> This makes me feel a bit insecure.  I am not sure if I might
> >>> inadvertently break something by defining those symbols, thinking
> >>> that they're not used by Mathematica (since they're syntax-coloured
> >>> blue).
>
> >> It seems the best way to ensure no conflicts could occur is to
> >> simply use a lower case letter as the first letter of the name
> >> of anything you create.
>
> --
> Szabolcs Horv=E1t
> Mathematica QA site proposal:http://area51.stackexchange.com/proposals/37=
304

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web