Re: About interactivity.



helmwo@xxxxxxxxx wrote:
How important is interactivity for you on a desktop Forth system?

I'm curious, my working scheme on a desktop-computer is:

1) write/edit source (resulting in an ASCII-file)
2) startup Forth
3) do some interactive tests
4) end Forth
5) go to 1)

So I need a very low level of interactivity. For example my Forth does
not need to prevent itself from crashing and forcing the command
prompt to not go away in such a case. I also do not do the source
writing work inside the system - I do this in my favourite editor.

The pattern most of us at FORTH, Inc. is to keep both SwiftForth or SwiftX (our cross-compiler for microcontrollers) *and* our favorite editor open all the time. If we're working in SwiftX, we maintain a live cross-target link (XTL) to the target at all times, so when we type target commands in the command window they're executed on the target. The system mirrors the host's and target's data stacks.

In the Forth command window, we may type phrases or enter simple definitions to explore -- try out a concept, probe a new piece of hardware, etc. In the editor, we do more extensive editing.

We can copy/paste definitions back and forth between Forth and the editor. From Forth, we can LOCATE a compiled definition and see its source (from the file, displayed in the command window along with any comments), or EDIT a command which switches to the editor with the command's file open and the cursor positioned at its definition. Or, we can do a cross-reference on a command, which displays the source for all uses of the command in currently compiled code, and you can click on any of those to switch to the editor and see the source file positioned to that place.

We can also save the command window or the commands we type to a file. This is very useful in debugging (to see the exact sequence of operations before an error) and to generate saved test procedures.

So, our level of interaction is extensive, and we wouldn't give it up for anything!

So how do you this? I know there are block editor workers - I even use
one (one!) screen sometimes to do point 3), but it's more or less
useless for me in most cases.

We haven't used a block editor for 10 years.

I also do not have much use for MARKER or restarting the system or
CATCHing a THROW on command prompt (this causes to exit the system in
all my systems).

We use CATCH/THROW extensively. Error recovery virtually never requires the system to exit, although the standard response message offers a "restart" option.

And, although we rarely have multiple levels of MARKERs, it is sometimes helpful to be able to be able to return to a preset state without closing and relaunching Forth altogether, because it preserves the previous command window (so we can see what we've been doing) as well as whatever options we've set. We can always return to the system's state right after launch without re-launching.

Hope this is helpful.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
.



Relevant Pages

  • bringing ee up to date
    ... -is a simple screen oriented text editor. ... +.\" To format this reference page, use the command: ... -Turn off display of information window at top of terminal. ... -.Ss "Control keys" ...
    (freebsd-hackers)
  • Re: Embedded Basic interpreter recommendations?
    ... Editing source code and interactivity is orthogonal. ... A more modern approach would be GUI, but with an additional command line ... have an additional text editor and you can hit "compile" to compile the ... you can inspect methods and open them in an editor. ...
    (comp.arch.embedded)
  • Re: Typography
    ... Sounds more to me as if there wasn't a straightforward LaTeX ... which editor to use. ... There never would have been one standard - obviously. ... old command line stuff had had its day. ...
    (uk.comp.sys.mac)
  • Re: Difference between VC++ and UNIX
    ... grammar that describes how you interact with the editor. ... One way to think of this is that every command you can give the editor ... if I type C-x in emacs, that puts me in a state where typing "u" ... will be in a state where a keypress inserts the literal character. ...
    (comp.programming)
  • vi editor FAQ (Frequently Asked Question List), Part 2/2
    ... has the UCB distribution of vi, and lots of useful macros. ... m0 is the ex command to move the line to line 0. ... Swap character and one vertically above: ... A non-visual editor under Unix. ...
    (comp.unix.questions)