37
votes
How can I adaptively simplify a curved shape?
We can use the Ramer-Douglas-Peucker algorithm to reduce the number of points. This algorithm was originally devised for processing map data.
...
34
votes
Character to replace _ in symbol names?
This has been discussed on comp.soft-sys.math.mathematica. The gist is that there are lots of Unicode characters you could use, e.g. \[LetterSpace] or ...
27
votes
Why does removing a function and defining it on the same line not work?
Executing Trace on an expression reveals what is actually happening:
...
26
votes
How to make Mathematica variables declarative instead of just-in-time?
You are looking for $NewSymbol which is run every time a new symbol is created. For example, let say you only want x, ...
19
votes
Accepted
How can I obtain a complete list of the kinds of atomic expressions in the Wolfram Language using only the language itself?
You can use EntityValue to find out what symbols can be atomic:
...
16
votes
Accepted
When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?
I'd probably use x_Symbol in a function argument to control evaluation. Otherwise, one might do the following (thanks to @Leonid for pointing out an oversight).
If ...
14
votes
Why did Mathematica choose brackets for function arguments over parentheses?
Although Chip's answer already suffices to address the question, I would like to quote here a relevant part of the dialog by Theo Gray and Jerry Glynn in their book Exploring Mathematics with ...
Community wiki
14
votes
Accepted
How to make Mathematica variables declarative instead of just-in-time?
Edit: method extended for multiple contexts and unlocking mehtod added.
Let's protect whatever is a new symbol.
In old answer I've manually excluded symbols matching ...

Kuba♦
- 136k
13
votes
Generating list of alphabet letters
Nowadays, one can use Alphabet[] along with Take[] or Part[] + ...
Community wiki
13
votes
Character to replace _ in symbol names?
The issue is that Mathematica interprets underscore as Blank and interprets my_variable as a ...
13
votes
How can I define symbols but not have them show up in the front end?
Core Function
Here's a single function that does all this coloring stuff:
...
13
votes
Accepted
Why does args symbol exist in a fresh kernel?
It's a type of otherwise harmless bug that tends to come and go with versions. I would suggest to report it to Wolfram, but also not to worry about it. Notice that the symbols have no associated ...
13
votes
What does $ mean in an output?
This usually means you've exported a local symbol from the context in which it was localized. Consider:
Module[{x}, x]
(* x$24939 *)
Your results may vary. The <...
12
votes
Bug: With[] pattern-variable renaming misses symbols within `Except`
I agree that this is a bug. However, I want to point out that this usage of Except does not seem to be allowed in older versions.
In version 9.0:
We don't get the ...
12
votes
Accepted
Defining a symbol e that represents plus-minus-one, so that e^2 == 1 and e^3 == e
A quick way is to use TagSet[] and TagSetDelayed[] to teach Power[] how to deal with your ...
12
votes
PlusMinus definition unexpectedly affects plotting
It appears that PlusMinus is the only wrapper that is not Protected:
...
12
votes
When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?
How about:
SymbolQ[_Symbol] = True
SymbolQ[_] = False
?
12
votes
Accepted
Equivalent for \hookrightarrow, ↪
You can use an empty TemplateBox to create a new operator. For example:
...
11
votes
How can I adaptively simplify a curved shape?
Here is my attempt to use ParametricPlot for obtaining an adaptive approximation of the shape. It is based on the code of glyph to ...
11
votes
How can I adaptively simplify a curved shape?
Here I present a very simple angle-based polygon reduction algorithm as described in the chapter "A Simple Algorithm" of David Eberly's "Polyline Reduction". The only addition is ...
11
votes
Accepted
1 is not the SameQ as Null, but why might 1 be Equal to Null?
=== (SameQ) tests structural equality and is meant mainly for programming uses. Like nearly all functions named as ...
11
votes
Accepted
How to list all user-defined symbols?
User defined symbols/functions are in the Global` context:
a = 1;
b[x_] := a x^2;
c[x_] := f[x];
Names["Global`*"]
{"a", "...
11
votes
How can I implement a listener variable in Mathematica?
As part of handling this for myself I wrote a package that does it. The idea was to mimic the *Var() classes in tkinter. I'll do ...
11
votes
Make symbols atomic, without losing their type
Perhaps what you want is symbolic tensors: http://reference.wolfram.com/language/tutorial/SymbolicTensors.html
...
11
votes
Accepted
Make symbols atomic, without losing their type
You could use my TensorSimplify package help with this. Install the paclet with:
...
11
votes
How to generate a horizontal histogram with words?
First of all, you don't need a Histogram, you need BarChart. Secondly, you need to massage the data slightly so each data point ...
10
votes
Accepted
Why does removing a function and defining it on the same line not work?
I use the word internal symbol rather than just symbol, to make it easier to distinguish between the name of a symbol and the internal representation of the symbol inside the kernel. I felt I should ...
10
votes
Accepted
Check if symbol is in core language
You can look it up using WolframLanguageData, which has a list of all pre-defined symbols:
...
10
votes
Accepted
Change nested list of symbols to nested list of numbers
symbols = {e4, {e200, {e1, {e11, e23}}}};
Map[FromDigits@StringDrop[SymbolName[#], 1] &, symbols, {-1}]
{4, {200, {1, {11, 23}}}}
...
10
votes
Accepted
Implement abstract algebraic structure
I decided it was worth giving another example of modern OOP in Mathematica. There will be a small amount of code, but almost all of it is boiler-plate. I use a package to handle most of the boiler ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
symbols × 340evaluation × 31
built-in-symbols × 26
functions × 23
symbolic × 22
variable-definitions × 22
contexts × 22
syntax × 19
replacement × 18
packages × 16
list-manipulation × 15
output-formatting × 15
variable × 15
function-construction × 14
string-manipulation × 14
front-end × 12
hold × 12
clear × 12
programming × 11
pattern-matching × 11
formatting × 11
scoping × 11
custom-notation × 10
equation-solving × 9
expression-manipulation × 9