« first day (2837 days earlier)      last day (1664 days later) » 

2:48 AM
@Pavel I think there is a non-zero chance that Stephen thinks that...
Not high, but not zero
 
I'm pretty sure Stephen does think that and expect large parts of the wolfram site to be a notebook at some point in the future
Would actually be really nice if the documentation center was interactive
 
@Pavel They're clearly like starting towards that: reference.wolframcloud.com/cloudplatform/tutorial/…
But not there yet
 
 
3 hours later…
5:33 AM
@b3m2a1 @HenrikSchumacher 2h to the end of the bounty mathematica.stackexchange.com/q/194954/5478
 
@Kuba I'm not sure I could think up a good enough example in time :| It will help a lot if you use things like Normal to canonicalize an Association into an Options list but Normal wants to recurse into your array to try to normalize it or if you had, say, a SparseArray inside you wanted to protect.
 
@b3m2a1 is the part about options addressed to me? :P
 
It can really help performance if you use Hold to protect data from being transformed or looked into, but in general Mathematica just holds a pointer to an internal Expression object
Just a few comments on the question but I won't have time to answer it properly :)
 
You can start a sketch and finish later, at least it will be what I hope for
To me it feels important because I always thought about Hold attributes as a simpler version of pass by reference/pointer.
Your and Henrik's comments change a lot.
 
 
2 hours later…
8:02 AM
I have never understood what Hold and related functions actually do, I'm not sure I've ever used them...
 
 
5 hours later…
1:23 PM
@CarlLange Basically ensure no eval. Here's a usage I cooked into this answer: mathematica.stackexchange.com/a/208490/38205
doASymbolicThing~SetAttributes~HoldAll
$defaultSymbolList = Thread@Hold[{x, y, z, a, b, c}];
doASymbolicThing[symbolicExpr_,
  symbols1 : {__Symbol},
  symbol2_Symbol
  ] :=
 Replace[
  Thread[
   DeleteDuplicates@
    Join[Thread[Hold[symbols1]], $defaultSymbolList, {Hold[symbol2]}],
   Hold
   ],
  Hold[symList : {__Symbol}] :>
   Block[symList,
    processSymbolicExprSafely[symbolicExpr, symList]
    ]
  ]
Then consider this:
processSymbolicExprSafely~SetAttributes~HoldAll
doASymbolicThing[x^2, {x}, y]

processSymbolicExprSafely[x^2, {x, y, z, a, b, c}]
We can see that we were safely able to remove duplicate symbols and also make sure that if x had a value it wouldn't be applied
That pattern Replace[Thread[prepHeldExprs[heldStuff...], Hold], Hold[{heldStuffNew...}:>...] is one I actually use pretty often
 
 
4 hours later…
5:20 PM
@CarlLange I find Hold useful to pass a variable "by reference" to a function.
 
6:05 PM
@gdelfino the big thing is that "by reference" has performance implications in C and friends, but not in Mathematica. Basically a Symbol can just be a handle to an internal Expression and to modify it in place, even though of course a Symbol is also just an internal Expression object.
 
 
2 hours later…
8:17 PM
I know several power users who hang around here may be interested in resources.wolframcloud.com/FunctionRepository/resources/…
To register extensions for custom formats
 
 
2 hours later…
9:58 PM
@CarlLange I'm sure you already know what they do, but you may not be aware that you know.
Look at this simple piece
x = 2;
x^2 + 3
Plot[x^2 + 3, {x, -2, 2}]
When x^2+3 is 7, why doesn't the Plot expression show a straight line at y=7?
The answer is that it doesn't evaluate the x^2+3 inside Plot: It holds the argument unevaluated.
There are roughly two different classes of symbols inside Mathematica:

1. HoldFirst, HoldAll, HoldRest, SequenceHold, HoldAllComplete are Attributes you can use for your function to tell them that `f[args]` should not evaluate its arguments in the usual way. It's how, e.g. `Plot` does what it does.
2. Hold, HoldForm, HoldPattern, Evaluate, Unevaluated, Defer, ... are functions you can use directly in your code to change the normal way of evaluation.
That's the whole story.
 
10:49 PM
@halirutan That's extremely helpful and a simple explanation, thank you! Now I am aware that I know what they do!
And thanks also to @b3m2a1 and @gdelfino, also helped me understand a lot, thank you :)
 
@CarlLange Yep, and when you hit a road-block, you will know that these things exists and can look into how they might help to solve your problem. Until then, no need to dig deep into this.
 
100% unrelated (including to WL) but I did a cool thing! twitter.com/csl_/status/1187860638485434368 Ogham stones are standing stones in Ireland that have a language inscribed on them. They did a big photogrammetry thing a few years ago and released all the models as open data so I thought it would be cool to print them all!
(It would be really great to have mesh simplification in WL, I wonder when that's coming. A pretty big hole in the MeshRegion functionality IMO)
@halirutan Yeah, that's exactly how I've been approaching it (with the assumption that someone here would tell me that Hold is the way to fix whatever problem I was having 😉)
 

« first day (2837 days earlier)      last day (1664 days later) »