« first day (1667 days earlier)      last day (2814 days later) » 

1:15 AM
@bbgodfrey I'm interested in creating a 2D electromagnetic PIC simulation for a high temperature plasma (30keV) ... do you know of any open source Mathematica codes that would be a good starting point?
 
 
3 hours later…
3:58 AM
The day a new version of MMA is touted, and instead of boasting of things like "...two man-years of effort resulting in significantly improved image recognition for dog collars..." there's "...built-in functionality for Edgeworth and saddle-point approximations for probability distributions..." I'll probably have a coronary from surprise and delight...
6
 
 
2 hours later…
5:45 AM
@ciao, you won't be having infarctions anytime soon, I think. But the pieces needed for constructing saddle-point approximants are all there; somebody just has to find the time.
 
 
3 hours later…
8:37 AM
(@J.M.) RudinShapiro is listed in docs under guide/SummaryOfNewFeaturesIn11 (link), but its code still uses strings.
 
8:55 AM
@JacobAkkerboom how to use V-G trick with a symbol that have specific down values one doesn't know?
@JacobAkkerboom Hi :)
 
@Kuba heya!
Hmm, I'm not sure, but note that you can simply find out the definitions of RudinShapiro with PrintDefinitions from GeneralUtilities`
 
@JacobAkkerboom let's say I want to Echo arguments of a given function each time it is called. But it have a long list of downvalues I don't want to care about.
@JacobAkkerboom e.g:
f[x_] := {x};
f[x_String] := {x, x};
Module[{guard},

 (f[arg_] /; ! TrueQ[guard]) := Block[{guard = True},
    Echo[{arg}]; f[arg]
    ];

 ]
f[1]
f["S"]
"S" isn't caught.
 
Ah yeah that sounds tricky
 
9:11 AM
@JacobAkkerboom worth main?
 
@Kuba I suppose so. I'm trying something to extract patterns from the DownValues now..
 
@JacobAkkerboom I was trying:
Module[{firstCall = True},

 (f /; TrueQ[firstCall]) := Block[{firstCall = False}, f@*Echo];

 ]
but I don't get why it produces an infinite loop
 
@Kuba Unfortunately it's taking me a while to understand all this again :P
 
Hmm, I really don't....
understand
@JacobAkkerboom with firstCall instead of guard it is more descriptive.
 
9:32 AM
@Kuba Possibly this is just some quirky behaviour where the behaviour of this "transparency" is not what you would expect when using definitions with OwnValues rather than DownValues
Note that a definition like x_f /; cond[x]:= code gives a definitions listed under DownValues (in case you were looking at Rojo's answer here)
Hmm here is an example of a working V-G trick with OwnValues. I was quite surprised that this did not yield an infinite iteration/recursion.
I investigated that at some point I think. It is kind of wonky that a definition like expr : g[x_] := expr; g[1] does not give an infinite iteration and the working OwnValue V-G trick relies on this. Of course something like expr : g[x_] := Identity@expr; g[1] gives an infinite recursion... but I'm confused about the relation to your code :P
 
When using LineLegend is there a way to reduce the spacing between the entries? My legend is too long and I'd rather not reduce the font size.
 
@JacobAkkerboom I feel like Rojo's answer should teach me how to solve that but I have failed to absorb that knowledge
:)
 
9:50 AM
mathematica.stackexchange.com/questions/17530/… answered my question; apparently Spacings can be used even though it doesn't show up in the documentation of things like PointLegend and shows up red when you type it.
 
@Kuba Maybe its because something like Block[{guard}, f] returns f which may again be evaluated? Even the following gives an infinite iteration:
Clear[f]
Module[{firstCall = True}, (f /; TrueQ[firstCall]) :=
   Block[{firstCall = False}, f];]
f
 
@JacobAkkerboom yep
 
10:03 AM
Arg forget about that comment by Oleksandr, it has nothing to do with OwnValues :-/, don't know where I got that idea
@Kuba I'm gonna go do something else, hope I didn't cause too much more confusion
 
@JacobAkkerboom I've just exhausted time allocated for understanding this :) Will be back later too :) Thanks for help anyway :)
 
@Kuba no problem, good luck!
 
@JacobAkkerboom Thanks and likewise :)
Cya
 
 
2 hours later…
12:14 PM
For version 11 there is a graphic comparing distribution coverage to other platforms (here). Does anyone know where I can get the code & data (or a higher resolution image) of that graphic?
 
 
1 hour later…
1:39 PM
@user3183724 LegendMargins can be helpful for that.
3
A: Show and PlotLegend row spacing

Karsten 7.The option LegendMargins can be used to significantly reduce the spacing. This option can be added directly to LineLegend plots = Table[ Plot[x i, {x, 0, 1}, PlotStyle -> {Hue[i/11]}, PlotLegends -> LineLegend[{"Serial " <> ToString[i]}, LabelStyle -> {FontFamily -> "Times", 10},...

 
 
1 hour later…
2:40 PM
@Edmund What makes you so sure it was written 100% in Wolfram Language Code? Things like this tend to go thru design and are edited to fit in more with the style of the webpage.
What are you interested in? I'm sure the basic code is somewhere, but the code probably wasn't written to be released to the public.
 
2:55 PM
 
Heh what madness. I cannot set the default application with which to open notebook files to a new version of Mathematica (neither 10.4.1 nor 11.0.0).
 
animation above : Waves equation PDE in 2D with absorbing boundaries conditions :
 
@Searke Want to show a few colleagues that use R the difference in coverage. Can't read it as it is. Fonts are too small.
 
3:17 PM
Anyone familiar with the heat equation want to weigh in on this question? mathematica.stackexchange.com/questions/123681/… I think the result from NDSolve is correct but the asker isn't having it
 
3:42 PM
@Kuba I've resorted to inserting a specific DownValue at the top of the list. For example,
Internal`InheritedBlock[{f, $infunc = False},
  Unprotect[f]; (* for protected functions *)
  DownValues[f] = {HoldPattern[e:f[args___] /; !TrueQ[$infunc]] :> Block[{$infunc = True},
      Echo[{args}];
      e
    ]} ~Join~ DownValues[f];
  f["S"]
]
Or in a more general form:
ClearAll[wrapFunctionBlock];
SetAttributes[wrapFunctionBlock, HoldAll];
wrapFunctionBlock[{func_Symbol, wrapper_}, body_] :=
Internal`InheritedBlock[{func}, Block[{$inFunc},
	func; (* Ensure the function is loaded *)
	Unprotect[func];
	DownValues[func] = Join[
		{HoldPattern[expr:func[args___] /; !TrueQ@$inFunc] :> Block[{$inFunc = True}, wrapper[expr, args]]}
		,
		DownValues[func]
	];
	body
]]
There are several generalizations I need to make to it, like multiple symbols, etc., but it is sufficient for now.
 
@ChrisK I concur(red) with your assessment. Aristotle advises not to argue with people who start from different hypotheses about how things work. You did what you could.
 
@Edmund I'll check. Or at least convince them to put up a larger photo than that.
 
@Searke Thanks.
 
3:58 PM
I haven't really programmed R in like 6 years, but my impression is that R has everything. It's just that most of the stuff is hidden in poorly written or maintained packages written for someone's thesis, so it's often hard to say "Hey you don't have distribution X"
 
@Searke But I can say "Here are the differences in natively built-in and professionally supported distributions" as a starting point for conversation.
 
True. I don't want to discredit R too much though. Just because a distribution would exist in a package and not the core language doesn't mean it's not well tested and supported.
 
@Searke I agree. R is powerful and I am not attempting to discredit it. I am merely presenting alternative possibilities.
Professors at my alma mater invented R. I have no interest in discrediting it.
 
R really is though, in comparison to even Numpy/SciPy, a huge mostly desert planet of broken unmaintained academic code. The oases are nice though.
2
 
Seeds of dissent, however, I enjoy planting. ;0)
 
4:14 PM
@andre That's very interesting. Could you post the code?
 
4:43 PM
@Searke and @Edmund. For whatever it's worth I think R is great but I need both R and Mathematica (and SAS and a few others) to assist me (or even make my work possible). If you're comparing near identical features between R and Mathematica, you might consider comparing Mathematica's Manipulate function and R-Studio's Manipulate function. The similarities of language are shocking (at least to me) but the differences in quality are huge (again, at least to me) with Mathematica winning.
 
R studio now has a manipulate function? When I was a kid, we weren't allowed to use R outside the terminal... and we liked it.
 
@xslittlegrass Here is the code : `eqn=D[u[t,x,y],{t,2}]==D[u[t,x,y],{x,2}]+D[u[t,x,y],{y,2}]+NeumannValue[-Derivative[1,0,0][u][t,x,y], x==-1 || x== 1 || y==-1 || y== 1];
u0[r_]:=Evaluate[D[.125 Erf[(r-.8)/.125],r]]
ic={u[0,x,y]==u0[Sqrt[x^2+y^2]],Derivative[1,0,0][u][0,x,y]==0}
ufun=NDSolveValue[{eqn,ic},u,{t,0,3},{x,-1,1},{y,-1,1},Method-> {"MethodOfLines","SpatialDiscretization"-> {"FiniteElement"}}]
list=Table[Plot3D[ufun[t,x,y],{x,-1,1},{y,-1,1},PlotRange->{-1,2}],{t,0,3,0.1}];
ListAnimate[list]` It is inspired from [link](http : //
 
@Searke. R studio has had it for many years. At an American Statistical Association meeting several years ago, I asked one of the R-Studio developers why did it appear that they lifted the term "Manipulate" from Mathematica (and many other terms). The response was (essentially) "Everybody lifts things from others. Not a problem."
 
lol yes.
 
4:50 PM
@Searke Many thanks.
 
@Edmund Sorry. The PNG version is better. I wasn't able to get you the code though.
 
@Searke Not having the code is not an issue. Thanks for sourcing this.
 
@JimBaldwin really, given that most of the shallow copies of Manipulate just use sliders, I think "Manipulate" is a very bad name. It's very vague.
 
Should be called the WowFunction
Most people say "wow" when I show them a Manipulate
 
@Edmund. Agreed!
@Searke. R-Studio's manipulate has sliders, buttons, checkboxes, and pickers.
 
5:04 PM
@MichaelE2 thanks! ¯_(ツ)_/¯
 
@andre Thanks!
 
5:47 PM
@ChrisK I just noticed the OP's BC has D[u[t, h], x], which is probably wrong.
 
6:05 PM
@MichaelE2 Yes, although I don't think that's the source of confusion
 
 
5 hours later…
11:33 PM
@J.M. Oh, of course - I've done so on occasion for specific cases, but to have such things as built-ins (and a wider range of statistical tests) would be sweet - MMA already has breadth/depth (at least in probability) beyond any product I'm aware of. I held off going to 10 , then surprised to see significant performance improvements in some probability functionality (and close to speed of work-arounds I'd posted) that was completely undocumented in release notes...
 

« first day (1667 days earlier)      last day (2814 days later) »