« first day (925 days earlier)      last day (3549 days later) » 

1:54 AM
For image processing people -> movidius
 
2:45 AM
Usage of machine learning:
http://community.wolfram.com/groups/-/m/t/307516
 
3:20 AM
Does anyone else here use custom keyboard layouts with Mathematica?
I'm on a modified version of Dvorak, but I'm curious if anyone else is using something similar.
 
 
5 hours later…
8:04 AM
@Öskå I thought that "InputText" maybe copies things like the integral-sign as utf char, but obviously it doesn't.
I don't think we should use "xclip" to copy the string into the clipboard because this requires that the program is installed. I guess a more general way is to send the string to java and use some copy to clipboard method from there, because they have long experience to make such things work for various systems.
 
9:05 AM
@halirutan I unfortunately have no experience with Java :) And xclip is a 50kb tool. So of course it has to be installed, but it's not really complicated (unless someone wants to use that copy/paste tool without admin rights and without being able to install xclip indeed).
 
@Öskå I'm almost done with the new version. You can test it in a few minutes.
 
@halirutan Ok :) Are you experiencing issues when copying a link from the SEUploader as well? Because I get extra bytes as well, thus the same method should be used.
If it's not too much work
 
@Öskå Because there, the usual Mathematica copy method is used too :-(
 
@halirutan That's what I figured, so I guessed that you have the same issues with that too.. :)
 
@Öskå Then I need a bit longer.
 
9:14 AM
@halirutan No need to hurry, and once again, ask if you need help
 
9:32 AM
@Öskå Can you first close Mathematica down and delete the SEUploader directory inside ~/.Mathematica?
Then you find here a version to test:
Just extract it and copy the folder to ~/.Mathematica and after you start Mathematica, you should be able to open the new palette.
 
9:56 AM
@halirutan Style["Works like a charm!", Red]
http://i.stack.imgur.com/qvplK.png
Copied thanks to the palette without additional bytes.., this is a relief :)
Now I need to find what you changed.. :D
 
 
1 hour later…
11:14 AM
@Öskå I implemented a java version of copyToClipboard:
public static void copy(final String toCopy) {
    StringSelection stringSelection = new StringSelection(toCopy);
    Clipboard systemClipboard = getDefaultToolkit().getSystemClipboard();
    systemClipboard.setContents(stringSelection, null);
  }
pretty simple, but this should work for all systems.
Then I just changed the copyToClipboard function which the SEUploader uses. This was
      copyToClipboard[text_] :=
          Module[{nb},
            nb = NotebookCreate[Visible -> False];
            NotebookWrite[nb, Cell[text, "Text" ]];
            SelectionMove[nb, All, Notebook];
            FrontEndTokenExecute[nb, "Copy" ];
            NotebookClose[nb];
          ];
and I changed it to
      copyToClipboard[text_] := JLink`JavaBlock[
      (* Load the class for copying stuff to clipboard without the clutter *)
        JLink`LoadJavaClass["de.halirutan.uploader.ClipboardCopy", StaticsVisible -> True];
        ClipboardCopy`copy[text]
      ];
and the last step was to include another button in the palette which does the same as the button I have posted, only that it uses the above copyToClipboard instead of your xclip command.
The sources for all this are on a separate branch of the SEUploader code. Find it here:
 
11:54 AM
@halirutan Yeah I found these changes and the class file :) And it works super nice :)
 
 
1 hour later…
12:54 PM
@Öskå I'm always fascinated that we work with a system which has features like BridgeData but which is not able provide a reliable Copy&Paste or which needs a minute to start up on certain systems. And the excuse "those issues weren't reported in the beta-phase" (like for the slow starting time) is just lame, because (1) I have reported it and (2) all issues I found after the official release did not show up in the beta versions.
Someone might chime in here an say "but these things only appear in Linux and this system is not the main-system for Mathematica". This is another lame excuse because as it stands Mathematica is not as system used in industry heavily, but which is used in academia. For everything I know, most people here in our university use indeed Linux and not Windows.
 
@halirutan Totally agree, and even if it's not heavily used in the industry, if one proposes a software working on Linux, one should at least provide a reliable way to copy/paste.. Like you said, `BridgeData` is somehow less interesting then Copy/Paste :)

But your tool works nice, I'm glad you came up with something that quickly :) Planning on updating the meta post after testing it?
 
@Öskå We need users of the other (esp Windows) systems to test this. I can look whether it works on Mac and Linux. If it works, I would merge it into the master branch of the repository so that this is the version everyone is using.
@Öskå Btw, one of the things that don't work is that when you select a complete In/Out cell group, then you only get the code. With the usual c&p you get the In[]/Out[] markers too.
 
1:12 PM
@halirutan Well, I don't see any reason for Mac/Windows users to use that button knowing that Ctrl+C works for them. But I assume that it should be tested indeed.
And I've never liked the In[]/Out[] things ;o)
 
@Öskå But with the editor buttons I wrote for the SE editor, you can easily convert them to the following form:
1+1
(* 2 *)
if they have the In/Out marks.
 
@halirutan Yes, I know that too :) But I tend to prefer the "> 2" in answers :)
 
@VitaliyKaurov Vitaliy, when I include a image in a wolfram community post and I do it like this
then it is shown in the preview correctly, but when I publish the article, it is shown as code.
 
 
6 hours later…
acl
7:47 PM
apparently, scipy's expm chokes when my arrays are diagonal.
expm2 and expm3 are fine
but of course.
 
@acl Can you test for me if this is a bug? --> rg = RandomGraph[{10, 16}]; wg = SetProperty[rg, EdgeWeight -> RandomReal[1, VertexCount[rg]]] Shoulnd't this work fine?
 
acl
(and of course it's version-dependent)
@Szabolcs just a sec
@Szabolcs hm yes wg = SetProperty[rg, EdgeWeight -> {1, 2, 3, 4}] does nothing
(ie returns SetProperty[graph, EdgeWeight -> {1, 2, 3, 4} ])
did this work in v9?
hm, does the same in v9
 
Yes, it doesn't work in v9.
 
acl
@Szabolcs well, I don't have much experience with this but it certainly does look like SetProperty should have changed it
 
@acl I'm stupid: the number of weights should be the same as the number of edges, not vertices.
 
acl
7:56 PM
@Szabolcs oh
haha
right. it's EdgeWeight not VertexWeight :)
we're idiots.
ok back to guessing what has been arbitrarily changed between scipy 0.13 and 0.14 or whatever they are, breaking my code
 
Can some one help me understand the relationships between the Kernel, Threads, and processors? Can you have multiple processors in a single kernel? How does one define number of threads to be used? I am using linux bash.
 
Is there a WPC equivalent to [SystemDialogInput["FileOpen"]] or has someone come up with a nifty way to Import files into a notebook (assuming both the notebook and file are on the cloud already)?
 
@brama A processor is a hardware thing
If it has a single core, its like the unit that can perform a sequential task
 
@Rojo I know that...so can one kernel run on multiple cores?
 
@brama A kernel is a mma thing
and it is a single process
A process can have several threads but for most functions you run, they will run on a single thread
A thread is like the logical equivalent of a core
You can have many threads running, but they won't actually speed up anything if they are way more than the number of cores you have
because the cores will be actually alternating between your threads
 
8:13 PM
@Rojo so optimally, the # of threads should equal # of cores?
 
@brama Yeah. Or slightly higher. This is actually quite complicated, and I don't have a clear idea. If you are into details, you better wait for other people to answer here
 
@Rojo If so, How do I define how many threads to start and if my code is parallelized, how does MMA know how many threads to initiate?
 
@brama You mean, if your code launches extra kernels?
 
@brama A Mathematica kernel is a process that contains threads that are run on the available processors. You don't typically need to think about threads when using Mathematica (some async functionality is supported though). Many programs have a main thread and a UI thread or background thread when downloading files, etc). If you use parallel functionality in Mathematica it will start subkernels as their own process I believe. Which will typically have one thread.
 
You can lauch the number you want manually, with LaunchKernels, or even go to the settings, and choose how many you like
I think under Edit->PReferences
 
8:15 PM
Then the operating system assigns the threads of the subkernel processes as efficiently as it can, and then the main kernel reads the results I think.
 
@Rojo if I use only 1 kernel
 
@brama Then you are typically running a sequential code on a single thread, in the main kernel process. If you want to take advantage of your extra cores, you need to code in such a way
launching extra kernels and using the parallel functions, using Compile with Parallelization->True
 
@Rojo and @MichaelHale I think I am starting to understand. However, I am not sure how to proceed in the case of the program I am running: I have 10 core steps in my code that iterate several hundreds of times during the code execution. Every iteration update two large matrices using simple matrix manipulations. How do I go about effeciently running this? I have all the related functions compiled and parallelized.
 
@brama Not all algorithms can be parallelized
 
@Rojo Is my understanding correct that communication between multiple kernels is an extra overhead and single kernel is preferable for the case of simple calculations?
 
8:22 PM
@brama Correct
because kernels==processes, which means that they don't share their memory
so, parallelization is good when most of the time is spent calculating stuff indendently of the other kernels
(for non compiled code)
 
@brama Think about where the information dependencies are in the different steps of your algorithm. Each step can only execute when its dependent computations are finished, but if the dependent computations of many steps have been completed, they can all be done in parallel.
 
in my case, every iteration has two matrices updated, independently, after the first two steps that determines the interaction by creating a temporary matrix xy. The next 8 steps (4 for each matrix update) can happen independently using the information from xy.
under such scenario, I can think of using two kernels, one for each matrix
What do you think?
pardon my slow typing. I am trying to understand what you guys are suggesting...and then trying to see how it fits in my case..
@Rojo and @MichaelHale here is the code: pastebin.com/ipLsqeTR if you want to check!!
 
@brama Too looooong, zzzz
 
@Rojo is it???I thought most of it comments!!
`fi=demR[Last/@kr] gamma[Take[k0,{2,-2}],Take[k0,{3,-1}]];

qf=Fq[[Mod[j,4]+1]]=floF[Most@k0,Rest@(Fk[[1]]),Total@Fq,Join[Total@Fin,{0.}],Join[fi dx,{0.}]];
qin=Fin[[Mod[j,4]+1]]=Subtract[fi,b Most@qf] dx;
Fk=RotateLeft[Fk];
k0=Fk[[-1]]=updateF[Join[{0.},Divide[Subtract[Most@qf,Rest@qf]+qin,Vf],{0.}],k0];

qsum=Total@Rq;
qr=Transpose[Join[Transpose[floR[Most/@kr,Rest/@Rk[[1]],Most/@qsum]],{fi}]];
qr[[All,RML]]=compiledMin[RMori,floR[kr\[Transpose][[RML]],Rk[[1]][[All,RML+1]],qsum\[Transpose][[RML]]]];
The above are the core steps I was talking about, that iterate several hundreds of times during the execution
fi is calculated in the beginning and is used in the rest of the code
next 4 steps update the matrix k0
and the last 6 steps update the kr matrix
@Rojo still too confusing and zzzz?
@MichaelHale you want to take a shot?
 
8:47 PM
@brama Haha, yes, sorry, I don't have the time/responsability ratio required to look at that code now
 
@Rojo That is fine..I was just wondering how I can efficiently execute this code...
 
9:09 PM
@Artes By the way, I voted to close Sum with Levi-Civita after our chat. It's been holding at 4 votes for the last day, though.
 

« first day (925 days earlier)      last day (3549 days later) »