« first day (503 days earlier)      last day (3998 days later) » 

12:05 AM
Nothing going on here..
 
Dynamic[Stack[_], UpdateInterval -> 0]
looks interesting :)
Could anyone tell me if TraceInternal option is only available for Trace? I would like to use it in TraceScan but with no success..
 
And no, the dog is not old
 
Hi @halirutan ! Good morning! :D
 
@Silvia Indeed.
@Silvia Good morning.
 
How is your IDEA going? Sorry I'm busy on some personal stuff not have much time on the test..
 
12:14 AM
@Silvia I had to do lot of boring but important stuff too the last week.
But I'm working on variable expansion which starts to work now.
 
@halirutan That is what life is.
 
@Silvia Unfortunately, sometimes yes.
But currently it is not available as downloadable plugin.
 
@halirutan Looks great!
Take your time :) An old chinese idiom says, Slow and steady wins the race! (Is that a right sentence in English?)
Speak of smart option, it's funny MMA frontend proposes TraceInternal in TraceScan where it doesn't work, while not do it in Trace where it does work.
 
@Silvia Yes, that sounds correct to me.
@Silvia Let me have a look at this..
 
@halirutan It's a pity this option doesn't work for TraceScan, which is the only function I can find to inject test function around each evaluation steps.
 
12:31 AM
@Silvia Works for me it seems..
 
@halirutan hmm.. Could you give me a working example?
 
@Silvia For instance here, look at the difference between tracing internal on and off:
Trace[Fit[{1, 2, 1}, {1, x}, x], TraceInternal -> False]
 
@halirutan Oh I know it works on Trace, but what about TraceScan?
 
@Silvia That was just the ground truth... now look here:
TraceScan[Print, Fit[{1, 2, 1}, {1, x}, x], _, TraceInternal -> False]
and then switch to True
 
@halirutan Strange! It works now!
Maybe I messed up some tracing options... orz
@halirutan I see.. I misunderstood the function.. I used #& instead of Print as the first argument and expected it gives something like Trace.. A silly mistake. Thanks a lot! :D
 
12:42 AM
@Silvia Ah, OK then you only saw the output.
 
@halirutan You saved my day (and mood) :D
 
@Silvia Btw Did you notice that TraceInternal is not documented? It has not reference page and it is not mentioned in the doc to Trace but the error message of using it the wrong way has its own documentation..
 
@halirutan I don't know this doc but I did come across some other undocumented one's error message doc..
Also some functions has no formal documentations but has short ones. Like: ?TraceLevel
Also TraceAction.
 
@Silvia Yes, many have usage messages.
 
@halirutan There should be a usage handbook which includes those functions. They could be very useful.
e.g. With TraceLevel and TraceScan, I will have no need to do this.
 
12:54 AM
@halirutan Training for the next Anamorphic Post? :)
 
1:12 AM
Hi @0x4A4D , I have not logged in for some time. Have you changed you name?
What was it?
 
@Murta Yes, I changed my name. It was much shorter back then...
 
humm ... bad memory.. sorry :)
 
1:47 AM
Subscriptions in the site these days. We got a lot of new users...
 
Yes, pretty good, even though not to the same extent as the xkcd thing... that one blew up a bit.
 
I have scrapped the site to get those numbers. Some another way to get it?
 
@Murta Well, nothing public, since they're mod-only features.
 
2:29 AM
I find it amusing that people upvoted this, while not even knowing what maxt is... :)
Voting is indeed capricious and arbitrary.
 
3:00 AM
@Silvia @Murta Sorry, my network went down.
@Murta @0x4A4D You won't believe it, I got a mail from the editor of 2d-code.co.uk yesterday who asked whether I can write a post for marketers because One of the questions readers ask frequently is how to put a QR Code on a curved surface.
7
 
3:29 AM
19
Q: Extracting values from nested rules in JSON data

VerbeiaI have been using Mathematica to analyse some data from the StackExchange API. It is conveniently available in JSON form, which Mathematica interprets as replacement rules. However, some of the rules are nested as the right-hand side of an outer rule, as you can see in the case of badge_counts he...

you can actually work out new members from the publicly available API.
 
4:12 AM
Is anyone here now?
 
4:37 AM
@Mr.Wizard I am
 
@halirutan Hello! If you please, take a look at this. I'd like to see if it's possible to get it working in v8/v9. Could you provide me with the full output of BarChart as used in the question?
 
@Mr.Wizard Should I test the code of your answer or the one in the question?
 
@halirutan Jens said it doesn't work in v8 so I'm not asking for testing. Rather, if you could give me the full output expression of this it would help:
totals4 = {{1093, "AUSTRALIA"}, {235, "BELGIUM"}, {474, "BERMUDA"}, {187, "BRAZIL"}};

BarChart[#, ChartStyle -> "Pastel",
    ChartLabels -> (Placed[Rotate[#, Pi/3] & /@ #2, {{.5, 0}, {1, 1}}])] & @@
  Transpose[totals4]
 
@Mr.Wizard Something like this? pastebin.com/7g8fkmSQ
This is V9 btw
 
@halirutan That could be useful too, but I didn't mean the Box forms, just the Graphics object in InputForm. Could you give that as well, please?
 
4:45 AM
@Mr.Wizard here we go pastebin.com/Ne43SSUm
 
Thanks! :-)
 
Badly formatted as always
 
4:57 AM
@halirutan are you still here?
 
@Mr.Wizard Honestly, I'm at home ;-)
Do you need V8 as well?
 
@halirutan I never know how to ask that question. I'm open to suggestions. :-)
could you try this on both v8 and v9?:
autoStyle =
  Module[{style = Cases[#[[1, 2, 2]], {col_RGBColor, __, _Tooltip} :> col, -1], i = 1},
    MapAt[# /. x_Inset :> {style[[i++]], x} &, #, {1, 4}]
    ] &;
use is BarChart[. . .] // autoStyle
I may need to make the position specifications broader.
 
@Mr.Wizard Shall I try this with your former example? Like this:
BarChart[#, ChartStyle -> "Pastel",
     ChartLabels -> (Placed[
        Rotate[#, Pi/3] & /@ #2, {{.5, 0}, {1, 1}}])] & @@
   Transpose[totals4] /.
  Style[obj_, {GrayLevel[0]}] :> obj // autoStyle
 
No, by itself, please.
BarChart[#, ChartStyle -> "Pastel",
    ChartLabels -> (Placed[Rotate[#, Pi/3] & /@ #2, {{.5, 0}, {1, 1}}])] & @@
  Transpose[totals4] // autoStyle
 
@Mr.Wizard Labels are still black.
If this is what you want. Shall I post the graphics expression?
 
5:03 AM
Let me check my code first.
Would you assign the InputForm graphics expression you put on pastebin to gr and then run autoStyle[gr] and tell me the result?
 
@Mr.Wizard Let me a look on why your pattern is not matching. Give me a sec
@Mr.Wizard if I take part 1,2,2 of the graphics the expressions look different.
No RGBColor on first position in the sublists
{Directive[EdgeForm[{Thickness[Small],Opacity[0.7]}],RGBColor[0.798413,0.82472,0.968322]],{{Directive[EdgeForm[{Thickness[Small],Opacity[0.7]}],RGBColor[0.761959,0.470832,0.940597]],
{{}, RectangleBox[{0.5454545454545454, 0.}, {1.4545454545454546`, 1093.}, "RoundingRadius" -> 0]}},{Directive[EdgeForm[{Thickness[Small],Opacity[0.7]}],RGBColor[0.927848,0.742785,0.615138]],
{{}, RectangleBox[{1.5454545454545454`, 0.}, {2.4545454545454546`, 235.}, "RoundingRadius" -> 0]}},{Directive[EdgeForm[{Thickness[Small],Opacity[0.7]}],RGBColor[0.929162,0.95034,0.664815]],
 
@halirutan I don't understand; I'm using your expression. Did I somehow copy it wrong or are you not using the pastebin Graphics expression?
 
Yes, I see this. Let me check what happens here.
I can only tell you, if I take the Graphics and press Ctrl+Shift+I to convert it into InputForm I see your pattern. Using [[1,2,2]] on the same looks different
 
By the way, I see you now have three Guru badges; congratulations! I recently got my first. I no longer need to hang my head in shame in the chat room. ;o)
 
@Mr.Wizard Yes, the ~50k views on the QR code thing made this..
 
5:15 AM
@halirutan That sounds too complicated to figure out without getting hands on. Perhaps you could take my idea, fix it, and post an answer of your own?
@halirutan I'm working on something else now. Bye! (I may or may not still be here to hear a ping.)
 
@Mr.Wizard Try this:
BarChart[#, ChartStyle -> "Pastel",
   ChartLabels ->
    Placed[MapIndexed[
      Rotate[Style[#, ColorData["Pastel"][(First[#2] - 1)/3]],
        Pi/3] &, #2], {{.5, 0}, {1, 1}}]] & @@ Transpose[totals4]
Or rather, @halirutan, should try it.
 
@MichaelE2 yes, works.
 
@MichaelE2 Hah, thank you, but now you're recreating J. M.'s answer I believe. I was interested in exploring the post-processing option.
 
@Mr.Wizard This works in V8 and V9 too
 
@Mr.Wizard Oh, I hadn't read that one.
 
5:27 AM
autoStyle =
  Module[{style =
      Cases[#[[1, 2, 2]], {Directive[__, col_RGBColor], _} :>
        col, -1], i = 1},
    MapAt[# /.
       Style[x_, {GrayLevel[0]}] :> Style[x, style[[i++]]] &, #, {1,
      4}]] &;
 
@halirutan Thanks; would you like to post that, or shall I?
 
@Mr.Wizard You. I'm afraid this is not stable since the patterns are rather specific.
But for this example it works.
 
And for others it fails? Okay, perhaps best to leave it for now. I'm still curious as to why the Graphics expression changed in the process of copying it to pastebin; that sounds unstable.
 
@Mr.Wizard No, I simply haven't tested it.
@Mr.Wizard The difference is whether I write InputForm[gr] or whether I go to the graphics and press Ctrl+Shift+I it seems.
 
6:09 AM
Hiļ¼ŒCan somebody explain the usefulness of "tutorial/CallingSubsidiaryMathematicaProcesses"
link = LinkLaunch["math -mathlink"]
 
 
2 hours later…
7:54 AM
@matheorem link = LinkLaunch["math -mathlink"] starts the mathematica kernel in MathLink mode as a child process. The tutorial shows how to communicate with such a process. If you have written your own mathlink enabled programms you can communicate in a similar fashion.
 
 
3 hours later…
11:08 AM
@Matariki So, You mean starting the mathematica kernel in MathLink mode as a child process is actually useless?
 
 
5 hours later…
3:39 PM
@oleksandrr. I just got your comment and you're right. There's an additional N from the pattern matching which makes it worse. I just went by the iterations and forgot to include that. I won't be able to make changes until much later, so if you don't mind, could you please modify my answer to correct it? Thanks :)
 
5:15 PM
@MichaelE2 I'd leave it be. OTOH, I'm feeling very slightly charitable today...
 
 
2 hours later…
7:37 PM
Visualize a 3D cellular automaton using Image3D: Image3D[CellularAutomaton[{14, {2, 1}, {1, 1,1}},{{{{1}}},0},{{{10}}}]]
 
7:54 PM
weird weird weird....
I have two  n x2 lists, one of them as far as I can tell they are identical except for the numbers they contain:

MatrixQ[data, NumericQ] == MatrixQ[data2, NumericQ] &&
 Developer`PackedArrayQ[data] == Developer`PackedArrayQ[data2] &&
 Dimensions[DeleteCases[data2, _Real, {2}]] ==
  Dimensions[DeleteCases[data, _Real, {2}]]
=>True
but for this function, data runs in <1s and data2 never completes:

ListToPiecewise[lst_, var_] := Piecewise[
{Last@#, var <= First@#} & /@ lst
, lst[[-1, 2]]]
(they are both unpacked arrays of size 100 000x2 filed with real numbers)
 
 
3 hours later…
11:17 PM
@halirutan Very cool!
 
@Murta Hehe, yes. It was not even 24h after the post.
 

« first day (503 days earlier)      last day (3998 days later) »