Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail X-Newsreader: iForth 2.0 console (October 21, 2006) From: mhx@iae.nl (Marcel Hendrix) Subject: Re: revisiting a prgramming problem Newsgroups: comp.lang.forth Message-ID: <82079010938433@frunobulax.edu> Date: Sat, 25 Oct 2014 13:28:53 +0200 References: <544a2a5e$0$6868$e4fe514c@dreader36.news.xs4all.nl> Lines: 41 Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 82.157.147.127 X-Trace: news.sunsite.dk DXC=TYDS]A?1;\XOH21j@:G^6UYSB=nbEKnk[Fjo=OA>89^PAFQDNO0X`FR05[\_Lj_;YY6D3KhK?DWD]mKVNV39]TZX X-Complaints-To: staff@sunsite.dk Xref: csiph.com comp.lang.forth:34134 m.a.m.hendrix@tue.nl writes Re: The magical number seven (was: Tiny regular expressions code) [..] >> >Anton Ertl wrote: [..] >> An informal examination of one of Moore's applications shows that he >> averages seven references, including both words and numbers, per >> definition. > I'll have a look in 'Footsteps in an empty valley' and/or the Weasel > manual (full kernel), tonight. This should be easy to (dis)prove. 'Footsteps in an empty valley' -DIGIT \ 27 words NUMBER \ 53 words WORD \ 48 words QUIT \ 14 words BAUD \ 17 words SPACES \ 13 words M/MOD \ 10 words FILL \ 15 words SCAN \ 12 words THRU \ 12 words ] \ 46 words @ \ 11 words ( optimized) ( here I stopped ) I can't find any trace of words that are obviously factored out of larger definitions. All words perform a definite function. Not all words have a stack picture. No words have empty stack pictures. Only the data stack is commented, input stream and rack are not. I counted ':', "name" and ';' as words. The listing I used for counting was the metacompiler for the NOVIX. I didn't count the very long optimizer words (50 .. 72 words, unfactored :-), and also not artefacts of metacompiling like : @ @ ; . -marcel