« first day (2161 days earlier)      last day (2324 days later) » 

1:27 AM
I forget, was there a function that took a list and what I think was a pattern and returned a list of 0s and 1s?
I thought I remembered it being very efficient for certain tasks
Wait, no, sorry, I was thinking of Pick
 
 
2 hours later…
3:12 AM
@halirutan My point is that the body is in the wrong place. If it came last, then the order of the iterators would feel natural (and be left to right).
 
@MichaelE2 Ahh, OK. Yes.
The have quite a headache with this at WRI. Have you seen the "Design Review" about Curry?
 
@halirutan No I haven't. It's on Twitch, yes?
 
Yes.
There, this issue appears as well, because if you want to make a natural feeling for Curry, you need to reverse moste of Mathematicas arguments.
It's this one
 
Thanks for the link.
I suppose in, say, NIntegrate, they picked the order, because NIntegrate[f, {x, a, b}, {y, c, d},..., options...] was easier to parse? Then consistency demands Table etc. be the same way.
 
@MichaelE2 Basically, they turned it around to be able to say
fc =  Curry[Plot][{x,0,1}]
and then you get a function that is only missing its body.
and you can do fc/@{x, x^2, ...}
(btw, I love Micheal Trott. It seems he just speaks German but with English words)
2
 
3:21 AM
@halirutan Yeah, it seems hard. For instance Curry[Integrate][f] could be an operator on intervals or Curry[Integrate][{x, 0, 2 Pi}] could be an operator on function expressions.
 
@MichaelE2 Yes. You can switch the order, but on default they decided to not let it be {1,2,3..}.
It's pretty much covered in the video and the question if it is worth all the trouble is raised. Basically, you can do this with Function but not so nice.
Future will show if Curry will indeed be nice.
 
@halirutan Yes. I use Function for this. I sometimes wish for something like Curry, but often I have something a little complicated, like Michael Trott is suggesting.
 
@MichaelE2 Functions, esp. anonymous functions don't work as soon as you need several levels. This can be solved with curry easily.
 
@halirutan Yes, I've had that trouble, too.
 
(Levels: supply the arguments one after another.)
 
 
4 hours later…
7:10 AM
@JimB any chance you can help me with choosing an appropriate statistical distribution for a fitting project? The thing I'm looking at is the length of comments on this site, so I really have no sense of what an appropriate underlying model would be.
The distribution looks like this:
I was able to get decent agreement using a GammaDistribution and two NormalDistributions. But the fit isn't terrific and there's no real reason that's a good model for this distribution anyway.
Mathematica recommends a PascalDistribution but I don't know what that's good for modeling so don't know why that would be good for this distribution.
 
 
3 hours later…
10:31 AM
0
Q: Is buttocks-type question appropriate for this site?

VividDI thought there are many tools for rendering real-life scenes, but that Mathematica is not the one. I see there is a buttocks question - does this really belong here? What is the next thing? Finding volume of female breasts?

 
 
4 hours later…
2:10 PM
@b3m2a1 What you are measuring is a length. It can never be smaller than zero. It's like measuring the size of raindrops. Usually, these things are Gamma-distributed.
 
@halirutan I don't know if you have seen it, but there is a WTC presentation about the new compiler framework (see Abdul Dakkak): wolfram.com/events/technology-conference/2017/presentations/…
 
@Szabolcs No, I did not. Thanks.
 
 
3 hours later…
5:32 PM
@b3m2a1 @halirutan is correct. These things are usually Gamma-like distributed. Although in this case it is really a discrete distribution. I think that the skewness is a bit more than what a standard Gamma distribution will deliver but I'll look for other distributions with heavier tails. In the meantime it looks like the display is from using SmoothKernelDistribution and because the length of comments are at least 15 characters, using the "Bounded" option will be more accurate.
@b3m2a1 Something like .
skd = SmoothKernelDistribution[x, "LeastSquaresCrossValidation", {"Bounded", {15, \[Infinity]}, "Gaussian"}];
@b3m2a1 Then you won't have a display of values less than 15 with positive support.
 
5:52 PM
@JimB Great to know. In fact I do have things smaller, since the API provides the render, not the Markdown of the comment text. So I get things like "related". But that just means I should use 7 instead of 15 (since that's the min).
 
 
2 hours later…
7:24 PM
it is that time of the year...
 
 
2 hours later…
9:11 PM
@b3m2a1 - more fun listening to me squirm..... twitch.tv/videos/210630229##
 
9:37 PM
@JasonB. nice :) Is there any chance any of the basic M- code gets open-sourced or is accessible in some prototype capacity before the actual release? I'm excited to start playing with it and building off of that.
 
I know there is some form of prerelease testing, but I don't know anything about it
 
Just as a side note, would it be safe to provide more general (and obscure) names for these objects? When I work with chemistry I tend to call my molecule class AtomSet, as Molecule has an implied connectivity that I think an atomset does not.
And obviously Bond has 5 billion uses. ChemicalBond or something feels safer.
 
I really like the name that the CDK uses, AtomContainer - very precise
 
I'd also argue that these things should have a Normal form that's just an Association. It allows for vectorized Lookup calls which can be nice when looking at properties en masse.
 
Is there a WL function that can partition a real interval {a,b} into n parts? Returning for example for

In[]= f[{2.3, 5.7}, 5]
Out[]= {{2.3, 2.98}, {2.98, 3.66}, {3.66, 4.34}, {4.34, 5.02}, {5.02, 5.7}}
 
9:44 PM
Oh that is nice. I'm a fan. Where is the connectivity stored? It is it with the Atom or with the container?
 
an association like Normal @ mol returning <|"Atoms" -> List[..], "Bonds" -> List[..] |>?
Atomcontainer has the bonds and everything: cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/interfaces/…
But I like Molecule in spite of the fact that disconnected structures aren't technically molecules
goldbook.iupac.org/html/M/M03986.html - MoleculeEntity would be precise chemically, but horribly confusing for WL
 
Seems reasonable. My feeling is that for immutable atoms it makes sense to do it that way. For mutable systems I think the atom should store them, but obviously (I think) these things are immutable.
 
with the toolkits I'm using (cdk or rdkit), the atoms are owned by the molecule
 
Oh interesting. So is all connectivity and such specified up-front? Is there a nice way to describe bonds forming and breaking mutably?
Too many questions. I'll just wait for the paclet to be released and dig in then.
 
@VitaliyKaurov - not one function that I know of Partition[Subdivide[2.3, 5.7, 5], 2, 1]
 
9:52 PM
yeah, and especially in N dimenssions
 
I do think that support for dynamic things like vibrations is important though. I know SW doesn't know enough about chemistry for that to be a go-to thing for him, but if it's not considered up-front (even if not actually supported initially) I think it'll be a pain to fake back in.
 
This works: Graph[{1, 2, 3}, {{1, 2}, {2, 3}}]
This does not work: Graph[{6, 7, 8, 9, 10, 11}, {{6, 8}, {6, 10}, {6, 9}, {7, 8}, {8, 10}, {8, 9}, {8, 11}, {9,10}, {9, 11}, {10, 11}}].
What am I missing here?
It must be that the first one uses integer indices starting at 1 and the second does not.
This seems to be an undocumented (?) syntax.
 
is this a documented spec for defining an Edge ?
 
@Szabolcs Yeah if you shift it that makes it work:
Graph[{6, 7, 8, 9, 10,
  11}, {{6, 8}, {6, 10}, {6, 9}, {7, 8}, {8, 10}, {8, 9}, {8, 11}, {9,
     10}, {9, 11}, {10, 11}} /. i_Integer :> i - 5]
 
@VitaliyKaurov No, but it gives me a very significant speedup compared to any documented way I could find to do the same thing.
I wonder why it is not documented. It is very useful.
 
10:03 PM
I can't even find where the (apparently) default form for some graphs is defined:
InputForm@RandomGraph[{10, 15}]
Graph[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
{Null, SparseArray[Automatic, {10, 10}, 0,
{1, {{0, 3, 7, 9, 12, 13, 17, 18, 23, 27, 30}, {{2}, {8}, {9}, {1}, {4}, {6}, {10},
{4}, {10}, {2}, {3}, {8}, {9}, {2}, {8}, {9}, {10}, {8}, {1}, {4}, {6}, {7}, {9},
{1}, {5}, {6}, {8}, {2}, {3}, {6}}}, Pattern}]}]
Is that documented somewhere?
 
@JasonB. No, it is not.
@JasonB. There are at least three internal representations for graphs: "Simple", meaning a sparse array (what you show above), "Incidence", meaning an edge list, and "NullGraph" (if I remember correctly). This last one may be needed because the 0-vertex graph couldn't be represented with an adjacency matrix (sparse array).
The input form reflects these.
@JasonB. Is "default form" the term you use for this stuff internally?
I mean, the input form is used when writing the graph to a file, or when sending it through MathLink. But this is not the actual internal data structure that M uses.
 
@Szabolcs sadly that's so often the case. Generally when things in Mathematica are too slow, it tells me that I need to look at the *Values and dig into how it's implemented because there's almost always an efficient, undocumented implementation hiding under the hood.
 
What I would really like to know is how to do the reverse operation fast: get an index-based edge list, i.e. the equivalent of List@@@EdgeList@IndexGraph[graph]
IndexGraph is very slow for graphs with an "Incidence" representation.
You can get the representation using GraphComputation`GraphRepresentation
 
10:20 PM
@Szabolcs I do not know - am an alpha developer who talked his way into writing a WL paclet
 
Here's a fun thing little chart. A word cloud of words pulled from comments on this site:
7
 
ha!
 
Normalized against WordFrequencyData
 
it's all a workaround
 
And don't miss that "bug" is also big.
In reality, "bug" is bigger in raw frequency:
wordFreqs2["workaround"]

0.0390561

wordFreqs2["bug"]

0.132357
But I needed a normalization procedure to shrink down the common words and WordFrequencyData["workaround"] is tiny.
I'm currently writing a little blog entry on this stuff, but here's another one people might like. I pulled mentions in comments for the 100 highest rep users and looked at their word frequencies in this comments corpus:
I'm planning on normalizing these against rep somehow (and maybe trying to include some name changes for well-know users like @C.E.) but it's fun to see just how prominent @Mr.Wizard is on the site.
 
10:59 PM
I have a `BinomialDistribution` that I'm using to make a graph with `DiscretePlot`:

DiscretePlot[CDF[BinomialDistribution[12, 0.3], x], {x, 0, 20}]
What's the right way to graph this for multiple values of the probability simultaneously (e.g. p = 0.1, 0.3, 0.6)?
 
11:31 PM
DiscretePlot[
Table[CDF[BinomialDistribution[12, p], x], {p, {0.1, 0.3, 0.6}}], {x,
0, 20}]
 
that looks close, but seems to treat them as all being the same series
(as opposed to e.g., three different series with p = 0.1, 0.3, 0.6)
I think I may need a // Evaluate
 
Hello everyone! Hope you're all as happy and healthy as ever! Merry Christmas!
 
Merry Christmas Oleksandr!
@JohnFeminella jhon i think it treat them as different series: try giving them a color, mathematica will plot them differently from one another
 

« first day (2161 days earlier)      last day (2324 days later) »