[Haskell-cafe] Most used functions in hackage

Casey Basichis caseybasichis at gmail.com
Fri Feb 1 17:11:59 CET 2013


That book Mathsemantics sounds like something I should read, would you
recommend it?

Your point occurred to me the other day when measuring number of downloads
of whole packages was mentioned as being the ideal measure.

I have more confidence in measuring the contents of the packages themselves
as creating a Hackage package suggests a competency with the language and
baseline of sophistication.

My thought was the best measure might be the count of functions across all
packages, where an included function in any individual package would only
be counted once per package.

In this sense, map and fold would still likely be towards the top, but that
is as it should be.

But it seems there are many measures that would be useful, like the
percentage of functions from a package that tend to get used in the same
project - do people nit pick particular functions from a specific package
or does the package use tend to require the use of all of its functions in
every project the package is used in.

I'd love to hear some thoughts on this as I generally don't know where to
begin in solving these sorts of problems and would like to know more about
those methods in general.

Casey


On Fri, Feb 1, 2013 at 7:00 AM, Rustom Mody <rustompmody at gmail.com> wrote:

> On Tue, Jan 29, 2013 at 1:53 PM, Casey Basichis <caseybasichis at gmail.com>wrote:
>
>> Hi Dmitry,
>>
>> Thanks for the links.  I've been through the 24 Days of Hackage, but I
>> think its time to run through them again now that I'm a little more
>> familiar with everything.
>>
>> Why do you think browsing function by function is a bad idea?  It seems
>> that knowing exactly what the most used functions are would be an extremely
>> effective way of finding both which parts of the Prelude and Hackage are
>> most broadly useful (instead of browsing them like a phonebook) and also
>> finding support from the community as the most commonly used functions
>> would likely be the easiest to find support for.
>>
>>
> Find out "the most used functions" seems to be eminently desirable.
> To do that we need to count function-uses.
> And to do that we need to know what to count.
>
> Do we?
>
> If you remember, the cost-centre mode of counting functions in haskell
> programs was precisely because the usual (first-order language) mode of
> counting would lead to the strange conclusion that map and foldr were the
> most used and therefore most inefficient functions in Haskell! So a new way
> of counting had to be devised.
>
> There is a book: Mathsemantics by Edward Macneal which deals with things
> like:
> How does an airline count the number of passengers. I quote from the book:
>
> I 1980 I was one passenger, ten passengers, eighteen passengers,
>> thirty-six passengers, forty-two passengers, fifty-five passengers,
>> seventy-two passengers and ninety-four passengers.  Each of these
>> statements is true.
>>
>
> He then goes on to explain.
>
> I was one passenger in the sense that I was a person who traveled by air
>> in that year.
>> I was eighteen passengers in the sense that I made eighteen round trips.
>> I was forty-two passengers in the sense that on forty-two different
>> occasions I entered and exited the system of a different carrier.
>> I was seventy-two passengers in the sense that on seventy-two occasions I
>> was on board an aircraft when it took off from one place and landed at
>> another.
>> I was ninety-four passengers in the sense that I made ninety-four
>> separate entrances and exits from airport terminal buildings.
>>
>
> [He missed the explanation for 10!]
>
> He goes on to say that these differences are not mere technicalities and
> its important to get the sense of 'passenger'
>
> So… like 'passenger', how many meanings does 'function-use' have?
>
> Rusi
> --
> http://www.the-magus.in
> http://blog.languager.org
>
>


-- 
Casey James Basichis
Composer - Cartoon Network
http://www.caseyjamesbasichis.com
caseybasichis at gmail.com
310.387.7540
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130201/659a7e77/attachment.htm>


More information about the Haskell-Cafe mailing list