Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Kacper Gutowski
On Mon, Apr 11, 2016 at 5:27 AM, Elias Mårtenson wrote: > This seems similar to what GNU APL provides with the ⎕EA feature. The > problem with this (and, as far as I can tell, also with this Dyalog feature) > is that in an error handler, the original error has disappeared. If you call some functio

Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Elias Mårtenson
One option would be to have a way to install a callback that is called when a stack frame is unwound. This could be provided to the plugin API, providing the needed infrastructure to the FILE_IO module. Regards, Elias On 11 April 2016 at 15:07, Kacper Gutowski wrote: > On Mon, Apr 11, 2016 at 5

Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Juergen Sauermann
Hi, not sure what is meant by "having the ability to get suspension"? My understanding of ⎕EA and ⎕EC is that their primary purpose is to prevent suspension and instead to return to the caller. Returning to the caller implies unwinding o

Re: [Bug-apl] ⎕SQQ

2016-04-11 Thread Juergen Sauermann
Hi Kacper, thanks, fxed in *SVN 719*. /// Jürgen On 04/10/2016 03:43 AM, Kacper Gutowski wrote: Hi, Currently GNU APL doesn't know what ⎕SVQ is because it became ⎕SQQ due to typo back in r625. ⎕SVQ'' VALUE ERROR ⎕ SVQ '' Amusingly: ⎕SQQ SYNTAX ERROR ⎕SVQ

Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Elias Mårtenson
In Lisp, the stack is not unwound until until after the handler has had the opportunity to run. This means that all local state of the failed function is still available to the handler. Would this make sense to implement in GNU APL too? On 11 Apr 2016 23:26, "Juergen Sauermann" wrote: > Hi, > >

Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Juergen Sauermann
Hi Elias, what is a handler in this context? In the cases of ⎕EC and ⎕EA the behavior is defined so that they unwind the stack when an error has occurred and return some information regarding the error to the caller. APL execution always

Re: [Bug-apl] Error handling and IO

2016-04-11 Thread Kacper Gutowski
If I understand correctly, Elias wants to have something that would ensure that every file opened is eventually closed (only more general so it can be applied to any external resources not only files). That is in a code similar to the following, to ensure the line 3 is always run even if there's a