« first day (2995 days earlier)      last day (1479 days later) » 

1:14 AM
Has anyone using Wolfram Desktop 12.1 on windows seen weird behavior with control placement of Manipulate?
 
 
7 hours later…
8:08 AM
Keyboard shortcuts seem all messed up in 12.1. Evaluate-in-place doesn't seem to work anymore for instance
 
 
1 hour later…
9:23 AM
I am actually starting to see many hangs in FE in V 12.1 on windows 10. More than V 12.
This happens when I want save notebook or do Evaluation->Quit kernel. I could wait and wait and FE just hangs. Only way is to terminate all of Mathematica. It seems it is the FE and not the kernel which hangs.
 
 
1 hour later…
10:53 AM
sigma (r/nCr) is written as sigma (n-r/nCn-r). How come? I know about nCr being equal to nCn-r but just r in the sigma? Can we replace that too?
 
11:15 AM
@Nasser I have been struggling with something similar, but I could not create a minimal example, despite putting in a lot of effort and getting a lot of help from Wolfram QA. Can you give me more information?
You are saying "This happens when ... do Evaluation->Quit kernel". I was seeing this not after Quit, but after the first evaluation. Sometimes, if something was evaluated immediately after kernel startup, the FE hung. So: do you see the problem right after Quit, or after the first evaluation?
When this happens next time, can you try to kill the kernel and see if the FE recovers?
To give more details about my problem: I saw an FE hang if I loaded my package IGraph/M as the very first evaluation after Quit. Note that it had to be right after Quit. It is not sufficient to do it in a kernel that was already started earlier (such as after launching Mma). The latest version does not cause a hang often because I added a conditional delay to the package loading: github.com/szhorvat/IGraphM/blob/master/IGraphM/Kernel/…
 
@Szabolcs I wish I can give more exact information. I remember it happens after I want to start from a clean kernel, i.e. Evaluation->Quit kernel. Then I see the FE hangs after that. OK, will try to kill the kernel next time this happens and see. And will try to write down what happens next time. But for sure I've seen this few times so far to notice it. It seems new in V 12.1
 
Yes, the hang that happens when I load the package, which was fully reproducible for me, was new in 12.1. It never happened in 12.0.
 
It might have been also after trying to save a notebook right after quiting the kernel. I do not remember now the sequence. Yes, I do not think this was in V 12. The FE must be a very complicated software, I do not envy who ever have to maintain it at WRI :)
 
11:30 AM
@b3m2a1 Are you aware of any way for a function to cache its result in a sustainable way, and without pattern matching? Let me explain. I assume expressions have some internal ID (it's a hypothesis). If the function was called on a certain instance of an expression already, the result should be remembered. If it is called an a different instance which is identical (SameQ), it doesn't have to.
What I want to avoid is two things: (1) the pattern matcher scanning a potentially use expression (instead of just looking at some small internal ID) (2) DownValues filling up without limit because of classical, naïve memoization
It's for this application: mathematica.stackexchange.com/q/218318/12 Notice how some graph functions seem to return instantaneously when clearly the computation should not be constant time. Two examples are MultigraphQ and ConnectedGraphQ. I assume this is because the result is cached.
" a potentially HUGE expression " (it was a typo)
@LeonidShifrin Perhaps you know if what I am asking for above is possible?
It would be nice if this were a feature: to mark small functions with small return values (e.g. just True/False and not a 1000x1000 matrix) as side-effect-less, then the system would automatically manage caching results.
 
12:09 PM
@Szabolcs In general, when I need some cache with limit on the number of cached results and SameQ as equality comparison, I use some assoc-based cache implementations like the one in this post
Also have a look at my answer here, it may be more in line with your ideas of marking things with True / False.
You could actually dress any function you want to cache, into memoizing pure function, in a decorator-like fashion: newfunc = makeCachedPF[yourFunction[#]]
 
12:52 PM
@Szabolcs might you be able to combine Hash[] with an Association or the new LeastRecentlyUsedCache in 12.1? The docs claim Hash[] always returns the same result for the same expression, and a quick naive benchmark of LeastRecentlyUsedCache shows decent performance.
 
1:03 PM
@Szabolcs Just as a remark: For downvalues without patterns, the evaluator uses a way more efficient way to store the values that doesn't depend on expression size:
f[x_] := f[x] = RandomReal[]
Monitor[
 ListLinePlot[#, ScalingFunctions -> {"Log", None}] &@Table[
   Module[
    {x = NestList[{Table[RandomReal[], n, n], #, #} &, {}, n]},
    f[x];
    {LeafCount@x, First@RepeatedTiming@f[x]}
    ],
   {n, 1, 17}
   ],
 n
 ]
So the only downside to memoization appears to be the accumulation of downvalues...
@CarlLange You can always use something like the DarkReader extension ;) (if your browser supports it of course). It usually looks quite ok in my opinion:
 
1:19 PM
@Szabolcs If you do a TracePrint you see that PacletObject["MyPaclet"][<subvalue>] calls FindPaclet. It looks like PacletResource[....] also calls FindPaclet
FindPaclet doesn't seem terribly slow, but not blazingly fast. I might take the time at paclet load time to define a variable $MyPacletObject = PacletObject["MyPaclet"], so that I could replace all calls to PacletResource with the $MyPacletObject["AssetLocations",...] as mentioned by @IstvánZachar.
 
1:32 PM
@bobthechemist Are the mesh regions produced by ChemicalData decent for use with a 3D printer?
 
 
2 hours later…
3:12 PM
@JasonB. (Here's an example print)[imgur.com/a/v9pwfp1]
doh
 
I really want to extend that to include the double bonds, or the space filling version
but making mesh regions is not something I'm familiar with so I haven't done that yet
@bobthechemist - do you use V12 or earlier versions?
 
I'm getting ready to try a model with double bonds.
This is on v12.0 at the moment
Presently, I'm just taking the output from ChemicalData[... "MoleculePlot"] and applying a scaling transform (12%) and rotating to minimize the amount of support material. Print at 0.15 mm layer height.
...exporting the Graphics3D object as STL.
 
ahh, I assumed you were calling the "BoundaryMeshRegion" property from ChemicalData
 
I struggled through meshes when making my 3D printed periodic tables and it was not a terribly pleasant experience. I'm much happier when I can build using Graphics primitives.
 
I had no idea this worked, Export["~/test123.stl", MoleculePlot3D@Molecule@"1,2-difluoroethylene"]
Does it matter for 3D printing, that when I try to import the STL as a BoundaryMeshRegion it fails?
 
3:32 PM
I have to scale that STL by ~500%, but there's nothing in my slicing software to suggest it won't print
 
 
1 hour later…
5:01 PM
posted on March 31, 2020 by Calle Ekdahl

"Flattening the curve" has become a household phrase these days, as COVID-19 is ravaging the western world and putting enormous pressure on our healthcare systems. To flatten the curve means to decrease the number of cases in need of hospitalization at any one time to avoid exceeding the available capacity, such as the number of […]

 
 
2 hours later…
7:02 PM
@Feeds @C.E. For more inspiration medium.com/data-for-science/…
 
 
2 hours later…
9:08 PM
Before sleep, let me just drop it here: A notebook based To-do list I have been using for 2 months now. community.wolfram.com/groups/-/m/t/1915689
4
 
9:46 PM
Plot[Evaluate[Table[(1 + d2)/(1 + d2 - d1), {d2, 0.2, 1, 0.2}]], {d1,
0, 1}, GridLines -> Automatic, PlotLegends -> "Expressions"]
Hello
if I want to limit the range of d1 to (0, 1-d2)
how can I do this?
 
f[d1_?NumericQ, d2_?NumericQ] :=
If[d1 < (1 - d2), (1 + d2)/(1 + d2 - d1)];

Plot[Evaluate[Table[f[d1, d2], {d2, 0.2, 1, 0.2}]], {d1, 0, 1},
GridLines -> Automatic,
PlotLegends -> Table[(1 + d2)/(1 + d2 - d1), {d2, 0.2, 1, 0.2}]]
 
Ah, nice. Thank you!
 

« first day (2995 days earlier)      last day (1479 days later) »