home .. forth .. colorforth mail list archive ..

[colorforth] Fw: Re: LOC


Here is a top posted email exchange (start at the bottom) I had with Jeff Fox
about the iTv software metrics. He talks about the machine forth aspects and
the ANS forth browser and email client. Provided for historical reasons and
prospective target sizes.

Begin forwarded message:

Date: Wed, 9 Feb 2005 16:37:08 -0800 (PST)
From: "Jeff Fox" <fox@xxxxxxxxxxxxxxxxxxx>
To: "Terry Loveall" <loveall@xxxxxxxxx>
Subject: Re: LOC


> Jeff,
>
> Thank you for the prompt response. Wasn't sure whether how much of this
> info
> was propietary.
>
> Would it be possible to post this to the colorForth mailing list? This is
> info
> that provides working order of magnitude sizes. Gives people a target.

Sure feel free to post my comments to the mail list.  I just tried to
post something there and it bounced and I didn't save a copy before
I got the error message. And after that what I had entered into the
form previously went away.  I hadn't had it trash an email recently
so I hadn't bothered to 'save' it before I hit 'send' and sent it
into the great bit bucket in the sky.

> About the name 'Xwoaf'. An ugly acronym for an ugly project. Hacked all
> the
> way, as in 'hacking up a hairball'. It is just a proof of concept
> prototype in
> 1.44M. The uncompressed size is 2882304 bytes of filesystem/apps and
> 914371
> bytes uncompressed linux kernel. Or 3.79 pounds of worms in a 1.44 pound
> can.

Xwoaf, like something Stimpson J. Cat would say...  ;-)

> Regards,
> Terry
>
> On Wed, 9 Feb 2005 16:10:23 -0800 (PST)
> "Jeff Fox" <fox@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> > Jeff,
>> >
>> > After having spent some time putting together my Xwoaf (X-Windows On A
>> > Floppy)
>> > I wondered how many lines of code it took for the iTv web browser and
>> > email
>> > client, or is that information still under a NDA?
>>
>> I never had line counts.  I can recall object sizes roughly
>> from memory.  The machineforth modules tended to be very small.
>> Most were 1k or less.  ANS Forth modules tended to be large,
>> it was hard to get the ANS Forth programmers to care about size.
>>
>> In a typical staff meeting one machineForth programmer would report
>> that the module that he had been working on was now 20% smaller and
>> 50% faster, still under 1K.  Then an ANS Forth programmer would
>> say that they module ONLY grew by 25 or 50K that week and add that
>> it was so slow that they couldn't benchmark it without tools.
>>
>> OS CODE in machineforth 20-bit words
>> 1k ZIFF self-decompressing boot code module
>> 1k multitasker, resource manager, memory controller, file cache
>> 2k GUI with multiple windows, fonts, colors, styles, graphics
>> 1k flash file system, file support and object manager
>>
>> ANS Forth modules were something like
>> 40k browser
>> 20k email
>> 30k tcp/ip stack
>>
>> Most of us felt that the ANS modules would have been 10x
>> smaller if they had been coded in the style that we did
>> other things, but they were 'portable' to any ANS Forth
>> type system and ran quite easily in both the windows
>> simulation where we used the winsock for our sockets or
>> in the hardware simulation where we could execute the
>> binary image on the pentium by emulating our processor
>> and board at the hardware level.  There were a bunch  of
>> other protocols and other apps included TFTP, TELNET,
>> http server, etc. etc. but those were the main modules.
>> If I had to bet on how small it might have been had it
>> been done with that in mind, maybe 10K for our ANS CODE?
>>
>>
>> I think all three of the ANS modules could have been made
>> much smaller if that was our intention.  The next smallest
>> system bragged they fit in 1.4MB and ran in 4MB while we fit
>> in about 200KB (and ran in about 20OK words.  We were very
>> clever in terms of web page and file caching.
>>
>> Now how many lines of code as that? I don't know.  I know that
>> the TCP/IP code was organized exactly like the original C
>> code which meant hundreds of source files in dozens of directories.
>>
>> machineforth source tended to be heavily documented and between
>> 5k to 20K source for a 1K word object.  That at least gives you
>> a sense of the amount of source code involved.  I don't think
>> I ever counted up the total number of source files, or the
>> total size.  One could guess based on the compile object code
>> size and using a given person's coding style as a metric.
>>
>> Soeren reported that his Alegra GUI for p21 and F21, (hardware
>> accelerated gui using the video coprocessor jump opcodes instead
>> of moving bitmaps around) with multiple scalable, draggable,
>> windows the fonts and style and a widget library with buttons
>> and slider was 660 words of object code.  (not 660 Forth words,
>> but 660 memory cells).  For comparison you might compare that
>> to the memory requirements for X windowing.
>>
>> > Just for reference, Xwoaf source has about 1000 .c and .h files. The
>> > average source file size is 12750 bytes and has approx. 450 lines. So
>> the
>> > whole floppy source (not including the linux kernel) amounts to
>> 450,000
>> > lines
>> > in 11,781,088 bytes. Whew. Glad I never looked at that while putting
>> it
>> > together.
>> >
>> > The web-browser has about 23,700 lines in 788126 bytes and the email
>> > client
>> > about 60,580 lines in 1568933 bytes.
>> >
>> > All of the above figures are based upon:
>> > 1) getting total size for *.c and *.h files
>>
>> We had .h files too!  All the TCP/IP and protocol code had
>> .h files just like the original C programs. ;-)
>>
>> > 2) dividing by the number of files,
>> > 3) looking at a file of the average size for line count
>> > 4) multiplying line count by the number of files.
>> >
>> > Does not take into account other support files and documentation, so
>> you
>> > could
>> > say that these are overly optimistic. But they do provide a reference.
>> >
>> > Regards,
>> > Terry Loveall
>>
>> Xwoaf sounds interest, but the name sounds odd. I know it
>> probably is an acronym or makes more sense to Linux programmers.
>>
>> I never kept a copy of the complete system build after I left.
>> The company that I am currently working for now owns the old iTV
>> software, but I haven't seen a copy of it.  We bought the rights,
>> but I don't think they ever gave us the disks.
>>
>> We also had compilers and simulators and emulators that we had
>> the sources to.  I have a copy of iTV's 40S minus the network
>> and application code, but that's just the machineForth OS
>> code.
>>
>> I would guess that all of our sources to the target code
>> would have not fit on a floppy without some compression.  But
>> that's just a guess.  Michael Montvelishsky once did prensetation
>> to FIG where he detailed the exact size of all of the modules,
>> but I arrived late that day to FIG and missed it, so no video.
>>
>> There were some interesting issues such as exactly what sub-set
>> of TCP/IP you really need because every node on the internet
>> is using a different sub-set and what exactly will happen to any
>> given packet is difficult (impossible) to predict so you just
>> have to take your best guess as to what subset you will use.
>>
>> Best Wishes
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com