« first day (712 days earlier)      last day (3778 days later) » 

11:20 AM
477 items on the to-do list. I'm excluding data that is already accessible from WA or data paclets. en.wikipedia.org/wiki/User:Wakebrdkid/Wikicode/To-do_list
 
 
2 hours later…
1:21 PM
In a Compiled function, I am interested in performing some dot products and then looking at only the diagonal elements. Apparently Diagonal[A.B] inside a compile function results in a MainEvaluate call. Is there a good compile-friendly way to pull out only the diagonal elements of a matrix?
 
@Zibadawa you can just use Table, I think
@MichaelHale what is "visual attributes as solid/liquid" for aluminium, for instance? Complex refractive index 400-700nm? Or something else?
 
@OleksandrR. In what way?
Table[A.B[[i,i]],{i,1,3}]?
Would that cause A.B to be evaluated for every value of i, or would it store it and only do it once?
 
@Zibadawa this is essentially what I was thinking of, yes. The question of whether it would be re-evaluated or not is a good one. Table does have HoldFirst, but the VM doesn't really have any concept of attributes, so it depends on implementation in the VM. I suggest compiling it and examining the generated code.
 
1:38 PM
I'm not entirely sure how to tell if it's re-evaluating from CompilePrint
It alleges it is human readable, but that only seems true if you are already well-versed in whatever pseudo-language it spits out
Apparently there's a MainEvaluate on the dot product...
Apparently using A.B is bad, but Dot[A,B] is okay. That's unexpected. Still unsure if it's re-evaluating, but at least I know to avoid that.
 
@Zibadawa interestingly it uses opcode 47 if you do a.b[[i,i]] but opcode 42 if you have (a.b)[[i,i]] (note that Part has higher precedence than Dot)
 
Ah, yes, that would be why the dot had a mainevaluate, then
I've no idea what that removed comment means.
 
No, my mistake. 42 is a call to a runtime function.
 
Well, it's not giving me any "resorting to uncompiled version" errors now
Now if I could just figure out why sometimes Parallelize results in radically slower code...
 
Anyway, looking at the different code, it seems better to precompute. If you don't, then yes, the dot product is evaluated over and over again.
 
1:51 PM
Hao
 
That's bothersome, then. I need to do dot products of many related matrices, and I was intending to do them all within the same compiled code
 
@Rojo ni hao
 
@OleksandrR. Ni chi le ma
 
@Rojo not yet :D
 
@OleksandrR. Me either :)
 
1:54 PM
I'll have to come back to play with that tomorrow. No heat in my office during the break, so my toes are getting a bit cold.
 
@Zibadawa just With[{m=a.b},Table[m[[i,i]],{i,1,Length[m]}]] should be okay
 
ah, thanks
 
As far as I can tell, there's no real difference between With, Block, and Module inside the VM. But, let's use the right one anyway...
 
Does that work inside other structures? Like Table[With[{m=A.B},Table[m[[i,i]],{i,1,3}]], but where the outer table's variable is ultimately changing what A looks like (different selection of columns, ultimately)?
and assuming I close brackets correctly
 
Well, yes it works, but you should move the With to the outside, otherwise you're recomputing the product not on each inner loop iteration but still multiple times
In other words the VM does simulate the HoldFirst behavior of Table, so just use it like you would use it outside of compiled code.
 
2:01 PM
Well, like I said, the matrix I'm computing m from changes with every iteration in the outer table
Will it not choke if I use the With outside it when the expression inside the With relies on a variable inside the outermost table?
 
@Zibadawa oh, right, yes. Okay then, that should be fine. Though could be quicker to do the full-rank Dot and then pull out the necessary elements from the result, rather than reset the input and form the product repeatedly. (If possible in your application)
 
I'm not sure I understand.
 
@OleksandrR. We'll gradually build up the complexity. For now, just a couple of graphics primitives setting color/specularity/transparency would suffice to start. The most complex I would imagine currently would be doing a 3D Texture for something like granite so you can do cutaways properly or show crystal composites.
 
@Zibadawa Sorry, I wasn't reading carefully enough. For columns of A then yes it seems like you have to do it that way. I was thinking of the analogous situation for rows of A or columns of B where you can just pull out the rows/columns you want at the end
@MichaelHale what do you see as the application for this compilation of knowledge? For me the big problem with W|A has always been that it just goes with the first seemingly relevant answer it can come up with, without regard to applicability to the given situation. So for instance if you ask for the flag of Angola in 1593, it might give the current flag, or the Portugese flag, or something else without acknowledging the historical complexity.
I don't care all that much about history in fact but when this is done for thermophysical properties of the elements it really becomes annoying
What I'm trying to get at is that a result that subjectively looks a bit like a picture of aluminium doesn't really seem to me as if it would be all that useful for any actual application. But maybe my physchem background is skewing my judgment on that.
 
2:17 PM
Well, that seems to have improved speed by a substantial amount. Nearly 14 hours originally to do this task, now under 310 seconds.
 
I think the current capabilities for parameterized 3D color textures enable a lot of cool scenarios. A tree trunk texture that has an adjustable age parameter that puts more rings in the trunk you can see when it is cut open. I definitely see this more as a way to try to grow the Mathematica capabilities more and eventually phase out Wolfram Alpha. I just avoid the W|A functionality for now because it is usable if you mess with it some and I can work longer the farther away I get from feeling
like I'm reimplementing something.
 
Now if only I can prove a theorem which says that's all I really need to do...
 
Should we rename this site to:
-2
Q: I need a help about the mathematica

RichalI want to make a animation including three graphic ,it can be about two ball collision finally become a ball which still moving. such as : Animate[ParametricPlot3D[{{Sin[u]*Cos[Pi*t + v], Sin[u]*Sin[Pi*t + v], Sin[u]}, {2 Cos[2 Pi*t] + (1/2)*Cos[v]*Sin[u], 2 Cos[2 Pi*t] + (1/2)*S...

?
 
That would be a rather onerous name.
 
@Zibadawa why´s that?
 
2:23 PM
@OleksandrR. I'd love to eventually see all sorts of complexity for visual attributes that take into account physical states, alloy compositions, even computes parameters on the fly by doing some initialization molecular or quantum computations, for example.
But for now a good start would be if you had a model of a soda can that you wanted to animate rotating, it would be convenient to just say Aluminum`Material[] to get some simplistic directives that look metallic.
 
@YvesKlett It resolved as a link to a post
 
@MichaelHale my main concern about doing this kind of project would be that you can spend a lot of time incorporating many miscellaneous facts in the hope that it would be useful for someone, but because the information lacks detail, it ends up not being useful for anyone after all. So, if it were me, I would start with things about which one can be absolutely definitive and authoritative. So no demographic details or visual appearances.
The listing of lattices and various different nuclides are a good example of useful data, IMO, because these things can be stated with absolute confidence and are not going to change. For any experimentally derived information you definitely need to give a reference, though
 
I understand your concern, but I have found the demographics data already in Mathematica to be useful for exploratory purposes. This project follows the same guidelines as Wikipedia and encourages listing of references at the bottom of code sections. So that, combined with open source make it easier to track down references you are using than Mathematica or W|A.
 
@YvesKlett "wegiveyouahalpaboutthemathematica.com"?
 
Like for the data I pull from the World Ocean Atlas. You can look at the code for the package and get the direct URL from the Import commands, or you can scroll down and see traditionally formatted references just like a journal or Wikipedia article.
We could add a utility function to compile a formatted reference list from all of the packages that you are using.
 
2:39 PM
@MichaelHale well, that's my point really. If you find the data actually useful for real applications, then that's great, as it avoids the question of whether it is useful or not. For other cases on your to-do list, I'm not so sure. If I were you I'd be reluctant to go out and research and program all these things until I knew for sure that I needed them and what information exactly would be suitable
 
@YvesKlett We need a help about the Wolfram. Mathematica is almost obsolete
 
@OleksandrR. I'm compiling the list by searching through articles that are popular and closer to root categories. I just scan the article for any chart or visualization or table that I think I could recreate in less than a page of code. Then I add it to the list. So my threshold for importance is if the crowdsourcing mechanics of Wikipedia have considered it necessary for an article about the subject.
The idea is that over time, the complexity of what we'll be able to accomplish in a page of code will grow as we continue to expand the function library, so we'll be able to add new tasks in the future that aren't feasible now. More complex simulations, etc.
 
3:13 PM
@Rojo but, the Wolfram is so intuitive (not to mention sentient) that nobody could need a help about it! The only problem is deciding which Wolfram you're trying to use...
 
@Rojo :D
@OleksandrR.
 
@OleksandrR. but you can use Wolfram to decide which Wolfram to use!
 
3:31 PM
@rm-rf But is that the Universal Wolfram, or the Ultimate Wolfram? I heard that Stephen Wolfram was thinking of rebranding himself. Either Supreme Wolfram or WolframAlphaAndOmega (not decided yet)
 
@OleksandrR. Since the adjective Wolfram > Ultimate, it probably might be Wolfram Wolfram
 
@rm-rf either way, naming a Wolfram is clearly a very serious business. No room this time for awful mistakes like Literal -> Verbatim, Compose -> Composition, SetSharedDownValues -> SetSharedFunction, or the like
 
4:09 PM
Hey folks, how to output $1^3+5^3+3^3=153$ to be copied into my LaTeX document when using IntegerDigits[153]^3?
 
4:22 PM
Regarding this:
78
Q: How to generate a random snowflake

Peltio'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So, here's an holiday quest for you Graphics (and P-Chem?) gurus. What is your best code for generating a (random) snowflake in Mathematica? By random I mean with different shapes that will mimic the ...

some might want to consider participating here:
1
Q: Let's simulate a random snowflake

EntryLevelDevI saw this question on http://mathematica.stackexchange.com/ and I think it's pretty cool. Let's make the snowflake with other programming languages. This is a quote from the original question: 'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So...

@rm-rf is there a simple way to ping tho authors of the snowflake thread?
 
posted on December 30, 2013 by S M Blinder

I had intended to write a treatise describing the history of the hydrogen atom over the last 100 years. Unfortunately, my time is running out this year, so I will content myself instead with this much briefer blog post outlining the major events associated with Niels Bohr’s three epochal papers in 1913. The hydrogen atom [...]

 
@rm-rf uh, just saw that this is completely taken from MMA.SE and other languages are encouraged :/
 
 
1 hour later…
5:45 PM
Since I've been away for a little more than a week i never got a change to post my MMA Christmas tree.
transforms = {
AffineTransform[{{0., 0.}, {0., 0.16}}],
AffineTransform[{{{0.85, 0.04}, {-0.04, 0.85}}, {0., 1.6}}],
AffineTransform[{{{0.20, -0.26}, {0.23, 0.22}}, {0., 1.6}}],
AffineTransform[{{{-0.15, 0.28}, {0.26, 0.24}}, {0., 0.44}}]
};
p = {0.01, 0.85, 0.07, 0.07};
step[{x_, y_}] := RandomChoice[p -> transforms][{x, y}]
Graphics[
{
Darker[Green], Point[NestList[step, {0, 0}, 10^4]],
Red, Disk[#, 0.05] & /@ NestList[step, {0, 0}, 10^2],
Yellow, Disk[#, 0.05] & /@ NestList[step, {0, 0}, 10^2],
.... or should I say Christmas fern.
2
 
 
4 hours later…
9:23 PM
I'm wondering how fast something like this would be closed on our site. I think such a thread would be fun.
 
10:10 PM
I would not vote to close a thread such as @halirutan mentioned, but I think MMA.SE is a smaller community and low participation is not good for a thread like that.
 
10:38 PM
@halirutan do it on the meta like they did; it won't be closed...
Huge majority of German TeX users...
 
@OleksandrR. First I have to think about some good poll questions.
 
@halirutan my answer is (214)
 
@OleksandrR. hmm, OK!?
 
@halirutan what you linked to. (214) South Georgia and the South Sandwich Islands
 
@OleksandrR. Ahh, stupid me.
 
10:44 PM
That, or the North Sentinel Island
 
@halirutan "What is your favourite Mathematica function?" :D
 
@rm-rf More like "What mental tricks or drugs do you use to forget that Wolfram Language was ever called Mathematica?"
 
acl
@halirutan Has there been some sort of official renaming?
 
@acl You need to get out of your cave more often...
 
acl
@rm-rf I'm sorry, latex is beating me up badly so I can't move
The Wolfram Language is a highly general multi-paradigm programming language developed by Wolfram Research, that serves as the main interfacing language for Mathematica. It is designed to be as general as possible, with emphasis on symbolic computation, functional programming, and rule-based programming. It is built to represent arbitrary structures and data. The language is very large, touching on numerous domains, often specialized. For example, it includes built-in functions for generating and running Turing machines, creating graphics and audio, analyzing 3D models, and solving diffe...
 
acl
some hyperbole seems to be involved
 
I wonder if WRI is taking Mathematica in the direction of the mobile apps business model... there's Wolfram Alpha Pro, Mathematica Online, Wolfram Cloud, GridMathematica, etc. If WL ends up being a giant toolkit that's utterly useless without a hefty subscription to one of the above WRI services, then it's a step backwards, IMO.
 
11:31 PM
@rm-rf I am usually quiet in such discussion, because I personally think that many steps were already steps in the wrong direction.
I don't think WA is as good as it is hyped; everything with a Cloud in it scares me anyway, etc, etc.
2
 
acl
@halirutan I don't think you are alone in being underwhelmed with WA...
 
@acl It really is nice and in some situations it gives exactly the kind organized information I want to have, but it's just that I don't need it that often. Maybe it's me.
 
acl
@halirutan Right. More than that, the amount of hype over it is just incredible.
I mean it's impressive by itself, but next to the hype, it's ridiculous.
 
@acl And with this, I get the feeling I have in general: It feels like everything needs to be promoted and hyped because if you look at it plainly, it is only great and not super duper mega awesome. And then I ask myself, why so less effort is put into bringing current features to a higher level. Like the pdf-export, like exporting colorized source-code, like improving the speed of the front-end
...
 
acl
@halirutan Yes exactly. So many things could be made more robust and yet they're not.
 

« first day (712 days earlier)      last day (3778 days later) »