Re: Forth input line buffered, why?
On Mar 5, 10:44 pm, celephicus <celephi...@xxxxxxxxx> wrote:
Greetings,
Forth, whether interpreting or compiling waits for the user to type
return before starting doing it's magic. Is there a reason for this,
apart from avoiding the output getting mixed up with the input?
It is tradition. There are also nice games possible - eg.
123
dup . 1- dup [IF] >in off [THEN]
It makes also sense for situations where some custom words want to
read ahead in the input line.
I have in mind a strange implementation that tokenises while it is
accumulating input.
This is not as strange as you thing. My Forths do this since years and
emulate the buffer if in ANS mode. Since the Unix-input usually is
line by line if you did not change it, a user can still edit.
Take a look at the new Retroforths - I think they do as you want it.
Regards,
-Helmar
.
Relevant Pages
- Forth input line buffered, why?
... whether interpreting or compiling waits for the user to type ... Is there a reason for this, ... apart from avoiding the output getting mixed up with the input? ... I have in mind a strange implementation that tokenises while it is ... (comp.lang.forth) - Re: VB6 crashes after writing exe
... VB.exe to crash after compiling and writing the exe. ... Code that for some reason has a flaw that the compiler can not digest. ... the exe file. ... best thing to do is look careful at Your code and see where it could be ... (microsoft.public.vb.general.discussion) - Re: Forth input line buffered, why?
... whether interpreting or compiling waits for the user to type ... The main reason is that it's often desirable to manage the input stream while you're in it. ... I have seen implementations that compile a command line before executing it, in order to be able to use things like IF and DO in the command line, but I think executing before the user is finished typing would be very hard to get used to. ... (comp.lang.forth) - Re: stupid generics
... generic arrays', according to the PDF link Zero posted. ... compile without any unchecked warnings, ... Therefore, the reason given for avoiding generic array instantiation is pretty weak, given that it can happen easily anyway, no? ... (comp.lang.java.programmer) - Re: OpenBSD seems Much Faster Than FreeBSD -- Why?
... Not that I've got any particular reason to doubt your impressions, ... you've offered exactly zero support for claims of one being faster than ... but most operating-system code benefits from staying ... What I'm getting at, is that compiling from source is, these days, ... (comp.unix.bsd.freebsd.misc) |
|