« first day (896 days earlier)      last day (3886 days later) » 

00:00
Mathematica does have this problem. I faced it many times myself. lets hope V10 is more robust.
acl
acl
And the slowness in modifying my code just isn't worth it. Also, parallelization in C vs in Mathematica is much harder (for the stuff I do, which is almost trivial in mma)
@Nasser Strongly doubt that :) I think any high level language is prone to this.
00:12
@Nasser Your view of an assignment in C is not completely correct. When you do a=b, b is not copied! The memory of a is set to the value of b, but the allocation of a was done before that! And in the special case of arrays, a and b are only pointers.
@acl If it is trivial in Mathematica, I'm sure it would be as trivial in C using OMP.
If it is not trivial in C, you'll surely run into problems in Mathematica too.
@halirutan I am not following you. In C, when I write a=5; b=7; then write a=b; are you saying "a" does not now contain "7" ? I am also not talking about pointers. I know all about pointers. I programmed in C/C++ for over 15 years.
But luckily for me, I do not have to use C or C++ any more. I think they are terrible languages actually.
@Nasser What I wanted to point out is, that when you do a=b in Mathematica, and a and b are not only numbers but larger expressions, then there are several steps that possibly happen. First, a already had a value, so Mathematica might garbage collect it. Secondly, because the memory of a which needs to be of the size of b isn't allocated, you need to do that and, finally the pure assignment process.
In C, this is different, because the memory of a is already allocated and when you do a=b, nothing needs to be garbage collected or re-allocated. You only need to set the memory.
acl
acl
@halirutan not as trivial! and I did implement it in C too, it was a buggy mess and while debugging the C code, I finished the project by simply throwing more computing power at it using mma and published it. So I gave up on implementing it in parallel in C.
@acl Hmm, I often had another experience, but I didn't need to write something in C for some time now.
@halirutan But these are all implementations. I am looking at the semantics of the assignment. A=B logically gives A the value of B, and changes in B do not change A. I do not care now about how it is done in compiled language vs. dynamic really. Just the semantics of the assignment.
acl
acl
00:24
@Nasser Well C is nice, it's just too low level and it restricts flexibility. Also if I have an idea and implement it in mma in a day, in C it takes more than a day. This might not be important if you know exactly what you're doing it and simply want to to it on an industrial scale; but I modify things all the time, C slows me down too much. Anyway, I haven't written C for a long time now.
@halirutan I guess it depends on what sort of thing you do.
@acl, sure, that is why I said, I will never use C/C++ for science. Mathematica/Matlab/Maple allows one to try different idea much faster and simulate things more easily. But for production, I will choose Fortran for computation over anything else.
@Nasser OK, yes. This is the obvious definition of an assignment.
acl
acl
@Nasser Depends on what you mean by production
I mean, if you have to do long running applications, for industry, weather prediction, large scale simulation that takes days and compute intensive, hundreds of thousands of lines of code. You can't beat statically compiled code. And Fortran is best for that. (for numerical). Lots of robust well tested numerical libraries.
acl
acl
@Nasser Well, the computations I am doing now might take about a week per run on 16 4-core CPUs. The heavy stuff is matrix manipulation, and it's going to be done by LAPACK whether you use mma, python, C or fortran
00:30
For prototyping, basic simulation to try ideas, algorithm testings, etc.. dynamics language, like Mathematica, Matlab are more useful since one can try things more quickly.
@acl you know what is best for you. I am just saying what I would use that is all.
acl
acl
for numerical solution of a few thousand coupled noninear ODEs over thousands of runs, I did in the end have to use C.
but there was not much algorithmic complexity there, just a symplectic integrator. straightforward to implement in anything
@Nasser Yes that is what everybody tells me. Well, that gives me an advantage over them so I'm not complaining. I've tried both, there is little speed difference for this kind of thing (linear algebra with complicated logic on top). At least for what I do, and if you have enough RAM.
of course if you're writing GCMs then you'd do it in fortran or C
01:32
@Nasser Mma also does what you said about Matlab. a=b doesn't copy until you change a
@Rojo thanks. good to know the implementation is the same as well. As I said, This is much more logical way of doing things. Having A changes because I changed C 20 pages later in the code must be very confusing. I do not know how people code in julia or python really like this :)
@Rojo I think you meant in the above "untill b changes"
@Nasser Any of the two
Ok, that also makes sense.
02:12
@halirutan I'm a bit later in the chat, but completely agree about how disconnected with the real world development the demonstrations are. For commercial/industrial purpose, you need to easily connect with a database, do something with it, and show to the user, all inside a nice interface. There is no simple way to do that with Mathematica. In my case, I have created my own WolframAlpha inside the company I work, using WebMathematica.
So, I don't need a interface.. just NLP
Here is how it look like...
You type your question, and get the answer, about company subjets.
The gray text are example questions that alternate in the screen.
here in Brasil we are in the World Cup, so, we have a special doogle
@Murta This is nice :-) Have you seen us yesterday against Algeria?
Someone up for some thinking? Consider this small definition:
f[a_Integer] := Module[{b = a}, a /; True]
Evaluate this line (but check the f has no value) and then change the body of the Module:
f[a_Integer] := Module[{b = a}, b /; True]
And now look at ??f and see that you have two definitions, although the call pattern is exactly the same and the Condition is in both cases always True.
Is there any way to reach the second definition under any circumstances or why does Mathematica introduces this new rule instead of replacing the old one?
02:41
@halirutan It doesn't replace it because of Condition... I suppose it doesn't actually check to see if that it is always True.
@rm-rf But Mathematica tries hard to check on the pattern of the LHS and it won't recognize that the condition is the SameQ?
@halirutan Yes I have saw on TV! Nice game!... In the stadium I went to England and Paraguay. I'm not big Soccer fan, but in the World Cup isn't impossible to don't get involved here in Brazil.
@halirutan Wellll... if you want a case where one can break your example, try this in v10
Clear@f
f[a_Integer] := Module[{b = a}, a /; True]
f[a_Integer] := Module[{b = 1}, b /; True]

Internal`InheritedBlock[{f},
    DownValues[f] = DownValues[f] /. Verbatim[Condition[a, True]] :> Inactive[Condition[a, False]] // Activate;
    f[2]
]
@Murta I'm not much into watching soccer either but I liked the game yesterday, because Algeria made the hell of an enemy. Really nice.
@rm-rf And
Internal`InheritedBlock[{f}, DownValues[f] = Last[DownValues[f]]; f[2]]
wasn't enough? :-)
@halirutan well, fuck me. :)
Not enough time with mma these days :)
or :(
02:56
@rm-rf Tell me.. It's 4:56 and I'm doing work.
03:45
Hello
 
3 hours later…
06:36
@Nasser here is a post I like from some of the python devs about why the semantics of python make sense (not just the implementation) python.net/~mwh/hacks/objectthink.html
if you read through it they also make it clear why it has the nice property of an easy mental model for speed (and the pythonic idea that if you want a copy you should be explicit and not depend on implicit semantics ... some vague notion of a 'value' change)
I can see why this might not be to your taste, but I found it made the behaviour feel elegant
@Gabriel "if you want a copy you should be explicit and not depend on implicit semantics" It should be in reverse! If you want reference semantics, one should be explicit. value assignment is the natural way and that is what one would want, else why write A=B in first place? I do not want to write a=copy(b) all the time. But any way, Julia and Python are not for me :)
@Nasser I don't agree that for an object oriented language (like the post describes) a copy is the correct semantics, as all values are just references to objects
when you write python you don't do what you describe, you simply don't make multiple references to the same object. It is like learning functional immutable styles of programming. It is different than procedural/side-effect stuff, but I don't feel that one is more 'natural' than the other, just different. You code differently when you write in one or the other
I have written largish numeric codes in python and I was not using 'copy(a)' etc everywhere, you just code differently
Also is the semantics of A=B clearly a copy? I often read this as A is B whereas I guess you are reading it as A gets B. I guess that is the core difference between the two paradigms, is the '=' operator giving a name to something, or giving it a value
06:53
@Gabriel A=B is the same as we do at school when writing math. as in x=y. it means x gets the value of y. If y=10, then x will become 10 after the assignment. This is the natural way. This is what one does on paper. But any way, I think I said all there is to say on this, I do not think I am interested in these languages at all. I'll stick to value assignment semantic languages, they feel more natural to me :)
@Nasser Yeah, not trying to convince you of python! Just don't feel that one is more "natural" in general then the other. From a pure maths perspective if I wrote y = 3 and then x = y and then x = 2 if y is still 3 wouldn't this be inconsistent?
"if I wrote y = 3 and then x = y and then x = 2 if y is still 3 wouldn't this be inconsistent?" Not if it was value assignment. x=y means x gets the value of y at this instance of the assignment. Not later on and not 2 years from now. That is why you see in math books sometimes they write x<-y instead of x=y.
If you want an equation, then one writes x:=y, which is different than x=y. x:=y is a definition but x=y is an assignment. This is the difference.
okay that is what I thought. So again you are assuming the operator is a copy. Which is fine, but it is not commonly how I have done math (as I rarely write down circular assignments unless I am doing an algorithm in which case either convention is natural)
and needs special notation as you say (likek python has = is ':=' and '.copy()' is your '='. Can python do reference assignment?
I mean can Mathematica
I have never thought about this in a Mathematica context ...
in math, Assignment and definitions are not clear from each other but they are guessed by context. This is known issue. That is why in programming languages there is := and there is = to make this difference by definition and assignment.
fair enough, but does mathematica have both?
== is a logical operator and not a reference type
python does so it seems fair that they chose one as the default
07:05
@Gabriel sure. Mathematica has = and it has :=
@Gabriel == is boolean operator. Not a definition and not an assignment.
yeah that makes sense
so you just don't like that python/julia uses := by default vs =
Maple has := and it also has = , one for definition and one for assignment.
No I get it now. I just am trying to see why you think one is more natural then the other. From how you have explained it they seem like both are the same semantically (ie we use them ambiguously when we do paper and pencil calculations) so each language needs to decide which to make the default.
@Gabriel but "=" value semantics is the more common, and it should have been the default. And instead make A=ref(B) the explicit. i.e. instead of writing A=copy(B) everywhere, it should have been A=B. If one wants reference semantics, then they write A=ref(B). The reason is, it is more common to want value semantics than reference.
I guess I don't see it what sense it is more common. If I am writing a lot of functions in mathematica then I certainly want := more often. Python uses objects so := makes far more sense, is more common. I guess when I write code I am not doing a lot of = assignments like you state. I often try to keep my 'state' relatively encapsulated. That is likely how I learned to code, but doesn't seem less common to me
07:13
Look at any algorithm in any book, numerical and scientific. It is all value based. A<-B. Not reference.
@Gabriel You use := more than = in Mathematica?
isn't that just because we have used procedural languages? If I looked up a book with functional algorithms it wouldn't be that way
hell in assembly algorithms they love references/pointers ;)
I do. I often write more functions than assigning values
@Gabriel getting late here, got to go get some sleep. Nice talking to you :)
then I just do calls like f(g(x)) so I really don't have a lot of = assignments
@Nasser later :)
07:32
@Nasser. I am not sure = and := is a value vs ref as if I do f[x_] := Sin[x] and then g = f and then f[x_] := Cos[x] then g will no longer be Sin[x]. This is similar to how the python issue gets mixed up as it requires assigning container-like types [] dict etc as x=1 y=x x=2 still has x=1 as the post I originally linked to mentions. So your behaviour is just a result of how numbers are treated (vs symbols/patterns) in mathematica I think
08:18
@halirutan I agree with @rm-rf, the patterns are different. The main difference is that while a gets injected into the body of the module verbatim, b is turned to a as a result of the evaluation process. If you block evaluation in some way, things may be different. But that's not the point - the point is that this kind of code analysis is not possible in general, since evaluation is involved.
@Nasser I agree with @acl, and consider C a very elegant language. To understand its elegance, you have however to start thinking at lower-level, in terms of memory addresses, and how actual bits are manipulated. This is the entire point - C covers a different layer (level) of abstraction than Python. To understand the language, you have to start thinking in it, in its abstraction level.
@Nasser I disagree. Which semantics is better largely depends on which problems the language is supposed to solve. For languages like Mathematica or Matlab, which target computations, pass-by-value may be a more natural thing to do in most cases. For languages heavily dealing with complex data types (objects built from other objects), pass by value is still effectively using references, since by default objects are not deep-copied (which makes total sense to me).
@Nasser C solves this problem by passing only by value but having pointer types. For assignments, copying only references for objects is a very natural thing to do. The reason is that by default, one has to be efficient, in any language. For primitive types, copying values explicitly is a well-justified short-cut, but for compound types it is not.
@Nasser I think we shouldn't confuse math and programming. That would be a serious mistake. There is some overlap between them, but it is not in the area we are discussing. When you use equal sign in equations, you are usually describing continuous sets (even if solutions happen to be a discrete set of isolated points). When you use assignments in programming, you are manipulating bits, bytes etc. There is a huge semantic difference, so I think that parallels are quite limited.
@Nasser This is an old-fashioned view. Many people who have written really large numerical projects, would argue that there are modern tools which are better. For example, OCaml (which is a functional language). Take a look at what Jane Street Capital is doing with it, they describe in some detail why they picked it and what benefits they got out of using it.
@Nasser Besides, language like OCaml are also used to write custom C code generators which can beat the hell out of even vendor-tuned math libraries oftentimes. In general, I share the opinion that (JIT) compilation / code generation is the future. The argument that Fortran is best is the same type of argument that Asm programmers used some time ago, and nowadays Asm programming is reserved to really special cases.
 
5 hours later…
14:04
This certainly has a duplicate, this keeps coming up all the time. Can anyone find it?
15:03
@halirutan, that's weird
Challenge accepted
15:15
@halirutan, ahhhh
since "a" gets injected into the scoping construct (Module), the Module variable would get renamed, making the conditions different
Morning (CST) all. Anyone aware of a convenient list of MMA keyboard shortcuts? I'm not looking for letters and letter-like forms but rather CTRL-l copies the preceding input and CTRL-L copies the preceding output.
@bobthechemist Yes
@chuy Knew it was out there. Thanks.
15:35
no problemo
 
1 hour later…
16:54
@belisarius. Do you know what the following error message mean? Compile::cfinll: The CompiledFunction could not be inlined because its use requires threading with the Listable runtime attribute.This happens when I use Last/@kr instead of #[[-1]] & /@ kr. It works fine with the latter.
@brama I'm in a hurry right now. No time to do testing. Try Last@#&/@kr
@belisarius ok..thanks fior your suggestion
@belisarius did not work :(
17:13
@MichaelE2. Do you know what the following error message mean? Compile::cfinll: The CompiledFunction could not be inlined because its use requires threading with the Listable runtime attribute.This happens when I call external compiled functions inside another compiled function and use Last/@kr instead of #[[-1]] & /@ kr. It works fine with the latter.
belisarius suggestion above to use Last@#&/@kr did not work either
17:41
@brama I can only guess: The compiled function you are trying to inline is Listable, and the compiler cannot create code to implement listable functions. You could be satisfied with a CompiledFunctionCall being used by the compiler. See reference.wolfram.com/mathematica/Compile/tutorial/… for more info.
Or you could get rid of the Listable runtime attribute, I suppose.
@MichaelE2 Please give me sometime. I am trying something...let me finish it and try your suggestion.
17:59
posted on July 02, 2014 by Wolfram Blog

We recently wrote some blog posts for our friends over at raspberrypi.org, sharing some of the cool things you can do with the Wolfram Language on the Raspberry Pi. Combined with the amazing projects and ideas being shared at Wolfram Community, we’re doing some seriously cool stuff on this little computer! If you haven’t been following [...]

18:18
@brama No worries, no hurries. I've got other things to do, too. :)
19:03
@MichaelE2 I am totally confused now...I am not sure why it gives me MainEvaluate for the following
demR = Compile[{{p1, _Real, 0}}, Min[100 p1, 2500], Parallelization -> True, RuntimeAttributes -> {Listable}]; t = Compile[{}, Module[{k2}, k2 = RandomReal[10, {10}]; demR[#] & /@ k2], Parallelization -> True, RuntimeAttributes -> {Listable}, CompilationOptions -> {"InlineCompiledFunctions" -> True}]; CompilePrint[t]
 
2 hours later…
acl
acl
21:00
@brama because demR is an externally defined symbol. Try
demR = Compile[{{p1, _Real, 0}}, Min[100 p1, 2500],
   Parallelization -> True, RuntimeAttributes -> {Listable}];
t = With[{demR = demR},
  Compile[{},
   Module[{k2}, k2 = RandomReal[10, {10}]; demR[#] & /@ k2],
   Parallelization -> True, RuntimeAttributes -> {Listable},
   CompilationOptions -> {"InlineCompiledFunctions" -> True}]
  ]; CompilePrint[t]
or
demR = Compile[{{p1, _Real, 0}}, Min[100 p1, 2500],
  Parallelization -> True, RuntimeAttributes -> {Listable}]; t =
 Compile[{}, Module[{k2}, k2 = RandomReal[10, {10}]; demR[#] & /@ k2],
   Parallelization -> True, RuntimeAttributes -> {Listable},
  CompilationOptions -> {"InlineExternalDefinitions" ->
     True}]; CompilePrint[t]
I have no idea why InlineCompiledFunctions doesn't do what it says. I never understood, probably never will, and have given up on trying. I always just use the With trick.
(this is more of a general comment on mma than InlineCompiledFunctions: I treat mma as a black box with correct but deliberately and subtly misleading instructions, and so far have found this point of view to fit surprisingly well with reality)
@brama if it's not clear, the With[{demR=demR},...] bit just injects the evaluated version of demR (ie, the body of the compiled function) into the ..., which happens to be the Compile[] structure, then evaluates the Compile.
does someone have a link to a whats new in mma v10? I have memories of this being mentioned in chat but I cant find it in the documentation
Any new features people are excited for as scientists/engineers not including the cloud stuff? that is new numeric/scientific features? I was all sold for the Dataset on its own, but as this has been scaled back I am wondering what new stuff has been developed for research
@acl I can not agree more with you !!. After referring to reference.wolfram.com/mathematica/Compile/tutorial/… I used InlineExternalDefinitions and it resolved it.
acl
acl
21:29
@brama Well, before v8 I think, there was no such documentation for the compiler. No CompilePrint either, although you could look at the bytecode and work out what each byte meant.
@acl wow..I recently started using MMA (6 months) and it just boggles me how such a magnificent software has such a poor debugging process with the notebook interface. btw I recently heard about the workbench..have not explored it much
acl
acl
@brama the FE does have a debugger though
this is in stark contrast to undo.
(although that may be on the way finally)
@acl bear with my ignorance, but what is "FE"?
acl
acl
@brama sorry, FrontEnd :)
I mean mathematica does have a debugger, not just in the workbench.
also, DebugTrace by David Bailey
hmm...did not know about it. But, the error messages are not so explicit to me yet. clicking them takes to generic stuff on the help document. Again, I am too naive to comment.
acl
acl
21:44
@brama Oh yes the error messages can be confusing
and good luck working out which options work and how.
I suppose with such a big collection of stuff it's always hard to have good docs. Not that mma's docs are bad, but they could be improved
@acl Thanks ...I find SE very helpful and I keep bugging you guys for simple syntax...I hope I am not being a pain.
acl
acl
@brama no I think that's the idea.
@acl Thank you. btw. where do you live? I live in US
acl
acl
Not in the US :)
@Rojo What I was wondering is that the condition itself does not change and that no check is done whatsoever.
But rm and Leonid already pointed out that this behavior can be seen as expected.
21:51
@halirutan Yes, I think ideally it should be removed. I was just saying how I think it works
In one definition, whlie evaluating the rhs condition, you would get Module[{a=... and in the other case, Module[{a$ or something
I don't recall if a was the variable
@Rojo Such things usually go without someone notice it, but I was testing package code and a function definition wasn't updated although I thought the definition should be replaced because the pattern and the condition was the same.
And I'm not usually not using ClearAll before any definition in my packages as e.g. @LeonidShifrin often does.
@acl oh....I need to go now..Thanks for the nice chat....Have a good day
@halirutan, I imagine it could be annoying, since the last definition goes last so you end up not overriding the first definition, right
acl
acl
@brama see you
someone's pissed off at mma!
haha
acl
acl
22:24
hm, after spending a day using an IDE to write python, the frontend feels like futuristic technology sprinkled on top of primitive foundations
probably too used to it
@acl And you used what IDE for python?
acl
acl
@halirutan wingide
@halirutan but any of them is OK with me, I just prefer its interface
@acl You could also try this here.
acl
acl
I just use the autocompletion and navigation in any of them
yes I have, it's also OK
a bit sluggish but I'm OK with any of them really
although I mostly write in emacs/textmate/sublime text and just use these when I'm done
@acl OK, it went from comment -> misread -> answer -> comment
@acl What are you making in Python?
acl
acl
22:38
@Szabolcs nothing much, I rewrote some code from mma into python some time ago and am cleaning it up.
exact diagonalization of many-body quantum systems with time-dependent hamiltonians if that's what you were asking
and various operations on the results
or many-body out of equilibrium quantum dynamics, if you want to see it from a high level.
on a practical level, trying to escape from license number limitations
OK also 8 queens and the like, because I had to do some boring things and used the opportunity to procrastinate
@Szabolcs have you tried using Python and scipy instead of mma for anything?
23:00
@LeonidShifrin thanks for the comments. I'll have to take a look at OCaml but I heared good things about it.
is V10 out yet? I just waked up.
acl
acl
@Nasser YES!
@Nasser just joking
@acl you got me excited there for a second. No problem, will wait one more day.
@acl Not really, only very minor and specific tasks. I think I really should though. I don't want to get stuck in Mathematica, and the only good alternatives I know of are Sage (don't like the community though...), Python and Julia.
Julia is not mature enough.
@acl I used R the most, but it's very stats oriented. If you're trying to use it for anything else than stats, it's annoying. I had to use a package that is only available for R and nothing else.
acl
acl
@Szabolcs yes Julia seems fast but doesn't feel mature enough
although I have not used it for actual work, just playing
@acl Julia seems to me one of the most confused languages invented.
acl
acl
23:13
@Szabolcs Python is nice, and very easy to learn and remember. much less baroque than mma. but I have used mma a lot more so maybe I am just not seeing the complications because of inexperience
@Nasser yes I gathered that :)
@acl I have examples, can show you. need bit of time to write them up.
We have enough Mma licenses here that I'm never going to run out, but that's probably an exceptional situation. It's not going to be like that in most places.
acl
acl
but why, apart from the a=b thing?
@acl no, relating to how it handles vectors compared to Matlab
acl
acl
@Szabolcs really? we have 40 and 200 subkernels, I think
@Nasser oh I see, OK, I'm not used to matlab so maybe that's not something I'd notice. but, again, I just played with it.
23:16
@brama Note that the two methods @acl used are the ones used in the docs in the link that I gave. Remember that Compile is HoldAll, so demR is read by Compile as a symbol and not as its value/definition.
acl
acl
@Szabolcs no 400 sub mathkernels
@MichaelE2 pfft real programmers don't read the docs
@Szabolcs I guess I only ran up against this limit because I'm doing calculations on disordered systems and need to run thousands of realizations of the same thing. Normally I have no problem
@Szabolcs Since you are into graphs lately, do you know any measure I could use to quantify the size of a parse tree. Something like number of nodes, depth, depth-per-node, whatever, combined?
@acl How can you check that? Actually I don't know how many we have, but once I asked and concluded that I'll never need to worry about it. Haven't used more than about 80 or so subkernel, I think.
@halirutan What's the application?
acl
acl
@Szabolcs here you can run /usr/local/math/MathLM900/bin/monitorlm license and it tells you. also who's hogging your licenses, which is useful
My presence here is going to be a bit spotty, I might disappear for 20 minutes without notice. Just letting you know.
@acl Let me try that ...
23:22
@Szabolcs For large files, like the combinatorica package with over 7k lines of code, the highlighting in IDEA is done in the region you see at the screen only.
Hello all, a small step for Mathematica, but large for myself - I now have 500+ reputation! haha! Congrats to me! :)
@Szabolcs I could find the exact source of the slow-down and it is the highlighting of local variables which does some work on the tree for every symbol.
The problem is, I can remove all of the logic so that everything that is left is just going trhough the tree and even this seems too slow.
Now I'm wondering whether it is the pure file-size, or whether it depends on the complexity of the parse tree.
@Szabolcs I am stuck at following question: If I can get a hint. I have this 3d points and polygons, I use blender to map 3d points to 2d points ( that has new polygons), how I can transfer attributes such as colors from 3d vertex to 2d points, if I use same order of vertex colors, then I found that color pattern have changed. Something I dont know here?
In real world I would leave icecream in the fridge for everybody! Yeeeeah! :D
@halirutan You mean walking the tree is slow?
@VividD You don't like British spellings? ;) ("centred" is correct)
23:30
@Szabolcs No, because when I take the logic of symbol highlighting out, it is fast, although it works the exactly the same way (it has to do the other annotations). There seems to be something I do which is slow.
@halirutan Does IDEA do anything behind your back? Or are you in full control of the algorithm?
But I would like to have/create a worst-case example code first and for this I want to find out which kind of Mathematica code has the most performance impact while still being not too large.
@BeingHuman Unfortunately I know very little about Blender ... tried to learn it once when my wife needed a 3D modeler program for a small project and I suggested it ...
@halirutan So you are trying to come up with trees that have bad performance to find out exactly what is causing this?
@Szabolcs I only implement an interface and the method of the interface (annotate(element)) is called by IDEA and I have the chance to calculate how this element should be colored (or annotated).
@Szabolcs Exactly.
@Szabolcs You have to understand, that such deep AST's are not possible in languages like Java, at least not as easy as in Mathematica.
In imperative programming you always end up with a sequence of statements which are not so deep usually.
@halirutan Have you already tried the trivial ones, such as "all flat" or "all deep"? All flat would mean no nesting, it's surely fast. What about a lot of nesting, and only nesting, like f[f[f[f[f[f[f[f[]]]]]]]]?
Or the minimal extra to allow inserting local variables in there
Sorry, I really want to help, it's just not completely clear what the question was. There are several ways to measure graphs, and it wasn't clear which one is good for you
23:36
@Szabolcs Yes, some month ago I created examples with meta-programming, but they were never as bad as the combinatorica example :-)
Combinatorica has some weird mess ...
@acl found some post on these issues. Please see 2pif.info/op/julia.html and scroll down a little to see the Julia handling of matrices. The early part is not important as the post is little old. But the way it handles vectors and matrices is really strange and confusing for Matlab programmers.
@Szabolcs I don't know which one is good either and before I come up with something, I though I'd ask you.
@Szabolcs Just to give you an idea: The maxIntellisenseFileSize is 2560000
The combinatorica.m has only 176539
So I guess the IDEA guys usually deal with larger files without problems.
@Szabolcs Thank you very much for your help. Speaking about helped me to come up with another idea about the slowness reason. It turns out that the actual color the text method is slow as hell.
acl
acl
@Nasser OK will take a look, thanks
Let me look into it.
23:42
@halirutan I'm trying to read the whole thing in and make a graph out of it so I can play with it ...

« first day (896 days earlier)      last day (3886 days later) »