26,010 reputation
253122
bio website
location Argentina
age
visits member for 2 years, 3 months
seen 36 mins ago

My email:

StringTake[ ExampleData[{"Text", "Hamlet"}] <> "@", List /@ {45, 114, 132, 134, 138, 142, 2933, 2939, -1, 2994, 3184, 3189, 3213, 3305, 3364, 3427, 3446, 3473}] // StringJoin


May
22
comment Pattern issues weird warning
@Mr.Wizard but _[{x_} | x__] :> f[x] issues a proper warning. Btw, I like when I can use the same pattern name in alternative patterns
May
21
comment Pattern issues weird warning
@celtschk Yeah, fortunately I think all examples work. So we'll just have to shut the message up for good perhaps
May
21
comment Pattern issues weird warning
@celtschk you're making the examples so simple that I'm starting to find this small "bug" more uncomfortable. Something like b_[8 | PatternSequence[]] :> b is totally common and issues the warning TWICE
May
21
revised Pattern issues weird warning
added 36 characters in body
May
21
comment Pattern issues weird warning
@Heike, yes. I think I assumed that your first comment was you trying to provide me with an alternate way of writing the same pattern that works, so I told you it was not the same. But you were probably just investigating variations of the problem, so I'll delete these extra comments
May
21
comment Pattern issues weird warning
@celtschk, interesting. I'll add to that that it is triggered when a NAMED pattern as a head. If you remove the b it works fine
May
21
comment Pattern issues weird warning
@Heike, no, that's the same as without the parenthesis. I meant head[b : _[_, arg : PatternSequence[_, _]]] := {arg} works but head[(b : _)[_, arg : PatternSequence[_, _]]] := {arg}, which is the same as in the example, doesn't
May
21
revised Pattern issues weird warning
added 3 characters in body
May
21
comment Pattern issues weird warning
@Heike, it's weird. b is not the head there, try parenthesising and it all goes down the drain
May
21
comment Pattern issues weird warning
@Mr.Wizard, yeah, in the original code that made me come into this I got the warning twice, with a PatternSequence[___, _?somethingQ, ___] . You're with v8.0.4 too?
May
21
asked Pattern issues weird warning
May
21
awarded  Enlightened
May
21
awarded  Nice Answer
May
21
comment How to find the period of an arbitrary mathematical function?
@Anixx, yes, but it's not open source. Perhaps the answer's function has been improved for the next version, or who konws
May
21
comment How to find the period of an arbitrary mathematical function?
@Anixx, you can always use wolframalpha, getPeriod[exp_] := WolframAlpha[ "period of " <> ToString[exp], {{"Periodicities:MathematicalFunctionIdentityData", 1}, "ComputableData"}][[1, -1, -1]]
May
21
comment How to find the period of an arbitrary mathematical function?
@Anixx, you could do that with something like p = If[Periodic`PeriodicFunctionQ[##], Periodic`PeriodicFunctionPeriod[##], Infinity] &;, so p[Sin[2 Pi t] Sin[t], t] returns Infinity
May
21
awarded  Enlightened
May
21
awarded  Nice Answer
May
21
awarded  Enlightened
May
21
awarded  Nice Answer