« first day (228 days earlier)      last day (4246 days later) » 

2:32 AM
@Verde Tell you what: if there are at least ten questions entirely about manipulating derivatives, then we make a tag; otherwise, they can stay under the tag for now.
@acl The $m_i$ are arbitrary unitary matrices? The thing you're proposing isn't obvious to me at a glance; I'll have to think a bit...
 
acl
@J.m. Yes, but from my brute force approach this should be true for arbitrary matrices (but I haven't checked numerically now that I think about it). Thanks for thinking about it (nevertheless do not spend much time, I can show it by manipulating indices, I was simply wondering if it can be deduced from some property I don't remember)
 
3:08 AM
I'm trying to do this:
i = RandomInteger[{1, 12}]
If[(p = RandomInteger[{1, 12}]) == i, p, RandomInteger[{1, 12}]]
i generates a random integer, and the function above will generate another integer that must be differente, I want to build a function that will try to re-evaluate it again, in the case of it being equal to i.
 
3:22 AM
@GustavoBandeira Why not use RandomInteger[{1, 12}, 2]? In the off chance that the result has two identical integers, evaluate again.
 
@J.M. Is there a way to re-evaluate one line if I have 2 equal integers?
I'm trying to make a function to generate random chords - the same note can never be repeated again.
 
R.M
f[] := f[RandomInteger[{1, 12}, 2]]
f[{a_, b_}] := a
f[{a_, a_}] := f[]
Is that simple to follow?
 
@R.M Yes, but there's a chance of this outputing two equal integers, right?
 
R.M
Well, I'm not really sure what you want to do... :D
How many notes do you need at a time for the chord?
 
@R.M I want to create a function that will generate 2 integers, say, x and y. If x=y, then it will re-evaluate itself again.
 
R.M
3:35 AM
@GustavoBandeira Well, then just change the second definition in my function above to {a, b}
That's all the change you need.
You'll never get two integers that are the same.
Even simpler would be: RandomSample[Range@12, 2]
 
a = Table[RandomInteger[{1, 12}, 2], {x, 1, 100}];
DeleteDuplicates[
Table[If[a[[x]][[1]] == a[[x]][[2]], {True, x}], {x, 1, Length[a]}]]
It's possible to get repeated integers.
(I used to do this kind of thing with While - It's so much easier to do with tables!)
@R.M Yes, this is the right function!
I could also use the code I generated above to do that, by excluding the "true" ones. =D
 
3:54 AM
@GustavoBandeira Use RandomSample[Range[12], 2] which is guaranteed to give you two unique elements from the set.
 
R.M
4:17 AM
@acl are you certain that they're dependent on $n$ and just trying to prove it or are you trying to find out if they're dependent?
 
 
11 hours later…
3:31 PM
I did a progress bar:
`ProgressIndicator[Dynamic[g], {1, 10001}, ImageSize -> {600, 50}]`

How can I put a percentage on it? I want it to be: [____________50%____________]
 
F'x
3:47 PM
@GustavoBandeira I would say use an Overlay, but it doesn't work
Overlay[{ProgressIndicator[Dynamic[g], {1, 10001},
   ImageSize -> {600, 50}]},
 Style["50%", 14, Bold], Alignment -> {Center, Center}]
 
@F'x Do you know any other alternative?
 
F'x
no, wait, I matched my braces wrong
This works:
Overlay[{ProgressIndicator[Dynamic[g], {1, 10001},
   ImageSize -> {600, 30}, BaselinePosition -> Baseline],
  Style[Dynamic[ToString[Round[100*g/10001]] <> "%"], 16, Bold]},
 Alignment -> {Center, Center}]
It's actually pretty cool :)
anyway, gotta go, I hope this helps
please leave me a comment if you find a problem with it (or ask it as a question on the site itself)
see you
 
@F'x Thanks for the help.
 
 
3 hours later…
7:29 PM
@GustavoBandeira See my comment at your Range@13 question
Not sure if you are calculating it the hard way for another reason, though
 
R.M
7:43 PM
¡Hola!
 
7:53 PM
@R.M olas!
@R.M You here?
 
@J.M. way tubular!
@Verde beat me to it there. :) Also: oeis.org/A003418
@Verde if so then compilation gives a reasonable boost (~25×)
 
8:10 PM
@OleksandrR. Yeah, but I don't really know if his intention is to calculate the LCM, or if it is a toy problem for understanding something else. That's why I didn't post an answer
 
Of course, the algorithm runs in exponential time, so compilation doesn't really buy you much for very long...
 
@OleksandrR. I think one could design a better algorithm tuned for the Range@x case
 
8:49 PM
@OleksandrR. Exp@Total@MangoldtLambda@Range@13
 
@Verde that's a good one! MangoldtLambda is new to me...
 
I don't believe timmings are much better than those of LCM
In fact they are worse :(
 
Well, it's still a nice identity. Number theory isn't my strong suit, that's for sure.
 
Srinivasa Ramanujan FRS () (22 December 1887 – 26 April 1920) was an Indian mathematician and autodidact who, with almost no formal training in pure mathematics, made extraordinary contributions to mathematical analysis, number theory, infinite series, and continued fractions. Living in India with no access to the larger mathematical community, which was centered in Europe at the time, Ramanujan developed his own mathematical research in isolation. As a result, he sometimes rediscovered known theorems in addition to producing new work. Ramanujan was said to be a natural genius by t...
 
9:22 PM
@Verde I've read his history.
Some days ago.
I wish I had such achievements.
@Verde Yep,I've seen.
 
OK!
@GustavoBandeira Ramanujan was one of a kind.
 
Caps means you're screaming!
Yep.
I'm going to take a nap.
Cya.
 
bye!
 
9:47 PM
Word to the wise... FindFit/NonlinearModelFit/(probably the other fitting functions too) have a parameter localization bug. Parameters of the form f[g, x] are localized correctly, but those like f[g[x]] aren't. I found this quite obscure.
Most bizarrely of all, the bug does not manifest if you use the (undocumented) Method -> "PrincipalAxis" option.
 
@OleksandrR. Thanks! Comment flagged as Too Localized :)
 
@Verde that's precisely the reason I haven't asked any questions so far... everything I find difficulties with is waaay too localized.
 
Evening
 
@Rojo hello!
 
@Rojo hi
 
9:52 PM
Hey Veerde
Hallo @OleksandrR
I didn't realised you hadn't asked a single question
Only few active users are in that elite group
 
@Rojo admittedly, I should try harder to think of something relevant. Leonid has managed to find things worth asking.
 
You mean worth self-answering?
 
Well, yes.
 
But Leonid, apart from knowing a lot, has his own style.
It seems to me he'd rather reprogram the wheel in assembly rather than ask in case he missed something
2
 
I suppose I could ask about Savitzky-Golay filtering. Then I can self-answer with my own code and J. M. can post his too.
 
9:55 PM
Of course, his new wheel would be way faster than all the rest
 
@Rojo Doubt is the jactancy of intellectuals
 
Hehe
I've asked 33
I'm very doubtful
 
Well, your questions have pretty much all been on topics that I've wondered about. You just had the good sense and motivation to write it up.
 
Motivation is the jactancy of rugbiers
I think I've been asking less and less however
Probably I had some accumulated doubts before I came to the site, that have already been cleared
 
@Rojo Doubts are useful. They keep reassuring you about your mortal condition
 
10:02 PM
How many people do you estimate have ever died throughout history?
 
I dislike this very much
0
Q: Handing a list of constraint expressions to a C++ function with MathLink

Daniel EbertsI need to solve an optimization problem, which is defined in a Mathematica notebook. Using Mathematica's FindMinimum is not an option, because it is too slow. So, the idea is to use an external solver for quadratically constraint quadratic problems and use MathLink to get the constraints of the...

 
@Rojo out of interest, how did you initially learn Mathematica? I learnt it by myself from the docs and through my own experiments, but increasingly I get the impression that this is uncommon and most people learn it from others--a taught course, colleagues, asking questions, etc. I never felt like my doubts would be of interest to others, though. After reaching a certain level of proficiency that of course changes, but perhaps I'm stuck in my ways now.
 
I learned it from the docs
like you
 
How he dares to insult FindMinimum so easly
2
 
@Rojo perhaps not as uncommon as I thought then. Or, at least, now I have no excuses. :)
@Verde FindMinimum is pretty fast. I'd be surprised if you could do a lot better outside of Mathematica, except perhaps in very specific situations.
 
10:05 PM
@OleksandrR. I downvoted him heartily
 
@OleksandrR. I learned it by myself, docs, experimenting. I was never a forum-active person, and I gave the mathgroup a shot even when it felt weird to ask. I ended up asking 3 or 4 only, not very satisfied with it anyway. Google groups, days between questionn and answer
Receiving answers by mail in private, receiving warnings that someone is currently on vacation
Hehe
And then I think I've learned quite a lot since I arrived here, by asking and reading
 
This forum is definitely a good thing. I've become a much better Mathematica programmer since joining up.
 
In here, Verde is probably the only local person I (don't) know that uses it regularly or knows how to use it more than to plot a sine
so, no courses, no nothing
 
I think it helps a lot to be around people of similar and higher skill levels than oneself. There's a lot of experience on MathGroup, no doubt, but it tends to be drowned out by the n00bs.
 
Also, here you get the opportunity to interact with nice people. Now, we are only awaiting for those to arrive
6
 
10:08 PM
@Verde starred!
 
x2
 
:=
 
I never asked any questions of MathGroup either, for that matter. My first post was demonstrating how you can use MathLink to communicate between different parallel subkernels.
 
Advanced
 
That was around the same time that I realised that, to get things done, sometimes you need to use undocumented functions...
 
10:12 PM
...that's how they do the documented functions
 
The whole mechanics of a by-mail forum isn't tuned for programming questions. You can't wait for a week for someone to come out with ... "hey ... use SetProperty[ ]"
 
Yeah
This forum is a great step forward, but we still have others
We should have way more packages shared, for some reason it doesn't happen
@Verde, up with infix
 
@Rojo I think it is so because a bullet proof package takes so much time to program in Mma
 
Infix to the death
 
@Rojo Sissy chatting
 
10:15 PM
@Verde Shut
@Verde 5~Range~Sequence[]~Total~Sequence[]
 
Now go with `HighlightGraph[#, Flatten@Position[VertexDegree[#], 1],
VertexLabels -> "Name"] &@s` ... quickly
 
@Rojo agreed with that. I just wrote a package to answer this question. Overkill? Yes, but it's something many people might find useful. Will post in a while.
@Verde you're right. I never bother with bulletproofing. If it doesn't fail for correct inputs, I consider it a job done.
 
Hehe
 
@OleksandrR. The problem with that is that a misbehaving program can freeze your kernel to death easily. Or kill it.
 
In any case
it would be nice to have some sort of system in which if something was used by several people it ended up being bulletproofed
 
10:21 PM
@Rojo It has been suggested a few times in meta
 
Let's metasearch
Yea
@OleksandrR. if I ever know as much as you about licensing, I'm sure I would forget it all in a day
 
@Rojo it would be nice not to have to care about licences. Unfortunately, software licensing seems to be as much a political as a legal/technical exercise, and people will make a huge fuss if you offend their sensibilities.
 
10:42 PM
I see
Much like when you talk bad things about FindMinimum near @Verde
 
@Rojo Nahhh ... I am upset bc he threw up an unjustified statement. I want to look at his "optimized" C code
 
10:59 PM
@Verde perhaps he's under the misapprehension that FindMinimum, like NMinimize, is implemented in top-level code. I'm not downvoting because the question is potentially interesting as it stands even if the statement is incorrect, but I understand your point of view.
 
@OleksandrR. I don't think blaming about a function behavior without showing the reasons are of much help for others here. We all know that many implementations in Mma are far from perfect, but the whole trick is understanding where the pitfalls are
 
I agree in the abstract, but for me it's not so much the why but the what (how to pass lists of symbols using MathLink) that's interesting. Of course, one still wonders whether he tried Method -> "LevenbergMarquardt".
 
@Verde but we need FindMinimum to find the pitfalls and it's too slow
 
There is also Optimization`QuadraticProgramming although I don't know how to use it (yet).
 
@OleksandrR. Agree with (how to pass lists of symbols using MathLink) that's interesting , but that is not how the Q is formulated
 
11:10 PM
GRR.. I inserted a horizontal thin line on my notebook because I was curious.. I can't find out how to get rid of it now
has anyone ever made that mistake lol
 
@LukeAllen, select it like any other cell and press delete
 
yeah that was my first idea too
but nope
 
You have to believe that it is selected even when you don't see the cell bracket
Select it with the keyboard
Shift+up/down
 
THANK YOU
i guess it's impossible to click thin lines
 
No problem
 
11:12 PM
@Rojo You have to believe ... Ha!
 
It's a leap of faith
 
 
Haha
 
once I figure this mathematica out it's going to be so fun hah
I'm not asking how, but is it possible to change section openers from triangle graphics to whatever graphic you want?
 
@LukeAllen That's a good question
 
11:17 PM
well I was looking at the opener documentation
it doesnt show its possible but
I'm not sure if using Image[] or w/e would do it or how to format it
Table[Opener[True,
Appearance -> a], {a, Image[blah.jpg]}]
like that for example
 
@LukeAllen literally speaking, no. (OpenerBox seems to have a fixed appearance.) But you can replace the Opener with a Toggler, which can look however you want.
 
I thought you were asking about cell groups openers
 
whatever you guys call the section openers
 
Whatever you mean when you say section opener
 
I don't want it that bad anyway was just curious how 'changeable' mathematica was for non-math stuff, just the gui stuff
 
11:24 PM
@LukeAllen There's a cell style called Section, and you can collapse cells with lower hierarchy, such as subsections. When you do, you can make the section cells have an opener on the side, to open or collapse the section
 
@LukeAllen well, usually the answer is "very much so". But often it's a bit obscure. I don't know particularly well how to do it myself and I think you have to expect that most things like this are going to be undocumented. In the case of the cell group openers, Cell has an option OpenerBoxOptions that you can use to change what an OpenerBox looks like.
 
That's what I thought you meant, but since you talked about Opener[, then OleksandrR's answer seems right
 
does anyone know the story behind why when you copy a tiny raster image from a pdf and paste it into mathematica, it will be about 5 times bigger than it was in the pdf
is mathematica zoomed in by default or what
ok it seems to be because it will paste the 100% image size of the image in mathematica
regardless of the constrained size in the pdf
 
acl
@R.M the first
@OleksandrR. I doubt most people here learnt it from formal courses
@OleksandrR. yes, that's the most useful thing in this SE: people of higher skill than oneself
 
11:44 PM
@acl that's what I thought too, at first. Then people started mentioning that they knew of Mathematica courses, which I had assumed didn't really exist (except for the training that WRI provides). Given that they do exist, and that some universities presumably use Mathematica in their teaching, I wonder how many people learn that way?
 
acl
@OleksandrR. I think only Heike has mentioned a course, but maybe I simply didn't notice
 
@OleksandrR. we get a few HW questions here, so I guess there are some
 
acl
@LukeAllen yes, let me check my notes on how I did that
@Verde but in the MG you'd be drowned out by those (I have no problem with that) but also by a small number of people with strong opinions. my metric for how useless a discussion is is the number of appeals to authority; there are (or were, I don't read it any more), lots of those there. bit like usenet.
 
@Verde Google for "mathematica course -inurl:wolfram.com" seems to suggest quite a few.
 
acl
still, there's some very useful info there
 
11:54 PM
@acl I changed ISP and my news server stopped working so I can't post any more, but I do still skim the posts on MG. Most of them are like you say, but there are a few that I think, "would have been better if you posted that on Mma.SE". This, for example... no way can we mention v9 features on MG.
 
gotta go, bye all!
 
Bye!
 
acl
@Verde come on, you're being too harsh! my C skills are negligible and yet my C code is generally faster than my mma code, even though I've spent years obsessively learning tricks to speed mma code up. it's a reasonable conjecture he's making (but the question is too localized as it is)
@Verde see you
@OleksandrR. So, are you procrastinating in preference to writing your thesis?
 
@acl well, it's 1AM here. But in a sense, yes.
 

« first day (228 days earlier)      last day (4246 days later) »