6
$\begingroup$

Bug introduced before 12.1.0, fixed in 13.3.0 [CASE:4972508]


When debugging I found the following peculiar behaviour of Information:

$Version
Do[
    Remove["Global`*"]//Quiet;
    Information@ToExpression@str;
    Names["Global`*"]//Sow,
    {str,Alphabet[]}
]//Reap//Last//First//Column
Remove["Global`*"]//Quiet;

enter image description here

Other context is ok: enter image description here

Here is the result from my friend. enter image description here

Where are these unexpected symbols coming from?

$\endgroup$
8
  • $\begingroup$ What is your question? Why do you find this peculiar? $\endgroup$
    – lericr
    Commented Aug 10, 2022 at 19:16
  • 1
    $\begingroup$ @lericr I'm also unsure about the question, but the creation of seemingly random symbols in the global context is indeed unexpected... $\endgroup$
    – Lukas Lang
    Commented Aug 10, 2022 at 20:10
  • $\begingroup$ Well, they're clearly not random. My assumption is that there is work going on that inspects what you "type" for the purpose of anticipating computational needs. Totally a guess. Don't get me wrong, I wouldn't have guessed that this happens, but seeing it happen doesn't cause much surprise for me. $\endgroup$
    – lericr
    Commented Aug 10, 2022 at 20:48
  • $\begingroup$ But I'm also pointing out that you didn't ask a question. You sort of made a judgment ("peculiar"), but that's an opinion that's not really relevant. Is your question simply "why do symbols get added to Global context?" If so, just ask. Also, a simpler example would suffice to motivate the question. But maybe you have a more specific/nuanced question. $\endgroup$
    – lericr
    Commented Aug 10, 2022 at 20:49
  • 1
    $\begingroup$ You can use $NewSymbol to investigate this problem, this make it possible to see what symbols (whetherever they are in Global ) are created around the time of creation of Global` symbols. $\endgroup$
    – rnotlnglgq
    Commented Sep 29, 2022 at 13:10

1 Answer 1

2
$\begingroup$

This is due to usage message, with which Information attempts to provide for user.

tmp`list1 = Reap[Do[
    Remove["Global`*"]//Quiet;
    Information@ToExpression@str;
    Names["Global`*"]//Sow,
    {str, Alphabet[]}
]][[2,1]];
Remove["Global`*"]//Quiet;
tmp`list2 = Reap[Do[
    Remove["Global`*"]//Quiet;
    MessageName[Evaluate@ToExpression@str, "usage"];
    Names["Global`*"]//Sow,
    {str, Alphabet[]}
]][[2,1]];
tmp`list1 === tmp`list2
(* True *)

These symbols seems all to be obsolete symbols with usage messages, even for those in Global:

In[1]:= Global`HashTable::usage

Out[1]= "HashTable is a part of the object which is returned by Dispatch."

This is from $InstallationDirectory/SystemFiles/Kernel/TextResources/ChineseSimplified/Usage.m , English and Japanese seem to not have this problem.

I've already reported this to WRI.

$\endgroup$
1
  • $\begingroup$ Thx! $NewSymbol is very useful. $\endgroup$
    – Lacia
    Commented Sep 29, 2022 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.