Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If it wasn't for Newton, we wouldn't have to eat bruised apples.


devel / comp.lang.forth / Re: Counting frequencies of unique words

SubjectAuthor
* Re: Counting frequencies of unique wordsDoug Hoffman
+* Re: Counting frequencies of unique wordsNN
|`* Re: Counting frequencies of unique wordsAnton Ertl
| `* Re: Counting frequencies of unique wordsNN
|  `- Re: Counting frequencies of unique wordsAnton Ertl
+* Re: Counting frequencies of unique wordsAnton Ertl
|+* Re: Counting frequencies of unique wordsDoug Hoffman
||+- Re: Counting frequencies of unique wordsAnton Ertl
||`* Re: Counting frequencies of unique wordsDoug Hoffman
|| +- Re: Counting frequencies of unique wordsDoug Hoffman
|| `* Re: Counting frequencies of unique wordsBen Hoyt
||  `- Re: Counting frequencies of unique wordsDoug Hoffman
|`* Re: Counting frequencies of unique wordsStephen Pelc
| +- Re: Counting frequencies of unique wordsStephen Pelc
| `* Re: Counting frequencies of unique wordsAnton Ertl
|  `* Re: Counting frequencies of unique wordsStephen Pelc
|   `- Re: Counting frequencies of unique wordsAnton Ertl
`* Re: Counting frequencies of unique wordsdxforth
 `* Re: Counting frequencies of unique wordsDoug Hoffman
  `* Re: Counting frequencies of unique wordsP Falth
   +- Re: Counting frequencies of unique wordsAnton Ertl
   `- Re: Counting frequencies of unique wordsDoug Hoffman

1
Re: Counting frequencies of unique words

<611678f9$0$699$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14181&group=comp.lang.forth#14181

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Fri, 13 Aug 2021 09:51:50 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.12.0
MIME-Version: 1.0
In-Reply-To: <2021Mar12.112124@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 59
Message-ID: <611678f9$0$699$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7e3a4305.news.sunsite.dk
X-Trace: 1628862713 news.sunsite.dk 699 glidedog@gmail.com/68.55.82.126:61337
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Fri, 13 Aug 2021 13:51 UTC

On 3/12/21 5:21 AM, Anton Ertl wrote:
> Ben Hoyt <benhoyt@gmail.com> writes:
>> Thanks for the help, folks. Updated version:
>> https://gist.github.com/benhoyt/770a6ce13e307b8cd2e7f1e7c4731c70
>>
>> (Merge sort taken from Rosetta Code.)
>>
>> I decided to just build the latest version of Gforth so I could have TRAVERSE-WORDLIST.
>>
>> dxforth, thanks a lot for the pointers to SKIP and SCAN -- very helpful.
>>
>> It's actually quite fast -- not much slower than the Python
>> solution! (Python takes ~2.2 seconds for my large 43MB input file,
>> this Gforth solution takes 3.7s).

ISTM that even this non-optimized "Forth" solution contains enough
non-standard words to make it difficult or impossible for the casual
reader of Hoyt's article to run it on anything but the latest Gforth. It
won't run on VFX and, I suspect, SwiftForth. Two very mainstream and
easily obtained Forths. I still can't get the latest Gforth to run on my
Mac (Catalina OS). The optimized version is hopeless.

Undefined words:
rdrop
execute-parsing
skip and scan are not in ANS (are they?), though VFX has them

Hoyt had to search "in the wild" for a cell array sort routine and he
found one in Rosetta Code. That's a shoddy way to have to find "library
code".

He lamented having to write his own ascii lower case routine.

Strangely, he also laments "I used to love the idea of no local
variables, but in practice it just means a lot of dup over swap rot".
But ANS Forth is chock full of local variables. Two different flavors
are in the standard. I don't understand his comment here.

Bottom line, I think anyone reading Hoyt's article will come away with a
very bad impression of what it takes to write programs in Forth. It
didn't have to be that way. Steering Hoyt to only standard ANS solutions
that would run as-is on Gforth, VFX, and SwiftForth would have been far
better IMO. Of course that would not have solved the problem of finding
"library" routines like merge-sort, lowercase, and perhaps a hash table.
The solution to that seems simple but I'm not volunteering.

Sorry this is coming so late. I have been unavoidably busy with other
things for most of the year.

-Doug

> Slower than Python does not sound fast to me:-)
>
> Is the benchmark input publically available?
>
> - anton
>

Re: Counting frequencies of unique words

<f5f6d49a-8180-467d-9449-236334088fe2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14185&group=comp.lang.forth#14185

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:de13:: with SMTP id h19mr2654354qkj.441.1628867805449;
Fri, 13 Aug 2021 08:16:45 -0700 (PDT)
X-Received: by 2002:a05:620a:1907:: with SMTP id bj7mr2756145qkb.95.1628867805196;
Fri, 13 Aug 2021 08:16:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 13 Aug 2021 08:16:45 -0700 (PDT)
In-Reply-To: <611678f9$0$699$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c5:6f04:d001:d4d1:b180:f220:d21f;
posting-account=9A5f7goAAAD_QfJPZnlK3Xq_UhzYjdP-
NNTP-Posting-Host: 2a00:23c5:6f04:d001:d4d1:b180:f220:d21f
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f5f6d49a-8180-467d-9449-236334088fe2n@googlegroups.com>
Subject: Re: Counting frequencies of unique words
From: november...@gmail.com (NN)
Injection-Date: Fri, 13 Aug 2021 15:16:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: NN - Fri, 13 Aug 2021 15:16 UTC

On Friday, 13 August 2021 at 14:51:55 UTC+1, Doug Hoffman wrote:
> On 3/12/21 5:21 AM, Anton Ertl wrote:
> > Ben Hoyt <ben...@gmail.com> writes:
> >> Thanks for the help, folks. Updated version:
> >> https://gist.github.com/benhoyt/770a6ce13e307b8cd2e7f1e7c4731c70
> >>
> >> (Merge sort taken from Rosetta Code.)
> >>
> >> I decided to just build the latest version of Gforth so I could have TRAVERSE-WORDLIST.
> >>
> >> dxforth, thanks a lot for the pointers to SKIP and SCAN -- very helpful.
> >>
> >> It's actually quite fast -- not much slower than the Python
> >> solution! (Python takes ~2.2 seconds for my large 43MB input file,
> >> this Gforth solution takes 3.7s).
>
> ISTM that even this non-optimized "Forth" solution contains enough
> non-standard words to make it difficult or impossible for the casual
> reader of Hoyt's article to run it on anything but the latest Gforth. It
> won't run on VFX and, I suspect, SwiftForth. Two very mainstream and
> easily obtained Forths. I still can't get the latest Gforth to run on my
> Mac (Catalina OS). The optimized version is hopeless.
>
> Undefined words:
> rdrop
> execute-parsing
> skip and scan are not in ANS (are they?), though VFX has them
>
>
> Hoyt had to search "in the wild" for a cell array sort routine and he
> found one in Rosetta Code. That's a shoddy way to have to find "library
> code".
>
> He lamented having to write his own ascii lower case routine.
>
> Strangely, he also laments "I used to love the idea of no local
> variables, but in practice it just means a lot of dup over swap rot".
> But ANS Forth is chock full of local variables. Two different flavors
> are in the standard. I don't understand his comment here.
>
> Bottom line, I think anyone reading Hoyt's article will come away with a
> very bad impression of what it takes to write programs in Forth. It
> didn't have to be that way. Steering Hoyt to only standard ANS solutions
> that would run as-is on Gforth, VFX, and SwiftForth would have been far
> better IMO. Of course that would not have solved the problem of finding
> "library" routines like merge-sort, lowercase, and perhaps a hash table.
> The solution to that seems simple but I'm not volunteering.
>
> Sorry this is coming so late. I have been unavoidably busy with other
> things for most of the year.
>
> -Doug
>
> > Slower than Python does not sound fast to me:-)
> >
> > Is the benchmark input publically available?
> >
> > - anton
> >

""

I think, if you read the earlier posts, you will find that Ben states "I want to keep
it "mostly standard" but I'm fine using a couple of Gforth-specific features if
needed. " .

As for the undefined words, I assume rdrop is simply

: rdrop ( -- ) r> drop ;

Skip and scan are :-

: scan ( a u c -- a1 u1 )
over 0= if drop exit then
>r over c@ r@ = if r> drop else 1 /string r> recurse then ;

: skip ( a u c -- a1 u1 )
over 0= if drop exit then
>r over c@ r@ = if 1 /string r> recurse else r> drop then ;

Execute-parsing is :-

https://git.savannah.gnu.org/cgit/gforth.git/tree/compat/execute-parsing.fs

As someone who tried his hand at the exercise, I did come away with the impression
that for a problem that sounded simple it was not easy to solve in forth. ( I didnt need
to read Ben's article to come to that conclusion. )

I also realised the need to build a library and that's going to be a slow work-in-progress.

NN

Re: Counting frequencies of unique words

<2021Aug13.170239@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14187&group=comp.lang.forth#14187

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Fri, 13 Aug 2021 15:02:39 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 81
Message-ID: <2021Aug13.170239@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk>
Injection-Info: reader02.eternal-september.org; posting-host="0fd349d651368433610776fd56ad7a3b";
logging-data="19788"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MVFsOo0/ilNK4uLyZGjNM"
Cancel-Lock: sha1:ivZz3FolzYl+Ap1tAX5KkmJXOJQ=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Fri, 13 Aug 2021 15:02 UTC

Doug Hoffman <dhoffman888@gmail.com> writes:
>ISTM that even this non-optimized "Forth" solution contains enough
>non-standard words to make it difficult or impossible for the casual
>reader of Hoyt's article to run it on anything but the latest Gforth. It
>won't run on VFX and, I suspect, SwiftForth. Two very mainstream and
>easily obtained Forths. I still can't get the latest Gforth to run on my
>Mac (Catalina OS). The optimized version is hopeless.
>
>Undefined words:
>rdrop
>execute-parsing
>skip and scan are not in ANS (are they?), though VFX has them

RDROP is indeed not necessary and can be replaced with R> DROP.

Concerning EXECUTE-PARSING, he did the right thing and used a capable
Forth instead of trying to work around the deplorable fact that VFX
and SwiftForth still have not implemented this word. Shame on them!

It's not as if EXECUTE-PARSING is a secret of Gforth. EXECUTE-PARSING
has been discussed here repeatedly since November 2000, it has been
brought up in the standardization committee, where typical tabling
tactics have been used successfully (ask for more functionality, and
when that request is satisfied, everybody dislikes the result because
of complexity). And of course, they have the classical defense that
nobody uses EXECUTE-PARSING. Ben Hoyt's program is a counterexample
to that claim. If you want to run Ben Hoyt's program on VFX, ask
Stephen Pelc for EXECUTE-PARSING.

SKIP and SCAN exist in Gforth, SwiftForth, and VFX.

>Hoyt had to search "in the wild" for a cell array sort routine and he
>found one in Rosetta Code. That's a shoddy way to have to find "library
>code".

So what? The result worked. Sure, it would be better if Forth had a
library culture like, say, Python, but for various reasons it has not.

>He lamented having to write his own ascii lower case routine.

Gforth only has TOUPPER:-).

>Strangely, he also laments "I used to love the idea of no local
>variables, but in practice it just means a lot of dup over swap rot".
>But ANS Forth is chock full of local variables. Two different flavors
>are in the standard. I don't understand his comment here.

Lot's of people here claim that proper Forth code does not need
locals, and that real Forthers do not use them. Apparently Ben Hoyt
followed this dogma in this program, then looked at the result, and
made this comment.

>Bottom line, I think anyone reading Hoyt's article will come away with a
>very bad impression of what it takes to write programs in Forth. It
>didn't have to be that way. Steering Hoyt to only standard ANS solutions
>that would run as-is on Gforth, VFX, and SwiftForth would have been far
>better IMO.

My impression is that he was not interested in being steered. A
number of people (me included) presented alternative solutions.

In what sense would a pure-standard solution have been better? It
would have been even longer, portraying Forth as a very long-winded
language.

You can find a short version (25 lines including empty lines and
comments) in <2021Mar12.090140@mips.complang.tuwien.ac.at>.

You can also find a version that runs on lxf, SwiftForth, and VFX on
<http://www.complang.tuwien.ac.at/anton/count-unique-portable.fs>,
with results in <2021Mar19.172724@mips.complang.tuwien.ac.at> and
<2021Mar20.095626@mips.complang.tuwien.ac.at>. And finally I did a
very Gforth-performance-oriented version
<2021Mar20.152840@mips.complang.tuwien.ac.at>.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<2021Aug13.181209@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14188&group=comp.lang.forth#14188

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Fri, 13 Aug 2021 16:12:09 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 13
Message-ID: <2021Aug13.181209@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <f5f6d49a-8180-467d-9449-236334088fe2n@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="0fd349d651368433610776fd56ad7a3b";
logging-data="19788"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5Sq0mvyDEX8PdiPBHhh88"
Cancel-Lock: sha1:fIVE/0Pg7mfkS4dapIJtEUXnaZA=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Fri, 13 Aug 2021 16:12 UTC

NN <november.nihal@gmail.com> writes:
>: rdrop ( -- ) r> drop ;

Unfortunately, that does not work in general, because there is a
colon-sys on the top of return stack at the start of this colon
definition.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<0bc7f7b4-1c80-4c69-b856-61c81f920d1an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14189&group=comp.lang.forth#14189

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:7141:: with SMTP id m62mr3450198qkc.496.1628876972686;
Fri, 13 Aug 2021 10:49:32 -0700 (PDT)
X-Received: by 2002:a05:6214:1cb:: with SMTP id c11mr3906452qvt.47.1628876972454;
Fri, 13 Aug 2021 10:49:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!border2.nntp.ams1.giganews.com!nntp.giganews.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 13 Aug 2021 10:49:32 -0700 (PDT)
In-Reply-To: <2021Aug13.181209@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c5:6f04:d001:d4d1:b180:f220:d21f;
posting-account=9A5f7goAAAD_QfJPZnlK3Xq_UhzYjdP-
NNTP-Posting-Host: 2a00:23c5:6f04:d001:d4d1:b180:f220:d21f
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk>
<f5f6d49a-8180-467d-9449-236334088fe2n@googlegroups.com> <2021Aug13.181209@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0bc7f7b4-1c80-4c69-b856-61c81f920d1an@googlegroups.com>
Subject: Re: Counting frequencies of unique words
From: november...@gmail.com (NN)
Injection-Date: Fri, 13 Aug 2021 17:49:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: NN - Fri, 13 Aug 2021 17:49 UTC

On Friday, 13 August 2021 at 17:14:23 UTC+1, Anton Ertl wrote:
> NN <novembe...@gmail.com> writes:
> >: rdrop ( -- ) r> drop ;
> Unfortunately, that does not work in general, because there is a
> colon-sys on the top of return stack at the start of this colon
> definition.
> - anton
> --
> M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
> comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
> New standard: http://www.forth200x.org/forth200x.html
> EuroForth 2021: https://euro.theforth.net/2021

My bad :-(

Would this work ?

: rdrop postpone >r postpone drop ; immediate

Re: Counting frequencies of unique words

<2021Aug14.070832@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14199&group=comp.lang.forth#14199

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Sat, 14 Aug 2021 05:08:32 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 17
Message-ID: <2021Aug14.070832@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <f5f6d49a-8180-467d-9449-236334088fe2n@googlegroups.com> <2021Aug13.181209@mips.complang.tuwien.ac.at> <0bc7f7b4-1c80-4c69-b856-61c81f920d1an@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="05144d734a805d9f4a5588ca6ae4b631";
logging-data="15742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1982+05FXWPZ8QmNav1uztM"
Cancel-Lock: sha1:NIAfMbdIOPwX/xDSa1perEneFi4=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 14 Aug 2021 05:08 UTC

NN <november.nihal@gmail.com> writes:
>Would this work ?
>
>: rdrop postpone >r postpone drop ; immediate

As used by Ben Hoyt, yes.

Interpreting it does not work like Gforth's RDROP (but then, other
Forth systems generally don't support interpretive return stack access
anyway), and ticking it does not work like Gforth's RDROP, either.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<61179418$0$707$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14202&group=comp.lang.forth#14202

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk>
<2021Aug13.170239@mips.complang.tuwien.ac.at>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Sat, 14 Aug 2021 05:59:49 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.12.0
MIME-Version: 1.0
In-Reply-To: <2021Aug13.170239@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Lines: 113
Message-ID: <61179418$0$707$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 01d53d21.news.sunsite.dk
X-Trace: 1628935192 news.sunsite.dk 707 glidedog@gmail.com/68.55.82.126:64498
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Sat, 14 Aug 2021 09:59 UTC

On 8/13/21 11:02 AM, Anton Ertl wrote:
> Doug Hoffman <dhoffman888@gmail.com> writes:
>> ISTM that even this non-optimized "Forth" solution contains enough
>> non-standard words to make it difficult or impossible for the casual
>> reader of Hoyt's article to run it on anything but the latest Gforth. It
>> won't run on VFX and, I suspect, SwiftForth. Two very mainstream and
>> easily obtained Forths. I still can't get the latest Gforth to run on my
>> Mac (Catalina OS). The optimized version is hopeless.
>>
>> Undefined words:
>> rdrop
>> execute-parsing
>> skip and scan are not in ANS (are they?), though VFX has them
>
> RDROP is indeed not necessary and can be replaced with R> DROP.
>
> Concerning EXECUTE-PARSING, he did the right thing and used a capable
> Forth instead of trying to work around the deplorable fact that VFX
> and SwiftForth still have not implemented this word. Shame on them!
>
> It's not as if EXECUTE-PARSING is a secret of Gforth. EXECUTE-PARSING
> has been discussed here repeatedly since November 2000, it has been
> brought up in the standardization committee, where typical tabling
> tactics have been used successfully (ask for more functionality, and
> when that request is satisfied, everybody dislikes the result because
> of complexity). And of course, they have the classical defense that
> nobody uses EXECUTE-PARSING. Ben Hoyt's program is a counterexample
> to that claim. If you want to run Ben Hoyt's program on VFX, ask
> Stephen Pelc for EXECUTE-PARSING.
>
> SKIP and SCAN exist in Gforth, SwiftForth, and VFX.

Do they all behave the same?

>> Hoyt had to search "in the wild" for a cell array sort routine and he
>> found one in Rosetta Code. That's a shoddy way to have to find "library
>> code".
>
> So what? The result worked. Sure, it would be better if Forth had a
> library culture

That is an understatement.

> like, say, Python, but for various reasons it has not.
>
>> He lamented having to write his own ascii lower case routine.
>
> Gforth only has TOUPPER:-).
>
>> Strangely, he also laments "I used to love the idea of no local
>> variables, but in practice it just means a lot of dup over swap rot".
>> But ANS Forth is chock full of local variables. Two different flavors
>> are in the standard. I don't understand his comment here.
>
> Lot's of people here claim that proper Forth code does not need
> locals, and that real Forthers do not use them. Apparently Ben Hoyt
> followed this dogma in this program, then looked at the result, and
> made this comment.
>
>> Bottom line, I think anyone reading Hoyt's article will come away with a
>> very bad impression of what it takes to write programs in Forth. It
>> didn't have to be that way. Steering Hoyt to only standard ANS solutions
>> that would run as-is on Gforth, VFX, and SwiftForth would have been far
>> better IMO.
>
> My impression is that he was not interested in being steered. A
> number of people (me included) presented alternative solutions.
>
> In what sense would a pure-standard solution have been better?

Anyone wanting to run the code could easily have done so on any
of VFX, SwiftForth, or Gforth (and maybe some other Forths).

> It
> would have been even longer, portraying Forth as a very long-winded
> language.
>
> You can find a short version (25 lines including empty lines and
> comments) in <2021Mar12.090140@mips.complang.tuwien.ac.at>.
>
> You can also find a version that runs on lxf, SwiftForth, and VFX on
> <http://www.complang.tuwien.ac.at/anton/count-unique-portable.fs>,
> with results in <2021Mar19.172724@mips.complang.tuwien.ac.at> and
> <2021Mar20.095626@mips.complang.tuwien.ac.at>. And finally I did a
> very Gforth-performance-oriented version
> <2021Mar20.152840@mips.complang.tuwien.ac.at>.
>
> - anton

So regardless of what you or I think, he concludes the following
about Forth:

"(though I’m not sure it’s valid to call this simple!):"

"It’s not for nothing that Forth has a reputation for being write-only."

"in practice it just means a lot of dup over swap rot"

"even Gforth (which has a lot more than ANS standard Forth) doesn’t have
fairly basic tools like to-lower or sort, so we have to roll those
ourselves (the in-place merge sort was taken from Rosetta Code)"

"I might still consider using Forth for fun or on tiny embedded systems,
but I don’t think it has the ergonomics or the libraries to write
programs for general use. For a much richer, more modern take on a
Forth-like language, check out Factor."

-Doug

p.s., I worry about using the dictionary trick to get a hash table. One
could not do this for shipping a turnkey production program. A
dedicated hash table is needed, like Marcel did it.

Re: Counting frequencies of unique words

<2021Aug14.132734@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14204&group=comp.lang.forth#14204

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Sat, 14 Aug 2021 11:27:34 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2021Aug14.132734@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <2021Aug13.170239@mips.complang.tuwien.ac.at> <61179418$0$707$14726298@news.sunsite.dk>
Injection-Info: reader02.eternal-september.org; posting-host="05144d734a805d9f4a5588ca6ae4b631";
logging-data="878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qZMvnMWzCQHWAYMb2JWd+"
Cancel-Lock: sha1:qruS1NBEeC1E6Mcs36m3zIv2bP8=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 14 Aug 2021 11:27 UTC

Doug Hoffman <dhoffman888@gmail.com> writes:
>On 8/13/21 11:02 AM, Anton Ertl wrote:
>> SKIP and SCAN exist in Gforth, SwiftForth, and VFX.
>
>Do they all behave the same?

Who knows? In my portable version I used the standardized PARSE-NAME
instead, but found that SwiftForth and VFX do not treat line feed as
white space in PARSE-NAME, and so instead used the reference
implementation of PARSE-NAME.

>> In what sense would a pure-standard solution have been better?
>
>Anyone wanting to run the code could easily have done so on any
>of VFX, SwiftForth, or Gforth (and maybe some other Forths).

Yes, but the program would have been even longer, which would have
made Forth look even worse. And the vendors would be reinforced in
their stance than nobody needs EXECUTE-PARSING.

>p.s., I worry about using the dictionary trick to get a hash table. One
>could not do this for shipping a turnkey production program.

Sure one can. A turnkey program just starts a different word instead
of the text interpreter.

>A
>dedicated hash table is needed, like Marcel did it.

I see no reason not to use Forth features just because some vendors
don't support them for turnkey programs. Better ask these vendors for
providing the full power of Forth, including wordlists, in turnkey
programs.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<sfb7pq$ac3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14220&group=comp.lang.forth#14220

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Sun, 15 Aug 2021 14:19:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <sfb7pq$ac3$1@dont-email.me>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <2021Aug13.170239@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 15 Aug 2021 14:19:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="85109bd7393791e168974c55575e4fd6";
logging-data="10627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MW4Tt/Y6tFo08CQoiPOoo"
User-Agent: Usenapp/1.11.1/l for MacOS - Full License
Cancel-Lock: sha1:r8gU2C3urUpJ6gU6GSm+8oVdhUU=
 by: Stephen Pelc - Sun, 15 Aug 2021 14:19 UTC

On 13 Aug 2021 at 16:02:39 BST, "Anton Ertl" <Anton Ertl> wrote:

> Concerning EXECUTE-PARSING, he did the right thing and used a capable
> Forth instead of trying to work around the deplorable fact that VFX
> and SwiftForth still have not implemented this word. Shame on them!

There's an old proverb "People in glass houses shouldn't throw stones".

>> Bottom line, I think anyone reading Hoyt's article will come away with a
>> very bad impression of what it takes to write programs in Forth. It
>> didn't have to be that way. Steering Hoyt to only standard ANS solutions
>> that would run as-is on Gforth, VFX, and SwiftForth would have been far
>> better IMO.

If you want a new word adopted, it is a good idea to implement it for more
than one system. I look forward to Anton's contribution of EXECUTE-PARSING
for VFX.

Stephen

Re: Counting frequencies of unique words

<sfb8l7$qpk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14221&group=comp.lang.forth#14221

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Sun, 15 Aug 2021 14:34:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <sfb8l7$qpk$1@dont-email.me>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <2021Aug13.170239@mips.complang.tuwien.ac.at> <sfb7pq$ac3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 15 Aug 2021 14:34:15 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="85109bd7393791e168974c55575e4fd6";
logging-data="27444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++LCJYLBbAXLdUXms+zJRv"
User-Agent: Usenapp/1.11.1/l for MacOS - Full License
Cancel-Lock: sha1:LOg7fo5M8Zc4dFzhnnE7mJ5NAX4=
 by: Stephen Pelc - Sun, 15 Aug 2021 14:34 UTC

>
> If you want a new word adopted, it is a good idea to implement it for more
> than one system. I look forward to Anton's contribution of EXECUTE-PARSING
> for VFX.

Bernd actually implemented (thanks) EXECUTE-PARSING for VFX many
years ago. See the VfxForth harness in the Minos sources.

In my ample spare time I'll make a file of gForth-isms.

Stephen

Re: Counting frequencies of unique words

<2021Aug15.173129@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14222&group=comp.lang.forth#14222

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Sun, 15 Aug 2021 15:31:29 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 46
Message-ID: <2021Aug15.173129@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <2021Aug13.170239@mips.complang.tuwien.ac.at> <sfb7pq$ac3$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="8af3d5f476ea0e58470158170419de15";
logging-data="6489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Pz9TnusOyMAJ66T5E0a2G"
Cancel-Lock: sha1:LYqfuvWfynIfLclHykLBNwu+Rdk=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sun, 15 Aug 2021 15:31 UTC

Stephen Pelc <stephen@vfxforth.com> writes:
>On 13 Aug 2021 at 16:02:39 BST, "Anton Ertl" <Anton Ertl> wrote:
>
>> Concerning EXECUTE-PARSING, he did the right thing and used a capable
>> Forth instead of trying to work around the deplorable fact that VFX
>> and SwiftForth still have not implemented this word. Shame on them!
>
>There's an old proverb "People in glass houses shouldn't throw stones".

Gforth has provided EXECUTE-PARSING since Gforth-0.6 in 2003.

>>> Bottom line, I think anyone reading Hoyt's article will come away with a
>>> very bad impression of what it takes to write programs in Forth. It
>>> didn't have to be that way. Steering Hoyt to only standard ANS solutions
>>> that would run as-is on Gforth, VFX, and SwiftForth would have been far
>>> better IMO.
>
>If you want a new word adopted, it is a good idea to implement it for more
>than one system. I look forward to Anton's contribution of EXECUTE-PARSING
>for VFX.

I posted an implementation in Forth-94 (should work on VFX) here
in on February 12, 2006 <2006Feb12.174921@mips.complang.tuwien.ac.at>,
and added it to

http://www.complang.tuwien.ac.at/forth/compat.zip

shortly after. In the meantime you can find it also on

http://theforth.net/package/compat

in particular in

http://theforth.net/package/compat/current-view/execute-parsing.fs

And I mentioned both EXECUTE-PARSING and its implementation here
repeatedly.

You have only yourself to blame for not including it in VFX earlier.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<sfcpad$10h5$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14225&group=comp.lang.forth#14225

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Mon, 16 Aug 2021 14:24:44 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sfcpad$10h5$1@gioia.aioe.org>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="33317"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Mon, 16 Aug 2021 04:24 UTC

On 13/08/2021 23:51, Doug Hoffman wrote:
> ...
> Bottom line, I think anyone reading Hoyt's article will come away with a
> very bad impression of what it takes to write programs in Forth.

First impressions of Forth are typically bad. I was no different. But
if others were able to use it successfully - why not me?

> It
> didn't have to be that way. Steering Hoyt to only standard ANS solutions
> that would run as-is on Gforth, VFX, and SwiftForth would have been far
> better IMO.

Agreed. I wouldn't have used the forth compiler/dictionary which then
relies on oddities such as:

search-wordlist
name>string
name>interpret
execute-parsing

A mundane approach as might be done in C is preferable to 'showing off'
Forth, which then backfires.

to-lower

I might agree with because functions like this have universal appeal -
just don't expect it to come from 200x.

Re: Counting frequencies of unique words

<611a2bbf$0$702$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14227&group=comp.lang.forth#14227

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk> <sfcpad$10h5$1@gioia.aioe.org>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Mon, 16 Aug 2021 05:11:24 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.12.0
MIME-Version: 1.0
In-Reply-To: <sfcpad$10h5$1@gioia.aioe.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Lines: 46
Message-ID: <611a2bbf$0$702$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 62feed55.news.sunsite.dk
X-Trace: 1629105087 news.sunsite.dk 702 glidedog@gmail.com/68.55.82.126:54058
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Mon, 16 Aug 2021 09:11 UTC

On 8/16/21 12:24 AM, dxforth wrote:
> On 13/08/2021 23:51, Doug Hoffman wrote:
>> ... Bottom line, I think anyone reading Hoyt's article will come away
>> with a
>> very bad impression of what it takes to write programs in Forth.
>
> First impressions of Forth are typically bad.  I was no different.  But
> if others were able to use it successfully - why not me?
>
>> It
>> didn't have to be that way. Steering Hoyt to only standard ANS solutions
>> that would run as-is on Gforth, VFX, and SwiftForth would have been far
>> better IMO.
>
> Agreed.  I wouldn't have used the forth compiler/dictionary which then
> relies on oddities such as:

These 3 words are now in the standard, and Gforth, VFX, and SwiftForth
all have them:

> search-wordlist
> name>string
> name>interpret

execute-parsing and the sort (in place) and rdrop used are non-standard.
Finding them in-the-wild is non-trivial but can be done. Standard Forth
could benefit greatly by having a Standard Library. The problem would of
course be agreeing on what should be in a Standard Library and, more
difficult yet, what code to use. The Forth community would never agree
on even a simple Standard Library. It's just not part of the culture.
I'm amazed that we have the ANS Standard as it is.

I didn't have a problem with showing the code for to-lower because that
"showed off" how easily such functions can be written in Forth. Though
it is likely a candidate for a Standard Library.

-Doug

> A mundane approach as might be done in C is preferable to 'showing off'
> Forth, which then backfires.
>
> to-lower
>
> I might agree with because functions like this have universal appeal -
> just don't expect it to come from 200x.

Re: Counting frequencies of unique words

<sfdo0r$5ve$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14231&group=comp.lang.forth#14231

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Mon, 16 Aug 2021 13:08:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <sfdo0r$5ve$1@dont-email.me>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <2021Aug13.170239@mips.complang.tuwien.ac.at> <sfb7pq$ac3$1@dont-email.me> <2021Aug15.173129@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 16 Aug 2021 13:08:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7ceaed7e7b2a9f202007ddaafa83dd17";
logging-data="6126"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NHE5We0LUD9RfK76KWhXI"
User-Agent: Usenapp/1.11.1/l for MacOS - Full License
Cancel-Lock: sha1:uvthmKh+FrDCecs+f0RVAljJ/jw=
 by: Stephen Pelc - Mon, 16 Aug 2021 13:08 UTC

On 15 Aug 2021 at 16:31:29 BST, "Anton Ertl" <Anton Ertl> wrote:

> Stephen Pelc <stephen@vfxforth.com> writes:
>> On 13 Aug 2021 at 16:02:39 BST, "Anton Ertl" <Anton Ertl> wrote:
>>
>>> Concerning EXECUTE-PARSING, he did the right thing and used a capable
>>> Forth instead of trying to work around the deplorable fact that VFX
>>> and SwiftForth still have not implemented this word. Shame on them!
>>
>> There's an old proverb "People in glass houses shouldn't throw stones".
>
> Gforth has provided EXECUTE-PARSING since Gforth-0.6 in 2003.

Jolly good. But the point I was making is that VFX contains many words
(features) that I find far more useful than EXECUTE-PARSING. You will
argue the same for gForth. Having hissy-fits about a favourite word is
unproductive.

Stephen

Re: Counting frequencies of unique words

<2021Aug16.161341@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14233&group=comp.lang.forth#14233

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Mon, 16 Aug 2021 14:13:41 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 16
Message-ID: <2021Aug16.161341@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <2021Aug13.170239@mips.complang.tuwien.ac.at> <sfb7pq$ac3$1@dont-email.me> <2021Aug15.173129@mips.complang.tuwien.ac.at> <sfdo0r$5ve$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="5a750090b95d33aee24ac27f6059644f";
logging-data="22079"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190hGM4egaFnUpSXnVlFXuJ"
Cancel-Lock: sha1:+SD93DLm/F2IDrT6m4ud+01WRFo=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Mon, 16 Aug 2021 14:13 UTC

Stephen Pelc <stephen@vfxforth.com> writes:
>Jolly good. But the point I was making is that VFX contains many words
>(features) that I find far more useful than EXECUTE-PARSING. You will
>argue the same for gForth.

The original point was not what you or I find useful, but what Ben
Hoyt found useful, and whether, as Doug Hoffman argued, Ben Hoyt
should have refrained from using it because you did not supply this
word with VFX. I don't think he should.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<8e3801f2-99a7-4527-a63f-3b0cfac4b1f4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14234&group=comp.lang.forth#14234

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:58cc:: with SMTP id dh12mr164550qvb.32.1629151516553;
Mon, 16 Aug 2021 15:05:16 -0700 (PDT)
X-Received: by 2002:ac8:1417:: with SMTP id k23mr152166qtj.311.1629151516206;
Mon, 16 Aug 2021 15:05:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 16 Aug 2021 15:05:16 -0700 (PDT)
In-Reply-To: <611a2bbf$0$702$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:2000:2001:46bc:b008:6935:38e8:f18;
posting-account=ryzhhAoAAAAIqf1uqmG9E4uP1Bagd-k2
NNTP-Posting-Host: 2a01:2000:2001:46bc:b008:6935:38e8:f18
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk>
<sfcpad$10h5$1@gioia.aioe.org> <611a2bbf$0$702$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8e3801f2-99a7-4527-a63f-3b0cfac4b1f4n@googlegroups.com>
Subject: Re: Counting frequencies of unique words
From: peter.m....@gmail.com (P Falth)
Injection-Date: Mon, 16 Aug 2021 22:05:16 +0000
Content-Type: text/plain; charset="UTF-8"
 by: P Falth - Mon, 16 Aug 2021 22:05 UTC

On Monday, 16 August 2021 at 11:11:29 UTC+2, Doug Hoffman wrote:
> On 8/16/21 12:24 AM, dxforth wrote:
> > On 13/08/2021 23:51, Doug Hoffman wrote:
> >> ... Bottom line, I think anyone reading Hoyt's article will come away
> >> with a
> >> very bad impression of what it takes to write programs in Forth.
> >
> > First impressions of Forth are typically bad. I was no different. But
> > if others were able to use it successfully - why not me?
> >
> >> It
> >> didn't have to be that way. Steering Hoyt to only standard ANS solutions
> >> that would run as-is on Gforth, VFX, and SwiftForth would have been far
> >> better IMO.
> >
> > Agreed. I wouldn't have used the forth compiler/dictionary which then
> > relies on oddities such as:
> These 3 words are now in the standard, and Gforth, VFX, and SwiftForth
> all have them:
> > search-wordlist
> > name>string
> > name>interpret
> execute-parsing and the sort (in place) and rdrop used are non-standard.
> Finding them in-the-wild is non-trivial but can be done. Standard Forth
> could benefit greatly by having a Standard Library. The problem would of
> course be agreeing on what should be in a Standard Library and, more
> difficult yet, what code to use. The Forth community would never agree
> on even a simple Standard Library. It's just not part of the culture.
> I'm amazed that we have the ANS Standard as it is.
>
> I didn't have a problem with showing the code for to-lower because that
> "showed off" how easily such functions can be written in Forth. Though
> it is likely a candidate for a Standard Library.

A to-lower (and to-upper) that handles unicode codepoints is not that easy to write!

Peter

> -Doug
> > A mundane approach as might be done in C is preferable to 'showing off'
> > Forth, which then backfires.
> >
> > to-lower
> >
> > I might agree with because functions like this have universal appeal -
> > just don't expect it to come from 200x.

Re: Counting frequencies of unique words

<2021Aug17.105304@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14239&group=comp.lang.forth#14239

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Counting frequencies of unique words
Date: Tue, 17 Aug 2021 08:53:04 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 16
Message-ID: <2021Aug17.105304@mips.complang.tuwien.ac.at>
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com> <s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com> <2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk> <sfcpad$10h5$1@gioia.aioe.org> <611a2bbf$0$702$14726298@news.sunsite.dk> <8e3801f2-99a7-4527-a63f-3b0cfac4b1f4n@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="03a05cd76505f842f70009639b557aaf";
logging-data="3426"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18b39/3yq72JyOU1XQImdj4"
Cancel-Lock: sha1:MAxOVpchuIVmqysz/8r6nRlJ5s0=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 17 Aug 2021 08:53 UTC

P Falth <peter.m.falth@gmail.com> writes:
>A to-lower (and to-upper) that handles unicode codepoints is not that easy to write!

What it should produce also depends on the locale. E.g., in most locales

'I' to-lower xemit

should output 'i', but in some locales (e.g., tr_TR.utf8) it should
output a similar, but dotless letter.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: Counting frequencies of unique words

<611b8030$0$695$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14240&group=comp.lang.forth#14240

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk> <sfcpad$10h5$1@gioia.aioe.org>
<611a2bbf$0$702$14726298@news.sunsite.dk>
<8e3801f2-99a7-4527-a63f-3b0cfac4b1f4n@googlegroups.com>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Tue, 17 Aug 2021 05:23:56 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.12.0
MIME-Version: 1.0
In-Reply-To: <8e3801f2-99a7-4527-a63f-3b0cfac4b1f4n@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 8
Message-ID: <611b8030$0$695$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7b387f59.news.sunsite.dk
X-Trace: 1629192240 news.sunsite.dk 695 glidedog@gmail.com/68.55.82.126:57979
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Tue, 17 Aug 2021 09:23 UTC

On 8/16/21 6:05 PM, P Falth wrote:

> A to-lower (and to-upper) that handles unicode codepoints is not that easy to write!

Yes. So it appears.

-Doug

Re: Counting frequencies of unique words

<611e535d$0$705$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14260&group=comp.lang.forth#14260

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk>
<2021Aug13.170239@mips.complang.tuwien.ac.at>
<61179418$0$707$14726298@news.sunsite.dk>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Thu, 19 Aug 2021 08:49:33 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <61179418$0$707$14726298@news.sunsite.dk>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 75
Message-ID: <611e535d$0$705$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: f26eef77.news.sunsite.dk
X-Trace: 1629377373 news.sunsite.dk 705 glidedog@gmail.com/68.55.82.126:55217
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Thu, 19 Aug 2021 12:49 UTC

On 8/14/21 5:59 AM, Doug Hoffman wrote:

>>> Hoyt had to search "in the wild" for a cell array sort routine and he
>>> found one in Rosetta Code. That's a shoddy way to have to find "library
>>> code".

>>> He lamented having to write his own ascii lower case routine.

>> (In what sense would a pure-standard solution have been better?)
>
> Anyone wanting to run the code could easily have done so on any
> of VFX, SwiftForth, or Gforth (and maybe some other Forths).

Having said that, I should provide an alternative. The following is
based on library code, which is fair because most all of Hoyt's other
examples used library code. The difference is that Forth has no standard
library code. It is my library code, been using it for years, but
anyone's generic code should do.

include FMS2LL.f
include ptr.f
include array.f
include string.f
include file.f
include hash-table.f

hash-table t \ make a dynamically resizable hash table
s" kjvbiblex10.txt" file f

: process-line-array {: array -- :}
array :size 0
?do i array :at ( str-obj )
dup :lower :@ ( key-addr key-len) 2dup t :@
if ( key-addr key-len val ) 1+
else ( key-addr key-len ) 1
then -rot t :insert
loop array <free ;

: read-file->hash-table
begin
f :read-line ( str-obj)
while
dup :size
if bl swap :split ( array)
process-line-array
else drop
then
repeat ;

>array value a \ make a dynamically resizable array

read-file->hash-table \ populate the hash table
t :uneach
[: a :add ;] t :apply \ load the array with nodes from the hashtable
[: :val@ swap :val@ < ;] a :sortWith \ sort the array on #ofUniques
[: cr dup :key@ :. space :val@ . ;] a :apply \ print the array
a :size . \ #of unique words

The above solution is correct and runs as is on any ANS Forth. But it is
slow, taking about 15 seconds using VFX 32-bit(Hoyt's Ruby non-optimised
solution ran 40% slower on my machine than on his, for a rough
comparison). The bottlenecks are in my library code. It takes most all
of the 15 seconds just to :split each line into an array of strings and
then to populate the hash-table. I can see where my library code could
easily be made much faster for this specific problem just by tweaking
those two functions and allotting instead of allocating. But why bother?
It's a fictitious problem.

Is it better in the sense that it is easier to read, fully ANS
compatible, and memory can be reclaimed without restarting? I don't
know. Others surely can't read it as easily as I can. Would Hoyt have
lamented that this is write-only code? I don't know.

-Doug

Re: Counting frequencies of unique words

<611e7255$0$704$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14263&group=comp.lang.forth#14263

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk>
<2021Aug13.170239@mips.complang.tuwien.ac.at>
<61179418$0$707$14726298@news.sunsite.dk>
<611e535d$0$705$14726298@news.sunsite.dk>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Thu, 19 Aug 2021 11:01:38 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <611e535d$0$705$14726298@news.sunsite.dk>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 13
Message-ID: <611e7255$0$704$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 81ae926c.news.sunsite.dk
X-Trace: 1629385301 news.sunsite.dk 704 glidedog@gmail.com/68.55.82.126:56715
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Thu, 19 Aug 2021 15:01 UTC

On 8/19/21 8:49 AM, Doug Hoffman wrote:

If anyone is interested:

https://github.com/DouglasBHoffman/FMS2
> include FMS2LL.f
> include ptr.f
> include array.f
> include string.f
> include file.f
> include hash-table.f

-Doug

Re: Counting frequencies of unique words

<06758af8-e117-4396-8675-dde3a0d1aa4an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14267&group=comp.lang.forth#14267

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:23c6:: with SMTP id hr6mr16338194qvb.22.1629407873334;
Thu, 19 Aug 2021 14:17:53 -0700 (PDT)
X-Received: by 2002:a05:622a:144:: with SMTP id v4mr14732415qtw.220.1629407873142;
Thu, 19 Aug 2021 14:17:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 19 Aug 2021 14:17:52 -0700 (PDT)
In-Reply-To: <611e535d$0$705$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=2404:4404:2761:ce00:35d8:e973:8d9d:59f;
posting-account=CuGGfgoAAACvmU_uLakQwRjGoS9g7HzV
NNTP-Posting-Host: 2404:4404:2761:ce00:35d8:e973:8d9d:59f
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me> <7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at> <611678f9$0$699$14726298@news.sunsite.dk>
<2021Aug13.170239@mips.complang.tuwien.ac.at> <61179418$0$707$14726298@news.sunsite.dk>
<611e535d$0$705$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <06758af8-e117-4396-8675-dde3a0d1aa4an@googlegroups.com>
Subject: Re: Counting frequencies of unique words
From: benh...@gmail.com (Ben Hoyt)
Injection-Date: Thu, 19 Aug 2021 21:17:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 15
 by: Ben Hoyt - Thu, 19 Aug 2021 21:17 UTC

> Is it better in the sense that it is easier to read, fully ANS
> compatible, and memory can be reclaimed without restarting? I don't
> know. Others surely can't read it as easily as I can. Would Hoyt have
> lamented that this is write-only code? I don't know.

Hoyt is here, quietly fascinated that this thread has lasted 5 months and has 138 messages. :-)

I don't think this is particularly write-only code; on the contrary, it seems fairly straight-forward -- nice! With the hash-table and split helpers it's a lot more similar to how you'd do it in other languages that have more full-fledged standard libraries. I'm not familiar with that [: ... ;] syntax, but I can see what it's trying to do easily enough.

-Ben

Re: Counting frequencies of unique words

<611f6924$0$704$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14274&group=comp.lang.forth#14274

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Counting frequencies of unique words
Newsgroups: comp.lang.forth
References: <57548ac6-9f34-480d-a589-0e12913df32dn@googlegroups.com>
<s2f3t9$dk9$1@dont-email.me>
<7ee34ed0-190a-44f3-a703-82e648db810cn@googlegroups.com>
<2021Mar12.112124@mips.complang.tuwien.ac.at>
<611678f9$0$699$14726298@news.sunsite.dk>
<2021Aug13.170239@mips.complang.tuwien.ac.at>
<61179418$0$707$14726298@news.sunsite.dk>
<611e535d$0$705$14726298@news.sunsite.dk>
<06758af8-e117-4396-8675-dde3a0d1aa4an@googlegroups.com>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Fri, 20 Aug 2021 04:34:39 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <06758af8-e117-4396-8675-dde3a0d1aa4an@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 45
Message-ID: <611f6924$0$704$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: e57cd9f4.news.sunsite.dk
X-Trace: 1629448484 news.sunsite.dk 704 glidedog@gmail.com/68.55.82.126:59723
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Fri, 20 Aug 2021 08:34 UTC

On 8/19/21 5:17 PM, Ben Hoyt wrote:
>
>> Is it better in the sense that it is easier to read, fully ANS
>> compatible, and memory can be reclaimed without restarting? I don't
>> know. Others surely can't read it as easily as I can. Would Hoyt have
>> lamented that this is write-only code? I don't know.
>
> Hoyt is here, quietly fascinated that this thread has lasted 5 months and has 138 messages. :-)

Greetings! That would be partly because of me, I suppose. I came in
late and basically restarted the discussion. :-)

> I don't think this is particularly write-only code; on the contrary,
> it seems fairly straight-forward -- nice! With the hash-table and
> split helpers it's a lot more similar to how you'd do it in other
> languages that have more full-fledged standard libraries.
That's good to hear. I try to code in a straightforward style and
re-use code whenever it makes sense. Though there are differing views on
this among Forthers.

> I'm not familiar with that [: ... ;] syntax, but I can see what it's
> trying to do easily enough.
That is a relatively new "quotation" (2018?) Forth 200x syntax. It
simply allows for defining a block of nameless code and obtaining its
XT. It can be convenient.

As a strong supporter of writing Standard Forth code, doing so is my
goal. Though I think it's good for Forthers to push the envelope with
new ideas.

I found your article to be informative and well written. As you can see
it has generated a fair amount of discussion here. Anton Ertl wrote a
solution in a clever and efficient way. Marcel Hendrix, and a few
others, wrote some slightly non-standard code that runs quite fast.

Thanks for writing the article and for the feedback above.

-Doug

> -Ben


devel / comp.lang.forth / Re: Counting frequencies of unique words

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor