On Jul 20, 12:39 am, Howerd <
howe...@yahoo.co.uk> wrote:
> I originally asked :
> Do you mean that polyForth failed to use the F86-style segmented
> model, which limited it to 64K?
> The F-86 model uses a segment register as the Forth Instruction
> Pointer, so that Forth words must be aligned to a 16 byte paragraph.
> Can I assume that you mean that polyForth should have used separate
> 64K code and 64K data spaces?
The F86 model does allow for large programs, but it is slow. UR/Forth
used separate 64K code and data spaces, plus a 64K space for the
dictionary headers. This was much faster. There was some limitation on
the size of the programs but not too much --- this was highly
comparable to the Small memory model used in Turbo C etc.. Both of
these designs were reasonable, with UR/Forth emphasizing speed and F83
emphasizing size.
The only really bad design was PolyForth. It was slow (comparable to
F83) because it used ITC, but it didn't allow for large programs which
is supposed to be the benefit of ITC (as done by F83). The size issue
was the major problem. When you have your application's code and data,
and the compiler and the dictionary, all in a single 64K segment, your
applications are going to be extremely limited in size. Forth Inc.
didn't just shoot themselves in the foot, they shot themselves in both
feet (size and speed).
The whole point of moving from the 8-bit computers (Z80, 65c02 and
6809) to MS-DOS, was to escape the 64K limit of those computers.
Within this context, PolyForth inflicting a 64K limit on MS-DOS users
was just not amusing at all --- this was like buying a Porsche and
then saving money by not buying tires but just driving it on the rims
--- the fact that this was done by "Forth Inc." killed Forth's
credibility.
> >There is no *reason* for Forth Inc. to cram both application and
> >compiler into a single 64K segment as they did in PolyForth.
>
> One reason is to avoid having two sets of memory access words.
The application program doesn't normally access code memory or the
dictionary headers anyway, so this should never be an issue.
PolyForth did have E@ and E! for accessing memory using far pointers.
Considering how little data memory there was, I expect that most
PolyForth programmers did try to put as much data as they could out
there in far space. But that is hugely inefficient and cumbersome!
This is supposed to be an alternative to having two sets of memory
access words?
Meanwhile, large numbers of programmers were perfectly happy writing
Turbo C programs using the Small memory model --- they thought that
Forth was just a weird joke.
> >There is
> >no benefit whatsoever. The only *reason* is that nobody at Forth Inc.
> >knew 8088 assembly language.
>
> This statement is absurd in so many ways that it makes it very
> difficult for anyone reading this thread to take anything you say
> seriously.
> 1) I know many people who have worked at Forth,Inc., and all of them
> knew about the 8086 and its segmented architecture
> 2) No one can know that *nobody* at Forth Inc. knew this
> 3) There are pros and cons with any architecture, so to say there is
> "no benefit whatsoever" is wrong
>
> It is very difficult to discuss these ideas if you smother any
> sensible comments you make in outrageous opinions and speculation.
There are no pros to the PolyForth design.
It may well be true that people who worked at Forth Inc. knew 8088
assembly language and knew about the segmented architecture --- but
Elizabeth Rather obviously didn't --- so they had to just play dumb
and pretend that 64K was a "physical limitation" of the 8088.
This is what happens when a non-technical salesperson gets put in
charge --- the employees just play dumb and go along with the most
outrageous technical decisions --- when the boss speaks you just grin
like an idiot and bob your head up and down, and so long as your
paycheck doesn't bounce you don't care.
> >>This is like colorForth's Just-In-Time (JIT)
> >> compilation technique, and allows programs to be as large as your disk
> >> drive can hold.
> >I wouldn't consider the use of binary overlays to be like Just-In-Time
> >(JIT) compilation technique.
>
> I agree - JIT is not the same as binary overlays, but I said
> "colorForth's Just-In-Time (JIT) compilation technique".
> Perhaps we need a new name for this, to avoid confusion - how about
> CJIT?>lol
>
> Is it just me, or the use of "lol" in this context slightly offensive?
> I mean this as a serious question - I'm not sure how to interpret
> it :-)
For the most part, I don't use lol and all of that internet slang. I
apologize if that was offensive.
Comparing binary overlays to JIT was pretty amazing though --- I did
actually laugh out loud when I read that.
We have a lot of non-programmers on comp.lang.forth who fake up
expertise with their jargon-heavy discussions peppered with idiotic
ideas. The obvious example is John Passaniti. He first attacked my use
of binary trees (symtab in the novice package) saying that hash tables
are better. I don't think that is really true, but at least it
partially makes sense. Then he went on to say that linked lists are
more efficient than my binary trees too. It became obvious at that
time that he was a complete phony.
When I read your statement that binary overlays are like JIT, I
supposed that you were a phony like Passaniti. Other than that one
weird remark however, your comments have been on the level
technically, and you haven't resorted to vulgar language --- so I'll
give you the benefit of the doubt and assume that you are a
programmer.
> With CJIT the original source (as typed by the programmer) is
> converted on-the-fly into pre-parsed source. This pre-parsed source is
> then "compiled" when needed.
> I put "compiled" in quotes because this is not the same as normal
> compilation from text source - its much simpler and faster.
> With Binary Overlays the original source is compiled into a binary
> image which is then used to overwrite part of the Forth system
> dictionary.
>
> The main difference between these two techniques is that CJIT does not
> need to be decompiled to be edited.
I don't know anything about ColorForth, and I don't really want to
either, as all of that color-syntax stuff is too far out and funky for
my taste.
Coincidentally however, the Forth that I am currently writing uses a
technique similar to what you are describing. I don't have an
assembler. I write the low-level words using a traditional assembler.
Using macros in that assembler (HLA), I generate a dictionary that
keeps track of info about the words, including the address that the
code starts and ends at. The Forth compiler pastes the low-level words
into the high-level words effectively providing inline assembly
despite the fact that I don't have an assembler available at compile-
time. The already-compiled words are like little tiny binary-overlays
that get copied into the middle of the words getting compiled later
on. It is crude, and there are limitations compared to using a Forth
assembler, but it works. My goal is to have execution speed at least
twice that of SwiftForth, and I think this is a reasonable goal.
This Forth that I described here is called ToyForth and it will mostly
be used for writing toy programs similar to what Gforth is used for
(suduko solvers, etc.). Later on ToyForth will become HostForth and be
incorporated into Straight Forth. The Straight Forth system consists
of HostForth that runs on the desktop computer and TargForth that is
the cross-compiler written in HostForth. The only program that will
ever be written in HostForth is TargForth. The users will program in
TargForth and will have minimal need to mess with HostForth which is
underneath it. HostForth doesn't have to be particularly fast
executing because applications aren't written in it, which is why I am
using such a crude compilation technique as described above. By
comparison, TargForth will use a more sophisticated compilation
technique --- it will use a Forth assembler for the micro-controller
that is being targeted and it will do analytic compilation.
I originally wanted Gforth to be my HostForth, and make TargForth an
ANS-Forth compliant program. This didn't work out. ANS-Forth has
serious problems. This is why I had to write ToyForth/HostForth myself
--- despite the fact that there are already many many x86 Forths
available. Nothing in the Forth world is any good! In the year 2012 I
have to write my own Forth from scratch using a traditional assembler,
because there really isn't anything already available that is worth
using --- this is why I say that Forth is dead.
> Best regards,
> Howerd
Best regards to you too! Good job on maintaining a civil discussion.
I don't tolerate vulgarity. Over the weekend when I was driving my cab
I had to call the police because some faggot took off his clothes and
was dancing around naked on the side of the road. I'm really sick of
this kind of thing. When Elizabeth Rather supported John Passaniti in
telling me that my code "sucks," she did the one thing that really
offends me --- I will never forgive her for that.