« first day (873 days earlier)      last day (3612 days later) » 

12:00 AM
From Wikipedia:
It introduces the concept of dialecting: small, optimized, domain-specific languages for code and data,[6][7] which is also the most notable property of the language according to its designer:

Although it can be used for programming, writing functions, and performing processes, its greatest strength is the ability to easily create domain-specific languages or dialects.

—Carl Sassenrath
Now I see why it's appealing to Leonid :-)
 
acl
This icon somehow makes me think of Java running on Windows 98
> many characters which might need to be balanced in other languages (such as [] {} "" `` or <>) are treated by J as stand-alone words or, when inflected, as single-character roots of multi-character words.
I think I already don't like it! Look at this:
 
That part is very overwhelming. Some of it makes sense, and some of it is just madness.
 
acl
  quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)
 
For example, "sine of x" is 1o.x and "cosine of x" is 2o.x. This is just madness!
 
acl
@Szabolcs what's the reasoning behind this?
 
12:06 AM
@acl I'm not sure. It's probably inherited from from APL, which had special symbols for everything and one needed and APL keyboard to even write a program. J replaced those special symbols with short combinations of ASCII characters.
A number of common math functions are lumped together in the o. operator, or verb, as J calls them: jsoftware.com/help/dictionary/dodot.htm
Sorry, my wireless stops working for 1 minute every 2.5 hours. The router is provided by the apartment complex, so I can't fix it myself. The guy from our ISP claims that he also can't find out what's wrong ...
The logical part of all these funny symbols is that there are "nouns", which are like variables or literals that we can operate on. There are "verbs" which are like operators or functions (can be one argument or two argument, unary or binary). And finally there are adverbs which modify verbs in a predictable manner.
E.g. + does what you expect. It's a verb. Then there's the / adverb, which modifies it so that +/ 1 2 3 4 is going to be 1 + 2 + 3 + 4. It's like Apply. It works with anything, not just +.
I don't think I'm going to use J for anything useful, but it was interesting to look at it, especially since APL (the J predecessor) is much older than Mathematica or MATLAB, both of which seem to borrow from it (especially Mathematica).
When used as a binary operator, / is like Outer. a +/ b is Outer[Plus, a, b].
I haven't looked at any new language in years, so it was interesting to play with it. Recently I tend to only look at stuff I need for my work ... I don't know if that's good or bad.
As for scientific computing, the only new thing worth looking at seems to be Julia.
 
acl
@Szabolcs That looks like a joke to be honest
 
@acl Yes. No one seems to use it. You can define sin =: 1&o. to make a unary operator called sin which can be used as sin x. There's a (standard?) library that already does this.
 
acl
@Szabolcs sounds reasonable!
but the business with the adverbs sounds intriguing. It's like attributes, right? Like the Listable attribute of Plus?
@Szabolcs She does seem promising from a few days playing with her :)
 
12:21 AM
@acl I guess we could say that. Except these "adverbs" are added explicitly each time the "verb" is used.
 
acl
@Szabolcs That's not necessarily bad. Having attributes is like having hidden state
Actually it is hidden state
 
I haven't learnt the full language though (meaning: not even all the concepts). I was actually hoping it could help me process some very large files without loading them into memory, but it turned out to be too much trouble to use that feature.
 
acl
@Szabolcs why not C for this?
or is the processing complicated?
 
@acl C is too much work. Learning a new language is even more work, but I was hoping that it could be useful in the future. I ended up using awk... it took a couple of hours, but it extracted the relevant part of the data that I can work with in Mma.
I mean, C is easy, but it does take a lot longer than Mma ...
 
acl
@Szabolcs I know what you mean :)
 
12:26 AM
I need to go now, my wife is calling. See you all later! :-)
 
acl
bye
 
12:41 AM
@YvesKlett. Sorry I missed you earlier. This is probably a dead issue but what did you mean by "I´ll be happy to retract my vote - any preference"? Are referring to a close vote?
 
@m_goldberg Yeah, close vote.
 
@YvesKlett. I think the question should be kept open, so I'd appreciate your retracting your close vote.
 
 
3 hours later…
3:36 AM
Voronoi Treemaps
 
4:06 AM
0
Q: What is the reason for limiting the number of answers I can delete?

m_goldbergToday I learned that I can only delete five of my own answers in one day. Can anybody tell me the reasoning behind this limitation, or point me to a Meta-SE thread or article explaining it? I don't think I need to be protection from own decisions, but someone in authority evidently believes tha...

 
 
3 hours later…
7:29 AM
@Szabolcs Java can also be less verbose when used idiomatically, and also there are now things like Eclipse XTend, which compile to readable Java, while enhancing it with some additional things like closures. Java also has a very nice feature that once one gets into it, particularly for a large project and working with a good IDE, one can have a continuous flow and be quite productive with it despite the verbosity.
@Szabolcs One of my work projects while working in Java, was a bank front-office application which had about 500 classes, plus extra jars which I sometimes modified too, and in any case had to read and understand classes from there. I do remember doing refactorings which affected more then 100 classes at the same time. This was a piece of cake. I can't imagine doing anything on that scale e.g. in Mathematica. Even in Python that would be harder (because it is dynamic)
@Szabolcs But of course, Java is still a language designed with an average developer in mind, something like the least common denominator. So, it can be used productively, but it certainly limits really good developers by its infrastructure, verbosity, etc. These days, I am taking a pragmatic approach to Java - I use it without hesitation whenever it happens to have the library I need, or whenever its structure seems applicable for the problem at hand, but it is not my language of choice.
@Szabolcs For example, for RLink, there were several benefits of using it. I could avoid all the low-level work with C binding to R, get cross-platform bridge for free, and also R's object model (at least it's part that RLink is using) was easy to express as object / interface hierarchy, so inheritance / polymorphism that Java provides were quite useful in that case.
Hi @SjoerdC.deVries. Sorry for not replying to your last email earlier, will do today. Believe it or not, this is a first time in the last 10 days or so that I get a spare moment.
 
8:12 AM
@LeonidShifrin No problem.
Crunch time
 
@Szabolcs I looked at it a few times, but never had any significant time to devote to learning it. So, it is on my wish list, but certainly lower than Lisp-family, Red/Rebol and Smalltalk.
@Szabolcs When coded right, Java is speed-equivalent to C (within a factor of 1.5, say). But not memory-equivalent, Java is much more memory-hungry. This, and the abundance of libraries, makes Java a good option for bottleneck removal language, particularly in the context of Mathematica. That's why I bothered with Java reloader, although it needs more work to make it easier to work with it.
@Szabolcs "Certain that it's not going to be useful" - I wouldn't be so sure. Depends on the task, of course. And, I would look more at the Red branch / version of Rebol. It is under a very active development, and they already have an impressive infrastructure. In fact, I think that it will be a very useful language, both stand-alone and in conjunction with e.g. Mathematica.
@Akater No problem :) I wish I myself had the time to actually learn it. But it is quite high on my list of language to learn.
 
9:05 AM
@Szabolcs it has happened before that the archive website hasn't been refreshed for extended periods, but the posts keep on happening behind the scenes. I don't know whether that's the case now because I can't access or post on MathGroup any more; I changed ISP and my new one doesn't have any news server. Or perhaps Steve decided that now there are Mma.SE and Community, so if he goes on holiday for a while and lets MathGroup stagnate, it doesn't matter as much as it did in the past.
 
 
3 hours later…
12:26 PM
Hi all, I am having hard time in solving the following non-linear elliptic equation: ( \eta+u) \bigg((\eta+u)^2 -\frac{\varphi ^2}{4} \bigg)\nabla^2 u -\frac{\varphi^2}{4} \partial _m \bigg ( \frac{\eta+u-1}{ \varphi} \bigg) \times \partial_m \bigg ( \frac{\eta+u+1}{ \varphi} \bigg) = 0 It needs to be solved numerically for u.
Please let me know if you know how handle this problem.
 
12:57 PM
@OleksandrR. I use eternal-september.org for news. It's free.
@LeonidShifrin I didn't mean that it won't be useful in general. What I meant is that I likely won't be able to use it for actual work (because of the type of work I need to do).
 
1:36 PM
@Irina COMSOL ?
 
That's the problem) This is non-linear PDE, which makes harder to create correct initial data for Mathematica.
 
@Irina What do you have so far ?
 
@Sektor , do you have idea how to handle this?
 
@Irina Generally speaking - yes, but still depends on Mathematica whether or not it is solvable with the available tools
 
@Sektor, maybe you can help me?
 
1:46 PM
@Irina I can, if you paste the code you have written so far
 
@Sektor, I didn't, I am testing in simple cases
 
@Irina Well, gimme what you got :D
 
@Sektor, for example this equation is solvable
sol = NDSolve[{
\!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Theta]\)]\(v[\[Theta],
r]\)\) == -\!\(
\*SubscriptBox[\(\[PartialD]\), \({r, 2}\)]\(u[\[Theta], r]\)\) - 2,
\!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Theta]\)]\(u[\[Theta], r]\)\) ==
v[\[Theta], r],
u[0, r] == 1,
u[\[Theta], 0] == 1 - \[Theta]^2, u[\[Theta], 1] == 1 - \[Theta]^2,
v[0, r] == 0, v[\[Theta], 0] == -2 \[Theta],
v[\[Theta], 1] == -2 \[Theta]}
{u, v},
{r, 0, 1},
{\[Theta], 0, 1}, MaxStepSize -> 0.001]
you can also plot it
Plot3D[Evaluate[u[t, x] /. sol], {t, 0, 1}, {x, 0, 1}, PlotRange -> All]
 
@Szabolcs Yes, I can understand that. It will be a while until Red will become a viable alternative for technical computing. I do hope though that this will happen sooner rather than later.
 
2:11 PM
@Sektor, How it is going?))
 
2:33 PM
@Szabolcs OTOH, Red has a low-level Red/System dialect, which is compiled to native code and speed-equivalent to C. It may be an alternative for using C, but I don't know enough about it to be sure.
 
2:57 PM
@Leonid The problem with breaking into technical computing is that the existing tools are very good (even if they do gave significant problems) and creating a viable alternative would be a huge amount of work. Most new or interesting languages don't target technical computing at all.
@Leonid I mostly use either C++ or Mathematica. The former is very fast, and has some useful libraries (though I do not use libraries often). I use it mostly for simulations. To replace C++ for this application, a language must be either clearly faster (probably impossible) or significantly easier to use while matching C++'s speed. Mathematica has a langauge that is good for interactive use and a huge library. Recreating the library would take a huge effort and several years.
So to replace Mma (or Python) a language has to provide very solid basics (very good array manipulation, linear algebra, basic numerics), has to be just as easy to use, while being significantly faster.
So to be a viable alternative, a new system has to be very well positioned along the performance -- easy-of-use tradeoff, and probably be closer to one end while improving on the existing tools.
 
3:38 PM
@Szabolcs I use Mathematica mostly for simulation. I'm very interested in your usage of C++ and Mathematica. Since Mathematica seems to be able to do everything, what are the situations you use C++?
In my studying here at graduate school, I have tried several times to learn C++ and use it in my research, but at last I end up using Mathematica for almost everything I do. Sometimes I realize that I would become more and more narrow sighted if I stuck in one system for ever, but I found it really difficult to do simple things complicatedly in C++ while they can be done in Mathematica in just several lines of code.
So how do you balance this problem, and what's your general workflow for a big simulation?
 
4:14 PM
@Szabolcs I totally agree with all your points. That's pretty much what I also have been thinking. Even Julia still has a long way to go, although it has gained a lot of momentum, is under active development and has a strong developer community, particularly for such a young language.
 
4:38 PM
@xslittlegrass Mathematica is much, much slower than C++. In particular if you do a simulation which is a very natural fit for a procedural programming style, such as an Ising model, you'll find timing differences of 1000x or more. For this reason I rarely use Mathematica for simulation (for the types of things I do). Instea'd I write the simulation in C++, and drive it form Mma through LibraryLink.
@xslittlegrass There's an example of implementing diffusion limited aggregation on this site. That's another example which would be much faster if done in C++, and not much more difficult (thanks to the procedural nature of the problem).
 
acl
5:00 PM
@Szabolcs If you do what for an Ising model? MC?
 
@acl Yes.
 
 
1 hour later…
6:10 PM
@Szabolcs Do you have an implemented simulation of the ising model in C++ linked with LibraryLink to share?
I will soon do some cuda simulations of it, and it could be nice to compare
 
6:46 PM
@Rojo No, I don't have that, only other Monte Carlo stuff (which is also naturally procedural).
 
7:41 PM
@Rojo Like this but in C++? demonstrations.wolfram.com/…
That uses NestList with a domain-specific function that modifies the state according to the acceptance probability, which is what I think of for a functional version of Monte Carlo.
Or I guess MCMC/Metropolis-Hastings specifically.
At first glance, I think all of the functions used in that example are compilable.
Well, the functions used for computing TL.
 
 
3 hours later…
10:52 PM
@LeonidShifrin That java is so memory-hungry and that you have to allocate everything you probably need at the start of the VM is one major thing why I have to use C sometimes.
@LeonidShifrin Another thing is that there are so many libraries for parallelization in C. Even CUDA is basically C.
 
11:48 PM
I think its often said, but worth repeating...Mathematica.StackExchange is a great site full of helpful people. Thanks to all !
 

« first day (873 days earlier)      last day (3612 days later) »