Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #26069
| Newsgroups | comp.lang.forth |
|---|---|
| Date | 2013-09-28 22:02 -0700 |
| References | <0044b6c1-68ab-42e5-80ab-665cf4b60f2e@googlegroups.com> <7299ddb2-12ec-40e9-8f27-354fbaa8d7dc@googlegroups.com> <524429ed$0$1707$e4fe514c@dreader35.news.xs4all.nl> <3366f0d5-6314-44a7-a111-74666dabae32@googlegroups.com> <5246c934$0$580$e4fe514c@dreader34.news.xs4all.nl> |
| Message-ID | <fdd76697-2cfc-41ab-8a4e-cb97407ff669@googlegroups.com> (permalink) |
| Subject | Re: Ray Duncan, LMI Forth e-Manual? |
| From | Robert <linyuuuu@gmail.com> |
On Saturday, September 28, 2013 5:19:00 AM UTC-7, Albert van der Horst wrote:
> In article <3366f0d5-6314-44a7-a111-74666dabae32@googlegroups.com>,
>
> Robert <linyuuuu@gmail.com> wrote:
>
> >On Thursday, September 26, 2013 5:34:53 AM UTC-7, Albert van der Horst wrote:
>
> >
>
> >> Porting Forth code is maybe easier than porting any other language.
>
> >>
>
> >> A UR-Forth -> ISO ("ANSI") compatibility box may be much less work
>
> >>
>
> >> than you think and is independantly useful.
>
> >>
>
> >
>
> >>
>
> >> That is approximately the above idea. Someone inspired to do so, could
>
> >>
>
> >> add some blocks to the library of ciforth, and the only thing you'd
>
> >>
>
> >> have to is add WANT UR-Forth at the top of your programs.
>
> >>
>
> >
>
> >> Albert van der Horst, UTRECHT,THE NETHERLANDS
>
> >>
>
> >
>
> >Thanks, Albert. This is interesting. But I am starting at the beginning
>
> >here. Can you suggest how I might go about obtaining or writing such a
>
> >translator? That would be a great help for the future.
>
>
>
> An example. I had a fig Forth program to print labels for a mass
>
> maling (in the 80-s). The machines that where to be used where
>
> IBM pc's and only had F83. We never touched the fig-Forth program
>
> and the preamble was only a couple of screens, maybe even one.
>
>
>
> Other example.
>
> I've yourforth and it is a trimmed down version of ciforth.
>
> yourforth is not iso so it can't pass the Hayes test as such.
>
> It runs the Hayes test, even if it's missing quite a few words,
>
> including all double precision words. This is done by using a
>
> preambule that adds a few words, and by deleting tests from Hayes
>
> that have become irrelevant. The Hayes test passes in every version
>
> of yourforth, and at the moment I've evolved quite from ciforth.
>
> So I adapted the test and the preambule all the way to today.
>
>
>
> In the ideal situation your UR-Forth program comes with tests for
>
> each part. Now you try to compile some part with some other Forth.
>
> It may not pass the test, and you've to find out why. It may be
>
> a simple quirk like someone insisting on using $. instead of TYPE.
>
> Or it may be quite involved. There may be complicated assembler code,
>
> that can be replaced by high level code nowadays.
>
> Start with the easy parts. The preambule grows, but at a certain
>
> point you're done, and all the rest of the program works, as would
>
> probably any UR-Forth program you encounter.
>
>
>
> The problem is to get hold of good tests. Sometimes you can compare
>
> with the program as it was running in its natural habitat. Then you
>
> can pass a large amount of realistic data through it.
>
> In real life, I passed 2 Gbyte of testmessage through a system that
>
> was not well defined. If 5 of such badge passed, I declared my
>
> modification tested. Crude? You know, one in 5 badges failed anyway,
>
> so at least I hadn't made things worse. (All this can be statistically
>
> underpinned.)
>
>
>
> Probably you must proceed by loading simple parts that you more
>
> or less understand and fix missing words, stack under and overflows
>
> and anything else that smells bad. Read throught conversion guides
>
> from 79 to 83 and 83 to ISO to find out where the pitfalls may lay.
>
>
>
> You must *not* hope for a cut and dried convertor. Instead, think of
>
> it as a toolkit that you build up yourselve, gradually.
>
> Just start! It is all but mandatory to keep the chain of change in
>
> a source control system (rcs, cvs, git) in order to be able to
>
> retrace bad decisions. Don't be afraid to change and expand, and
>
> trim(!) your tests. All old versions are there anyway.
>
>
>
> (Only a supplier could guarantee a convertor, i.e. it is reasonable
>
> for you to expect no hassles, if I supply a `` WANT -legacy- ''
>
> to run a version 4 program from a version 5 ciforth.)
>
>
>
> Good luck.
>
>
Yes. Well, thanks, Albert, for the detailed explanation. That is why I have delayed doing this all these years. For all my code is uncommented, unindented, and unstructured, composed on the fly while thinking about astronomical equations, written in a sort of dream-state without much rhyme or reason, yet somehow working anyway. Everything is juggled on the stack, and nobody remembered to name anything appropriately for posterity.
Such is the wrapper of memory. I will probably start from scratch and write a better program, maybe in iForth.
Thanks again.
Robert
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar | Unroll thread
Ray Duncan, LMI Forth e-Manual? Robert <linyuuuu@gmail.com> - 2013-09-25 13:54 -0700
Re: Ray Duncan, LMI Forth e-Manual? alberto@hal-pc.org (Alberto) - 2013-09-25 21:56 +0000
Re: Ray Duncan, LMI Forth e-Manual? Robert <linyuuuu@gmail.com> - 2013-09-28 15:32 -0700
Re: Ray Duncan, LMI Forth e-Manual? hughaguilar96@yahoo.com - 2013-09-25 19:31 -0700
Re: Ray Duncan, LMI Forth e-Manual? Robert <linyuuuu@gmail.com> - 2013-09-25 21:33 -0700
Re: Ray Duncan, LMI Forth e-Manual? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-26 12:34 +0000
Re: Ray Duncan, LMI Forth e-Manual? Robert <linyuuuu@gmail.com> - 2013-09-26 16:18 -0700
Re: Ray Duncan, LMI Forth e-Manual? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-28 12:19 +0000
Re: Ray Duncan, LMI Forth e-Manual? Richard Owlett <rowlett@pcnetinc.com> - 2013-09-28 10:35 -0500
Re: Ray Duncan, LMI Forth e-Manual? Robert <linyuuuu@gmail.com> - 2013-09-28 22:02 -0700
csiph-web