Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Mathematica skill level snippet(s)

  • To: mathgroup at
  • Subject: [mg104902] Re: [mg104890] Re: Mathematica skill level snippet(s)
  • From: John Fultz <jfultz at>
  • Date: Fri, 13 Nov 2009 05:51:48 -0500 (EST)
  • Reply-to: jfultz at

If I were to do this, I would do it by scavenging usage messages.  The usage
messages are written very systematically.  I suspect, for example, the vast
majority of usage messages (if not every single one) which begin with 

"<symbol> " (*i.e. followed by a space *)

are options or other free names which aren't functions.  On the other hand,
every usage message that begins with...

"<symbol>[" is guaranteed to be a function.  But many symbols map to operator.  
For example, see the usage message for Plus, which is why searching for messages 
which *don't* match "<symbol> " is better than searching for symbols which match 

I did start to write a solution to do this, but there's a bit of HoldPattern
magic and such that needs to be done and I was too busy to spend time getting it 
to work (I did have something kind of working, actually, but then accidentally 
quit my session w/o saving, and gave up because of the ten million other things 
on my to-do list).

John Fultz
jfultz at
User Interface Group
Wolfram Research, Inc.

On Thu, 12 Nov 2009 06:07:46 -0500 (EST), Drago Ganic wrote:
> Hi Nasser,
> I think there is no way except enumerating the symbols.  Unfortunatly
> Mathematica is lacking some attributes (like Command, Option etc.) or some
> other mechanism (e.g. system tables) for providing those kind of
> information.
> BR,
> Drago
> "Nasser M. Abbasi" <nma at> wrote in message
> news:hdbhn2$jol$1 at
>> From: "John Fultz" <jfultz at>
>> "Stephen Wolfram wrote a blog post which included a ListPlot of the
>> function
>> count from Mathematica's inception to version 7.
>> today/
>> The plot is about a third of the way through the post.  Note the number
>> here is
>> significantly below your number because you're counting all System`
>> symbols,
>> whereas he was counting System` *functions*.
>> "
>> Yes, I know about this blog (it is one of the references already on my
>> page), and I actually remember spending sometime trying to find how did
>> Dr
>> Wolfram would have counted the number of functions, but I could not
>> figure
>> it out (the command used to generate the plot was not shown in the
>> blog.)
>> Do you know how to find how many of the Symbols are actually Functions
>> such
>> as Sin,Cos etc.. vs. say function options or other type of symbols?
>> Since
>> the Head of a Function is a Symbol itself I can't just look at the Head
>> of
>> each symbol to find out?
>> In[6]:= Head[Sin]
>> Out[6]= Symbol
>> In[7]:= Head[Joined]
>> Out[7]= Symbol
>> If I filter by attribute, which I think may be the way to do it, then
>> which
>> set of attributes to use? Listable? gives only 264
>> Length[Select[Names["System`*"], MemberQ[Attributes[#1], Listable] & ]]
>> 264
>> So, need more attributes which all apply to functions, then get a unique
>> list out, then count it? But I do not know what all the attributes
>> should
>> be.
>> If you know  _please_ let me know, and I will add this information to
>> the
>> table.
>> thanks
>> --Nasser

  • Prev by Date: Re: Re: Re: Complex solutions to simple
  • Next by Date: Pattern puzzle
  • Previous by thread: Re: Re: Mathematica skill level snippet(s)
  • Next by thread: Re: Re: Mathematica skill level snippet(s)