From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ken Anderson Newsgroups: gmane.lisp.guile.user Subject: Re: Lines-of-Code counting for Scheme Date: Fri, 19 Apr 2002 14:29:06 -0400 Sender: guile-user-admin@gnu.org Message-ID: <5.0.2.1.2.20020419142250.02190b80@zima.bbn.com> References: <20020419175339.E31F63C2B@fnord.ir.bbn.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1019241173 2197 127.0.0.1 (19 Apr 2002 18:32:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 19 Apr 2002 18:32:53 +0000 (UTC) Cc: Greg Troxel , Tom Mitchell Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ydBk-0000ZJ-00 for ; Fri, 19 Apr 2002 20:32:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yd99-0003dG-00; Fri, 19 Apr 2002 14:30:11 -0400 Original-Received: from zima.bbn.com ([128.89.72.16]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yd8L-0003VW-00 for ; Fri, 19 Apr 2002 14:29:21 -0400 Original-Received: from ale.bbn.com (ale [128.89.72.125]) by zima.bbn.com (8.11.4/8.11.4) with ESMTP id g3JIT6l25201; Fri, 19 Apr 2002 14:29:06 -0400 (EDT) X-Sender: kanderso@zima.bbn.com X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Original-To: Greg Troxel , guile-user@gnu.org In-Reply-To: <20020419175339.E31F63C2B@fnord.ir.bbn.com> Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:214 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:214 What i do in Java is count "}" and ";". To get a reasonable physical line count in Scheme, you could read each expression from the orignal scheme file and then pretty print it and then count those lines. Ward Cunningham has an interesting way summarizing a java class by squeezing out all the characters that aren't "{", "}", or ";": http://c2.com/doc/SignatureSurvey/ It gives you a quick summary where each Java file is one line, and you can see some interesting patterns. k At 01:53 PM 4/19/2002, Greg Troxel wrote: >I've recently been keeping metrics on programming tasks in C, and want >to do that on code in Scheme as well. For C, I'm using the usual >"Physical SLOC" definition, which removes all comments and then all >blank lines (yes, this means that coding style makes a difference). >There are a number of definitions of Logical SLOC, but they do not >agree. So, I took a stab at Logical SLOC for Scheme (taking advantage >of the clean syntax) and declared each '(' to be a single LSLOC. >(-LSLOC seems about 50% higher than PSLOC, at least for the >SLOC-counting program. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user