« first day (1316 days earlier)      last day (3165 days later) » 

12:25 AM
hmmm ...however I don't think I have EVER got an email about a new version release
 
@LLlAMnYP it's a way to write a memoization
Not sure if it has a specific name
 
 
5 hours later…
5:02 AM
@MikeHoneychurch I have gotten an email occassionally. I'm not certain if there's logic behind it, or not.
 
 
2 hours later…
6:36 AM
Finally went for it. *crosses fingers*
 
 
1 hour later…
7:58 AM
@OleksandrR. so after some staring at FullForm it seems, e there is simply shorthand for happyQ[i], however I was surprised to find that a SetDelayed to Pattern[e, happyQ[i_]] gives DownValues to happyQ and not to Pattern. Am I missing something here?
 
 
2 hours later…
9:48 AM
@LLlAMnYP consider the output of `r_mod := ReleaseHold[5 (Hold[r] /. mod -> List)]`
then `mod[3]`
 
10:18 AM
@PatrickStevens yes, I kind of get it, that is : is useful for writing out more complicated patterns and such, I'm rather looking for reliable reading material on how and when DownValues are set. If I write out your example in FullForm, i.e. Pattern[r,mod]:=definition, mod will get a DownValue. If I write pattern[r,mod]:=definition, pattern will get a DownValue. Obviously, there are some special rules for the head Pattern, but I can't, at first glance, find a good reference.
 
10:28 AM
Perhaps it's worth creating a question for this purpose?
Of course I meant to say Blank[mod] rather than just mod
 
Yeah, make a question - I'm not totally sure how it works
 
 
1 hour later…
11:37 AM
@PatrickStevens done
 
 
2 hours later…
2:00 PM
Downsample is unusable slow with large high-dimensional arrays. I can do the very same thing manually with Part and Span, and it's fast on a packed array. What is then the point of Downsample?
 
2:18 PM
I am thinking at this point that it might be useful to list down built-in functions that are easily beaten by user-made ones…
3
 
2:54 PM
@Szabolcs Downsample is not for you
Or really for anyone working with high-dimensional arrays
The point of downsample is that downsampling is a common task that people want to do, but don't know how to do at all.
Downsample and many other functions are more or less syntatic sugar which help people find something corresponding to what they are looking for in the documentation.
Anyone with reasonable programming experience wouldn't search the documentation for "downsample" if they wanted to downsample a set of data.
But a sufficient number of inexperience programmers do this to warrant a function which does the basics of that.
That said, there's no reason for it to be inefficient and I'm sure the developer would be glad to see what example you got.
 
3:22 PM
In the case of Permanent, I was specifically asked (told) to implement it but not make a huge project out of it. The general issue of whether/when to put in a new function with possibly suboptimal performance does get raised at times. Suffice it to say that there are considerations, such as getting new functionality up and running in finite time, that sometimes lead to such judgement calls. — Daniel Lichtblau Aug 17 at 6:53
I've been mulling over Daniel's comment for quite a while. I'm not sure how to react.
At the very least, there indeed are functions that were implemented just because it was felt they had to be there, suboptimality be damned.
 
4:04 PM
1
Q: What is mathematica?

Nadia AliI thought it is a site for Mathematics, but just now came through another site. What is the difference by the way? I am new here. Thanks

 
@Searke I thought the point of adding so many builtins was to provide shortcuts and to provide more efficient (or general) implementations. I didn't search for Downsample, I just noticed it somewhere a while ago, possibly in the list of new functions. Recently I tried to use new builtins more, assuming that they provide benefits.
 
I have used Downsample myself extensively on a recent project. Nice piece of syntactic sugar.
Makes it very clear to read.
 
Yes.
 
Exactly; the code is easier to parse if the "syntactic sugar" is well-designed.
 
But isn't Downsample[arr, {k1, k2, ...}] the same as Part[arr, ;; ;; k1, ;; ;; k2, ...]? Am I missing something?
 
4:14 PM
It is, but Part is such a general thing that it's not easy to tell immediately at a glance what it's doing
Downsample is instantly obvious
 
But if what's going under the hood is not too good, then what's the point? The user is forced to go back to his stone age tools.
 
I just looked at the Downsample implementation to try to figure out why it's so slow and it seems to be quite complicated, relying on a 1D downsampling function Signal`FilteringDump`DownsampleIPP, which only seems to work for machine reals. Why is this necessary instead of implementing it in terms of Part?
This is unusably slow: arr = ConstantArray[0., {100, 100, 100, 3}]; Downsample[arr, {3, 3, 3, 1}];.
arr[[;; ;; 3, ;; ;; 3, ;; ;; 3]]; is instantaneous.
 
bizarre
but the principle of "use specifically applicable tools rather than generally-applicable ones whenever possible" is a good one for code readability
and, for that matter, for mathematical readability
 
…and yet, if you're reading the code a few months later, you'd need more thought to read the Part[]/Span[] version.
 
Yes, Downsample is easier to read and write.
 
4:19 PM
But due to these inefficiencies, we go against one reason why Mathematica is fun to write in: it makes for clean readable code.
 
Also, Downsample unpacks. This has to be a bug, I see no other explanation. @Searke
 
"Downsample unpacks" - definitely an oversight by the concerned developer…
 
Maybe unpacking is done by some of the code that checks the arguments.
 
It didn't unpack for me on this one: Downsample[ConstantArray[1, {5}], 2]
how are you checking for unpacking?
 
On["Packing"]
It doesn't unpack on that one.
But it does on 2D arrays.
Try {5,5}.
 
4:25 PM
@Szabolcs Undesirable at very least
But yes the mindset for some of these new things is to match customer behavior
They can always be sped up later
but at least having them out helps those people who wouldn't know how to do it themselves
That said, unless someone writes support@wolfram.com noting that this, the functions probably won't improve
While there's a quorum of people here
has anyone use GrammarApply, GrammarRules for anything?
 
the unpacking is in Signaling`Resample`oDownsample
it Maps downsample1d over the input data
I shudder slightly to read it:
Do[xt = Map[
Signal`Resampling`downsample1d[#1, f[[rank - i + 1]],
p[[rank - i + 1]], realQ, prec] &, xt, {rank - 1}];
xt = Developer`ToPackedArray[xt];
not that i know anything about working with packed arrays in practice
but it really seems to defeat the point if you unpack and then re-pack :P
 
If a user suddenly notes an increase in memory consumption while using Downsample[], then that'd be it, yes.
 
5:00 PM
HI
which function is faster; If or Do ?
 
@barznjy It's not a meaningful distinction, really
You may ask Do to do hundreds of thousands of things
If is restricted to doing two
Like asking "which tool is better at making houses: hammer or chisel?"
 
"doing two" - or three
Why again are you comparing a conditional to a looping construct?
 
@PatrickStevens let me rephrase my question; for the same set of calculation, which one is more efficient ?
 
What exactly are you doing that has you asking such a question?
 
5:17 PM
@Guesswhoitis. I am now using "If" in my code, but it is very slow, it take long time to give me a numerical result. I wonder if "Do" function can give better performance
 
It is very unlikely that the conditional is your bottleneck. What are you doing inside the If[]?
 
@Guesswhoitis. I use it as a loop
 
(That you are even asking this tells me you are confused with how loops and conditionals work.)
If[] does not work as a loop.
 
@Guesswhoitis. I think I need some rest. I am really confused ..
 
If[condition, p, q, other] will return either of p, q, or other depending on what condition evaluates to. That's all there is to it.
 
6:18 PM
posted on August 26, 2015 by Patrik Ekenberg

Wouldn’t it be great if you could easily connect your simulation models to your existing infrastructure? Whether you are working in industries such as oil and gas, industrial energy, or life sciences, connecting to your processes in order to monitor and control them is vital. The OPC (Object Linking and Embedding for Process Control) standard has [...]

 
 
3 hours later…
9:10 PM
Someone around who would like to test this
Manipulate[
 BoxWhiskerChart[{0.5, max, 1.0, 1.5, 2.5}, {{"Outliers"}}],
 {{max, 9.5}, 0, 10}
 ]
and tell my why the whisker goes to the inside when the outlier is drawn it?
 
9:43 PM
@halirutan The "box" part is calculated including the outliers. The "whiskers" ignore the outliers. So with a small number of data points and an outlier, it is easy for the 3rd quartile to be between the outlier and the rest of the data set.
 
10:27 PM
@Guesswhoitis. or anyone, please help me reopen this question -- I have an answer I want to post.
 
10:41 PM
@m_goldberg $10
@Guesswhoitis. Perhaps you could help here
1
Q: Range of summation in simple Plot seems off

danielI was trying to reproduce a picture in a book by Havil of the sum, $$s = \sum_{r=1}^{\infty}\frac{\mu(r)}{r}\left(Li(x^{\rho_k})+Li(x^{\rho_k*})\right) $$ using s = Sum[(MoebiusMu[i]/i)*(LogIntegral[x^(ZetaZero[1]/i)] + LogIntegral[x^(Conjugate[ZetaZero[1]]/i)]), {i, 1, 30}]; The gra...

 
@belisarius. You take MasterCard?
 
@m_goldberg Yup. Just mail me your card
 
@belisarius. I thought you were in Argentina, not Nigeria
 
@m_goldberg As a bona fide showoff, here's mine
ups! It's my old one
@m_goldberg Scam is a global sport now. Ashley Madison, Shirley Temple and Barbra Sterisand are all into it.
 
@belisarius I thought Shirley had passed away.
 
10:51 PM
@m_goldberg Perhaps that German doctor forgot my pills
 
11:02 PM
@halirutan. Tried your code and some variations on it. Don't know what's going on, but it looks a bug to me. Or maybe the upper whisker is afraid of the outlier.
 
11:17 PM
@halirutan Manipulate[
{q1, q3} = Quantile[{0.5, max, 1.0, 1.5, 2.5}, {0.25, 0.75}];
iqr = q3 - q1;
BoxWhiskerChart[{0.5, max, 1.0, 1.5,
2.5}, {"Outliers", {"Outliers", "\[FilledCircle]"}, {"FarOutliers",
"\[EmptyCircle]"}}, AspectRatio -> 1/10, ImageSize -> 500,
BarOrigin -> Left,
GridLines -> {{{q3 + 1.5 iqr, Dashed}, {q3 + 3 iqr, Dotted}}, None},
FrameTicks -> {{None,
None}, {{0.5, max, 1.0, 1.5,
2.5}, {{q1, "q1"}, {q3, "q3"}, {q3 + 1.5 iqr,
"near"}, {q3 + 3 iqr, "far"}}}}]
, {{max, 9.5}, 0, 10}]
 
11:32 PM
It's a quartile mess
 

« first day (1316 days earlier)      last day (3165 days later) »