Function editing and line editing have inconsistencies.

2020-03-12 Thread Hans-Peter Sorge

Hi,

There are two inconsistencies (and slightly annoying) when editing:

1 - is a small inconsistency when deleting lines in editor mode.

    ∇X[⎕]
[0]   X
[1]   a
[2]   b
[3]   c
[4]   d
[5]   e
[6]   f
    ∇
[7] [∆1-3]   the editor only deletes lines 1 and 2
[6] [⎕]
    ∇
[0]   X
[3]   c
[4]   d
[5]   e
[6]   f
    ∇
[7] [∆4-7]   but the editor complains, if I want to delete the last line
∇-command failed: Bad line number N in [M∆N]
[7] [∆4-6]  again last line is being excluded from delete
[6] [⎕]
    ∇
[0]   X
[3]   c
[6]   f
    ∇
[7] [∆6]    need to delete last line in an additional step.
[7] [⎕]
    ∇
[0]   X
[3]   c
    ∇

Expected: delete lines x to y including line y in [∆x-y]


2 - moving cursor to previous line(s) skips most recent entry

enter:
  123
123
  456
456

cursor up - display entry line 456
cursor up - display entry line 123
cursor down - display entry line 123
cursor down - display current entry line
cursor up - display line 123  - should be line 456

In general:
after ENTER, the cursor moves one line up
after a CURSOR move up/down, the cursor moves two lines up.
This is also true during function editing.

Expected: cursor move should be line by line.

Best Regards,
Hans-Peter


Re: Function editing and line editing have inconsistencies.

2020-03-12 Thread Blake McBride
I would suggest looking at IBM APL2 and just do what they do.

--blake


On Thu, Mar 12, 2020 at 9:42 AM Hans-Peter Sorge <
hanspeterso...@netscape.net> wrote:

> Hi,
>
> There are two inconsistencies (and slightly annoying) when editing:
>
> 1 - is a small inconsistency when deleting lines in editor mode.
>
>  ∇X[⎕]
> [0]   X
> [1]   a
> [2]   b
> [3]   c
> [4]   d
> [5]   e
> [6]   f
>  ∇
> [7] [∆1-3]   the editor only deletes lines 1 and 2
> [6] [⎕]
>  ∇
> [0]   X
> [3]   c
> [4]   d
> [5]   e
> [6]   f
>  ∇
> [7] [∆4-7]   but the editor complains, if I want to delete the last line
> ∇-command failed: Bad line number N in [M∆N]
> [7] [∆4-6]  again last line is being excluded from delete
> [6] [⎕]
>  ∇
> [0]   X
> [3]   c
> [6]   f
>  ∇
> [7] [∆6]need to delete last line in an additional step.
> [7] [⎕]
>  ∇
> [0]   X
> [3]   c
>  ∇
>
> Expected: delete lines x to y including line y in [∆x-y]
>
>
> 2 - moving cursor to previous line(s) skips most recent entry
>
> enter:
>123
> 123
>456
> 456
>
> cursor up - display entry line 456
> cursor up - display entry line 123
> cursor down - display entry line 123
> cursor down - display current entry line
> cursor up - display line 123  - should be line 456
>
> In general:
> after ENTER, the cursor moves one line up
> after a CURSOR move up/down, the cursor moves two lines up.
> This is also true during function editing.
>
> Expected: cursor move should be line by line.
>
> Best Regards,
> Hans-Peter
>


Fwd: Re: Function editing and line editing have inconsistencies.

2020-03-12 Thread Hans-Peter Sorge




 Weitergeleitete Nachricht 
Betreff:Re: Function editing and line editing have inconsistencies.
Datum:  Thu, 12 Mar 2020 19:04:38 +0100
Von:Hans-Peter Sorge 
An: Blake McBride 



I'd like it that way.

In IBM APL2 you can do full screen editing. But in Gnu-APL only line 
editing can be done.


I think it would be a rather big change to the terminal functionality to 
make it work like IBM APL2.


I did use emacs / M-x shell. This can handle screen editing of any line 
(input and output).

However the original line being edited gets echoed too and
  as more than one line can be edited only the most recent line which 
was edited gets echoed,

  and any other line that was edited too, remains as is.
In IBM-APL2, any line changed will become an input line.

Best Regards,
Hans-Peter


Am 12.03.20 um 15:57 schrieb Blake McBride:

I would suggest looking at IBM APL2 and just do what they do.

--blake


On Thu, Mar 12, 2020 at 9:42 AM Hans-Peter Sorge 
mailto:hanspeterso...@netscape.net>> wrote:


Hi,

There are two inconsistencies (and slightly annoying) when editing:

1 - is a small inconsistency when deleting lines in editor mode.

 ∇X[⎕]
[0]   X
[1]   a
[2]   b
[3]   c
[4]   d
[5]   e
[6]   f
 ∇
[7] [∆1-3]   the editor only deletes lines 1 and 2
[6] [⎕]
 ∇
[0]   X
[3]   c
[4]   d
[5]   e
[6]   f
 ∇
[7] [∆4-7]   but the editor complains, if I want to delete the
last line
∇-command failed: Bad line number N in [M∆N]
[7] [∆4-6]  again last line is being excluded from delete
[6] [⎕]
 ∇
[0]   X
[3]   c
[6]   f
 ∇
[7] [∆6]    need to delete last line in an additional step.
[7] [⎕]
 ∇
[0]   X
[3]   c
 ∇

Expected: delete lines x to y including line y in [∆x-y]


2 - moving cursor to previous line(s) skips most recent entry

enter:
   123
123
   456
456

cursor up - display entry line 456
cursor up - display entry line 123
cursor down - display entry line 123
cursor down - display current entry line
cursor up - display line 123  - should be line 456

In general:
after ENTER, the cursor moves one line up
after a CURSOR move up/down, the cursor moves two lines up.
This is also true during function editing.

Expected: cursor move should be line by line.

Best Regards,
Hans-Peter





Re: Re: Function editing and line editing have inconsistencies.

2020-03-12 Thread Blake McBride
First, in addition to any full screen editor IBM APL2 has, it has the
regular line editing standard with APL too.

Second, I am not suggesting the GNU APL add a screen editing capability.

Third, I went into IBM APL2 and confirmed both errors reported by
Hans-Peter.  GNU APL is in error here.

Thanks.

Blake McBride


On Thu, Mar 12, 2020 at 1:05 PM Hans-Peter Sorge <
hanspeterso...@netscape.net> wrote:

>
>
>
>  Weitergeleitete Nachricht 
> Betreff: Re: Function editing and line editing have inconsistencies.
> Datum: Thu, 12 Mar 2020 19:04:38 +0100
> Von: Hans-Peter Sorge 
> 
> An: Blake McBride  
>
> I'd like it that way.
>
> In IBM APL2 you can do full screen editing. But in Gnu-APL only line
> editing can be done.
>
> I think it would be a rather big change to the terminal functionality to
> make it work like IBM APL2.
>
> I did use emacs / M-x shell. This can handle screen editing of any line
> (input and output).
> However the original line being edited gets echoed too and
>   as more than one line can be edited only the most recent line which was
> edited gets echoed,
>   and any other line that was edited too, remains as is.
> In IBM-APL2, any line changed will become an input line.
>
> Best Regards,
> Hans-Peter
>
>
> Am 12.03.20 um 15:57 schrieb Blake McBride:
>
> I would suggest looking at IBM APL2 and just do what they do.
>
> --blake
>
>
> On Thu, Mar 12, 2020 at 9:42 AM Hans-Peter Sorge <
> hanspeterso...@netscape.net> wrote:
>
>> Hi,
>>
>> There are two inconsistencies (and slightly annoying) when editing:
>>
>> 1 - is a small inconsistency when deleting lines in editor mode.
>>
>>  ∇X[⎕]
>> [0]   X
>> [1]   a
>> [2]   b
>> [3]   c
>> [4]   d
>> [5]   e
>> [6]   f
>>  ∇
>> [7] [∆1-3]   the editor only deletes lines 1 and 2
>> [6] [⎕]
>>  ∇
>> [0]   X
>> [3]   c
>> [4]   d
>> [5]   e
>> [6]   f
>>  ∇
>> [7] [∆4-7]   but the editor complains, if I want to delete the last line
>> ∇-command failed: Bad line number N in [M∆N]
>> [7] [∆4-6]  again last line is being excluded from delete
>> [6] [⎕]
>>  ∇
>> [0]   X
>> [3]   c
>> [6]   f
>>  ∇
>> [7] [∆6]need to delete last line in an additional step.
>> [7] [⎕]
>>  ∇
>> [0]   X
>> [3]   c
>>  ∇
>>
>> Expected: delete lines x to y including line y in [∆x-y]
>>
>>
>> 2 - moving cursor to previous line(s) skips most recent entry
>>
>> enter:
>>123
>> 123
>>456
>> 456
>>
>> cursor up - display entry line 456
>> cursor up - display entry line 123
>> cursor down - display entry line 123
>> cursor down - display current entry line
>> cursor up - display line 123  - should be line 456
>>
>> In general:
>> after ENTER, the cursor moves one line up
>> after a CURSOR move up/down, the cursor moves two lines up.
>> This is also true during function editing.
>>
>> Expected: cursor move should be line by line.
>>
>> Best Regards,
>> Hans-Peter
>>
>
>


Re: Fwd: Re: Function editing and line editing have inconsistencies.

2020-03-12 Thread Alexey Veretennikov
If you use Emacs, you would be happy to know that Elias Mårtenson has
implemented fantastic mode for GNU APL:
https://github.com/lokedhs/gnu-apl-mode

It makes working with GNU APL a pleasure and removes the necessity of the
full screen editing.

Br,
/Alexey


Hans-Peter Sorge  writes:

>  Weitergeleitete Nachricht  
>
>  Betreff:   Re: Function editing and line editing have  
>inconsistencies.  
>  Datum:   Thu, 12 Mar 2020 19:04:38 +0100  
>  Von:   Hans-Peter Sorge   
>  An:   Blake McBride   
>
> I'd like it that way.
>
> In IBM APL2 you can do full screen editing. But in Gnu-APL only line editing 
> can be done.
>
> I think it would be a rather big change to the terminal functionality to make 
> it work like IBM
> APL2.
>
> I did use emacs / M-x shell. This can handle screen editing of any line 
> (input and output).
> However the original line being edited gets echoed too and
>   as more than one line can be edited only the most recent line which was 
> edited gets
> echoed,
>   and any other line that was edited too, remains as is.
> In IBM-APL2, any line changed will become an input line.
>
> Best Regards,
> Hans-Peter
> 
>
> Am 12.03.20 um 15:57 schrieb Blake McBride:
>
>  I would suggest looking at IBM APL2 and just do what they do. 
>
>  --blake
>
>  On Thu, Mar 12, 2020 at 9:42 AM Hans-Peter Sorge 
> 
>  wrote:
>
>  Hi,
>
>  There are two inconsistencies (and slightly annoying) when editing:
>
>  1 - is a small inconsistency when deleting lines in editor mode.
>
>   ∇X[⎕]
>  [0]   X
>  [1]   a
>  [2]   b
>  [3]   c
>  [4]   d
>  [5]   e
>  [6]   f
>   ∇
>  [7] [∆1-3]   the editor only deletes lines 1 and 2
>  [6] [⎕]
>   ∇
>  [0]   X
>  [3]   c
>  [4]   d
>  [5]   e
>  [6]   f
>   ∇
>  [7] [∆4-7]   but the editor complains, if I want to delete the last line
>  ∇-command failed: Bad line number N in [M∆N]
>  [7] [∆4-6]  again last line is being excluded from delete
>  [6] [⎕]
>   ∇
>  [0]   X
>  [3]   c
>  [6]   f
>   ∇
>  [7] [∆6]need to delete last line in an additional step.
>  [7] [⎕]
>   ∇
>  [0]   X
>  [3]   c
>   ∇
>
>  Expected: delete lines x to y including line y in [∆x-y]
>
>  2 - moving cursor to previous line(s) skips most recent entry
>
>  enter:
> 123
>  123
> 456
>  456
>
>  cursor up - display entry line 456
>  cursor up - display entry line 123
>  cursor down - display entry line 123
>  cursor down - display current entry line
>  cursor up - display line 123  - should be line 456
>
>  In general:
>  after ENTER, the cursor moves one line up
>  after a CURSOR move up/down, the cursor moves two lines up.
>  This is also true during function editing.
>
>  Expected: cursor move should be line by line.
>
>  Best Regards,
>  Hans-Peter
>

-- 
Br,
/Alexey



Re: Fwd: Re: Function editing and line editing have inconsistencies.

2020-03-12 Thread Blake McBride
Or ...  I wrote a portable APL-only editor available at
https://github.com/blakemcbride/APLEditor


On Thu, Mar 12, 2020 at 3:00 PM Alexey Veretennikov <
alexey.veretenni...@gmail.com> wrote:

> If you use Emacs, you would be happy to know that Elias Mårtenson has
> implemented fantastic mode for GNU APL:
> https://github.com/lokedhs/gnu-apl-mode
>
> It makes working with GNU APL a pleasure and removes the necessity of the
> full screen editing.
>
> Br,
> /Alexey
>
>
> Hans-Peter Sorge  writes:
>
> >  Weitergeleitete Nachricht 
> >
> >  Betreff:   Re: Function editing and line editing have
> >inconsistencies.
> >  Datum:   Thu, 12 Mar 2020 19:04:38 +0100
> >  Von:   Hans-Peter Sorge 
> >  An:   Blake McBride 
> >
> > I'd like it that way.
> >
> > In IBM APL2 you can do full screen editing. But in Gnu-APL only line
> editing can be done.
> >
> > I think it would be a rather big change to the terminal functionality to
> make it work like IBM
> > APL2.
> >
> > I did use emacs / M-x shell. This can handle screen editing of any line
> (input and output).
> > However the original line being edited gets echoed too and
> >   as more than one line can be edited only the most recent line which
> was edited gets
> > echoed,
> >   and any other line that was edited too, remains as is.
> > In IBM-APL2, any line changed will become an input line.
> >
> > Best Regards,
> > Hans-Peter
> >
> >
> > Am 12.03.20 um 15:57 schrieb Blake McBride:
> >
> >  I would suggest looking at IBM APL2 and just do what they do.
> >
> >  --blake
> >
> >  On Thu, Mar 12, 2020 at 9:42 AM Hans-Peter Sorge <
> hanspeterso...@netscape.net>
> >  wrote:
> >
> >  Hi,
> >
> >  There are two inconsistencies (and slightly annoying) when editing:
> >
> >  1 - is a small inconsistency when deleting lines in editor mode.
> >
> >   ∇X[⎕]
> >  [0]   X
> >  [1]   a
> >  [2]   b
> >  [3]   c
> >  [4]   d
> >  [5]   e
> >  [6]   f
> >   ∇
> >  [7] [∆1-3]   the editor only deletes lines 1 and 2
> >  [6] [⎕]
> >   ∇
> >  [0]   X
> >  [3]   c
> >  [4]   d
> >  [5]   e
> >  [6]   f
> >   ∇
> >  [7] [∆4-7]   but the editor complains, if I want to delete the last line
> >  ∇-command failed: Bad line number N in [M∆N]
> >  [7] [∆4-6]  again last line is being excluded from delete
> >  [6] [⎕]
> >   ∇
> >  [0]   X
> >  [3]   c
> >  [6]   f
> >   ∇
> >  [7] [∆6]need to delete last line in an additional step.
> >  [7] [⎕]
> >   ∇
> >  [0]   X
> >  [3]   c
> >   ∇
> >
> >  Expected: delete lines x to y including line y in [∆x-y]
> >
> >  2 - moving cursor to previous line(s) skips most recent entry
> >
> >  enter:
> > 123
> >  123
> > 456
> >  456
> >
> >  cursor up - display entry line 456
> >  cursor up - display entry line 123
> >  cursor down - display entry line 123
> >  cursor down - display current entry line
> >  cursor up - display line 123  - should be line 456
> >
> >  In general:
> >  after ENTER, the cursor moves one line up
> >  after a CURSOR move up/down, the cursor moves two lines up.
> >  This is also true during function editing.
> >
> >  Expected: cursor move should be line by line.
> >
> >  Best Regards,
> >  Hans-Peter
> >
>
> --
> Br,
> /Alexey
>
>


bug report

2020-03-12 Thread Rowan Cannaday
Hello, receiving the following segfault when attempting to use dfn's with
all possible arguments: ⍵ ⍺ ⍹ ⍶ χ.

{⍵+1}{⍹ ⍶ χ+⍵}[1]{⍵+1} 1

===
SEGMENTATION FAULT


-- Stack trace at main.cc:88

0x7FCD8D70CBBB __libc_start_main
0x55C686DB3145  main
0x55C686F2ABC5   Workspace::immediate_execution(bool)
0x55C686E077BBCommand::process_line()
0x55C686E081CA Command::do_APL_expression(UCS_string&)
0x55C686E07858  Command::finish_context()
0x55C686E113E8   Executable::execute_body() const
0x55C686EC62BCStateIndicator::run()
0x55C686E4A0D3 Prefix::reduce_statements()
0x55C686E111EC  throw_apl_error(ErrorCode, char const*)
0x55C686E110B5   Error::update_error_info(StateIndicator*)
0x55C686E118C2Executable::set_error_info(Error&, Function_PC2)
const
0x7FCD8DC23520
0x55C686DBA11B



apl --version
BUILDTAG:
-
Project:GNU APL
Version / SVN:  1.8 / 1234M
Build Date: 2020-02-25 21:08:06 UTC
Build OS:   Linux 5.4.0-2-amd64 x86_64
config.status:  'APSERVER_TRANSPORT=LINUX' 'DYNAMIC_LOG_WANTED=yes'
'MAX_RANK_WANTED=5' '--with-postgresql=yes' '--with-sqlite=yes'
Archive SVN:1161

Cheers,
- Rowan