« first day (661 days earlier)      last day (3820 days later) » 

3:08 AM
This is a bit of a long shot I think, but has anyone here written anything for the Mathematica Journal?
 
 
7 hours later…
9:39 AM
What is the difference between {a,b}={val1,val2} and MapThread[Set,{{a,b},{val1,val2}}] ? In this answer only the latter works.
 
 
3 hours later…
12:11 PM
@cormullion At least Mr Presentation's post is a good starting point for earning the Peer pressure badge (笑)
 
 
1 hour later…
hhh
1:35 PM
Is there a sparse format which shows only the nonzero things?
Basically I need to pick up all nonzero (not null) things and use SparseArray[...]
(for some reason still returning Nulls -- anyway to stop it returning them?)
 
hhh
2:02 PM
Moved the question here with a small working example.
 
 
2 hours later…
3:57 PM
@hhh Reply to this if you want more help. I'll be in and out.
 
hhh
Table[If[MiNotJ[ii, jj, mcstable[[All, kk]]] != Null, {ii, jj}], {ii, 1, 31}, {jj, 1, 31}, {kk, 1, 147}]

where kk=1,2,...,147; ii=1,2,...,31; jj=1,2,...,31.

Now my goal is to return only cases where MiNotJ[ii, jj, mcstable[[All, kk]]] is not Null.
So the output is 31x31 matrix where only a few nonzero things. My goal is to express the output in a sparse format without the nulls.
 
@hhh So the entries of the 31 x 31 matrix are single numbers? And the entry is 1 if some of MiNotJ[ii, jj, mcstable[[All, kk]]] are not Null, or is it if all are not Null?
 
hhh
Yes, single numbers.

I cannot yet understand the latter. I will share my code with you, a second...
https://www.dropbox.com/s/b7tl17kigdsq5o3/code.nb
https://www.dropbox.com/s/9nsqitluujpd8ou/RHRMCS.txt
https://www.dropbox.com/s/hjueqplvbmbuxs5/RHRBASIC.txt
The first is the code and the latter are data files.
 
4:15 PM
@hhh I don't understand how one decides the entry for ii, jj. Is the condition non Null for all kk?...I'll take a peek at the code...I hope it's not too big.:)
 
hhh
The first entry lines 1-31 reads the data from the data files.
Then the next lines tries to use the MiNotJ with the mcstable
 
@hhh One thing that confuses me is that your Table command generates a 31 x 31 x 147 array instead of just 31 x 31. Any hint how to go down to just 31 x 31?
 
hhh
@MichaelE2 Very good question -- there is a mistake in thinking!
there should be a sum, takes me some time to fix it..
 
It seems like the Table command is generating an {ii, jj} index if whenever a single value of kk makes MiNotJ[ii, jj, mcstable[[All, kk]]] return non Null.
@hhh Reap and Sow might be useful, if that is the correct behavior, for collecting all the desired indices {ii, jj}.
 
 
2 hours later…
6:12 PM
Has anyone seen this document about Maple 17 on WRI's site? wolfram.com/mathematica/compare-mathematica/files/…
I'm not sure this is good marketing for Mathematica ...
If you scroll down to the bottom, among the features that have only been added to Maple recently but Mathematica has had for a while, you'll find (!!!) -->
(Fortunately, that is not really possible because I is Locked.)
 
@Szabolcs So multiple undo will arrive in Maple 2023
 
Good point!
 
6:26 PM
@Szabolcs This document keeps getting mentioned here often (and no one is impressed by it). I get the feeling that WRI is being run by the marketing folks and not by developers... that's sad because the focus is now more on jumping on the latest fad and designing half-baked tools (like social data/big data/etc.) than on improving the core functionality or adding other much requested features.
This was quite likely some intern's project and they must've thought the best way to do a review is to talk shit about the competitor
 
@rm-rf But we have gauges
 
lol
@Rojo It's good for designing the "undo suck-o-meter"
 
Hehe
I dislike marketing in general
Such a money dump
But in our case it is worse than a dump, it's dumb and counterproductive
Like shooting coins in your own face. Anyone who has tried that will understand
 
Well no one likes it, but there are good ways of doing it and bad ways... WRI seems to have hired the love child of the devil and an incompetent intern.
 
It feels personal. As if sometime in the past, Stephen Maplesoft called Stephen Wolfram a baldie
 
6:36 PM
@Rojo Speaking from experience? :P
Hehe, I like how they're proud that mma implemented signal processing features in 2012, when MATLAB has had it FOREVER!
 
@rm-rf If Stephen Mathworks called him a baldie, they would forget about signal processing and talk about gauges
 
Hehe
 
I guess MAPLink isn't coming in v10 :P
 
I think Mathematica's 2D expression input, subscripts, etc. is the single biggest reason for poor programming practices... If I ever teach a class on Mathematica, I'll give an automatic -10 for anyone that uses them
@Rojo MAPLink?
 
@rm-rf I believe you, I saw on your last gauge that you like giving ratings outside the 0-10 range
@rm-rf Oh, just kidding, MAPLink, a link to Maple
 
6:47 PM
 
@rm-rf I use some 2D inputs in notebooks, specially when others might read them. Sorry
Haha
 
@Rojo Oh, I do as well... it's sometimes useful to express something compactly/closer to math equation/etc. Just that by using that as a selling point and introducing that as a "hello world" sort of, they're lowering the bar to using Mathematica (understandable, from a business viewpoint) and propagate bad practices
I'm probably just being grumpy... it is entirely possible to use it for a very long time without running into issues (or not caring about them). I'm sure the guys at TeX - LaTeX feel the same way about my latex coding, despite the fact that I've been using it for several years
@Rojo Hehe, try this: AngularGauge[Infinity, {0, 10}]
Probably from the argument of DirectedInfinity, but it seems like it will accept any arbitrary argument instead of throwing an error
 
Hehehe
Daamn. I live in front of a park. It's 4 pm. Park is full, of course, of people relaxing, with their kids, etc
and there's some crazy crappy metal band playing at volume 11 in the middle of the park. Poor people
I was planning to take my laptop to the balcony but not a good idea
 
@rm-rf That sounds like putting on perfume instead of showering
...so it should work :)
 
hehe
 
7:40 PM
@rm-rf -10 for the OP of the last question
 
8:02 PM
I should have expected that the adjective "last" would render my comment backwards incompatible after a few minutes
 
The last row does not update:

symbols = Unique /@ {a, b, c};
fields = InputField[Dynamic[#], Number] & /@ symbols;
Column[fields~Join~{Dynamic[symbols]}]

If anyone can see why that is it would be much appreciated :)
 
@Calle There's a question of mine on that
Wait, I'll find a link
but my conclusion at that time I thiiink it was that those symbols created by Unique just aren't tracked. Let me check
13
Q: Unique[] symbol not properly tracked

RojoIn a nutshell, why does this work (change y and see how the value updates) ClearAll[y]; Dynamic[x, Initialization :> (x = Symbol["y"])] and then on a separate cell y = 98; but this doesn't? (assign the printed variable whatever value and see how it doesn't update) Dynamic[x, Initializati...

Perhaps it's time to take a new fresh look at that
 
I've spent hours on that problem! I feel very lucky you were around. It's odd that they aren't tracked.
 
@Calle No, it wasn't exactly that. The issue you just discovered is a nice complement to that question
 
Now I can start looking for workarounds I guess.
 
8:12 PM
@Calle Well, this is clearly not standard Mathematica. In my case, I don't remember exactly what I was trying to do but for sure I was trying to stretch the limits of Dynamic to simulate stuff that the Futz would have said "it just can't be done yet"
 
@Rojo This may not be exactly that, but I have another problem too that is just like that.
 
@Calle but you can always force the updates with updateInterval if that is not a big waste for you
 
@Rojo Yup, that seems to work.
 
@Calle It seems it also works if you initialize your symbols
symbols = Unique /@ {a, b, c};
fields = InputField[Dynamic[#], Number] & /@ symbols;
Scan[(# = 0) &, symbols];
Column[fields~Join~{Dynamic[symbols]}]
 
@Rojo Yeah.
@Rojo Perhaps you can see a connection to this issue as well. If I wrap the code in this answer with DynamicModule[{},code] it stops working. Could it be because I use Unique in there?
I know it's not exactly a MWE, just if you've seen this behavior with DynamicModule as well.
This type of problems with Dynamic is unfortunately very poorly documented. It's hard to see why some things work and some don't :/
@Rojo NVM, thanks for your help :)
 
8:37 PM
@Calle It didn't stop working for me
 
@Rojo no, had to localize the variables too srry.
and that's when it stops working.
 
@Calle Oh, I won't try it now. But, at least, you should know that you are fighting the system by coding like that
Ideally, the variables you use should be localized explicitly by DynamicModule
 
8:57 PM
@Rojo OK, ty.
 
hhh
9:44 PM
Is this the right way to do inner for-loops?
or should one colon be a semicolon between the for-loops?
(I cannot understand what the procedure really mean in the docs)
 
To be frank you should avoid using For loops. I've never seen a For loop that couldn't be implemented functionally (= more efficiently)
 
10:02 PM
Naive question: why does Locator not work in the epilog? Graphics[Circle[], Epilog -> {Locator[]}]
 
@Szabolcs ...nor Prolog
 
hhh
@MikeHoneychurch You mean with Table[...,{i,1,31},{j,1,31}]?
 
@Rojo So it just doesn't work, and there isn't a lot one can do about it, right?
 
@Szabolcs I don't feel more qualified to guess than you, but that would be my guess
 
@Rojo Do you know how to get a Locator not to update its variable until I'm finished dragging it?
pt = {0, 0}
Dynamic[pt]
Graphics[Locator[Dynamic@pt, ContinuousAction -> False]]
This one does update it continuously. Am I missing something?
Well, ContinuousAction is not documented for Locator, but it is present, so I am still confused.
 
10:13 PM
@Szabolcs Should I stop ignoring the question?
Hehe
 
No ...
 
Ok, ignored
 
@Rojo I meant, yes, please don't ignore it.
 
@Szabolcs Ah, ok
Good, because I had it copypasted
Graphics[DynamicModule[{tmpPos = pt},
Locator[Dynamic[tmpPos, {Automatic, (pt = tmpPos) &}]]]]
 
@Rojo It's a good workaround!
 
10:20 PM
@Szabolcs hand made continuous action
Perhaps {Automatic, (pt = #) &} makes more sense, not sure
 
10:41 PM
@Szabolcs Graphics[Locator[Dynamic[pt, Temporary]]]
 
@MikeHoneychurch Ohhh, that's new to me
 
@MikeHoneychurch That's new to me too. I've never seen it, even though it is documented.
 
but it's in the docs
 
its documented. I've used it once or twice
In the dynamic docs under Scope > Advanced Dynamic there is an example (using Slider)
 
Yes, it is indeed documented.
Do you guys know what is a partition function?
(in statistical mechanics)
 
10:50 PM
yes. ...well yes as in I used to LOL. it is for calculating entropy from memory ...but it is years since i have been involved with that sort of stuff
 
I have one of those, brute force calculated (I know it looks silly): pastebin.com/YmU8pjQe
I'm trying to make it calculate faster, though I don't think it can really be improved much ... exponential with large arguments ask for trouble if I compile.
 
why brute force. i would think u should be able to write an efficient function. I'd have to re-read my phys chem textbooks
 
Don't bother, I'm quite comfortable with the math part right now. I'm just trying to use it in an interactive demonstration and improve speed. But it already works pretty well.
I brute forced it for a small system to see how that system works. There's no way to calculate it any other way due to the nature of the problem.
(Except use approximations for very large systems, but that's a different thing.)
 

« first day (661 days earlier)      last day (3820 days later) »