« first day (907 days earlier)      last day (3578 days later) » 
00:00 - 23:0023:00 - 00:00

12:01 AM
@mildused The Wolfram Programming Cloud is free for everyone. If you deploy something it costs Wolfram Credits. Free users get 500 Wolfram Credits per month, and with MMA10 you get an additional 1000 Wolfram Credits I think.
 
I was talking about more evaluation time
 
@mildused I haven't seen a subscription for increased evaluation time. Where did you see that?
 
just a second let me pull it up
Hmmm it was there yesterday. The free version had a 0.5 minute evaluation limit
Found it.
Well I guess increasing credits increases computation limit as well
 
No, you were right. Paid subscriptions increase the time limit it seems.
 
Yeah it seems cheaper in the long run to just get Mathematica
 
12:10 AM
I can't find the source where it says what cloud capabilities MMA10 gives you though.
 
i don't think it has any
i mean if you think about it: if you have mathematica why settle for 30 minute limits anyways
Yesterday I ran a code that went for 8 ish hours
actually, no it was 11 hours
Let me tell you my story:
I am a 15 year old teenager. I am taking the 3rd Level in a Science Research Course that uses Mathematica to build students up.
I LOVEEE math
I do math competitions every year at National and State Level and place in Top Many times
and whenever I had trouble with Mathematica late night, I wasn't able to call my professor because he was asleep but I can always find a similar problem on Stack and make some similar edits to my code as well
 
@Murta Hi!
My condolences!
 
@belisarius Creedence? :P
 
This page describes what benefits you get from MMA with premier service.
 
@belisarius ... Yeah..
 
12:17 AM
@mildused Sounds like all you need is Mathematica.
 
See you tomorrow!
 
@Rojo "La fanfarria militar Alto Peru" ;)
@Murta Let us enjoy till then !
 
Hehe
 
I have to go now!.. bye
 
Where can I download Lightweight Grid Manager?
 
12:18 AM
@mildused you need a premier service. So you download in Wolfram User Portal
 
@Murta Bye! I'll be here tomorrow to be shamed by your comments :)
 
how much is it and go ahead and leave if you have to go
 
@belisarius I hope soo! hehe
@mildused it's free with premier service.
 
@Murta I hope you'll do the same if the unexpected happens
 
acl
@Rojo @Szabolcs doesn't like it
 
12:24 AM
@acl Thanks @Szabolcs, whyyyyy?
@MichaelE2, you around?
 
12:43 AM
@Rojo Hi! I hope Di María is healthy...
 
@MichaelE2 Hehe, let's hope so, it's not sure yet
@MichaelE2 I pinged you about the closed swapping question
 
@Rojo I remember it.
 
I didn't read all your answer, but I probably know why you saw what you saw
Probably your first swap requires copying because your $HistoryLength!=0, so it needs to be kept
but if you swap in a batch in the same evaluation in a Do, then it won't need to store each
 
@Rojo Oh, that's possible. $HistoryLength = 5 for me....
 
Makes sense then :)
 
12:47 AM
@Rojo Yep, that's it. Well, time to revise....the OP and m_goldberg might like to know. Thanks.
 
@MichaelE2 No problem
 
Good luck tomorrow!
 
@MichaelE2 Thanks, we'll need it
 
@Rojo Because there are better ways and it's easy to break it. Suppose fun[] does it. Then you (or someone) defines g[...] := ... fun[...] ... that returns a number. Then you use Reap[fun[g[1]], tag] thinking that you'll only get additional results from the fun that you wrote, not knowing or noticing that there's an extra one called inside g. Leaving unreaped sown values is not a good idea IMO.
 
@Szabolcs So, because of the possibility of conflicting tags
 
12:58 AM
Suppose FindRoot did this. It's not hard to imagine that a black box function that you're trying to find the root of also calls FindRoot inside.
 
or someone else trusting that no inner function sows anything and using Reap with no tag
Ahh, I see
 
@Rojo Not exactly. Because the very same function that you want to returns extra information from gets called twice inside the same Reap.
 
If you don't reap right away, you may have unexpected conflicts
 
Yes. That's why I don't like it.
 
Thanks
 
1:03 AM
@Rojo You could use an association to return several pieces of data.
Then fun[...]["mainData"] gives the main result.
 
@Szabolcs That's what I did, yes
but one has to admit, it's not striictly better in every way
 
acl
@Szabolcs that's the first use for associations I've thought of
 
I reaaally like associations
Big addition
 
acl
yes it seem very useful. I've not gotten round to actually using it in my code yet (not yet familiar enough with them)
 
@acl Me either. I haven't used MMA much these last months
I'll probably try abusing associations until I bounce back to a healthy middle ground
 
1:07 AM
If you guys use Associations, I found this today:
Mentioned in chat earlier.
Should be no problem for as long as all keys are strings or numbers.
 
@Szabolcs Well, but they are weird as atoms in other ways too
 
acl
@Szabolcs that looks dangerous
@Rojo such as?
 
@acl Well, the rhs also don't get reevaluated once the associations get created
but, the one that I find most troubling for now (but I haven't used them), and is probably a design thing, is that the pattern matching doesn't get inside
So, for example, <|"a"->"b"|> /. {"a"->8, "b"->34}
remains unchanged
 
acl
@Rojo true
f = <|a -> c|>
FullForm[f]
f[[1]]
f // TreeForm
so FullForm lies
just like Graph!
 
@acl We don't have many functions that never lie, right?
AtomQ perhaps
 
acl
1:20 AM
@Rojo I just meant that that TreeForm is unexpected if you are used to eg Lists, and Part doesn't work like you'd expect from FullForm given how that works for other structures
 
You have atoms, expressions, and atoms that dress up as expressions. For the latter, half of mma functions fall for the disguise and the other half don't
 
acl
@Rojo ah I hadn't noticed that
@Rojo apart from Graph and Association, what else?
 
@acl Image?
 
acl
(what else pretends to be an expression while in fact being an atom, I meant)
@Rojo hm, TreeForm is slightly more reasonable there, but Part fails miserably
looks like most of the "recent" stuff does this
 
@acl SparseArray?
@acl Each crossdresser deceives its own set of built-ins, which makes it a bit messy
Associations even deceive Level, Map, .... But not the replacement functions
and AtomQ has a good eye
 
acl
1:25 AM
@Rojo hm, I had never noticed even though I use SparseArray all the time
So, many things introduced after v4 look like they're faking it
It feels like it's fragmenting the language into various levels
 
@acl It was probably too hard to do a PackedArray equivalent for each data structure that needed an internal optimization
I think the pattern matcher, just like AtomQ, hasn't been fooled yet, hummm
Not true
Image fools it to some extent
And association fools most built ins in a peculiar way, that is different from its full form
For example, even though the full form is Assoc[List[Rule[key, val]]], for Level or Depth there's only one level involved. They just treat it as a list indexed by key
instead of integer position
What I meant with "the rhs remains unevaluated" is that ass = <|"a" -> a|>; a = 4; ass
 
acl
@Rojo yes that's right
 
will give the value a unevaluated
even though it's "rule" and not "ruleDelayed"
Same if you did ass=<|"a"->0|> ; ass[[1]]:=2+2; ass; So probably these will fall in the same traps that Szabolcs mentioned
even though they are less relevant
 
acl
Also the behaviour of Map etc is inconsistent with FullForm (although it's documented and obviously intended)
 
@Szabolcs A simpler example than compressing: Normal@ass
On a side note, I see a tremendous potential for jokes in code
 
1:40 AM
:16558669 It serves well with (at least) Fit, First, Mean, Integrate, ...
 
@belisarius What's it?
 
@Rojo ass...
 
@belisarius Flatten, Rescale, Partition, Hold, HoldAll, ...
 
Insert
AirPressureData
 
@Rojo Hehe, FindCurvePath
 
1:45 AM
@rm-rf TunnelData
SmallCircle
 
acl
Riffle
 
Expand, Split
 
acl
@rm-rf this is going downhill, fast
@rm-rf StringSplit, even
 
@acl "Puritans not allowed"
 
@belisarius GARCHProcess
 
acl
1:47 AM
Guess @Szabolcs didn't really think his var name through
 
@rm-rf But that converts to something else: a list of rules. While Compress or MathLink transfers are expected to preserve them
 
@acl Hehe, that's why I always use assoc in my answers :)
 
@Rojo Yeah, GARCH is a local preference
 
@acl I used it about 20 times in the community post ...
 
acl
@Szabolcs I noticed it when you linked to it, but thought I'd say nothing
 
1:49 AM
Even Through
Anyway
 
@Rojo FindMaximumFlow... <drops mic>
 
acl
@rm-rf I once watched a talk (by B. Drossel, I think) where we were told, numerous times and on several slides, how an "anal. solution" was obtained
 
lol
 
@rm-rf Just don't post an image
 
@Szabolcs Do you still have the list of new functions in m10? (too lazy to generate them myself :D)
 
1:56 AM
@rm-rf No, sorry. Need to go now, bye!
 
bye
 
Bye
 
2:22 AM
@belisarius Unbelievable.
 
@PatoCriollo You know. Argentina is a party today.
@PatoCriollo Y tocada el 9 de julio en Tucuman :)
 
I wonder why... poor Murta
 
@PatoCriollo All the fun coming out of the cargadas are dangerously borderline with a nuclear war right now :)
 
@belisarius tell me about it. Had my field day with some friends from our neighbouring country after "la paliza" they received.
 
@PatoCriollo Wanna see something touching?
This one is better, though
 
2:43 AM
@belisarius I'm crying of emotion. El himno!
 
@PatoCriollo Todas las canchas parecen el Monumental
 
Argentinians everywhere...
 
Tomorrow I'll be flying during the match :(
 
@PatoCriollo You can't!
 
Sum[n/m Binomial[n - m/2 - 1, n - m] z^m, {m, 2, n, 2}] evaluates to 1/2 (-1 + 2^-n (1 + Sqrt[1 + 4 z^2])^n) why exactly?
 
2:50 AM
@belisarius Long Story ...
 
@PatoCriollo Oh,well. A very bad day for flying.
 
@belisarius I don't think there is a single Latin American Country that wants Argentina to win tomorrow.
 
Well, we are very good at getting hated uniformly...
 
@PatoCriollo That's part of the folklore
 
2:59 AM
@PatoCriollo Much better
:)
 
@Rojo I don't understand this:
$HistoryLength = 0;
SeedRandom[1];
a = Range[10^8];
sw = Table[RandomSample[a, 2], {1000}];

Do[a[[s]] = a[[Reverse@s]], {s, sw}]; // AbsoluteTiming
(* {0.420449, Null} *)

a = Range[10^8];
Do[a[[s]] = a[[Reverse@s]], {s, sw}]; // AbsoluteTiming
(* {0.002002, Null} *)
(I Quit[] first....)
 
@MichaelE2 Back
@MichaelE2 Are the first 4 lines run on the same cell?
If so, $HistoryLength was still 5 there
 
@Rojo I did it both ways. Same thing no matter what.
 
@MichaelE2 Let me try
Crap, I closed mma. It hurt, lots of stuff open
 
3:14 AM
@Rojo Sorry....
 
@MichaelE2 My fault, i am using a lot of keyboard shortcuts
and sometimes I just make mistakes and hit the "close app" shortcut
More like "kill app"
@MichaelE2 I think that
RandomSample might be returning references to a's data
so sw has those references
instead of copies
That would be my guess
for now. Not sure, weird
 
@Rojo Thanks. Seems plausible. This stuff is too complicated under the hood...
This is quick on both runs:
SeedRandom[1];
a = Range[10^8];
b = Range[10^8];
sw = Table[RandomSample[b, 2], {1000}];
 
@MichaelE2 Right, so it seems it is because sw has references to a
What would be a simple way to force a copy?
InverseFunction[Share][] :P
 
@Rojo Hehe. Yeah, I don't really know. Maybe a[[1]]=a[[1]].
 
3:24 AM
@belisarius :)
@MichaelE2 I can't find a way to force it to create a clean full copy
I imagine if you change a single value, the array of pointers has to be copied in full, but only the part you changed gets a new address
This is interesting
OR
I am sleepy and am not thinking straight
 
@Rojo Maybe I'm wrong, but executing a[[1]]=a[[1]] after sw seems to do it. At least the times of the swaps are similarly short.
@Rojo I don't think I've been thinking straight about this at any time....
 
3:42 AM
@MichaelE2 It seems to take longer when the first level of sw is packed
Try this line instead
sw = Table[Hold@RandomSample[a, 2], {1000}] // ReleaseHold
so that it doesn't pack the whole thing
No
I'm confused. Time to shut up for a while
 
@Rojo I thought it was working. Not sure why, though....
 
@MichaelE2 Yes, with your a[[1]]=a[[1]] it probably works, but I am also unsure why. I thought it was for some reason but it doesn't fit
I mean, it is not a workaround. It is almost like doing the first swap :P
 
@Rojo That's true. But sw doesn't have to depend on a. It probably doesn't in the OP's real code. It was convenient because a happened also to be the list of positions in a.
By the way, if I do sw = Developer`FromPackedArray[sw];, the first swap takes 0.4 sec (i.e. it's long/slow).
 
@MichaelE2 Yes, but that unpacks also at level 1, it seems to make a difference
@MichaelE2 Right. And I wouldn't worry much about such internals as long as mma just copies "once when needed", for some definition of needed. But trying to create a copy of sw (not of a) and failing made me start thinking if there are situations where this can be real trouble.
 
@Rojo Yes, I wouldn't be surprised if it comes up and is never noticed fairly often.
 
3:53 AM
@MichaelE2 I'll think and ping you up if something comes up
 
@Rojo Ok, thanks!
 
 
5 hours later…
9:15 AM
@Rojo Since you are on Linux now too, can you check whether V10 (in the final version, not one of the betas) has weird behavior for 3D Graphics? Everytime I click to rotate, it somehow zooms for a fraction of a second:
@Rojo Additionally, the Antialiasing preference has absolutely no effect. Here with full antialiasing in V10:
here on V9 with the same setting
 
 
4 hours later…
1:01 PM
0
Q: Combine two users

NicoDeanWhen I have joined Mathematica.SE, I unfortunatly logged in into two computers, and couldnt remember my other username, so I created two of them. This one and this. Is there any way to combine these two users? Thank you!

 
 
1 hour later…
acl
2:15 PM
@Rojo that answer was a joke (it does work though)
@Rojo this solves a question, a special case of which is your interpretation of the OPs question using a monte carlo approach
(I wrote the code years ago, I think I'd do it differently now but it sort of works)
 
2:30 PM
@halirutan Same thing happens here. The zooming for a fraction of a second is less noticeable but clearly happens, and antialiasing has no efect
But then again, I still have to make fonts work properly. The plus sign + for example is assymetric :D
@acl Ah, ok. Sorry for spoiling the joke asking questions
 
 
2 hours later…
4:04 PM
@Rojo In CompiledFunction, you can change any specified elements in place without copying the entire array. So I guess there are ways in mma to achieve this, just "undocumented".
 
@Silvia Hey. I don't really remember what I was thinking exactly there. I ended up quite confused with the issue
 
@Rojo Ah, since you're here, can you check this behavior? According to the doc "If it is evaluated not within a scheduled task, $ScheduledTask gives None. ", but directly evaluate $ScheduledTask doesn't give None here.
It's an update in 10 according to the doc.
 
@Silvia Remains unevaluated here instad of giving None
 
Thanks!
 
@Silvia Worth reporting
 
4:11 PM
@Rojo Will do it :0
@Rojo So I guess you changed your avatar because of the World Cup?
 
@Silvia That's right :)
 
@Rojo Hehe every bar in China is full of fans watching the game :)
 
@Silvia You should too :)
Entity["Country", "Argentina"]~EntityValue~"Flag"~Rasterize~"Image"~ImageCrop~{80,
80}~Export~"myGravatar.png"
 
@Rojo Oh.. I can feel the passion, but I never understood any sports except the table tennis...
@Rojo Have a great game! I'll for some sublime text stuff now :)
 
@Silvia Table tennis is fun
Go go goo, thanks
 
4:22 PM
@Silvia Table tennis is the best ;o)
 
4:35 PM
@Öskå Yes! And my favorite player: Kim Kyung-ah! :D
 
 
3 hours later…
8:04 PM
@Rojo good game!
 
8:16 PM
Any tips for converting nested rule lists into assocations/datasets? My code is working without them, but I'm curious.
{a -> b, c -> {{d -> e, f -> g}, {h -> i, j -> k}}}
to
<|a -> b, c -> {<|d -> e, f -> g|>, <|h -> i, j -> k|>}|>
My first try was {a -> b, c -> {{d -> e, f -> g}, {h -> i,
j -> k}}} //. {a : (_ -> _) ..} -> <|a|>
It's for converting JSON imports.
 
8:48 PM
@MichaelHale The problem with this is that Association is atomic, so the minute you make the change to <|a -> b, c -> {{d -> e, f -> g}, {h -> i, j -> k}}|>, you lose the ability to "inspect" further and make replacements. The way out would be to build the associations from inside out.
@MichaelHale Try this:
Block[{$Association},
    Replace[json, r : {__Rule} :> $Association@r, {0, Infinity}] /. $Association -> Association
]
 
Works, just not as elegant as I was hoping.
 
@YvesKlett If only they weren't so tired
@rm-rf I haven't tried it but, I think that should work without the $Association
 
@Rojo real spirit there. Watching in a spanish tapas bar ;-)
 
@YvesKlett :)
Too much tension
 
@Rojo Good catch. Yes, this works as well:
Block[{Association},  Replace[json, r : {__Rule} :> Association@r, {0, Infinity}]]
 
8:57 PM
@rm-rf I meant
Replace[stuff, {r__Rule}:>Association[r], {0, Infinity}]
 
@rm-rf @Rojo In rm-rf's first version, why did the /. replace the inner $Associations when the doc for /. says "no further rules are tried on that part, or on any of its subparts."
 
@Rojo we're all good here. But two hours of beer and tapas leave me something bloated.
 
ah, the heads are separate
 
@Rojo Ok, that works too. For some reason I thought it wouldn't
 
nevermind
@rm-rf @Rojo So Replace works but ReplaceAll doesn't because Replace goes from inside out and ReplaceAll goes from outside in?
The basic Replace version does work though, so it's clean enough to continue updating my JSON imports to use Dataset. Thanks
 
9:19 PM
@MichaelHale interesting. This Would be a nice transformation for XML too. At least in the cases where attributes can be ignored.
 
@Murta That was the first thing to came to mind when I read they were working on arbitrarily nested associations.
Import["http://en.wikipedia.org/w/api.php?format=json&action=query&\
titles=Ernest%20Hemingway&prop=revisions&rvprop=ids|timestamp|size&\
rvlimit=10", "JSON"]
That gets the ids, times, and sizes of the 10 most recent revisions to the Ernest Hemingway article.
So to extract the continuation id I would do something like json[[1, 2, 1, 2, 1, 2]]
Now I can do data["query-continue"]["revisions"]["rvcontinue"]
 
@Rojo @YvesKlett Goooooo!!!
@belisarius sorry...
 
@murta :-)
 
Thought this might work though, no such luck. data["query", "pages", "9428", "revisions", All, {"revid", "timestamp",
"size"}]
It works up to "revisions" though.
It works with double brackets for Part, but I wasn't expecting it to keep the keys in that case.
 
9:37 PM
@YvesKlett Congratulieren!
 
Congratulanken
 
@belisarius Seen any sports lately?
 
@Rojo congrats to a superb game!
 
@YvesKlett :) great game
@MichaelHale Right
 
With our king being of more than 75% of german descent I will regard this as a Dutch win.
 
9:46 PM
@Rojo I wouldn't have known to even try that. After I saw ReplaceAll wouldn't work, I figured I needed to use MapAll or ReplacePart with some extra checks.
 
@MichaelHale here is an attempt to do the XML case:
xml=XMLElement["root",{},{XMLElement["n0",{},{XMLElement["n1.1",{},{"v1.1"}],XMLElement["nl1.2",{},{"v1.2"}]}]}];
Replace[xml,XMLElement[element_,_,{val___}]:> Association[{element-> {val}}],{0,\[Infinity]}]
<|"root" -> {<|"n0" -> {<|"n1.1" -> {"v1.1"}|>, <|"nl1.2" -> {"v1.2"}|>}|>}|>
But too much parentesis...
remember that this transformation ignores attributes
 
A function is usually a good alternative too if nothing else works. change[{r__Rule}] := change@<|r|>;
change[a_] := change /@ a;
assuming there are no Hold stuff inside
 
@Sjoerd well done!
 
Hello
 
10:01 PM
@Murta Interesting. @Rojo @rm-rf Were you familiar with this issue from the similar behavior of Graph?
 
I am calculating the eigenvalues of a very large matrix, but the calculation of the elements is very slow in mathematica. I want to off load the computation of the elements to C code, so how can I do that.
It should be asked somewhere, can anyone p[oint me with the right link?
 
@MichaelHale I am not sure what issue you are referring to, but I have barely used Graph, so probably not
 
@SjoerdC.deVries And a Dutch loss at the same time? ;)
@MichaelHale Yeah
 
@Rojo That Association is atomic, like Graph, so ReplaceAll won't reach inside it, despite its written appearance.
 
@MichaelHale Ah, ok. No, I was familiar because I knew Associations were atomic so I checked to what extent it worked as if it wasn't
 
10:20 PM
@YvesKlett you too :)
 
acl
10:43 PM
@hwlau you could use Compile with CompilationTarget->C
 
@acl How can I make it very efficient with almost zero overhead except the memory fro the matrix itself?
 
acl
@hwlau what should have zero overhead?
 
memory overhead
 
acl
you could use SparseArray
they are sparse, right?
 
It is a dense Hermitian matrix of size 30000x30000
with double precision, it willl take about 14.4GB which just fit my memory
 
acl
10:49 PM
@hwlau dense?
 
@acl yes, all matrix elements are non-zero complex number
 
acl
@hwlau well, then no sparse matrices for you
anyway compiling the function that produces the elements is the way to go, I would guess
at least, that is what I do
 
@acl I think so, but I never successfully compile any useful functions except few trivial one.
It always complain some function are not compilable
maybe I should try again.
Is the compilation of for loop and appendto efficient in compiled code?
They are not efficient in Mathematica
 
acl
@hwlau yes
 
@hwlau If it just fits you memory, it is very unlikely you find a procedure that solves your problem without taking any additional memory (for instance for storing the result if it cannot be done inplace).
 
acl
10:55 PM
try and ask here (ask me) if you have some problem compiling.
@halirutan yes that's also true
@hwlau one of the two functions I use is
Compile[
    {{number, _Integer}, {lsystem, _Integer}, {nparticles, _Integer}},
    Module[{n = nparticles, m = number, state = Table[0, {i, lsystem}], btmp},
      Do[
        btmp = binomc[lsystem - i, n - 1];
        Which[
          m > btmp, m -= btmp; state[[i]] = 0,
          True, n -= 1; state[[i]] = 1
        ],
        {i, 1, lsystem}
      ];
      Return@state
    ],
    CompilationOptions -> {"InlineExternalDefinitions" -> True},
    CompilationTarget -> "C"]
or something like that
it compiles completely and is fast enough
 
@halirutan I have memory to store another matrix during the eigenvalues[] call
 
acl
(can be made a bit faster too)
 
trying...
 
00:00 - 23:0023:00 - 00:00

« first day (907 days earlier)      last day (3578 days later) »