16 questions linked to/from Understanding Villegas-Gayley
83 views

How to make a contextual variable?

I have a question that would be trivial in OOP, but I am a newbie to programming in Mathematica, so I'm wondering how to deal with it. Basically, I want to create a package which basically involves a ...
631 views

Prevent graphics from rendering inside a held expression

Assuming each odd line is input I would like the even lines to be the output of the following lines. In the above the Graphics are inside ...
177 views

How to prevent Mathematica from complete evaluation of special functions?

Recently I tried to check a result of integration which should be a linear combination of the Riemann $\zeta\;$-function at various arguments, the coefficients of the combination being of primary ...
6k views

What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

Note: I put Simon's implementation on GitHub. Contributions welcome! When trying to read the definition of already defined (package or built-in) symbols using ...
131k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
2k views

How to perform a depth-first preorder traversal of an expression?

Mathematica provides functions that perform a depth-first postorder traversal, or which use such a traversal, including: Scan, ...
179 views

Unexpected behavior when directly assigning to DownValues

I'm encountering some unexpected behavior when assigning to DownValues. When I assign two definitions for test as below, ...
521 views

Mathematica unable to solve easy differential equation $y''+y\,y'=0$ with initial conditions $y(0)=1, y'(0)=-1$

Trying to solve the following: DSolve[{y''[x] + y[x] y'[x] == 0, y == 1, y' == -1}, y[x], x] leads Mathematica to declare that no analytic solution exists <...
208 views

ConversionRules and style inheritance

Take the LaTeX-Article stylesheet stylesheet = FileNameJoin[{"Article","LaTeX-Article.nb"}]; Compare these outputs ...
331 views

Why do subsequent evaluations seem to be stopped by a False Condition (/;)?

Exploring another problem and this example of @halirutan, I came across an evaluation behavior I don't understand. When g[] below is evaluated the first time, <...
276 views

How to find out what files are touched when Get is called?

Is there a way to capture all package files touched whenever a package is called via Get, Needs, ...
165 views

Why does Block reset Attributes?

Not even "formal symbols" such as \[FormalX] are guaranteed to always be symbolic. Their Protected argument is forgotten when ...
1k views

Placement of Condition /; expressions

It is my practice to place Condition expressions on the left side of := and :> in almost ...