« first day (568 days earlier)      last day (3922 days later) » 

1:11 AM
Hi all, I don't think this is a good candidate for a Q on the site, but has anyone else ever had problems with creating documentation in Workbench? Specifically, I'm finding that (1) the "Create Symbol Pages" button only creates one page at a time, not running through all selected symbols as a batch; (2) even if creating pages one at a time, it only works sometimes; (3) the Pacletinfo.m window doesn't seem to recognise the files that are created.
Relevant facts might be: (a) I'm using Eclipse with Workbench add-in, not the branded Workbench; (b) My project is managed using Microsoft TFS; (c) I am building a single context but there are several subfiles contributing code to that package/context.
 
@Verbeia In Linux this isn't usable at all. When I need to write doc, I do this on my Mac, but even there it's quite unstable.
 
@halirutan thanks, interesting - I'm using Windows. The TFS thing means I can't use my Mac at home to do this. The code has to stay in the source control management.
 
The DocuTools palette is a pain in the ass and when you write new functions into your package, I often have problems that the list of undocumented functions is not updated properly.
 
@halirutan My issue has been I just can't get the shell pages with the usage messages and options. Well, I can get them if I do them one at a time, but it's flaky.
 
@Verbeia You mean the Reference Pages, right?
 
1:22 AM
@halirutan Yes, in Documentation/English/ReferencePages/Symbols
The whole thing hangs if there is already a file there, so the "Add Page" button does not work.
 
@Verbeia I have a button here Create Symbol Pages where you can create templates for all functions in one step.
 
@halirutan That's the button that is not working properly for me
It think the problem is that it ran once and didn't save.
I wouldn't mind so much but I have about 170 symbols in this package to document :-\
 
@Verbeia Hmm.. seems this doesn't work for me either, but currently I'm sitting on my Linux box. I would need a miracle to make it work here ;-)
mathematica opens and it seems the pages are created, but then they are still missing.
@Verbeia Oh.. correction. Now it worked.
I could create 3 pages in one click.
 
I'm going to go tediously through and delete the files I created using "Add Page", and then go through and add a few Symbols at a time. I wish it batched properly, it would be much easier.
 
2:02 AM
Hi, how to get the depth of a list? For example: {1,2} ==> 1, {{1,2},{3,4}} ==>2 , 1==>0 , {f[x],g[x]} ==> 1 , {{f[x]}}==>2
Thank!
 
@xslittlegrass ArrayDepth, I think, is what you want.
 
We should really build the mathematica documentation into the search feature on the site. It would resolve a lot of repeat/uneeded questions IMO.
 
@MichaelE2 but But ArrayDepth[f[x]] gives 1
@MichaelE2 I want the function to give 0.
@MichaelE2 both ArrayDepth[f[x]] and ArrayDepth[{f[x]}] give 1
 
@xslittlegrass Yes, I just tried that.
 
Did you try Depth?
to get the depth of an expression you use Depth.
 
2:08 AM
@Liam yes, but Depth[f[x]] I get 2. I only want the list depth, not the expression depth
 
@xslittlegrass What about
 
@xslittlegrass Try this: If[ArrayQ[#], ArrayDepth[#], 0] & -- haven't thought of anything simpler. I didn't know ArrayDepth worked over heads other than List.
 
depth[l_List] := ArrayDepth[l];
depth[__] := 0;
 
I believe I like @halirutan's better than mine.
 
@MichaelE2 Especially since ArrayQ[{1, {2}}] gives False ;-)
 
2:13 AM
@halirutan @MichaelE2 Thanks very much!
 
@halirutan Good point. In some cases, someone might want 0 whenever it is not an array.
 
 
2 hours later…
4:21 AM
@Liam People already don't search the existing questions or Google their problem... why do you think they would search the documentation if we were to bake it into the site (btw, the mma docs are available online) :)
 
@rm-rf hey
 
4:42 AM
@VitaliyKaurov hi
 
@rm-rf nice reply to the post on meta about community - thx ;)
 
@VitaliyKaurov Thanks :)
 
At Microscopy & Microanalysis conference now - lots of big microscopes ;)
and people with image processing questions
 
@VitaliyKaurov This is one of the best ones we have that's related
 
@rm-rf exactly they would be forced to search both the site and docs at the same time ;)
 
4:55 AM
@rm-rf wow that is a glorious post! I am here with our image processing lead - I will have her to take a look at it. We just coded a related one right at the conference about focus stacking: community.wolfram.com/groups/-/m/t/92362
 
@VitaliyKaurov That's a nice post. I might have use for something like that, so that's good to know
 
 
4 hours later…
9:21 AM
Hi
 
 
2 hours later…
10:58 AM
@DominicMichaelis Hi!
 
11:28 AM
@Sosi Hi!
 
@MichaelE2 Heya! How's it going? :)
 
@Sosi Great! And you?
 
all good all good! trying to get an efficient way to write documents (cough cough Office's Word) on ubuntu
 
@Sosi I'm embarrassingly bad at Word. :)
 
@MichaelE2 I want to go to Latex eventually, but haven't had much time to give it a try yet. I am still very slow writing there.. Oh well...
 
11:38 AM
@Sosi I'm even worse at LaTeX, but quite good at plain TeX, ok at ConTeXt
 
Hello everybody
I read a book about lisp just to see how similar lisp was to MMA. Turns out you cannot do all this replacement stuff in (common) lisp. It was interesting anyway. Maybe we should have Q&A comparing lisp and MMA? If a "translation table" could be made of mathematica - lisp functions, even better. I think I once saw such a thing, but it was quite incomplete. (Rant).
 
 
2 hours later…
2:07 PM
experts: Before I post this question, I thought to check if I am not overlooking something simple. Should the plot of these 2 command be any different? I simple move one point x from the list out it at the end in one case, then at the start of the list in the second case. That is all. WHat do you think?
x = {2, 2, 20};
ListContourPlot[{{2, 2, 1}, {2, 3, 1}, {3, 1, 2}, {3, 2, 9}, x},
 Contours -> Range[0, 20, 1], PlotLegends -> Automatic]

ListContourPlot[{x, {2, 2, 1}, {2, 3, 1}, {3, 1, 2}, {3, 2, 9}},
 Contours -> Range[0, 20, 1], PlotLegends -> Automatic]
 
 
3 hours later…
4:58 PM
@rcoyller ping
@rcollyer
ClearAll[myFunction2];
Options[myFunction2] = {"SparseH" -> False, "Reverse" -> True,
"OrthogonalizationMethod" -> "Householder"};
myFunction2[n_Integer?Positive, OptionsPattern[]] := Block[{
A = SparseArray[Band[{1, n}, Automatic, {1, -1}] -> 1, {n, n}],
diags =
Sqrt[1./HarmonicNumber[n, 2]]/(Sqrt[n - #] (# + 1) &@
Range[0., n - 1]),
H, T, Z, htime, ttime, ztime
},
htime = First@AbsoluteTiming[
H = If[OptionValue["SparseH"],
SparseArray[
MapIndexed[Band[{1, First@#2}] -> #1 &, diags], {n, n}],
 
@ssch pong. :)
 
Threw in some options and timings, for me householder speeds up T significantly and slows down T negliably
 
Those are interesting ..
 
*slows down Z
 
Running myFunction2[2500], I get {0.590599, 2.101073, 2.002156, 0.391274}.
Running myFunction2[2500, "OrthogonalizationMethod" -> Automatic], I get {0.563771, 11.698489, 1.796911, 0.391274}.
I wonder ...
 
5:07 PM
perhaps Automatic =!= no option at all
 
what I was checking. I added to your code:

orthomethod =
If[OptionValue["OrthogonalizationMethod"] === Automatic, ## &[],
Method -> OptionValue["OrthogonalizationMethod"]];
With appropriate other changes ... and it didn't effect the timings. Odd.
I don't know. My other code does not change timings. Here let me post it:
n = 2000;
Timing[pp = N[1/HarmonicNumber[n, 2]];
 A = Reverse[IdentityMatrix[n]];]
Timing[diags =
   Sqrt[1./HarmonicNumber[n, 2]]/(Sqrt[n - #] (# + 1) &@
      Range[0., n - 1]);]
Timing[H = Array[If[#2 < #1, 0., diags[[#2 - #1 + 1]]] &, {n, n}];]
Timing[T =
   Reverse@Orthogonalize[Reverse /@ H, Method -> "Householder"];]
Timing[Z = T.H.Transpose[T];]
Timing[Total[(Flatten[UpperTriangularize[Z, 1]])^2]]
Check it yourself, changing the method, if you would.
 
then I get 1s slower for householder, compared with myFunction2
oh wait, possibly Timing vs AbsoluteTiming
 
that would do it. Give me a sec.
 
changing to AbsoluteTiming gives me same +- epsilon
 
With AbsoluteTiming, I get a 2 sec epsilon, the other way.
Switching your code to timing, I get 7.3 s v. 45.8 s ("Householder" v. Automatic).
 
5:27 PM
I wonder if using a sparse array ever becomes benefitial
 
Good question. Got to run here.
 
o/
 
 
1 hour later…
6:39 PM
hello :)
 

« first day (568 days earlier)      last day (3922 days later) »