Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #58418

Re: how to create standalone EXE from inside forth with actual working environment (in forth or c)

Subject Re: how to create standalone EXE from inside forth with actual working environment (in forth or c)
References <332b84e4-3e3d-426c-9a27-42b25b9979a5@googlegroups.com> <o2coqg$o7l$1@dont-email.me> <oe1sa7$50t$1@cherry.spenarnc.xs4all.nl> <oe2jbs$6bp$1@dont-email.me> <oe4d3v$f9o$1@cherry.spenarnc.xs4all.nl>
Newsgroups comp.lang.forth
From "Elizabeth D. Rather" <erather@forth.com>
Organization FORTH, Inc.
Date 2017-04-30 09:35 -1000
Message-ID <1vudncEPIInuoZvEnZ2dnUU7-IPNnZ2d@supernews.com> (permalink)

Show all headers | View raw


On 4/30/17 12:09 AM, Albert van der Horst wrote:
> In article <oe2jbs$6bp$1@dont-email.me>, Alex  <alex@rivadpm.com> wrote:
>> On 4/29/2017 12:09, Albert van der Horst wrote:
>>> In article <o2coqg$o7l$1@dont-email.me>, Alex  <alex@rivadpm.com> wrote:
>>>> On 12/8/2016 15:58, Anton Ertl wrote:
>>>>> Alex <alex@rivadpm.com> writes:
>>>>
>>>>>
>>>>>> . Error recovery may not work correctly on the saved EXE.
>>>>>
>>>>> What do you mean with that?
>>>>>
>>>>
>>>> Exception handling may change the environment of the system between an
>>>> initialisation and the point where it's saved; but when the saved EXE is
>>>> run, everything the system manages returns to the initialisation state
>>>> (qv file handles). Under Windows, automated guard page exceptions to
>>>> change reservations to allocations on the stack are one where the
>>>> application programmer has no control.
>>>
>>> The proper exception handling for an application program is
>>> to have all foreseen exceptions caught and consider all unforeseen
>>> exceptions fatal. Fatal exceptions should abort the application,
>>> not fall into the QUIT interpreter loop.  1]
>>
>> Well, of course, since by definition fatal errors are fatal, but not all
>> unforeseen errors can be expected to be fatal and abort; since that
>> would make a development environment very difficult indeed.
>>
>> Re-entering QUIT allows the application to be debugged.
>
> No it doesn't. A real application cannot be expected to be debugged
> by a user.
> On division by zero, MS-Windows sees that the program has crashed
> and suggest to the user to send a message to the maker of the
> program to the effect that there is a severe defect.

An application that is to be released to "real world" users should be 
debugged thoroughly before being released. It certainly shouldn't have 
bugs that allow dividing by zero or other fatal errors. During 
development, errors need to be handled in such a way as to facilitate 
debugging.

>>> This is what is built in into the -c (compile) option of ciforth).
>>> Assuming the user of an application can do some useful error
>>> recovery within Forth is in general invalid.
>>
>> I respectfully disagree; for example, division by zero.
>
> What kind of applications do you have in mind?
> I think of a demonstration of midi voices where the user can select
> the midi voice to play "mary had a little lamb" on.
>
>>>
>>> This is not to say that special situations may not arise.
>>> The application may be geared towards very knowledgeable users, or
>>> a turnkey control system may be designed to do a warm start
>>> with as little danger as possible.
>>
>> Yes. WF32 does have a mechanism for this; there's a sequence that does
>> initialization which can then call the end user's application. The
>> default application is to have QUIT executed.
>
> So you don't deal in applications where the user need not be
> aware that it is written in Forth?

We certainly do. We test them pretty intensively before they're 
released. Most do not have an end-user interface that works at the QUIT 
level, though. That's mainly for debugging.


>>>> --
>>>> Alex
>>>
>>> Groetjes Albert
>>>
>>> 1] This might even be a security leak.
>>
>> I doubt it; one could consider the entire Forth system as a security
>> leak in that case.
>
> We don't disagree. Having Forth at disposal is a security leak in itself.
> So in a secure application you can't have an escape into Forth,
> not even for errors that "cannot/should not occur".

In most cases, that's true. So, the summary on this issue is that error 
detecting that goes to QUIT is essential in the debugging process, but 
not relevant in a released, end-user application.

Cheers,
Elizabeth

-- 
Elizabeth D. Rather
FORTH, Inc.
6080 Center Drive, Suite 600
Los Angeles, CA  90045
USA

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-07 02:55 -0800
  Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Julian Fondren <julian.fondren@gmail.com> - 2016-12-07 03:26 -0800
    Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-07 05:31 -0800
      Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Julian Fondren <julian.fondren@gmail.com> - 2016-12-07 05:50 -0800
    Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-07 13:50 +0000
      Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com (Stephen Pelc) - 2016-12-07 20:24 +0000
        Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-07 22:05 +0000
          Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com (Stephen Pelc) - 2016-12-08 09:13 +0000
        Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2016-12-07 14:59 -1000
          Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Ron Aaron <rambamist@gmail.com> - 2016-12-08 06:50 +0200
        Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) JUERGEN <epldfpga@aol.com> - 2017-04-29 04:58 -0700
      Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-12-08 15:58 +0000
        Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-08 23:04 +0000
          Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-29 13:09 +0200
            Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2017-04-29 18:46 +0100
              Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 12:09 +0200
                Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-04-30 09:35 -1000
                Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2017-04-30 22:23 +0100
                Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-04-30 13:50 -1000
      Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com - 2017-01-02 03:59 -0800
        Re: how to create standalone EXE from inside forth with actual albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-02 15:10 +0100
        Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-01-02 07:43 -1000
      Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com - 2017-01-02 04:01 -0800
  Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-12-07 15:58 +0100
  Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-08 01:32 -0800
  Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2017-01-02 03:39 -0800

csiph-web