« first day (2857 days earlier)      last day (1615 days later) » 

12:02 AM
@J.M.willbebacksoon: how goes?
 
12:12 AM
I've just upgraded to version 11 (and I have a free upgrade to 12 that I haven't applied yet). I noticed that when I "Save Selection As..." the pre-filled name for a PNG is "Untitled.png". It used to be the name of the notebook file with the appropriate extension. I looked through the Options Inspector, but couldn't find an option to get back to the previous behavior, which I preferred. Is there a way to get that behavior back?
 
Hey @robjohn, it has been a while. I'm somewhat okay.
 
@J.M.willbebacksoon Yeah, I've been pretty busy offline, so I haven't been hanging out in chat as much. My uncle's probate is almost over, so I will hopefully have more time soon.
 
That is good to hear.
 
@C.E. Hmm, that basically killed a big party :(
 
@robjohn Does the string "Untitled" occur anywhere in the output of Options[$FrontEnd]?
 
12:25 AM
From 99.xxx to this in an instant.
 
Look at the bright side, you went up in overall rank. ;)
 
@J.M.willbebacksoon Lemme look
 
@J.M.willbebacksoon Hey JM, it's nice to see you here.
I hope you didn't mind that I asked others to donate on your behalf.
 
@J.M.willbebacksoon Nope
 
@halirutan yes, I only saw the messages left on that page just yesterday, and most of them mentioned you. ;) Thank you.
@robjohn That's odd. Sounds like a good question for main.
 
12:30 AM
@J.M.willbebacksoon Okay. I thought I'd ask here first in case it were a well-known thing.
Thanks!
 
To be more accurate tho, the computer hasn't passed away quite yet, but it's barely hanging through. (Which is why I needed to borrow someone's computer while I run something in mine.)
 
@J.M.willbebacksoon How much money are you planning to spend on a new one?
 
@halirutan I'm actually debating on whether I should get one big and heavy-duty laptop (with a GPU perhaps?), or one netbook and one medium-range laptop. I kind of highballed it to $1800 based on current laptop prices.
With the former setup, I have more raw computational power; with the latter one, at least I can do exploratory work in the small one while the larger one crunches.
 
@J.M.willbebacksoon Well, it depends on if you are indeed using the better GPU. I mean, a good laptop also has more memory and a better CPU.
 
I guess the other selling point of getting a laptop with a GPU is that I can actually finally start experimenting with machine learning. :D
 
12:39 AM
Personally, I wouldn't buy a too powerful laptop, because compared what you get as a desktop for the same money, it's never better.
But I know that other people like to work on laptops for various reasons.
 
I suppose I would need to check the cost of a laptop vs. a desktop + UPS (on account of electricity being irregular here).
(On a different note, I'm going to be moving again to a different place by January next year; the rent in my current place has gone up and I don't think I can afford the new rates.)
 
@J.M.willbebacksoon I wanted to talk to you about the larger plan anyway (since summer actually). Before you started the "by me a coffee" thing, I wanted to suggest that you try to set-up smth like Patreon and bind some followers by regularly making your nice blog posts.
That would increase your income for something you would do anyway.
 
1:00 AM
@halirutan I'm actually surprised my blog actually gets traffic everyday, even if it's just one or two users checking it out.
 
@J.M.willbebacksoon You'd have to draw more attention to this, but I'm certain there is an audience which would spend a dollar or two each month to read your insights.
 
In any event, hopefully by late this month or next month, I might be able to devote some more time to SE, as well as writing blog posts and actually posting finished packages on GitHub.
 
@J.M.willbebacksoon That would be nice. On a different note, with the Key Promoter project, I actually made it to be accepted by GitHub Sponsors.
 
@halirutan You are certainly right; I prolly could use a little more self-promotion.
@halirutan Very cool!
 
So now, people can donate directly there but the best part is that GitHub matches each donation for the first year.
 
1:05 AM
"GitHub matches each donation for the first year" - surely the new owners can more than afford to do this ;)
 
@J.M.willbebacksoon That's what I thought :)
 
Is there a Key Promoter for Mathematica?
 
@anhnha Nope.
 
Okay, I gotta go for my morning work shift today. It was nice to be here again. :)
 
@J.M.willbebacksoon And I should go to bed at some point. 2:13am here.. Have a nice day and I'm I could talk to you.
 
1:31 AM
This's from the Mathematica Book but it seems that it changed already
The graphics is still displayed now
 
@anhnha The Mathematica Book is very out of date
BTW you seem to be asking a bunch of questions about the introductory features of the language and why they work the way they do. Are you doing some kind of project where you try to figure out how Mathematica works specifically?
I guess I'm just surprised by the number of questions about, e.g. the evaluation sequence relative to those about how to do various things
 
@b3m2a1 no, I just try to study it now and hope I can use it effectively for my work
That book is old but quite easy to understand
I really like it
The docs from help doesn't help much to study systematically
 
2:06 AM
@CarlLange I'm travelling and don't have a good enough internet connection to join
 
 
1 hour later…
3:12 AM
PointSize[d]
is a graphics directive which specifies that points which follow are to be shown if possible as circular regions with diameter d. The diameter d is given as a fraction of the total width of the plot.
I tried this:
but the point size is just a half of plot width.
Graphics[{PointSize[1],{Point[{1,2}],Point[{3,5}]}}]
 
3:30 AM
@J.M.willbebacksoon It is now a question on main. Thanks for the help.
 
3:53 AM
@robjohn It's unlikely that there will be a good (or any) solution to this.
But I agree that it's good that you asked on main.
 
4:13 AM
@Szabolcs Yeah, I searched for quite a while last night, but you never know if there is something I missed.
 
I'm back to this question --->
10
Q: Finding a visually pleasing rotation of point sets with approximate symmetries

SzabolcsSuppose we have an arrangement of points in 2D that are visually symmetric, and therefore they have a rotation that seems "natural". For example, consider these points: pts = {{0, 0}, {2, 0}, {0, 1}, {2, 1}}; rpts = pts.RotationMatrix[RandomReal[2 Pi]]; rpts = # + RandomReal[0.01 {-1, 1}, 2] & ...

If anyone has new ideas, let me know
I'm trying to remember why I didn't actually use the BoundingRegion solution (other than that it was new in 10.4)
That method does not do very well on pts = {{2, 0}, {-2, 0}, {0, 1}, {0, -1}}
 
5:08 AM
units[xmin_,xmax_]:=Range[Floor[xmin],Floor[xmax],1]
bp=Plot[BesselJ[2,x],{x,0,10}];
Show[bp,Ticks->{units,Automatic}]

Why does this "units" function still works while there's no applied arguments?
 
5:40 AM
@C.E. OK, finally I get my 10000 voting points.
Oops, I mean, half of them.
 
 
1 hour later…
6:51 AM
@anhnha Option value of Ticks can be function relationship. For more info check the document of Ticks.
 
7:36 AM
@xzczd I saw that in docs but no explanation
the functions have two arguments
but none is used in the code
 
@Szabolcs I had been investigating a similar problem for a possible extension of MoleculeViewer[], but hadn't gotten around to a full study. The idea in this paper and this paper is to indeed look at the inertia tensor's eigenvalues (equivalently, the SVD of the centered point set) and derive symmetry elements (e.g. axes or planes of symmetry) from it.
For 2D, you'll need to do a preliminary embedding to 3D so that the right singular vector corresponding to the zero singular value is a symmetry axis candidate. I can forsee a generic implementation for e.g. polyhedra and graphs (not just molecules) to be very useful. Perhaps you might beat me to implementing it. ;)
@anhnha did you look at the "Generalizations & Extensions" section of the docs for Ticks?
 
7:53 AM
@J.M.willbebacksoon I did
but I mean the explanation why it works
not just showing how to do it
 
@halirutan The only solution I see is to give me the points as a bounty :)
@xzczd I'm glad for you even though I'm not sure what the link is supposed to show me.
 
8:20 AM
@C.E. I figured out the usage of debugger in the answer below :)
 
8:44 AM
@anhnha Read the last row of the table on possible tick specifications carefully: "a function to be applied to xmin, xmax to get the tick mark specification" - this implies that if you specify a function (i.e. anything that is not a list), Graphics (or more specifically the front-end) tries to apply the function to xmin,xmax (i.e. func[xmin,xmax]) to get the list of ticks specifications.
@anhnha You can add Frame->True to see what is happening (see also this example)
 
@LukasLang that frame is good. As for the tick function I still don't know where does it get xmin, xmax.
The applied function is only name
no argument is applied
 
@anhnha Does the following help you a bit to understand the underlying design?:
trig[func_] := func[5.]
trig /@ {Sin, Cos, Sec}
 
9:00 AM
@anhnha The front-end determines them from the other options (like PlotRange). The idea of that specification is that you can write a tick-generating function that works for arbitrary plot ranges without having to worry about the actual limits of the plot. This way, you can set the same tick function for a bunch of plots with different ranges, and the front-end handles the determination of the actual limits
 
@xzczd nope I don't understand what you want me to see from the code. I don't have any problem with the code you send.
@LukasLang so the PlotRange is input to the arguments of the function units?
 
@anhnha I mean it's not necessary for us to send function argument.
@Lukas has already explained this in a more detailed way in his last message.
 
Okay, I just wanted to know where does that function get its arguments.
 
9:22 AM
I think knowing "Graphics[…] gives it arguments in some way" is enough. BTW the used argument can be checked by
ticks[min_, max_] := (Print@{min, max};
  Table[If[EvenQ[i], {i, i, .06, Red}, {i, i, .02, Blue}], {i, Ceiling[min], Floor[max],
    1}])

Graphics[Circle[{0, 0}, 4], Axes -> True, Ticks -> ticks]
 
 
2 hours later…
10:53 AM
@C.E. Right, sounds like a good plan :)
 
@xzczd This is even one of those times where Echo[]is very convenient: ticks[min_, max_] := Echo[Table[If[EvenQ[i], {i, i, .06, Red}, {i, i, .02, Blue}], {i, Ceiling[min], Floor[max], 1}]].
Then, try Graphics[Circle[{1, 0}, {3, 2}], Axes -> True, Ticks -> ticks] @anhnha
 
@xzczd @J.M.willbebacksoon I tried both but I don't see where the min and max are printed
 
Did you remember to do Remove[ticks]; first before trying out a new definition?
Because Mathematica doesn't forget, unless you tell it to do so.
 
Okay, that work for xzczd code but I got an error with your code.
"Tick specification must be a list or a function"
it is a function already
hm
I just check Downvalues
but somehow it is not there
let's me check
it runs now
but no printing
 
hmm, okay, then stick with xzczd's version for now (remember to use Remove[] or Clear[]!)
 
11:14 AM
Is there an easy way to remember this?
 
Personally, I don't; it's not like I can't look things up in the docs.
 
11:42 AM
@anhnha Which version are you in? Both Print and Echo works in v11.3. (They print in the message window though. )
 
@xzczd it's 12.0.0.0
 
11:59 AM
I'm not sure why it happens. I just quit the server and restarted again but I got the error "Tick specification must be a list or a function" again
I just tried to type it myself and it ran but not printed anything
 
12:38 PM
"I just quit the server" - oh, you are using the Cloud?
 
Oops, sorry I meant quite the kernel
Graphics[Disk[{0, 0}, Offset[{10, 40}]], Frame -> True]
in this function can I check the coordinate of Offset[{10, 40}]?
 
 
3 hours later…
3:15 PM
What is the normal evaluation time for a 200 by 200 matrix's determinant?
For me it takes like 20-25 sec (?)
It's a numerical determinant over values of machine precision
And I have the latest macbook pro but the cheapest model , so it really shouldn't take that long right?
It contains a "KroneckerDelta" which I suspect to be a contributing factor to Mathematica trynig to evaluate it symbolically or something
 
3:41 PM
In[3]:= mat = RandomReal[1, {200, 200}];

In[4]:= Det[mat] // AbsoluteTiming

Out[4]= {0.010382, -2.44808*10^80}
 
@1010011010 Is it a numeric matrix or not? If it is, the computation should be very fast, as shown by @JasonB. If it is not (which it sounds like, considering the KroneckerDelta), then it will be significantly slower (it has to fall back to symbolic evaluation after all)
 
4:18 PM
@LukasLang Minus the KroneckerDelta it will be numeric
Is there any way to speed it up in those cases?
I have already "explained" to Mathematica the input will be numeric with: NumericQ for example
 
4:38 PM
But does the KroneckerDelta[] evaluate to something numeric?
 
What do you mean? I just need extra 1's along the diagonal
The only improvement I can see is maybe DiscreteDelta
But this is also a symbolic operation
 
"Minus the KroneckerDelta it will be numeric" somehow made it seem as tho the KroneckerDelta[] do not immediately evaluate; having said that, this is just the same as adding IdentityMatrix[200], no?
 
    AbsoluteTiming[Det[RandomReal[1, {200, 200}] + IdentityMatrix[200]];]
       {0.301206, Null}
 
 
 
1 hour later…
7:41 PM
@J.M.willbebacksoon I actually wrote a bunch of code to find symmetries of a set of atoms up to a certain tolerance a few years ago (needed to assign molecular point groups).
Now with the new Molecule object that @JasonB. it might be possible to use his architecture, though.
Turn the point set into an all-hydrogen molecule and feed it into his functions
 
7:56 PM
I'm slowly taking up using a ::doc message on my functions to support something closer to python/Javadoc dosctrings beyond what ::usage gives you.
I don't want to write a huge ::usage message because it's just supposed to give basic usage to the user, but I want to put my warnings and implementation notes somewhere accessible.
And I've found that writing full documentation is more work than I really care to do, so instead of just writing long comments I'm trying this out.
 
8:21 PM
Also something potentially of interest to @Szabolcs or @Kuba or other paclet people. I emailed Todd Gayley and he confirmed to me that the "Extensions" mechanism in PacletInfo.m is designed to support arbitrary user-defined extensions.
I'm planning on using this to move many of my config settings into the PacletInfo.m itself, since this cuts one more file out of the layout and makes it easier to support and extend without any fear of collisions.
 
 
2 hours later…
10:03 PM
@b3m2a1 That's nice! I mean, a chemistry-specific implementation is great for you and me and the other chemists, but as I said, an abstract implementation that only deals with vertices and edges would certainly be valuable on its own (and for a wider audience too).
 
@J.M.willbebacksoon That's basically what I did, but I allowed it to use identities of atoms to determine whether or not I needed to compare some number of vertices
I just allowed it compute all the symmetry elements for a given set of points, but it would only compare all the carbons, e.g., to eachother
 
Howdy hey folks: Does anyone know of a nice & easy way to make a 3D SphereMatrix not unlike DiskMatrix? It seems to me this should exist. I want to make some Fourier Analysis plots for my NMR course && DiskMatrix has thus been a lifesaver.
 
10:25 PM
@CATrevillian ImageMesh can probably do this
 
11:01 PM
@CATrevillian Basic example without any performance considerations:
DiskMatrix3D[r_] := Table[
  Boole[Sqrt[x^2 + y^2 + z^2] <= r],
  {z, -r, r},
  {y, -r, r},
  {x, -r, r}
  ]

DiskMatrix3D[32];
 
This is related to what b3m2a1 was suggesting.
 
11:33 PM
@J.M.willbebacksoon I think that is exactly what I was thinking of
 
11:48 PM
Here is a faster version that let's you specify the size of the matrix and the ball inside it separately:
With[{
  f = Compile[{{point, _Real, 1}, {r, _Real, 0}},
    If[point.point <= r^2, 1, 0],
    RuntimeAttributes -> {Listable},
    Parallelization -> True]},
 dm3d[n_Integer, r_Integer] := With[{dn = Max[1, Floor[n/2]]},
   f[Outer[List, #, #, #] &[Range[-dn, dn]], r]
   ]
 ]
It will always create odd sizes so that the center of the ball is well-defined.
 

« first day (2857 days earlier)      last day (1615 days later) »