« first day (2674 days earlier)      last day (1824 days later) » 

12:11 AM
@halirutan Probably need to get something up sooner rather than later :) Seems to be close to being closed...
 
@b3m2a1 I'm doing my best :)
 
Not a problem. Just thought I'd let you know.
 
12:37 AM
@channel I've been in need of better data structures recently so I'm going to write a number of efficient ones and put them into a paclet you can drop into a package. Currently on the docket are the ones listed in the question body here: mathematica.stackexchange.com/q/198341/38205
Are there other requests?
Anyone want to contribute their own structures? I'm gonna put this on GitHub so if you have a data structure just submit a pull request.
 
1:06 AM
Here's a quick way to kill your kernel. Try to display this in the FE:
Fold[{#2, #} &, Null,  Range[100000]]
I'm making a linked-list Stack and that kept crashing and I couldn't figure out why.
 
1:34 AM
I took back the close vote but I do think the question could be rewritten to be more on-topic.
First the title doesn't make sense unless you are a regular to the site and know the contributors by name (and by nickname, I still didn't associate "Hal" with halirutan), and have seen the ad in question. The title should tell me roughly what the question is about
Then the question doesn't explicitly ask "How can I make this geometric construction using Mathematica?" - which seems the bare minimum for a question on this site, right?
but my tendency towards being a curmudgeon is probably misguided here; the posted answer is really nice and it's great to have a place on this site for it
 
 
4 hours later…
5:26 AM
@JasonB. yeah I should have written it better but I was in a rush and figured however bad the question is the answer will be interesting enough to be worth posting.
Did the minimum necessary edits to make it make passable on the site
 
6:05 AM
Hello all! I worked really hard on this (don't tell my supervisors, haha!) and I felt like posting it here, enjoy! mathematica.stackexchange.com/questions/198372/… free to immediately find the post it is a likely duplicate of, or en
It's late, hah. Whoops! I forget enter doesn't let me do a real return, and just presses send....Thank you to you all, though, even if you see my level of ignorance in the simplistic methods & techniques I have likely missed, but do enjoy as I do :D I hope!
 
 
2 hours later…
7:46 AM
My DataStructures project is semi-live if people want to play around with it.
 
@b3m2a1 @JasonB. is there any good example of expression store vs idiomatic way to achieve something that favors expression store? I wanted to learn more about it and I kind of understand points about ref counts but I miss a convincing example.
 
@Kuba think about when you have an object a that has a property b that you want to compute. You'd like to store that value in a cached way but have it be that when a goes out of scope and is destroyed by the garbage collector that cached value also disappears so you don't have a leak.
There's no non-leaky idomatic way to do that.
 
@b3m2a1 that is a description and I think it is what I gathered from your posts as well.
I need a small example to wrap my head around it though.
E.g. aren't upvalues good for that kind of caching? ClearAll@sym will remove them as well.
 
Yeah but you need to know to call ClearAll@sym.
What if my object was made on the fly in a Module? It should die when the Module goes out of scope but if I attach an UpValue that references a System symbol it'll never die.
What if I need to return that object to an outer scope so I can't even control when ClearAll gets called?
I don't want to have to force my end user to garbage collect all their objects
(this is actually an issue I've run into with mutable objects in the past and is something I'd like to go back and use ExpressionStore to work around)
 
@b3m2a1 why are you refusing to show me a code sample which has a real application and shows how it works? :p
 
7:55 AM
@Kuba ah I thought that'd be enough. I'll draft one up:
 
@b3m2a1 I often have hard time grasping a programming concept that does not have examples attached to the explanation :)
Sorry :)
 
8:10 AM
Here's an example of a memory leak using UpValues:
createThingy[] :=
  Module[{tag}, myDataType[tag]];
myFunctionToProcessDoop[myDataType[tag_]] :=
  (
   tag /: myDataType[tag, "LeafCount"] = Range[10000];
   );

m1 = MemoryInUse[];
Module[{a},
 a = createThingy[];
 myFunctionToProcessDoop[a];
 ]
MemoryInUse[] - m1

82704
We can store that "LeafCount" data using ExpressionStore and avoid the leak:
store = Language`NewExpressionStore["<doop>"];

myFunctionToProcessDoop2[dt_myDataType] :=
 (store@"put"[dt, "LeafCount", 2])

m1 = MemoryInUse[];
Module[{a},
 a = createThingy[];
 myFunctionToProcessDoop2[a];
 ]
MemoryInUse[] - m1
Ah wait no looks like that one is also leaky...
Hmm.
 
0
Q: Custom atomic expressions - modern tutorial

KubaAtomic but sophisticated expressions are all around for a long time: Graph SparseArray. More are coming witch each new release, yet there is no official source of guidelines / tutorials about how users could create their own. Pieces of the answer are laying around: List of atomic expressions...

 
One issue is I don't know how to make Mathematica expressions go out of scope clearly.
@Kuba omg what is this:
m1 = MemoryInUse[];
Module[{a},
 a = createThingy[];
 myFunctionToProcessDoop2[a];
 None;
 ]
MemoryInUse[] - m1

1912
All it took to make it go out of scope was to put something at the end of the CompoundExpression...
Because that definitely makes sense.
Comparing that to the original case:
m1 = MemoryInUse[];
Module[{a},
 a = createThingy[];
 myFunctionToProcessDoop[a];
 None;
 ]
MemoryInUse[] - m1

82704
And to the case without the None:
m1 = MemoryInUse[];
Module[{a},
 a = createThingy[];
 myFunctionToProcessDoop2[a];
 ]
MemoryInUse[] - m1

82512
This smells like a bug to me...
 
8:36 AM
@b3m2a1 let me check those examples, thanks.
 
9:20 AM
@Kuba this is definitely something I should write up in more detail for my tutorial...
Not sure to what degree other people go crazy about OOP like I do, but there's really a lot to work with since v10 or so.
 
 
1 hour later…
 
4 hours later…
2:55 PM
@b3m2a1 This is because CompoundExpression[..., expr, Null] stores expr in Out. See this answer by @MrWizard.
 
 
1 hour later…
4:01 PM
@CarlWoll I had hoped the Module would circumvent that, but I guess I need to be sneakier about that then in the future.
 
 
2 hours later…
 
3 hours later…
 
2 hours later…
11:29 PM
So.….why does Nintegrate give such vastly different results, when one does or does not specify the number of points across? Is this a misunderstanding of syntax on my part? They both evaluate...in my case it's an order of .5 different? I've done an EME, then expanded it over a cosine basis....I'm seriously getting .04 with number of points across the span being specified, and then .08 when I just give my boundaries...I found something once on this issue here, but cannot find it now
I thought maybe it was a lack of enough points across the span, but it did not even come close to converging to the .08 value I get. I know this is a real rough ask, but its a simple misunderstanding on my end, and I'm stumped.
 
@Feeds I got excited about this -_- but it turns out they just got the wrong name. It's just about how to format Dataset. It's not even a Dataset "framework". It's just Dataset formatting...
@JKlug who's a good person to report a misnamed stream to?
 
@CA
 
I'm so bad at this hah but yeah I experienced the same thing @b3m2a1 luckily I had encountered the designation of "Dataset" last night, and knew what I wouldn't be getting into
I mean so my trends are very similar, if not "exactly" the same, albeit smoother without setting a number of points across the span....but the difference is by one-half, that's crazy! I've truly got no clue...I thought I was safe!!
OH I was just too ignorant before, wasn't I? Oh what bliss I had....there's no syntax that has NIntegrate go from x1 to x2, with a spacing of dx.....is there?
 

« first day (2674 days earlier)      last day (1824 days later) »