r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[All] except covered in other channels

Sunanda
1-Dec-2008
[3028x3]
Following a discussion in a non-[web public] group: I've just uploaded 
a very rudimentary utility to estimate the size of a REBOL application.
Please give it a go (if only for the bragging rights).

Also, please let's have a discussion about better metrics tahat could 
be included.
The script is here:
http://www.rebol.org/view-script.r?script=application-sizer.r
And the documentation -- which includes the results of running it 
against the REBOL.org CGI scripts is here:
http://www.rebol.org/documentation.r?script=application-sizer.r
May the biggest app win!
Graham
1-Dec-2008
[3031x2]
This is the client app only .. haven't included the server .. ie. 
this is just the one app that runs as a stand-alone encapped application.

make object! [
    folders: 1
    files: 1
    raw-bytes: 3430106
    compressed-size: 594167
    raw-lines: 80258
    code-lines: 65034
    elements: make object! [
        string: [19133 492736]
        datatype: [8502 48640]
        number: [8856 15584]
        refinement: [1569 9905]
        function: [58628 275328]
        comment: [0 0]
        body: [110179 1126104]
        whitespace: [206867 1461809]
    ]
    element-definitions: ["comment" [
            cmt
        ] "datatype" [
            date!
            issue!
            money!
            pair!
            time!
            tuple!
        ] "number" [
            decimal!
            integer!
        ] "refinement" [
            refinement!
        ] "string" [
            char!
            email!
            file!
            string!
            tag!
            url!
        ]]
]
This is easier ..

    folders: 1
    files: 1
    raw-bytes: 3430106
    compressed-size: 594167
    raw-lines: 80258
    code-lines: 65034
    elements: make object! [
        string: [19133 492736]
        datatype: [8502 48640]
        number: [8856 15584]
        refinement: [1569 9905]
        function: [58628 275328]
        comment: [0 0]
        body: [110179 1126104]
        whitespace: [206867 1461809]
    ]
Sunanda
1-Dec-2008
[3033]
Thanks Graham....You are right that the element-definitions are irrelevant, 
unless you've changed them.

I'm surprised at comments: [0 0]  -- are we looking at a bug in app-sizer, 
or are you really that terse?
Graham
1-Dec-2008
[3034]
What do comments measure?  Function comments?
Sunanda
1-Dec-2008
[3035]
Things that start with a semi-colon are treated as comments.
Anything else is treated as code (That could be improved ....)
Graham
1-Dec-2008
[3036]
I don't include comments in my functions .. I use Leo a literate 
editor, and comments are there.  They get stripped out when the source 
is built.
Sunanda
1-Dec-2008
[3037]
Thanks......Not a bug for either of us then.
Graham
1-Dec-2008
[3038]
So, my app is bigger than all the scripts on rebol.org??
Sunanda
1-Dec-2008
[3039]
Bigger than the CGIs that *run* REBOL.org.
Graham
1-Dec-2008
[3040x2]
oh ... wow, you've been busy then.
I'm going to have to add the server code as well to boost my stats
Sunanda
1-Dec-2008
[3042]
Actually, the results flatter us -- they include the source (sometimes 
slightly modified) of various scavanged scripts -- like Makedoc, 
Simetrics, Skimp and other externally-sourced scripts.

They should really be excluded from the REBOL.org CGI size. I'd guess 
that'd be a 15% drop in actual size.
Graham
1-Dec-2008
[3043x2]
No, I think they're part of your app
They're still relevant to measuring app size and complexity.  If 
they break, you still have to maintain them.
Sunanda
1-Dec-2008
[3045]
Agreed at one level......But if they came encapped, we'd be using 
them just the same as binary black boxes. Their code size is irrelevant 
to the application in question.
Graham
1-Dec-2008
[3046]
I have Rebgui in mine .. I didn't write it .. but I sure have had 
to help debug it.
Gabriele
1-Dec-2008
[3047x2]
ok... i didn't spend much time on this so not really sure how accurate 
this is... but this is Qtask:
folders: 218
files: 837
raw-bytes: 17651344
compressed-size: 3244150
raw-lines: 429986
code-lines: 293786
elements: make object! [
    string: [521438 8594106]
    datatype: [37918 247826]
    number: [57990 88982]
    refinement: [26270 181586]
    function: [486088 2264004]
    comment: [85910 3524536]
    body: [1005200 8675686]
    whitespace: [2220814 12162574]
]
Dockimbel
2-Dec-2008
[3049x2]
Half a million functions? That's huge!
300k LOC, if I take that 1 LOC of REBOL is roughly 10 LOC of C on 
average (probably underestimated), it ends up being equivalent to 
3M LOC which is almost the size of Windows NT4 OS codebase!


I wonder what kind of tools is used at Qtask to keep track of such 
large codebase?
Reichart
2-Dec-2008
[3051x3]
:)
We hope to make Qtask smaller over time, but Qtask is indeed do a 
lot of things...
doing
Robert
2-Dec-2008
[3054]
Here is my application result:
 
make object! [
     folders: 1
     files: 2
     raw-bytes: 1690752
     compressed-size: 396721
     raw-lines: 30110
     code-lines: 26330
     elements: make object! [
         string: [10677 256191]
         datatype: [3632 22230]
         number: [6178 10820]
         refinement: [894 5668]
         function: [29473 127244]
         comment: [50 1557]
         body: [61360 701524]
         whitespace: [112264 565518]
     ]
     element-definitions: ["comment" [
             cmt
         ] "datatype" [
             date!
             issue!
             money!
             pair!
             time!
             tuple!
         ] "number" [
             decimal!
             integer!
         ] "refinement" [
             refinement!
         ] "string" [
             char!
             email!
             file!
             string!
             tag!
             url!
         ]]
]
 

Lines of code is definetly wrong here, because I have a rebgui oneliner 
in it .
Sunanda
2-Dec-2008
[3055x2]
Dockimbel <Half a million functions? That's huge!>
That is huge! It's the biggest application disclosed so far!

But "function" is a technical definition that includes op! and perhaps 
other internal datatypes.....We could refine the application sizer 
to count those separately.
Thanks Robert for the comments here and on the ML.

It would make sense to refine the application-sizer to have the option 
to exclude specfic files, like rebgui. Then perhaps an app would 
have two counts:
-- all source files 
-- "unique" source files.
Gabriele
2-Dec-2008
[3057x3]
Keep in mind, there is likely to be redundancy in those numbers. 
we do have a couple things where we keep multiple versions.
eg. that also counts the old Qtask UI that is almost unused now.
tools we use... Mercurial.
Reichart
2-Dec-2008
[3060]
As stated...we will make things smaller over time.

But even after it all, with this number of people, the source needs 
a level of redundancy...


But yeah, it seems a bit  silly to me when people say they have the 
"biggest" REBOL application, because unless you are working on something 
of the scale of what we have been doing, and that is quite unlikely... 
 And we are speeding up, and making even more every day.
Graham
2-Dec-2008
[3061]
Traditionally an application is a stand alone distributable.  That's 
my claim.
Reichart
2-Dec-2008
[3062]
http://en.wikipedia.org/wiki/Application_software
Sunanda
3-Dec-2008
[3063]
Dockimbel <Half a million functions? That's huge!>

I've updated application-sizer.r to break the previous count (which 
was of any item of type any-function?) to distinguish action! op! 
and native!

The newer counts may be more meaningful. Plus a few other changes 
as suggested by Ashley and Robert. Thanks guys!
More info:
http://www.rebol.org/ml-display-message.r?m=rmlDHZC
Reichart
3-Dec-2008
[3064]
IT would be cool if it had an output that was flat text (not REBOL), 
this way we can through it in a spreadsheet quickly, and over time, 
paint a picture of how people program... (size matters, but relative 
usage of REBOL is of greater interest to me).
Sunanda
3-Dec-2008
[3065]
Nice idea  -- I'll add a /flat refinement tomorrow!
Reichart
3-Dec-2008
[3066]
Very cool, thanks....

(it truck me, you ""might" want to add the version number of the 
test maker)
Sunanda
3-Dec-2008
[3067]
Thanks -- I did that in the current release.
Sunanda
4-Dec-2008
[3068]
Actually, the refinement is /CSV -- but your wish has, I think, been 
taken into account.

You can grow a CSV file one row per run of application-sizer.r to 
gather lots of metrics.
All we now need to do is work out what those metrics mean!
http://www.rebol.org/view-script.r?script=application-sizer.r
[unknown: 5]
9-Dec-2008
[3069x2]
Anyone know of a PDF forms editor that is freeware or opensource?
I only need to fill out a PDF form and don't trust these online editors 
as to what they are doing with the information.
Henrik
9-Dec-2008
[3071]
I seem to remember using something like this in OpenOffice.
[unknown: 5]
9-Dec-2008
[3072]
I'll look into that.  Was hoping for something a bit more petite.
BrianH
9-Dec-2008
[3073]
I did a google search, but it seems that most products charge for 
that function. However, most charge 10 to 20 dollars. Try searching 
sourceforge for "PDF".
[unknown: 5]
9-Dec-2008
[3074]
Yeah I did and finally did get a product but most couldn't do the 
job.  But it turns out this didn't contain forms so I had to overlay 
text on it..
Pekr
9-Dec-2008
[3075x2]
Foxit Reader is nice free alternative to Adobe Reader, but dunno 
if it allows editing - http://www.foxitsoftware.com/pdf/rd_intro.php
Look around at portals like: http://www.planetpdf.com, http://www.pdfstore.com
, http://www.pdfzone.com
Graham
9-Dec-2008
[3077]
Acrobat reader can fill in a pdf form.