I found a nice bug in Mathematica 9.0.1.0. Could anyone check to reproduce it?
Create a file temp.txt with one line:
Attributes[s$] = {Temporary}
Load it into Mathematica with <<.
Now calculate:
Sum[x^(-n)*y^n, {n, 0, Infinity}]
Mathematica stops responding and the only option is to quit the kernel. You can't interrupt or abort.
Now change s to a or b in the file and repeat the above. It works!
Next put the line
Attributes[s$] = {Temporary}
directly into the notebook and calculate the sum. It works!
What is so special about temporary variable s$ loaded from the file?
I used a temporary variable s$ in one of my functions and then saved
the function to the file. Mathematica added the above line to the file.
Everything stopped working.
swill be renamed tos$to avoid name collisions (though not inModule). You should never use such names in your code or you're risking to break things. – Szabolcs Feb 07 '14 at 00:31s$, as this is reserved for internal operations. If you do, you are just asking for trouble. Did you explicitly use this symbol (s$) in your code? – Szabolcs Feb 07 '14 at 00:39s$then it's not a bug, it's user error. If you didn't then maybe. Yet you fail to tell us if you did or didn;t. – Szabolcs Feb 07 '14 at 00:59Temporarythe symbol should get removed instantly. Perhaps that's not the case if it was defined in the file? I haven't tried – Rojo Feb 07 '14 at 01:46sors$? The two are two different things. In the example you posted you are usings$, which as I said is a mistake and there's no surprise that it breaks Sum's or Get's internals. – Szabolcs Feb 07 '14 at 06:00$HistoryLength = 0;and removes even without this when the lineAttributes[s$] = {Temporary}is imported from a file usingGet. – Alexey Popkov Feb 07 '14 at 10:53