« first day (585 days earlier)      last day (3900 days later) » 

12:01 AM
(almost all of the *Matrix-es lead to a form of this)
 
 
3 hours later…
2:55 AM
@rm-rf Not that I was serious, but I wonder if there is actually a rule against answering questions using someone else's account, assuming you have permission. I mean, it's not voting fraud or the like. I don't imagine it's a common enough occurrence for there to be a rule about it.
@rm-rf Wow, the statistics there haven't been updated in forever. I wonder if we could motivate the authors to update those answers. Starting with @verbeia
@Nasser I can tell you that the rate of new users per period is approximately double the 2012 rate throughout 2013, with the rate fairly even throughout each year except for a few spikes caused by e.g. the xkcd question. It was about 7 per day average in 2012 and about 16 per day average for most of this year.
 
3:18 AM
@Kuba The OP wanted a count of True results for all tuples between part1 and part2; like Outer rather than Inner. If there is a simpler way to get the same result I'd like to know. (I do know that there would be significant optimizations possible if efficiently reimplementing Ordering but I didn't attempt that since with v7 I cannot compile to C.)
 
 
4 hours later…
6:52 AM
@SimonWoods this is most brilliant! High-end-oneliner material as well (counting 84 chars).
 
7:18 AM
@Mr.Wizard congrats - the badge does have special powers, too - crashed my firefox the instant I clicked on its link :-)
 
7:50 AM
@YvesKlett Which link? "Legend?" I don't know why that would happen.
 
8:00 AM
@Mr.Wizard I'm certain that's a straightforward violation of the ToS
> Under no circumstances will Subscriber use the Network or the Service to [...] (c) create a false identity or to impersonate another person ...
 
8:29 AM
@rm-rf It has no practical affect on me as I have no interest in doing this, but I'm not certain it's that clear. I read those terms to mean I can't start pretending I'm Jon Skeet or something. I don't think working on someone's behalf would qualify as impersonation.
 
8:43 AM
@rm-rf @SimonWoods en.wikipedia.org/wiki/Belousov–Zhabotinsky_reaction
Belousov–Zhabotinsky reaction, that's what it looks like to me
I don't quite understand how completely symmetric starting conditions lead to nonsymmetric results in this case though. Maybe through asymmetric rounding errors?
for even shorter oneliner, a = DiskMatrix[100]; Dynamic[Image[a = Rescale[a - GradientFilter[a, 2]]]] works also quite well.
 
9:04 AM
Interestingly enough, something resembling Voronoi regions would seem to "flash" behind the main pattern of this process from time to time...
 
 
1 hour later…
10:11 AM
@Mr.Wizard Ah, yes, I've missunderstood OP's idea. :) (p.s. do you sleep sometime?) :)
 
@kirma a = DiskMatrix@100; Dynamic@Image[a = Rescale[a - a~GradientFilter~2]] ;-)
 
10:29 AM
@Mr.Wizard not to worry, nothing reproducible (just oh so slightly eldritch)
 
10:43 AM
@YvesKlett :)
 
@Kuba Yes, but not often when I should. (I make light of it but it's really not funny.)
@YvesKlett Okay. :-)
 
 
3 hours later…
2:15 PM
Inspired by Simon Woods' one-liner: niksula.hut.fi/~jkirma/turbulence.mp4
2
ended up quite trippy :)
 
3:07 PM
Hello, is there any way to ask NDSolve to not store whole InterpolatingFunction but for example values for each 100th step?
@YvesKlett Hi, maybe you know :P
 
@Kuba sorry, no clue...
 
I do not want to end up with Nest :(
 
@kirma lovely!
but: code or it didn´t happen!
 
:)
 
3:33 PM
@YvesKlett Lots of crud in it, but basically I used this...
`SeedRandom[1];
s = 512;
a = Table[0, {s}, {s}];
Export["turbulence.mov",
Reap[For[i = 0, i < 60 + 30*60*5, i++,
a += RandomVariate[NormalDistribution[0, 0.01225], {s, s}];
a = Rescale[
a - GradientFilter[a, 3, Method -> "Sobel",
Padding -> "Periodic"]];
Sow@ColorNegate[
Image[256 (8.8705 a + 0.026349)~GradientFilter~3, "Byte",
ColorSpace -> "Grayscale"]]]][[2, 1, 61 ;;]],
"FrameRate" -> 30, "VideoEncoding" -> "Planar RGB"]`
not the prettiest piece of code on the planet :)
 
@kirma nah, hot stuff!
 
@YvesKlett It is definitely boiling. :)
 
makes me hanker for some soup :)
 
I'm still intrigued by the original becoming asymmetric. I guess it could be caused by additions being performed in a specific order, and different mirrored symmetries producing a different result? I can't imagine anything else, unless the algorithm has higher-level issues.
 
 
1 hour later…
4:43 PM
@kirma I'm intrigued by why it always leads to that rose like pattern... Also, someone had to do this :)
a = ExampleData[{"TestImage", "Lena"}] ~ImageResize~ 100 ~ColorConvert~ "Grayscale" // ImageData;
Dynamic[Image[a = Rescale[a - GradientFilter[a, 2, Method -> "Sobel"]]]]
 
 
3 hours later…
7:31 PM
Nice to see it in slomo `Dynamic[Image[
a = Rescale[a - GradientFilter[a, 2, Method -> "Sobel"]],
ImageSize -> Medium]~Refresh~None, UpdateInterval -> 0.1]`
Stuff like Quantity[2, 1000 "Meters"] doesn't work but WolframAlpha sometimes returns computable data in that format. Nice
 
acl
8:36 PM
All, I want to display a bunch of numbers with 2 digits to the right of the ., even if they're zero
(eg, I want 5.1 to be displayed as 5.10).
Due to some sort of mental malfunction I can't work out how to do it easily. Any ideas?
10
Q: Formatting a number with fixed number of significant digits

Alexey PopkovI need a formatting function (say format[x_, n_]) which outputs numbers with fixed n significant digits without unnecessary dot. Examples: format[.02,3] -> "0.0200" format[.2,3] -> "0.200" format[1,3] -> "1.00" format[100,3] -> "100" format[1000,3] -> "100\[Times]10^1" format[10000,3] -> "10...

thanks, guys
 
I see my iterative image processing went down well :-)
@kirma, you can see the asymmetry after just one iteration of the filter - look at e.g. ImageAdjust[Image[a-Reverse[a]]]
 
@rm-rf It seems counterintuitive that such patterns should arise from just GradientFilter...
@SimonWoods Hmmmh.
So all interesting stuff probably results from floating point rounding artifacts.
 
@kirma, I think so - I guess the swirling rose is stable with respect to small numerical errors. I was unable to find any initial condition which didn't eventually lead to it, but there may well be other stable states that we haven't seen yet.
 
8:51 PM
@acl This question comes to mind, Mr.Wizard's answer might help maybe: mathematica.stackexchange.com/questions/30370/…
 
@kirma Since this is mma, we could implement the entire iterative processing in exact arithmetic, but it might also blow up your computer =)
 
@rm-rf Maybe sufficient precision + rounding every iteration would create perfectly symmetric patterns, but that would also be quite uninteresting...
I wonder if Mma preserves order of primitive operations (like additions) for floating-point operations.
 
9:07 PM
@acl Perhaps NumberForm[#, {Infinity, 2}]&?
:10942637
1` + 1`*^100 - 1`*^100
1`*^100 - 1`*^100 + 1`
 
@kirma, not exact arithmetic, but a bit of rounding makes it interesting...
a = DiskMatrix[10, 200];
Dynamic[Image[
  a = Rescale[
    Round[a - GradientFilter[a, 2, Method -> "Sobel"], 0.09]]]]
 
@SimonWoods Hello there
How did you come up with that code?
 
Hi Rojo
I can't remember!
It's been lurking in my random notebook collection for a while
I love how MMA lets you create these endless animations with just a tiny bit of code
 
@SimonWoods Heh. That anyway keeps it symmetric.
 
@SimonWoods Do you think there would be an easy way to construct visualizations from audio input in a somewhat organized manor? More specifically guitar chords?
 
9:13 PM
...fir a while.
 
@SimonWoods Yeah. Animations through endlessly updating dynamics on images is your thing
 
@SimonWoods I will read more into the documentation, and I'll open a question about it eventually. I just haven't been able to determine how you might extract the guitar chord from something like SystemDialogInput["RecordSound"];
 
All roads lead to rose
 
That's how the universe will end
 
We're just living in a giant gradient filter
 
9:22 PM
@Liam, it must be doable but audio processing isn't really my thing. SpectrogramArray might be a good starting point
@rm-rf, you've been busy!
 
Could you guys tell me whats wrong with following code?
G = 4 Pi^2 // N;
n = 10;
data = Transpose@{RandomReal[{0, 2 Pi}, n], RandomReal[{.5, .7}, n]};
initpos = #2 {Cos@#, Sin@#} & @@@ data // N;
initvel = 2 Pi/Sqrt[#2] {Cos[# + Pi/2], Sin[# + Pi/2]} & @@@ data // N;

NDSolve[
{
Sequence @@ (r[#]''[t] == -G r[#][t]/Norm[r[#][t]]^3 & /@ Range[n]),
Sequence @@ (Array[r[#][0] &, n] == initpos // Thread),
Sequence @@ (Array[r'[#][0] &, n] == initvel // Thread)

},
r /@ Range[n],
{t, 0, 1}

]
It says it's not an ordinary differatial equation
 
@Kuba, you've used r'[#] in the boundary conditions instead of r[#]'
 
o well, I should do to bed then...
Thank you.
I was checking this too but I have not seen this :/
ah
 
Hehe
 
acl
@Rojo thanks, that's what I did in the end
@Calle thanks, in the end I (ahem) searched the site :)
 
9:30 PM
I shouldn't be easy to deconvolve the rose then, hehe
@acl Sure, no problem
 
acl
@Rojo I've not been paying much attention to the site recently. anything interesting I should look at over the last month or so?
 
@acl Not sure, I have missed several questions too. I'll let you know if I come into something interesting
@rm-rf Perhaps it is the other way around, and roses are how they are because the leaf's angle evolves somehow according to the gradient blablabl :P
Petals, not leafs. Woe my English
@acl What kind of questions interest you the most
Any favourite tags?
 
acl
@Rojo performance tuning and "programming" (no graphics!)
I'm going through them now and compiling a list to look at...
 
@acl You can perhaps start here
(of course, votes don't always correlate to quality or reflect your interests, but nevertheless, a decent place to start)
 
acl
@rm-rf ah yes! the gentle reminder that I've been neglecting my duties and the queue!
thanks :)
 
9:39 PM
Speaking about performance tuning, if I happened to feel like posting a CUDA version of an answer to some performance tuning question, would it be appropriate?
 
acl
@Rojo I'd say yes. Would be useful for reference too (ie as an example)
 
I would think so... I hope to see more CUDA and OpenCL answers mainly because I want to start using them too at some point.
 
Great
 
I wonder if GradientFilter uses some advanced trick, like FFT to do its' job.
I just can't comprehend how it can be still asymmetric after I add various rounding stuff on every round.
 
@MichaelHale Do you mind if ask you some more questions about your work experience or school?
 
9:44 PM
@Liam Not at all. Ask away.
 
@Rojo, oh please do. I'd love to see more examples of CUDA programming for MMA.
 
@MichaelHale Do you know any Bioninfomatics students that eventually got jobs in that field?
 
@kirma You can't escape the floating point operations in GradientFilter unless you write your own Sobel filter in exact arithmetic
 
@MichaelHale I'm actually quit interested in the demographics because I noticed that you said that you eventually went to Seattle yes?
 
@Liam During an internship near Seattle I went on a hike with students from Dr. Baker's laboratory at the University of Washington. Several of them were grad students in bioinformatics and computational biology.
 
9:49 PM
@acl You might like this to go with your other notebook tools... :)
 
@rm-rf I know, but I expected it to perform a bit better if results were rounded to just couple effective bits every iteration. Apparently that didn't help.
 
@Liam Yes, I lived in Redmond after college for three years.
 
acl
@rm-rf nice answers
 
@MichaelHale Seattle is a very cool place. Did you choose Seattle or was it just luck?
 
@kirma, a bit of spelunking shows that GradientFilter uses ImageConvolve which itself uses ListConvolve about which the internal implementation notes say "uses FFT algorithms when possible", so I guess you are right.
 
9:54 PM
@Liam I agree that it is a cool place, but I was initially drawn there for work.
 
@SimonWoods ListConvolve uses FFT "when possible" ?
sounds numerically dangerous! :I
GradientFilter would seem to return machine reals even if I feed it just array of integers
 
@kirma, I suppose the kernel is machine real even if the data is not.
 
ListConvolveis not limited to machine reals, though. If I give it exact quantities, it would seem to return exact quantities too.
 
@kirma GradientFilter has the option WorkingPrecision
You tried it_
?
 
10:09 PM
@MichealHale I bet Seattle has lots of dark clothing(greys,black,blues,etc..). I was quit surprised after moving to Chicago from Athens. Athens is quit bright in comparison.
ATL is fairly bright also.
 
@Rojo Yes, but ran into different trouble.
Bedtime now anyway ->
 
@Liam Yes, the change is pretty dramatic.
 
I do not know if it is something to do with Mathematica or what else, but I have never seen so much convoluted code as I see when looking at some code posted here by users asking for help. I really do not understand it. I've seen bad code in Matlab group, but not to the extent I see with people using Mathematica. It will be interesting to know the cause of this.
 
10:31 PM
An example? If you mean recently it might have to do with school starting.
Rushed students.
 
@Liam, may be it is the school rush, but I think there is more to it.
I think it has to do: most are not used to functional and pattern programming, and also mixing symbolic with numeric. it is just a general observation looking at some of the code posted asking for help in solving. I find it very hard to read and understand.
 
acl
11:00 PM
@Nasser mathematica makes it very easy to write unreadable code
for example, by iteratively and interactively building up awe-inspiring one-liners that 2 days later make no sense at all
 
@acl I think you summarised the issue very well :)
 
acl
@Nasser well, it doesn't have to be this way. but both the language and the notebook environment encourage this
 
@acl, I agree. I try myself to avoid the urge to make my whole program one long expression, just to be cool.
then spend days trying to understand when I have to make a change
I find it amazing, that most questions asked for help, can be easily solved, if the OP just did the program one step at a time. Yet most seem to code everything all in one big blob, then wonder why it is not working and where the error is from. This seems more common in Mathematica than other languages I've seen.
 
acl
@Nasser it encourages this. anyway, no point in getting worked up over it
 
11:15 PM
@acl, I think if more took advantage of Mathematica pattern checking on argument passed to modules, that will really help. I have been taking advantage of this feature myself, and it saved me lots of wasted time debugging when I pass the wrong input to a module. It makes the code more robust.
 
acl
@Nasser it helps debugging
 
it is not like true static type checking as in Ada, but it is much better than what is in Matlab, where there is no checking at all, and one has to add explicit checks themselves inside the function to verify the input is valid, etc.... I think in Mathematica it is much better done than with Matlab in this regard
In Matlab, I have to write half the function code, just to verify the arguments first are valid (string vs. not, vector vs. not, matrix vs. string, cell vs. not, etc....) In Mathematica I can use something like x_Integer/; x>0 for example. shorter, and clearer
and it is as close as possible to having static typing. (not as good, but good enough)
I should stop talking, else I'll get the talkative badge awarded to me again.
 

« first day (585 days earlier)      last day (3900 days later) »