Re: [Haskell-cafe] Lines of code metrics
On Thu, 21 Aug 2008, Johannes Waldmann wrote: NB: My private set of Haskell metrics: * lines of code (per declaration) (should be = 5) * number of declarations (per module) (should be = 5 as well :-) * number of usages of Int, String, List, IO (should be = 0 :-) :-) * number of usages of unsafePerformIO, unsafeInterleaveIO, use of Ptr or IO at all These would be nice metrics for me to decide, whether I want to download a package from Hackage. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Lines of code metrics
Hi, Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be Just curious, has anybody tried to apply Halstead's code metrics (see e. g. http://www.sei.cmu.edu/str/descriptions/halstead_body.html), but there is a 70s' book titled Elements of Software Science to Haskell and other functional languages vs. C and other imperative languages? I myself played with these calculations in late 80s trying to estimate code quality of Pascal programs on PDP-11, but that was a pain to count functions' operands properly as they might come from global variables. Application of these formulas to functional languages might be mich cleaner, so has anybody tried? Thanks. -- Dimitry Golubovsky Anywhere on the Web ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Lines of code metrics
Just curious, has anybody tried to apply Halstead's code metrics [...] As I understand it, Halstead's metric punishes the re-use of operands (= variables). This is what happens if you start your program with a bunch of global definitions (e.g. int i,j,k,l because you might want them as loop indices) that actually should be local. This totally does not apply to Haskell: there is no assignment, you cannot overwrite, so indeed each operand (variable) serves only one purpose, as it should be. NB: My private set of Haskell metrics: * lines of code (per declaration) (should be = 5) * number of declarations (per module) (should be = 5 as well :-) * number of usages of Int, String, List, IO (should be = 0 :-) :-) Not entirely joking - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
Greg Fitzgerald [EMAIL PROTECTED] wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, Some of the Experience Report category of paper at ICFP 2007 and 2008 might have the kind of thing you are looking for. I know that mine: Experience Report: Visualizing Data Through Functional Pipelines David Duke, Rita Borgo, Colin Runciman, Malcolm Wallace ICFP 2008 has a brief comparison of sLoC between Haskell and C++ implementations of similar algorithms. (But you may have to wait until it is published to obtain an electronic copy.) Regards, Malcolm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be Maybe this one is relevant: Evaluating High-Level Distributed Language Constructs by Phil Trinder http://www.macs.hw.ac.uk/~trinder/papers/ICFP2007.pdf which compares GdH, Erlang and C++. Richard. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
On Aug 19, 2008, at 9:12 AM, Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be ... loads of great references ... Thank you all for your help! These references are a great help for pushing Haskell at work. -Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
garious: On Aug 19, 2008, at 9:12 AM, Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be ... loads of great references ... Thank you all for your help! These references are a great help for pushing Haskell at work. I've also set up the Who's using Haskell section on haskell.org's front page -- let me know what you think -- with further documentation on the Industry page, with references to CUFP. Domain-specific stories there can be useful. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
Greg wrote: Thank you all for your help! These references are a great help for pushing Haskell at work. Don wrote: I've also set up the Who's using Haskell section on haskell.org's front page -- let me know what you think Great, thanks! I added Qualcomm. -Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
Speaking of GdH, the web page http://www.macs.hw.ac.uk/~dsg/gdh/ was last updated in June 2007, it says, but the binary snapshot (Linux only) is February 2002, and the installing GdH part says it's built using the GHC 5.00 sources. Is GdH dead, or is there a more up to date version lurking somewhere else? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
garious: Greg wrote: Thank you all for your help! These references are a great help for pushing Haskell at work. Don wrote: I've also set up the Who's using Haskell section on [1]haskell.org's front page -- let me know what you think Great, thanks! I added Qualcomm. Awesome. I'd strongly encourage people using Haskell in their workplace to mention this on the Industry wiki, http://haskell.org/haskellwiki/Haskell_in_industry -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] lines of code metrics
Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
2008/8/19 Greg Fitzgerald [EMAIL PROTECTED]: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be You can easily get some of this data for micro-benchmarks from the shoot out, but it will be laden with caveats and biases: http://shootout.alioth.debian.org/ While I'm sure your question is the right one (Which technologies improve the development metrics we care about?), it would seem that the biggest factor for things like time to market and code quality is actually the group of humans involved: http://alistair.cockburn.us/index.php/Characterizing_people_as_non-linear,_first-order_components_in_software_development (these are each very similar and by the same author) http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf http://www.cis.udel.edu/~silber/470STUFF/article.pdf http://www.acm.org/pubs/articles/journals/cacm/1999-42-10/p109-prechelt/p109-prechelt.pdf I found the last one from norvig.com where he has these two essays that go well together: http://norvig.com/java-lisp.html http://norvig.com/21-days.html Good luck! Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
On Aug 19, 2008, at 9:12 AM, Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be There's one I know of that compares Haskell to C++ and a number of other languages: Haskell vs. Ada vs. C++ vs. Awk vs. ... An Experiment in Software Prototyping Productivity http://www.haskell.org/papers/NSWC/jfp.ps Aaron ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lines of code metrics
Hello Greg, Tuesday, August 19, 2008, 8:12:00 PM, you wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be once i compared informally LOC for freearc (freearc.org) and 7-zip (7zip.org) - both are archivers with rather close functionality at the time of comparison - freearc was 3 times smaller. i also think that it wsas developed about 3 times faster than rar/7zip archivers, although this comparison is rather rough overall, i see from 10x improvements when we say about multithreading or complex algorithms to Haskell being even worse than C++ when we say about imperative, especially low-level, especially optimized code -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe