« first day (2583 days earlier)      last day (1918 days later) » 

10:05 AM
anyone around? @b3m2a1 ?
 
@Kuba yeah
 
Looking for a way to use V-G trick where specific down values exist. Then adding `foo[args___] /; !insde := Block[{...` won't work becasue `args___` could be less specific than existing e.g. `foo[s_String]`.
So the question is how to force V-G rule
I found this but I didn't test this yet: mathematica.stackexchange.com/a/155576/5478
 
10:17 AM
What's the context you need for this? If it can be done in a local fashion there are many tricks to try
Otherwise we need to think a bit
@ChrisK isn't it a little bit on the early side in East Lansing to be here?
 
@b3m2a1 I hoped you already solved it :) I would like to avoid specific solutions because I faced this issue on multiple occasions.
 
@b3m2a1 aha, on sabbatical in Europe :)
 
@ChrisK ah now that makes sense
 
So it should work for built-in or user defined functions regardless of their existing definitions
 
@Kuba I'll figure out which of my tricks are robust and which are not
 
10:19 AM
Don't spend too much time on that
 
The one thing I'm not sure I can avoid is things like cached definitions for f[1]
But I'lll see
 
I will play with Mr.Wizards trick and we will see if that is it
@b3m2a1 I think it is safe to assume that literal down values are considered evaluated.
So no need to wrap them
Or maybe not, I dont' know ;)
 
@Kuba here's a method that'll work at least for most of the cases I've hit in my spelunking and stuff:
f[x_List] := 2;
f[x_] /; ! TrueQ[$cond] := Block[{$cond = True}, asd]

withReorderedDVs[f_, sort_, body_] :=
  Internal`InheritedBlock[
   {f},
   With[{do = SystemOptions["DefinitionsReordering"],
     dvs = DownValues[f]},
    Internal`WithLocalSettings[
     SetSystemOptions[{"DefinitionsReordering" -> None}],
     DownValues[f] = SortBy[dvs, sort];
     body,
     SetSystemOptions[do]
     ]
    ]
   ];
withReorderedDVs~SetAttributes~HoldAll

f[{1, 2, 3}]
withReorderedDVs[f, FreeQ[$cond], f[{1, 2, 3}]]
But this won't work if you insert like f[1]:=2
I think that just takes too high precedence or something
Here's a further proof of at least partial usability:
f // Clear
f[x__List] := 2
f[x_List] := 2;
f[x_?(Length[#] > 0 &)] := 2;
f[x___] := 2
f[x___] /; ! TrueQ[$cond] := Block[{$cond = True}, asd]

f[a[1]]
f[{1, 2, 3}]
f[{1, 2, 3}, {1, 2, 3}]
withReorderedDVs[f, FreeQ[$cond], f[a[1]]]
withReorderedDVs[f, FreeQ[$cond], f[{1, 2, 3}]]
withReorderedDVs[f, FreeQ[$cond], f[{1, 2, 3}, {1, 2, 3}]]

2

2

2

asd

asd

asd
Note that the plain f[x___] actually sorts after the condition normally, but that's fine
Huh I can't remember the condition where "DefinitionsReordering" comes into play but I do remember there being one
 
10:34 AM
@b3m2a1 thanks, overloading foo[args___] case is my current problem. Will try your solution once more obvious fail.
 
 
4 hours later…
2:41 PM
Maybe this can be of interest for users of this site: Studying the MathOverflow data dump with Mathematica
It is based on the blog post on Wolfram website: The Data Science of MathOverflow.
 
Is there a place where users can post Mathematica tutorials they created so others can benefit? I imagine many users keep help files and I tend to put quite a bit of care in mine (roughly guided by academic presentation standard). Happy to share such material, but not sure where to do it.
 
@Mike I suppose the wolfram community forums are probably the place...
 
Ok thanks. Will check them out.
 
@Mike wolframlanguagereviews.org is meant to be a site for that
 
Checked it out, thx
 
2:54 PM
The advantage is that when you post something on Wolfram Community, you publish it under the ShareAlike license, so you essentially give up your right to the content. Furthermore, the content will look better on Wolfram Language Reviews. It will be formatted in a much more elegant way. Finally, sharing articles that you've posted to Wolfram Language Reviews looks better than sharing a forum post. (People's associations with forum posts are different.)
4
 
Right, thanks, good to know
wolframlanguagereviews.org seems indeed exactly what I need.
 
 
4 hours later…
6:51 PM
@C.E. That's really useful to know, I never realised the community stuff was licensed that way...
 
7:21 PM
@C.E. I also strongly agree that posts just look better not on WC. The formatting is so bad (and it also just doesn't look legit).
 
Evening people
I'm looking for a reference for a rather complicated integral
I've tried RUBI to find a reference
But it simply uses the argument "Use known integral expression" or something of the kind
So that gets me nowhere
The expression is also spawned through wolframalpha: type \int \frac{\log(1-x) \log(1-\alpha*x)}{x} dx in wolframalpha.com
 
 
2 hours later…
9:29 PM
@1010011010 what kind of reference? Like academic reference?
 

« first day (2583 days earlier)      last day (1918 days later) »