In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m
. I think this could provide a nice resource.
-
$\begingroup$ I think this should probably be restricted to bug fixes and workarounds or it becomes too broad. $\endgroup$– Mr.WizardCommented Aug 16, 2013 at 21:54
-
$\begingroup$ Should these be version-tagged? $\endgroup$– Yves KlettCommented Aug 17, 2013 at 16:54
-
$\begingroup$ @Yves I think they should, and so far it looks like everyone has already done that. $\endgroup$– Mr.WizardCommented Aug 17, 2013 at 20:51
-
$\begingroup$ Tangentially related: (56728) $\endgroup$– Mr.WizardCommented Feb 12, 2015 at 10:38
3 Answers
Fixes by Mathematica version. Note that unfixed bugs may apply to earlier versions as well; e.g. TableAlignments -> Left not working also applies to version 7.
Version 10.1
Fix syntax highlighting in
Trace
:Unprotect[Trace]; SyntaxInformation[Trace] = {"ArgumentsPattern" -> {_, _., OptionsPattern[]}}; Protect[Trace];
Fix Incompatibility of Row and TeXForm: (v9+)
BoxForm`$UseTemplateSlotSequenceForRow = False;
Fix SetOptions for CoordinatesToolOptions for DateListPlot?:
DateListPlot; (* preload; do not remove! *) With[ {dv := DownValues[Graphics`DateListPlotDump`iDateListPlot]}, dv = dv /. (fr : FilterRules)[a : Graphics`DateListPlotDump`opts, b_Options] :> fr[Join[a, Options @ Graphics`DateListPlotDump`caller], b] ];
Fix TableAlignments -> Left not working
- code too long to include; provided in answer linked above
Fix In 10.1.0 BenchmarkPlot doesn't work?
- see answer to link above
Fix Strange Error on Fresh Kernel (10.2):
With[ {dv := DownValues @ PacletManager`Package`loadWolframLanguageCode}, dv = dv /. wl : HoldPattern[ToString @ $SystemWordLength] :> RuleCondition[wl]; ]
Fix Problems with Displaying Output for Summation
InactiveDump`assembleInactiveSumProduct[ {args_, disp_, interp_, char_, tag_, tooltip_, fmt_}] := TemplateBox[ args, tag, DisplayFunction -> Function[disp], InterpretationFunction -> Function[interp], SyntaxForm -> char ]
-
Graphics`ArrayPlotDump`Private`stripOptions[opt2___, OP_] := Module[{opt = Flatten @ {opt2}}, Delete[opt, Position[opt, g_?(System`Utilities`StringName[#1] === System`Utilities`StringName[OP] &) -> _, {1} ] ] ];
Fix Conversion to TeX results in infinite recursion
Convert`TeX`ExpressionToTeX; (* preload; do not remove! *) Begin["System`Convert`"] With[{DV := DownValues[`TeXFormDump`maketex], RLS := `CommonDump`RemoveLinearSyntax}, DV = DV /. Verbatim[RLS][arg_, `CommonDump`Recursive -> val_] :> RLS[arg, `CommonDump`ConvertRecursive -> val] ] End[]
Version 10.0
Fix HoldForm doesn't hold form:
(fixed in 10.0.1)
Visualization`Utilities`OptionsDump`unitFormStringQ[HoldForm[s_]] = False
Fix BitShiftRight produces incorrect results in Version 10:
(fixed in 10.0.2)
SetSystemOptions["ParallelOptions" -> {"MachineFunctionParallelThreshold2" -> Infinity}]
Fix A bug in Commonest in version 10 (see link for an additional performance enhancement):
(fixed in 10.0.2)
Statistics`DescriptiveDump`oCommonestSetLength[list_, 1] := Commonest[list][[{1}]]
Fix 10.0.2 mapping Association to Dataset warning:
(fixed in 10.1.0)
Begin["TypeSystem`Inference`PackagePrivate`"]; exprType[e_Association] := If[AssociationQ@Unevaluated@e, Struct@MapUn[exprType, e], TypeSystem`UnknownType]; End[];
Version 7
As a version 7 user these likely don't apply to most users but here are mine:
Fix Symbol name slow-down weirdness (hashing problem?):
SetSystemOptions["NeedNotReevaluateOptions"->{"UseSymbolLists"->True}];
Fix a bug in
FullSimplify
:Unprotect[Holonomic`HolonomicFullSimplify];Clear[Holonomic`HolonomicFullSimplify];
Prevent Mathematica from eating all my RAM and freezing (most of the time):
$Pre = Function[Null, MemoryConstrained[Unevaluated @ #, 2^32, "Memory Exceeded"], HoldAll]
-
1$\begingroup$ It would probably be good to include a version check before applying any fixes. $\endgroup$– SzabolcsCommented Jan 19, 2015 at 16:21
-
$\begingroup$ @Szabolcs Would you elaborate on that, please? $\endgroup$ Commented Jan 19, 2015 at 16:22
-
1$\begingroup$
If[$VersionNumber == (* number *), ( * do this *)]
was probably meant… $\endgroup$ Commented Jun 19, 2015 at 21:40 -
$\begingroup$ @J.M. Perhaps so. I prefer to maintain the fixes manually. $\endgroup$ Commented Jun 19, 2015 at 21:41
-
1$\begingroup$ @Mr.Wizard Yes, that's what I meant. It's critical when one has multiple versions installed. Doing this without a version check is dangerous. Someone might copy a fix from here, forget about it, update Mathematica, then something suddenly gets broken. $\endgroup$– SzabolcsCommented Apr 10, 2019 at 11:48
Here is one that came from a Wolfram employee so it should be safe to add in version 9:
FindInstance returns Indeterminate in version 9, but not in 8
Here's a patch from Adam Strzebonski of Wolfram, which fixes a bug in RootReduce[]
in 9.0.1.
ToNumberField won't recognize Root as explicit algebraic number