All code in my contributions on Mathematica.SE, unless otherwise specified, is dual-licensed under CC-by-SA 3.0 and your choice of any one of the following:

2h
answered load static library (.lib) using NETLink
13h
comment If doesn't compile if its output is the output of Compile?
Identical issue, and solution, to those discussed in this question earlier today. In fact I'd be tempted to close this as a duplicate, except that I think it shows the issue a bit more clearly than the other question.
1d
comment Bizarre behavior of With, Compile and Break
Very good, +1 of course! Incidentally it would also be acceptable to put ++i; Null rather than Break[]; 0. Your analysis is correct either way.
1d
comment Unexpected behavior of Compile, Return and ;
@Ajasja f = Function[x, Return[x, CompoundExpression]]; f[0.]. And there are no bugs in Compile, only undocumented features. ;)
1d
comment Can ParallelDo speed up a counting problem?
ParallelCombine and ParallelSubmit are probably the most general parallelization constructs and I think therefore the most useful for parallelizing an arbitrary program. But at the moment I can't even tell whether your program is even conceptually parallelizable since the example needs to be restructured significantly before gaining performance (see @Pillsy's excellent answer) and we have no way of telling whether this restructuring would have any sensible analog in your actual program.
1d
comment Can ParallelDo speed up a counting problem?
@lagoa I think you need to give more details about your program structure before we can usefully comment further. For instance, what if you are using RandomReal as a stand-in for some function whose result depends on previously accumulated state? What if AddTo on c is just your way of representing an operation with complicated side effects for the purposes of the example? Since you talk about the idea and the structure and not the specific code, I worry that anything relating to your example will turn out not to be what you actually want.
1d
reviewed Reviewed Mathematica function Det has unexpected behavior
1d
comment Mathematica function Det has unexpected behavior
Also, please remove or comment out In/Out tags. Otherwise, people who wish to run the code will have to make modifications first. The normal way to signify an output on this site is to include it as a comment, such as (* -> output *).
1d
comment Generate a list of values with equal number of each value
@Kuba I think that what you've said is all okay. It is not obvious that, until recently, a machine integer in a 64-bit version of Mathematica was still only 32 bits. Your comments about memory consumption are accurate, but the reason that Mathematica $\leq$ 8 cannot form the unfiltered list of tuples is not memory but rather addressability of the resulting array.
1d
comment Generate a list of values with equal number of each value
Which version of Mathematica do you have? Only in version 9 were machine integers changed to 64-bit (in the 64-bit version only, of course). If you have version 8 or below then $32 \times 2^{32}$ clearly is larger than a (32-bit) machine integer.
1d
reviewed Close Dsolve is not solving equation ( 3 system with 2.order diferantial equations)
1d
comment Dsolve is not solving equation ( 3 system with 2.order diferantial equations)
This question appears to be off-topic because after correcting a few minor typos the problem does not appear to be reproducible. Could be a simple mistake, or could be stray definitions, but hard to tell which.
1d
comment Dsolve is not solving equation ( 3 system with 2.order diferantial equations)
In the second method you have Dsolve rather than DSolve and FullySimplify instead of FullSimplify. Plus, you might be better off using NDSolve rather than DSolve given that you have a lot of explicit numerical parameters. Other than that, the code seems perfectly okay, so I vote to close as irreproducible.
1d
reviewed Close Can Mathematica turn (y+x)=x^(1/y) into y=f(x)?
1d
reviewed Close Define a function that takes ragged array
1d
reviewed Close looping in mathemtaica for using the current value as initial state of next value
1d
comment Can ParallelDo speed up a counting problem?
Well, not with exactly this structure, AFAICT. But you could generate lists of random numbers in parallel, count the applicable elements of these lists in parallel, and then add these counts together to get the amount that should be added to c. Depending on what side-effects we assume for the individial operations, this may or may not be a valid approach for your real program--it's rather hard to tell from your example. What I can tell you is that this parallelization will almost certainly require changing more of your program than a simple substition of ParallelDo for Do.
Apr
13
comment Programming paradigm change
@Nasser this is spoiler markup, and it exists here on StackExchange as well. The idea is that people might like to try the problem for themselves before they see someone else's solution.
Apr
13
comment SystemModeler considered Mathematica related Wolfram product?
I agree. With the Wolfram Community site now active, I think we can fairly say that, since SystemModeler is not one of our strong suits, there are better places to ask about it--to the extent that we can be reasonably sure that such questions will not be answered well here and thus deem them off topic. But, as it's a fairly new product, that may well change in the future. I wouldn't want to unduly discourage users from asking their questions here if they strongly anticipate getting a useful answer. Questions won't be closed immediately, and can be re-opened, so it's worth a try if so.
Apr
13
comment Should we start a collection for the unreasonable behavior of Compile?
IMO, most important information about Compile is either undocumented, or not properly documented. So your question essentially reduces to "should we start to document Compile?". It's a nice idea, but the main problem is that undocumented behavior can change frequently and without notice, which is bound to frustrate our efforts. The fact that all this stuff is undocumented and that, as such, there are no expectations for what is proper behavior and what is a bug, probably contributes significantly to the inconsistencies and oddities that we observe.
1 2 3 4 5