« first day (1514 days earlier)      last day (2971 days later) » 

2:19 AM
@VladimirReshetnikov Yes, this is easily possible if you consider that the function Interval evaluates its arguments to whatever it likes. Most basic example
f[n_] := Round[n]
f[2.3] === f[2.5]
(* True *)
 
2:31 AM
The real question is, why 1`9.0 === 1`9.7 gives True and not False. I'm not sure how to handle your example, but look at this:
In[1]:= 1.00002`3 === 1.004`

Out[1]= False
then you set
Internal`$SameQTolerance = 5.0
and you get
In[4]:= 1.00002`3 === 1.004`

Out[4]= True
SameQ for real numbers has nothing to do with comparing internal representation.
 
 
2 hours later…
4:11 AM
@halirutan @VladimirReshetnikov Aren't the intervals different because Interval forms an interval around a single number argument of a radius that depends on the precision the number? The intervals around 1`9.0 and 1`9.7 are significantly different.
 
@MichaelE2 Yes, this is what I mean. If you look on the trace, you see that Interval does something and is not only a wrapper.
The whole thing with SameQ or MatchQ in a setting where you try to compare internal representation becomes more difficult for things like Images or Graphs.
@VladimirReshetnikov Therefore, because maybe I missed it: Can you explain, what you try to do in the big picture?
 
 
1 hour later…
5:34 AM
@halirutan Ah, I didn't know about Internal$SameQTolerance`. Thanks! I'm just exploring different ways of comparing expressions for "equality", "identity", "sameness" with different levels of precision (or, should I say, fidelity).
And at the same time, I'm interested in what details of expression structure can be lost/changed in operations, which one could reasonably expect to preserve identity (at least up to a degree observable by "normal" means), such as: copying FullForm output to an input cell, Compress/Uncompress, Export/Import etc.
I'm in the job of programming language design and specification writing, and from my experience, consistently defining equality of values/objects (so that it behaves well in inheritance hierarchies, agrees with ordering on orderable types, agrees with hash functions, etc) is one of the trickiest tasks.
 
 
4 hours later…
9:52 AM
@Kuba Make sense. I think at current stage, it's really not that easy (if not impossible) to tune an FE-based GUI to get a good performance. Not saying the stability problem. In the mean time, I do believe it's quite doable using Mathematica to smartly generate nice layout for GUI implemented with html, .NET's XAML, etc.
@J.M. Hi there. Didn't mean to disturb but an email was sent to you, please do check it when you get time. And nice to see you around the site again :)
 
 
5 hours later…
@MichaelE2 Was I missing something there? QuantityMagnitude@ GeoElevationData[GeoPosition[{56.991006, -3.438151}]] seems to give the elevation for a given position
 
@JasonB @JasonB Don't you like how the Q was deleted seconds after you gave the OP the answer. :)
Not even a thank you.
 
embarrassment is a powerful thing I think -
I think a couple years ago I went so far as to delete my account here because I was embarrassed after some downvote or something
 
@JasonB I suppose that's it. But that's what keeps me from asking Qs in the first place. That and the feeling that if I just try a bit harder, I can figure it out myself.
Hi @Silvia!
@JasonB Yeah, I considered doing that on matheducators.SE. The Qs there are much more opinion-based and some people seem to think a downvote, rather than no vote, is for disagreeing. So you tend to pick up random downvotes from time to time. Gives the site a bad feel for me.
 
3:06 PM
Style[
Dynamic@CurrentValue@"FontSize",
FontSize -> 15, FontSize -> 40]

Style[
Dynamic@CurrentValue@"FontSize",
FontSize -> 15, 40]
> 15
> 40

:) daily fun
 
@VladimirReshetnikov Yeah, I knew you were doing stuff with languages. You've been at Jetbrains when I remember correctly. As for your problem, with Image and Graph there is another level of difficulty because those things seem to be Mathematica expressions but under the hood they are not. It's a bit like comparing Java objects that contain references to other objects.
 
@Kuba It almost follows a simple pattern with this set of options, but the color seems to be an outlier:
{Style["daily fun", #1, #2], Style["daily fun", #2, #1]} & @@@ {{40,
FontSize -> 10}, {Italic, FontSlant -> Plain}, {Bold,
FontWeight -> Plain}, {Red, FontColor -> Blue}}
 
3:24 PM
@JasonB even better ;)
I think I understand why (except color) but I really don't like that :)
 
@Kuba because for that function, unlike every other function, it allows the same thing to be given as an optional argument and as a rule-based option?
 
@JasonB FontSize -> 15, FontSize -> 40 behaves as every other options patter, the first duplicate wins. 15, FontSize -> 40 behaves as style stack, the latest one wins. I think so but I'm not sure though. And color here is crazy.
So we are at the edge of Kernel and FrontEnd worlds where rules don't matter and points are made up :)
 
3:40 PM
@MichaelE2 Hi!
Hi @Kuba ! Did you find your way to construct a decent GUI with Mathematica?
 
4:10 PM
@Silvia Hi :) I haven't descovered anything new so I'd say I lost quite sime time lately. Usually I get what I want, not perfect though.
@Silvia Comparing to my very limited experience with css and semi mcv schemes I feel lack of something :)
Can anyone help with this problem?
My screen has 2560 x 1440 resolution. CreateDocument[{}, WindowSize -> {2560, 200} ] creates document a which is as wide as the screen.

But it is 96ppi screen so it should not be the case, the ratio pp:px is not 1:1. Does it mean that not only font's are displayed incorrectly? Is there something like FontProperties for everything else? Have I missed the point?
 
4:39 PM
@Kuba I don't get it. Why it should not be the case?
I mean ppi = pixel per inch right? In WindowSize -> {2560,200}, the unit of 2560 is pixel, if the screen has 2560pixel width, then the window should be full width I think.
 
@Silvia WindowSize is in printer's points.
As most of things in FE.
 
5:18 PM
Uh, epic amount of comments on this entry:
0
Q: How to turn off depth sorting of 3D curves for Manipulate?

ChamIs there a way to turn off the default depth sorting of curves in a 3D output of several complicated curves ? Currently, I suspect that depth sorting has a very strong impact on performances on my Manipulate box, and would like to turn it off, to see if there's an improvement (I'm sure it will !...

 
@Kuba What! Didn't know that! I always thought they are in pixel...
 
@Silvia I was always confused because it didn't fit what I thought it should so I was just ignoring that :) Lately I'm trying to understand more, and I'm more confused :)
 
Hmm I checked the SystemInformation panel, it seems MMA use "DPI" for my resolution.
Could it be they just used a confusing (or wrong?) word here...
 
The wording is sort of ambiguous, but it's the same all over the industry.
They could use something like "pixel pitch" to be more specific, but it would at the same time sound... a bit odd.
 
I never got all those resolution units straight.. There are so many and so confusing O_o
 
5:24 PM
Same here.
 
You sort of have to be "in the know" to make sense of it. Amusingly Mma seems to claim my 15" 2880x1800 display is actually a 72 dpi device...
 
Anyway if MMA think your resolution is 96 "DPI", then it assumes you're using a printer the same resolution with your screen, then your pp:px is 1:1 now. Paradox solved :D
 
@Silvia I have to chill and think about that but it seem so :)
@kirma thanks
 
@Kuba A message of warning: the home coming week is the week just after the WTC2016... don't leave the hotel reservation for too late...
(a message also valid to everyone interested on going to the WTC2016...)
 
@P.Fonseca I see, will keep that in mind ;)
 
 
3 hours later…
8:04 PM
I found MinimalPolynomial for the first time after reading this week's top Math.SE questions. It makes me smile when I find a new function that I have no idea how it works. MinimalPolynomial[Sqrt[2] + Sqrt[3]]
 
8:21 PM
Well I guess with that one, you square it, subtract the whole term. Then square (x^2-5), then subtract the whole term. (x^2-5)^2-24 // Expand gives the answer.
 
9:16 PM
Can someone please take a look at this:
0
Q: Wrong labelling of contours with ListContourPlot

SzabolcsConsider this example: dat = Table[Re[Sqrt[1 - x^2 - y^2]], {x, -1.1, 1.1, 0.01}, {y, -1.1, 1.1, 0.01}]; Now pay special attention to the labelling of contours. Here everything looks good: ListContourPlot[dat, Contours -> {1., 0.9, 0.8, 0.7, 0.6, 0.5}, ContourLabels -> All] But look! Li...

I'm going crazy and I'm sure I'm making some stupid mistake that I am just not able to see at this hour.
 
 
2 hours later…
11:01 PM
@Szabolcs Have you played around with sub options for "LayeredDigraphDrawing"? I'm trying to increase the distances between the layers for only some layers, and the distance between vertices for some vertices within a layer... other than extracting the vertex coordinates and changing them, do you know of any other way?
 

« first day (1514 days earlier)      last day (2971 days later) »