Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: C to Forth (was Ting) Date: Fri, 20 May 2016 22:16:07 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: <87bn40c7oo.fsf@jester.gateway.pace.com> References: <5736338d.13710740@news.eternal-september.org> <4762cab7-9c37-4137-9e9b-5a3ead1f8868@googlegroups.com> <20160514002835.6333f47c@_> <45KdnYh9FtAEUKvKnZ2dnUU7-cvNnZ2d@supernews.com> <42875847-66b1-49e6-b1fd-1ffcbe26c930@googlegroups.com> <87wpmuonmz.fsf@jester.gateway.pace.com> <2016May16.153714@mips.complang.tuwien.ac.at> <9cee1949-05d9-4f78-82c5-b9d9f512f2fa@googlegroups.com> <30f7a26d-ee8a-4bb1-a9e6-2fb9c5deec03@googlegroups.com> <938662b0-97b1-42dd-951c-df1fdafab845@googlegroups.com> <4ccd7da9-ce35-434d-afd5-f16c1324ede9@googlegroups.com> <0c344658-0e5b-403c-85b3-28a4d40a58aa@googlegroups.com> <87shxdeoz7.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="52eac348160ce62b68e4635eee7cc854"; logging-data="14648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vH1QUVi5S639ojsi4Nbk3" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:3ml01oX2iIBsfbZwbpQFs+JkLNo= sha1:MtIiujDel41/wHjgBHrXClHGEYE= Xref: csiph.com comp.lang.forth:47393 Andrew Haley writes: >> The dictionary/wordlist mechanism is part of the interpreter, so the >> code isn't THAT small. > You say potato, I say potahtoe. I say it's not part of the > interpeter, and historically it's never been thought of as such. I defer to your knowledge of Forth history, but I would have counted it. It's easy for me to envision a Forth system with no text interpreter, and that system would also not have dictionary/wordlist code. The more featureful text interpreters can also get somewhat complicated: think of gforth locals, for example. > you use the host Forth's existing dictionary to hold the name-address > mapping for target words while cross-compiling. It's not difficult at > all. I can't imagine what problem you're thinking of. You want the host's version of DUP to be different than the target's version. Maybe there's a way to do this with word lists, but it would have been a lot cleaner to supply a generalized dictionary interface. Gforth has something like that under the covers, I think. And no it doesn't mean adding more code. It just means having a more convenient calling interface to code that has to be written anyway. > it's quite likely that whatever hooks you think might be needed will > be the wrong hooks for me. Well, the ANS cross-compiler extension proposal linked earlier seems like it has been useful in practice.