« first day (1307 days earlier)      last day (3194 days later) » 

2:30 AM
@DanielLichtblau Where did you talk? I could have attended, if I would just have read chat on time... :/
Ah, ICIAM. Well, getting into conference might have been more a hassle. :I
 
3:27 AM
I gave a talk at an embedded workshop (Hybrid Symbolic-Numeric Computation) while at ICIAM. But the talk Sylvia noted was at Beijing Jiaotong Technical University. On a different note,
(I seem to have issues with chat...where was I...)
I gave a talk at an embedded workshop (Hybrid Symbolic-Numeric Computation) while at ICIAM. But the talk Sylvia noted was at Beijing Jiaotong Technical University. On a different note, I saw mention of tossing a baby from a roof. I don't recall that being a common notion and was wondering: did someone else here read early issues of "Cerebus the Aardvark"?
Also saw mention of shucking and eating live shellfish in Japan. This is probably still done in the States, with oysters at least. Was definitely around in Boston's Hay Market, as recently as the 80's if not still today. Lewis Carroll's Walrus would have approved...
 
 
1 hour later…
4:57 AM
Is there a way to change the bg color of cells of style "Item" so that the background does not look like the computer is drunk?
 
@MarianoSuárez-Alvarez Are you comfortable editing stylesheets?
 
some
(I cannot believe that is the default!)
 
Could you try adding the following to your notebook's stylesheet:
Cell[StyleData["Item"], Background -> RGBColor[1, 1, 1]]
That is not how it looks for me by default, btw
I believe None also works instead of white
 
Oh, but I do want a gray background
but one that covers the cell more sensibly :-)
 
5:12 AM
Ohh. Now that makes more sense.
lol
 
Try adding CellFrameMargins -> 15 (increase/decrease appropriately to get the right coverage)
 
oooooooh
cool :)
Now this looks like
Ideally, the background would cover the exact same width as the one above and below, which are in style "Text", with the extra indentation due to itemness inside the backgroun rectangle
But I am turning greedy I guess. I've been wondering why mma paints backgrounds on lists like that for over a decade :p
 
Hehe, yes, stylesheets aren't simple :) A lot of gridding issues/general ugliness can be "hidden" by using a transparent background with no borders :P
But this is fixable. Both just need to start at the same left edge, which can be done with CellMargins. Now to find the right numbers...
Try adding CellMargins -> {{66, 10}, {7, 7}}
 
I'll play with that. This is a life changing thing you know.
 
5:23 AM
:)
You won't have to play with them very much. If you drill into Defaults.nb, you can find the actual numbers that are used on your system for StyleData["Text"]. I'm guessing they're the same across platforms/versions but in case they're not, just use those for Item as well
 
Does AppendTo acting on an association work in place or I am copying things around?
 
@MarianoSuárez-Alvarez You're not copying things around. Insertion/deletion is cheap on associations but I don't think they're in place. "In place" would imply mutation whereas associations are immutable
 
so updating a value associated to a key makes a copy of the whole association?
Something like MapAt[f, Key[k]][huge_association]
 
94
A: How to make use of Associations?

Leonid ShifrinI. General I will first try to briefly answer the questions, and then illustrate this with a small but practical application. 1.Speed of insertion / deletion Associations are based on so called Hash Array Mapped Trie persistent data structure. One can think of this as a nested hash table, but ...

 
Whoever staged the coup at Wolfram and finally forced them to add those operator form for things like MapAt has a special place inmy heeart, btw
 
5:31 AM
Highly recommend that answer ^
@MarianoSuárez-Alvarez That would be Taliesin Beynon, I believe.
 
Actually, cells dingbats have never worked marvellous for me... It always gets messy with amplifications, strings, etc...
 
Now when someone suprepticiously adds lazy generators and such I'll go into raptures
 
20
A: Is there a built-in equivalent to Python's enumerate?

Leonid ShifrinStreaming` module - general, and the case at hand Starting with V10.1, there is an undocumented support for certain lazy operations in Mathematica. However, the primary goal of Streaming` is to support out of core computations reasonably efficiently, and lazy operations are only the secondary go...

Experimental/undocumented, etc. but something to play with
 
Now you are just teasing
 
 
1 hour later…
6:47 AM
@TheToad Yes, Talieson Beynon was the one who pushed hard for introducing operator forms into Mathematica.
 
 
2 hours later…
8:58 AM
groan why did they get rid of ToTitleCase mathematica.stackexchange.com/questions/78884/…
 
 
7 hours later…
3:31 PM
@hftf It was an experimental function which was pulled.
It didn't do anything really interesting and it was decided that there was a better design for the functionality that it would perform.
Please be warned that using functions labeled [[Experimental]] is known to cause groaning in severe cases
 
4:28 PM
hey guys can someone help me?
 
Don't ask to ask, just ask.
 
cos 55ºx-8=x
x-cos 55ºx=8
why?
why this happens?
why x is equals x- cos55? and not -xcos55?
-x+cos55
*
 
4:55 PM
@TiagoCoelho Wrong chatroom - this is Mathematica-the-software, not "mathematics". However: $\cos(55^{\circ} x) - 8 = x$ doesn't imply $x - \cos(55^{\circ} x) = 8$.
oh, this room doesn't do LaTeX
cos(55deg x) - 8 = x doesn't imply x - cos(55deg x) = 8
 
5:19 PM
Does anyone know if the following difference is by design and should be expected?
StringCases["kk", "k" ~~ ___] --> {"kk"}
StringCases["kk", "k*"] --> {}
 
@IstvánZachar I don't know if the inconsistency is helpful, but it is documented as such. The docs for StringMatchQ specifically call out the special characters, but StringCases doesn't.
 
6:03 PM
@MichaelHale I'm not sure I see how the StringMatchQ doc reveals anything about this, but I might have simply overlooked it. Could you please point me to the specific line in the docs? Actually, StringMatchQ["kk","k"~~___] equals StringMatchQ["kk","k*"], so I assume that the discrepancy is in the way StringCases partitions the string.
 
 
3 hours later…
9:16 PM
@IstvánZachar On the other hand, one cannot be sure what "k*" really means. The correct counterpart for "k"~~___ should be
StringCases["kk", RegularExpression["k.*"]]
No?
I recognised that there is a difference when I used string regex in the FileNames function.
 
 
2 hours later…
11:16 PM
@MichaelE2 Are you around?
 
11:32 PM
@halirutan Just back (to my computer) from dinner.
 
@MichaelE2 You complaint is correct, but there is an easy solution.
 
@halirutan Yes?
 
@MichaelE2 First, to understand why this happens with a 1000x1000 matrix, look at this small example that shows you how the tensor is initialized:
<< CCodeGenerator`
fun = With[{m = RandomReal[1, {5, 5}]}, Compile[{},
   m, CompilationTarget -> "C"]
  ];
CCodeStringGenerate[fun, "fun"]
 
@halirutan Yes, that was my guess....Solution?
 
@MichaelE2 Well, can you imagine having a c-source with 10^6 lines of code only for the initialization? I guess if I were a compiler I would be pissed too :-)
 
11:35 PM
@halirutan Of course
 
@MichaelE2 When you do something like this Compile[{{m, _Integer, 2}... then you can never change m because it is not copied. Mathematica uses the pointer to the real m and therefore, you can just pass the very large matrix as argument and you are fine.
I'm currently adding this to the answer
 
@halirutan Yes, that was my solution. My thought was to compare the two for the OP. Only compiling the included version slowed me way down. Talk about pissed software. The FE would become unresponsive for a minute or two every now and then, too.
Yet somehow I think a compiler should handle 10^6 20-byte or so strings for reals without too much fuss.
 
@IstvánZachar
StringMatchQ allows both ordinary StringExpression string patterns, as well as abbreviated string patterns containing the following metacharacters:
Under details and options
 
FE crashed...Ah well. Saved everything before dinner. :)
 
11:51 PM
@MichaelE2 I did a mistake by trying to compute all g3 for all Tuples[Range[1000],{2}]... whole system was gone until I ssh`d in and killed the kernel :-)
@MichaelE2 Anyway, here is the sneak preview
Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/PZLO6.png"]
I'll show shortly, that g3 is even faster as g2 for large matrices.
 

« first day (1307 days earlier)      last day (3194 days later) »